Automated Bartender

The goal of this project is to make the process of making/mixing cocktails easier through IoT(Internet of Things). the cocktail recipes (once entered) wil be remembered by the project. The containers for the drinks are integrated with sensors that maesures the temperature and the content of the bottle. All of the project will be controlled through a website on smartphone/computer.

Supplies:

HardWare:

- mdf wood sheet (0,5cm)

- wood screws

- 4mm inner diameter tube

- 4 plastic container

- 40 mm pvc tube

electronics:

- raspberry pi3

- 4x ultrasonic sensor (hc-sr04)

- 4x 10k ntc (waterproof)

- ADC mcp3008

- rfid scanner

- lcd screen

- 4 module relay

- 4 peristaltische pomp

- 12v dc power adapter

tools:

- tec7 transparent silicon

- drilling machine

- 3D printer

- saw

the cost of the hole project will be around 130 euros.

Step 1: Step 1 : Wiring the Electronics

Wiring:

while building the wiring of the whole project i reccomend using some longer wires for the ultrasonic sensors, the reason for this is that they need to reach each container. do the same with the relay module sinds this is going to be on the other side of the build.

Solder the pump circuit to the 12v dc adapter and connect it to the relay module. ( label the pumps so its easier to remember what pump is connected to wich relay switch, this will be handy later on in the build)

optional (this will spare work while building the whole case):

- you can label the ultrasonic sensors connected to the pins with the numbers below

- label the ntc as connected to the mcp3008

Raspberry Pi (BCM):

GPIO2(sda1/i2c) ==> relay module 1

GPIO3(scl1/i2c) ==> relay module 2

GPIO17 ==> trigger ultrasonic 1

GPIO27 ==> echo ultrasonic 1

GPIO22 ==> trigger ultrasonic 2

SPI_MOSI(GPIO10) ==> mcp3008(Din) & rfid (MOSI)

SPI_MISO(GPIO9) ==> mcp3008(Dout) & rfid (MISO)

SPI_SCLK(GPIO11) ==> mcp3008 (CLK) & rfid (CLK)

GPIO5 ==> echo ultrasonic 2

GPIO6 ==> trigger ultrasonic 2

GPIO13 ==> echo ultrasonic 3

GPIO19 ==> trigger ultrasonic 4

GPIO26 ==> echo ultrasonic 4

GPIO14(uart0_TXD) ==> relay module 3

GPIO15(uart0_RXD) ==> relay module 4

GPIO23 ==> LCD (D7)

GPIO24 ==> LCD (D6)

GPIO25 ==> rfid (RST)

SPI0_CE0(GPIO8) ==> rfid(SDA)

SPI0_CE1(GPIO7) ==> mcp3008 (CS/SHDN)

GPIO12 ==> LCD (D5)

GPIO16 ==> LCD (D4)

GPIO20 ==> LCD (E)

GPIO21 ==>LCD (RS)

Step 2: Step 2 : Configure the Raspberry Pi

config :

connect the pi to your wifi and enable the SPI in the config menu (sudo rasp-config => interfacing options => SPI => enable )

install the following packages :

- mfrc522

- RPLCD

- flask

- flask_cors

- flask_socketio

database :

install mariadb on the raspberry pi.

make a remote connection to the ssh with mysql workbench.

import the self contained file with the databaseonto the raspberrypiand make sure the user you have has all the rights to the database.


program :

below this section is a rar-file download it and extract the files within.

these filles contain the flask server and the necessary classes for the project.

transfer these files to the raspberry pi, i would recommend making a map for your user called automatic bartender, and place the filles in there

before wecan run the program you'll need to open the app.py and search for 'db = DataBase(app,"user","password","cocktails_db")'

change user and password to your mariadb username and password


website :

install an apache2 server onto the raspberry pi.

connect through filezilla.

extract the file below and you'll again need to change a few things, within the js file there are 4 .js files.

and finally transfer everything to the /var/www map on the raspberry pi with filezilla.

Step 3: Step 3 : Building the Case

The case exists of a frame made out of wood and then adding the mdf sheets.

Frame :

with the 2x1 wood planks you'll need to saw them to the right sizes.

- 6x 20cm

- 3x 49cm

- 2x 15cm

back side (frame):

take 2 pieces of the 50cm wood strip and 2 pieces of the 25cm

and make a simple rectangle. (foto)

front side(frame):

take whats left of the wood, that should be 4 pieces 25cm, 1 piec of 50cm and 2 pieces of 17,5cm

and arrange them like the following picture.

Case :

with the 0,5cm mdf sheets cut the following sizes :

main case :

- 1x 51x36cm (top)

- 1x 50x35cm (bottom)

- 2x 50x23,5cm (front & back)

- 2x 35,5x23,5cm (side panels)

indent :

-1x 19,5x19cm

-3x 10x19cm

1. take the 50x36cm for the bottom and we'll attach the back and front side of the frame to it.

2. now attach the side panels to the frame, these should be the sides without frames. (the reason we didnt do side planks for the frame is to spare space within the project).

3. now grab the front panel panels and and we'll need do make an indent and a hole on the top left for the lcd display.

indent :

- for the indent you first need to take out a rectangle from the front panel thats 18cm high by 19 cm

- then grab your 4 pieces for the indent and glue them together with some wood glue an insert in to the case.

the 19,5x19cm is the back panel for the indent.

lcd display hole :

- in the top left of the front panel you'll need to make a hole that is 7cm in lenght by 2,5cm in width

Step 4: Step 4 : Making the Containers

the lid and the container itself needs to be modified, the container needs a hole to enter the tube for pumping the water itself and a hole for the temperature sensor the lid needs 3 holes 1 for pouring the drink and another 2 for the ultrasonic sensor in each container.

container lid:

- dril 1 hole of 4,5cm on the top side of the lid

- on the bottom side 2 holes of 1,6cm with 0,8cm in between

container itself :

- you'll need ti drill 2 holes on the bottom of the container itself on the oppisite side of the container (the short sides)

- 1 of the 2 holes needs to be around 1,5 cm off of the bottom because the back side of the frame, the other one should be low to the bottom.

Step 5: Step 5 : Integrading the Electronics

1. first of we'll start bij sticking the breadboard to the left side as seen from the front.

2. next up try and place the lcd within the sawed out rectangle in the front this should be tight enough fit to hold by itself. but you can use screws if you feel the need

3. Right below the lcd you need to screw/tape the rfid scanner in place.(both will work)

4. On the right side we'll place the relay as seen in the picture and screw the pumps on the right side, with the cables for the raspberry pi going over the indent in the front.

5. Now you'll need the container with the lowest hole facing inward and insert the temperature sensors according to the numbering with bottle number 1 starting on the left going to the right. the holes with the temperature sensors needs to be waterproof so glue with the tec7.

6. insert the tubes on the other side and take a rought measurement of the lenght needed to get to the pumps and cut them. make sure to glue this to.


7. meanwhile we can insert the ultrasonic sensors and pvc tubes into the corresponding holes no glue needed they should fit quite well.

Step 6: Step 6 : Finishing Up

- get the 2 power adapters out of the back side and screw the backplate on.

- unscrew the closing caps of the pvc tubing place the top on the case itself you can screw it if you need to, but i prefer not to sinds i can acces it that way after its made.

The project is finished now, you can decorate however you want.

Share

    Recommendations

    • Sew Tough Challenge

      Sew Tough Challenge
    • Planter Challenge

      Planter Challenge
    • Stone Concrete and Cement Contest

      Stone Concrete and Cement Contest

    Discussions