K-Fee: The Connected Coffee Machine โ๏ธ๐ค
A web-controlled coffee brewing system that combines IoT hardware with full-stack development
๐ View on Hackster.io
๐ง GitHub Repository
Project Overview
We reengineered a standard coffee machine into a smart brewing system controllable via web interface. Users can:
- Customize sugar levels (1-5 cubes)
- Select cup size (S/M/L)
- Create/save custom recipes
- Schedule automatic brewing
- Monitor ingredient levels in real-time
Homepage of the connected coffee machine web interface
Technical Breakdown ๐ ๏ธ
Hardware Architecture
- Brain: Raspberry Pi 3B+ (MQTT broker/server) + ESP32 (sensor/motor control)
- Sensing Suite:
- VL53L0X time-of-flight sensors (ingredient level monitoring)
- Capacitive proximity sensor (cup detection)
- Water level sensor
- Actuation System:
- NEMA 14 stepper motors with custom 3D-printed augers
- L298N motor drivers
- Grove Relay for 230V kettle control
- Safety: Red LEGO-enclosed high voltage compartment
Software Stack
- Web Interface (Python/Flask):
- Recipe database (SQLite)
- Scheduled brewing system
- Real-time machine status dashboard
- MQTT Communication (Mosquitto):
- Website โ Raspberry Pi โ ESP32
- JSON payloads for brewing parameters
- Firmware (C++/Arduino):
- Sensor data acquisition
- Motor control algorithms
- Safety interlocks
Development Challenges ๐ง
- High Voltage Handling: Safely controlling 230V kettle with ESP32
- Material Flow: Designing 3D-printed augers for consistent sugar/coffee dispensing
- Sensor Fusion: Combining multiple sensing modalities for reliable operation
- Real-time Sync: Ensuring <500ms latency between web request and machine start
Lessons Learned ๐
- Team Collaboration: Coordinating between 4 developers across hardware/software
- Iterative Design: 7 versions of 3D-printed augers to prevent ingredient clumping
- Safety First: Implementing multiple failsafes for high-voltage components
- User Experience: Balancing technical complexity with intuitive web interface
Project Gallery ๐ธ
Architecture overview showing MQTT communication flow
Team Insights ๐ก
โWell the coffee wasnโt that good, in fact there was too much sugar for not enough coffee, but it was a fun project to work on.โ
Ready to brew?
๐ Full tutorial on Hackster.io
๐จ๐ป Explore the codebase