Cocktail machine project for Ambient Intelligence class @ Instituto Superior Técnico, Lisbon, Portugal.
Report: Mixologist_AI_Project_Report_Group10.pdf
More information: https://fenix.tecnico.ulisboa.pt/disciplinas/AI514/2019-2020/2-semestre
Group 10
- Cup filling up to a specified weight/liquid quantity
- Beverage pouring only if a cup is present and if the cup has the needed capacity
- Cocktail making only if the quantities of the required ingredients are available
- Alerts on empty bottles / full glass
- Storage, management of recipes in a database
- Google Assistant voice control (recipe search)
- Notifications on status update
- Computation of the number of cocktails that it is possible to make with the current bottles
- Add authentication
- Add ingredients / recipes editing
This application is written in Python 3, built around the Flask framework for routing.
Data is stored in a MySQL database and can be updated using HTTP REST methods.
- Orange Pi PC or other GPIO-capable board (preferably supporting the pyA20 library to make it work right away)
- 4 (peristaltic) pumps
- 4 relays module to drive the pumps
- An Arduino
- 5 load cells modules
- 5 HX711 ADC modules
- Arduino IDE
- Python 3
- Python dependencies (flask, pymysql, flask-socketio, pyA20, spidev, pyserial, requests, pyopenssl - can be installed with the Pipfile, please read How to build)
- MySQL/MariaDB server
- IFTTT account
Default pin connections are the following:
Relay input | Orange Pi PC pin |
---|---|
1 | PA10 |
2 | PA9 |
3 | PA8 |
4 | PA7 |
HX711 # | HX711 pin | Arduino pin |
---|---|---|
1 | DOUT SCK |
4 5 |
2 | DOUT SCK |
6 7 |
3 | DOUT SCK |
8 9 |
4 | DOUT SCK |
10 11 |
5 | DOUT SCK |
12 13 |
Upload the arduino/calibration/calibration.ino sketch to your Arduino and note down the calibration value for each load cell in the provided Serial assistant.
Edit the arduino/json_read_5x/json_read_5x.ino sketch:
float calibrationValue_b1 = -420.00; // calibration value load cell 1 !!!
float calibrationValue_b2 = -418.53; // calibration value load cell 2
float calibrationValue_g = -951.84; // calibration value load cell 3
float calibrationValue_b3 = -420.80; // calibration value load cell 4
float calibrationValue_b4 = -416.38; // calibration value load cell 5
And update the values for each load cell.
Upload this sketch to your Arduino and connect it to your Orange Pi.
Create an IFTTT account on https://ifttt.com/, then enable the Google Assistant service and the Webhooks service.
Once done, note down your API key, and create two applets:
Load the init.sql file to populate your database and note down your connection settings.
Replace database, Arduino, WS2812 and IFTTT connection settings in webapp/config.ini.
If needed, replace the relay GPIO pins in webapp/Pump.py.
sudo apt install python3 python3-pip python3-dev python3-setuptools mariadb-server mariadb-client libffi-dev
pip install --user pipenv
git clone https://github.com/geckoflume/mixologist.git
cd mixologist
pipenv install
python3 webapp/app.py
The webserver is now started on https://ORANGE_PI_IP:5000/.