An Arduino-based automated cocktail-making machine designed to dispense consistent and accurate mocktails using pumps, relays, sensors, and a simple menu-driven user interface. This project combines hardware + embedded software to automate drink preparation while preventing spills using cup detection.
- Menu-based selection using 16x2 I2C LCD
- Two-button navigation system (Next / Select)
- Supports multiple flavors
- Supports different drink sizes
- Ultrasonic cup detection (prevents dispensing without a cup)
- Relay-controlled water pumps
- Visual LED indicator for cup detection
- Consistent dispensing using timed pump control
- User powers on the system
- Selects flavor
- Selects drink size
- System checks for cup presence
- Dispenses ingredients automatically
- Displays completion message
- Returns to main menu
| Component | Description |
|---|---|
| Arduino UNO R3 | Main microcontroller |
| 6V–12V DC Water Pumps | For liquid dispensing |
| 4-Channel Relay Module | Controls pumps |
| HC-SR04 Ultrasonic Distance Sensor | Detects cup presence |
| 16x2 LCD Display with I2C Adapter | User interface display |
| Push Buttons (Next / Select) | Navigation input |
| 12V 2A SMPS Power Supply | Powers pumps and system |
| Buck Converter (12V → 5V) | Steps down voltage for Arduino |
| Silicone Tubes | Liquid channels |
| LED Indicator | Visual cup detection feedback |
- Arduino IDE
- C / C++ (Embedded)
LiquidCrystal_I2CLibrary
| Component | Arduino Pin |
|---|---|
| Next Button | D13 |
| Select Button | D12 |
| Relay 1 (Sprite) | D5 |
| Relay 2 (Apple) | D6 |
| Relay 3 (Strawberry/Guava) | D7 |
| Ultrasonic Trigger | D9 |
| Ultrasonic Echo | D10 |
| Cup Detection LED | D8 |
- Debounced buttons using
millis() - Medium press → cycle options
- Long press → confirm selection
- Cup detection threshold: ≤ 10 cm
- Safety lock: dispensing only starts if cup is detected
- Clone this repository
- Open
src/cocktail_maker.inoin Arduino IDE - Install required libraries
- Upload to Arduino UNO
- Power the system
- Select flavor & size
- Place cup and enjoy 🍹
Developed as part of:
IT1040 – Fundamentals of Computing
Sri Lanka Institute of Information Technology (SLIIT)
Year 1, Semester 1
This project is licensed under the MIT License – feel free to use and modify with attribution.
