Introduction: CocktailMaker

CocktailMaker is the name of my project, the function can already be deduced from the name.

The goal is to make the cocktail that you choose on a self created website. On the website, you can find wich cocktails can be made, the history of the cocktails(how many were made). The machine Itself produces driven by pumps the cocktail that you selected on the site.With a temperature sensor, you can see on a display the temperature inside the machine. The ultrasonic sensor is used for detecting if a glass is present. Without a glass you can't produce the cocktail. The last sensor is the force sensing resistor.He will be used to measure the liquid in the bottle. When there is an error the buzzer goes off and the error code will be shown on the display.

Supplies

Microcontrollers

  • Raspberry Pi

Sensors & actuators

  • HCSR04(Ultrasonic sensor)
  • Force squary resistor
  • DS18B20(Temperature sensor)
  • LCD20x4 -I2C (Display)
  • Pump(24V)
  • Buzzer(3V3)

Case

  • Beverage crate
  • Plexiglass
  • Metal case(RPI,breadboards...)
  • Glue
  • Wires

Step 1: Installing Raspberry Pi

Before we can start at our project, we need to install and program our Raspberry Pi.

  1. Install the IMG. file on the SD card(16GB>).
  2. Plug the SD card into the Pi.
  3. Install Putty(SSH) and connect with 169.254.10.1.

Now, we start to program our Raspberry Pi.

  1. Setting up your Home network, use this command for setting it on your Pi:wpa_passphrase "YourNetwork" "YourSSID" >> /etc/wpa_supplicant/wpa_supplicant.conf .Reboot your Pi and type ifconfig. If everything is fine you will see an IP addres.
  2. After it you should change your password.Every default pi has the same password and username and that makes it easy for hackers to invade the Pi. You can do that by typing the command passwd.
  3. Install following packages that we need for future things: sudo apt install apache2 -y, sudo apt install php libapache2-mod-php -y, sudo apt install mariadb-server mariadb-client -y, sudo apt install php-mysql -y, sudo systemctl restart apache2.service, sudo apt install phpmyadmin -y .
  4. Now we need to install libraries.We use the pip3 command: pip3 install mysql-connector-python, pip3 install flask-socketio, pip3 install flask-cors, pip3 install geventpip3 install gevent-websocket .
  5. As a final step, we set our Pi enabled for one wire, spi and i2C. Use following command to enter the config file: sudo raspi-config.
  6. When you are in the file, move to Interface options and enter.
  7. You see options that you can disable or enable, We need to enable the one-wire, spi and i2C.
  8. Reboot

Step 2: Getting Things Ready

Now everything is set on our Raspberry Pi, we move on to the circuit. The best option to start is taking everything step by step but first we need to set our SSH connection on Visual Studio. This link explains how to do that: https://code.visualstudio.com/docs/remote/ssh .

  1. Connect the Pi to the circuit.
  2. Integrate the temperature into the circuit.
  3. Test the circuit.
  4. Integrate the HC SR04 into the circuit.
  5. Test the circuit.
  6. ...

Step 3: Database

After testing the components we will create a database to store data. First we need to make a connection over SSH.This link shows how we do this: https://dev.mysql.com/doc/workbench/en/wb-mysql-co... . When you're connected you can start making tables and add columns or you can import data by using "Data Import". That file includes all data and structures.

Step 4: Case

As last step, you need to make your product attractive. I used 3 cables for 12 connections instead of 36 loose wires and everything is stored in a box. After that I used a beverage crate and I sprayed it with paint to make it look new and fresh.Inside, the bottles are cooled by a fan on top of the beverage crate.I also used leds to make it look colorful inside.