BrewBuddy


Introduction: BrewBuddy – Never drink cold coffee again
BrewBuddy is a smart IoT system that takes your coffee experience to the next level. The cup holder continuously monitors your coffee’s temperature, cools or heats it as needed, and notifies you when it’s perfect to drink.
Through a user-friendly web interface, you can track your coffee habits, and set personal preferences.
Perfect for coffee lovers, students, remote workers, and tech enthusiasts. In this Instructable, I’ll show you how to build your own BrewBuddy – from hardware to software.
Supplies
To build your own BrewBuddy, you’ll need the following components:
Core Components
- Raspberry Pi (with Wi-Fi)
- Extra power supply (that can handle both 3.3V and 5V)
- Micro SD Card (min. 16 GB for Raspberry Pi OS)
- Power Supply for Raspberry Pi (5V, 2.5A or higher)
Sensors
- Infrared Temperature Sensor – to measure the coffee temperature
- Load Cell + HX711 Amplifier – to detect cup presence and remaining coffee amount
- RFID Module + Tags – to identify users and their preferences
Actuators
- PTC Ceramic Heater – to warm up coffee
- 5V Fan – to cool down coffee
- Buzzer – for audio alerts
- RGB LED – to indicate coffee status (too hot / perfect / cooling)
Display
- 16x2 LCD Display (I2C) – to show status messages and IP address
Electronics & Wiring
- Jumper wires (male/female)
- Breadboard (for prototyping)
- Resistors, capacitors (as needed)
- Transistors or MOSFETs (for controlling fan/heater)
- Dupont connectors
- Heat shrink tubing or electrical tape
Software & Services
- Raspberry Pi OS (Lite or Full)
- Python (for backend and sensor control)
- Fast API (for the web interface)
- SQLite or MySQL (for database)
Enclosure
- 3D printed smart cup holder (custom design for sensors & electronics)
- Laser-cut enclosure (custom design for sensors, Raspberry Pi, and display)
- Coffee mug (compatible with the holder)
Downloads
Gather All Components
Make sure you have all supplies ready (see supplies list). This includes your Raspberry Pi, sensors (IR, load cell, RFID), actuators (heater, fan, buzzer, RGB LED), and your display.
💡 Tip 1: Have a breadboard and jumper wires ready for prototyping and testing each component.
💡 Tip 2: Label your jumper wires and print a pinout diagram of your Pi — saves time later!
Hardware:
- Raspberry Pi 3B+ / 4
- Load cell + HX711 module (for cup weight sensing)
- Infrared (IR) sensor (to detect temp)
- RFID reader + tags (to load user profiles)
- Heater element (ceramic or PTC)
- Mini cooling fan
- RGB LED
- Button
- 16x2 LCD display (I2C)
Tools:
- Breadboard & jumper wires
- Soldering iron (optional)
- 3D printer or laser cutter (for the case)
Connect the Electronics

- Wire the sensors and actuators to the Raspberry Pi (or Arduino if you're using one as a secondary controller).
- Use transistors/MOSFETs if needed to control high-power components like the heater or fan.
- Connect the load cell via HX711 to the Pi.
- Wire the LCD (I2C) to SDA/SCL.
- Use proper voltage levels: 5V for actuators, 3.3V for GPIO logic.
⚠️ Make sure to use MOSFETs or transistors for actuators like the heater or fan.
🔌 If using 5V components, level-shift where needed to protect GPIOs.
🛠️ Test each component individually before integrating.
Flash the Raspberry Pi & Set Up the Software
Pre-Installation: update RPi firmware
Use Raspberry Pi Imager to write an EEPROM update image to a spare SD card. Select Misc utility images under the Operating System tab. (See: rpi-eeprom)
So you can create a special Micro SD card to update your RPi's firmware. Do this before you have written away the start image, or you will have to write the image again.
Installation
Download the image -> Download THIS on youre computer
- ⚠ Unzip the file ⚠
- Place the file on an SD card of at least 8GB (16GB) using Win32 Imager or Balena Etcher.
- After the image is written, you can remove the SD card and insert it into your Pi.
Pi pairing
- Boot your Pi.
- Connect the Pi to your computer with a network cable and make an SSH connection in Putty to 192.168.168.169 for the user student with the password P@ssw0rd
- PLEASE NOTE: The image is created in AZERTY, should you connect directly via keyboard.
Prepare Pi for further use
- After logging in you first have to set a new password for student user
- ssh student@192.168.168.169 ; current password P@ssw0rd ; new password and confirm
- log in again with new password
- REBOOT the Pi (This can take a few minutes again)
- ATTENTION: all buses are still deactivated. Do not forget to activate them via Pi-config
- SSH and VNC are already activated.
Set Up the Database

BrewBuddy uses a lightweight SQLite database to store coffee sessions, user preferences, and system actions. While the .db or .sql file isn’t provided directly, you can easily recreate the structure using the Entity Relationship Diagram (ERD) below.
Launch the FastAPI Web Interface
Create a venv and install the requirements.txt in it
Place the code from this GitHub link into your workspace, keeping the structure as shown in the link. If you’ve configured everything properly, the code should run without issues.
The link: https://github.com/howest-mct/2024-2025-projectone-mct-LelongCeline.git
Test & Calibrate the System
- Place a cup → load cell registers weight
- Scan RFID tag → user preferences loaded
- Temp sensor tracks heat → fan or heater adjusts as needed
- RGB LED shows color based on drink status
- Buzzer alerts you if coffee is too cold or too hot
🧪 Calibrate load cell using included functions like tare() and calibrate() in your code.
Build the Enclosure
- Ensure cutouts for:
- The cup holder
- Load cell and IR sensor
- LCD and LED
- Cooling vents (for fan and heater)
- Mount all components using brackets or standoffs
- Laser-cut or 3D print the enclosure parts.
- Make sure there are cutouts for the cup, sensors (IR, load cell), RGB LED, and screen.
- Mount all components securely inside the housing.
Optional: Add rubber pads or insulation to reduce vibrations from the fan
Troubleshooting Tips
Issue Solution
LCD not showing text -> Check I2C address with i2cdetect -y 1
Load cell returns 0 -> Verify DT/CLK pins and proper 5V supply
FastAPI returns 500 error -> Ensure brewbuddy.db exists & has correct perms
RFID reader not responding -> Enable SPI and use correct driver
Fan doesn’t activate -> Check MOSFET wiring and GPIO output logic
Final Assembly
- Secure all parts inside the case
- Route and label all wires neatly
- Use hot glue or screws for strain relief
- Power up your Pi using a stable USB-C supply