This Barbot is an open source Arduino cocktail mixing machine controlled by an app via Bluetooth. It has been designed to use 8 ingredients for making the cocktails, dispensing the correct amount from each to mix your cocktail of choice.
Cocktails can be chosen using the mobile app that connects to the Barbot via Bluetooth.
Required Parts
· 1x Arduino Uno
· 1x HC-05 Bluetooth module
· 8x 12V Food Safe Diaphragm Pump – Gikfun
· 4x L298N Motor Driver Controller
· 1x 12V Power Supply – Higher amperage is better
· 1x 16x2 LCD with I2C
· 1x DC jack
· Food Safe Tubing
· Jumper Wires
· Wood (see separate wood part list)
· Metal (if going with welding)
Required Tools· Soldering Iron
· Solder
· Wire stripper
· Drill
· Drill bit – 28mm and 10mm
· Wood glue
· Super glue
· Screws for wood
· Screws for LCD
List of 3D parts used in this project· Spout
https://github.com/ThisisTyT/Cocktail-Machine/blob/main/Funnel.stl
· LCD cover
https://github.com/ThisisTyT/Cocktail-Machine/blob/main/Front%20Cover%20v3.stl
CommunicationThe mobile app and the Barbot communicates over the Serial port using the Bluetooth module HC-05. This requires a voltage divider on the HC-05 RX pin, due to it using a 3.3v level. Connect to this device in your Bluetooth settings before opening the app.
AppI built the app using MIT App Inventor.
The source code (.aia) can be found here:
https://github.com/ThisisTyT/Cocktail-Machine/blob/main/Cocktail_Machine.aia
The.apk can be found here:
https://github.com/ThisisTyT/Cocktail-Machine/blob/main/Cocktail_Machine.apk
Additional information- These pumps might not work with thicker drinks.
- You can use Coca-Cola and other carbonated drinks with these pumps, but it will lose a little bit of carbonation.
- Wash pumps very well before and after every use, by running the cleaning command.
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#include <SoftwareSerial.h>
//defining the pins used for each drink, you can changes this depending how you connect the pumps and the drinks.
int Vodka = A0;
int Moonshine = A2;
int Whiskey = 12;
int Rum = 10;
int Sprite = 8;
int Coke = 6;
int Coffee = 4;
int Tonic = 2;
int state = 0;
int oz = 1700;
LiquidCrystal_I2C lcd(0x27, 16, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display
void setup()
{
Serial.begin(9600);
lcd.init(); //initialize the lcd
lcd.backlight(); //open the backlight
lcd.clear();
lcd.print("Starting up");
// Set pins to output pins to drive the relay boards and motors
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
pinMode(A0, OUTPUT);
pinMode(A1, OUTPUT);
pinMode(A2, OUTPUT);
pinMode(A3, OUTPUT);
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
digitalWrite(10,LOW);
digitalWrite(11,LOW);
digitalWrite(12,LOW);
digitalWrite(13,LOW);
digitalWrite(A0,LOW);
digitalWrite(A1,LOW);
digitalWrite(A2,LOW);
digitalWrite(A3,LOW);
delay(5000);
lcd.clear();
lcd.print("Ready");
}
void loop()
{
if(Serial.available() > 0){ // Checks whether data is comming from the serial port
state = Serial.read(); // Reads the data from the serial port
Serial.println(state);
}
if (state == '1') {
state = 0;
lcd.clear();
lcd.println("Cleaning ");
delay(1000);
digitalWrite(Rum, HIGH);
delay(3 * oz);
digitalWrite(Rum, LOW);
delay(1000);
digitalWrite(Vodka, HIGH);
delay(3 * oz);
digitalWrite(Vodka, LOW);
delay(1000);
digitalWrite(Moonshine, HIGH);
delay(3 * oz);
digitalWrite(Moonshine, LOW);
delay(1000);
digitalWrite(Whiskey, HIGH);
delay(3 * oz);
digitalWrite(Whiskey, LOW);
delay(1000);
digitalWrite(Sprite, HIGH);
delay(3 * oz);
digitalWrite(Sprite, LOW);
delay(1000);
digitalWrite(Coke, HIGH);
delay(3 * oz);
digitalWrite(Coke, LOW);
delay(1000);
digitalWrite(Coffee, HIGH);
delay(3 * oz);
digitalWrite(Coffee, LOW);
delay(1000);
digitalWrite(Tonic, HIGH);
delay(3 * oz);
digitalWrite(Tonic, LOW);
delay(1000);
state = 0;
lcd.clear();
lcd.println("Cleaning is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
if (state == '2') {
state = 0;
lcd.clear();
lcd.println("Priming ");
delay(1000);
digitalWrite(Rum, HIGH);
delay(.5 * oz);
digitalWrite(Rum, LOW);
delay(1000);
digitalWrite(Vodka, HIGH);
delay(.5 * oz);
digitalWrite(Vodka, LOW);
delay(1000);
digitalWrite(Moonshine, HIGH);
delay(.5 * oz);
digitalWrite(Moonshine, LOW);
delay(1000);
digitalWrite(Whiskey, HIGH);
delay(.5 * oz);
digitalWrite(Whiskey, LOW);
delay(1000);
digitalWrite(Sprite, HIGH);
delay(.5 * oz);
digitalWrite(Sprite, LOW);
delay(1000);
digitalWrite(Coke, HIGH);
delay(.5 * oz);
digitalWrite(Coke, LOW);
delay(1000);
digitalWrite(Coffee, HIGH);
delay(.5 * oz);
digitalWrite(Coffee, LOW);
delay(1000);
digitalWrite(Tonic, HIGH);
delay(.5 * oz);
digitalWrite(Tonic, LOW);
delay(1000);
state = 0;
lcd.clear();
lcd.println("Priming is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
// Cocktails:
//Vodka
//Vodka Tonic
if (state == 'a') {
state = 0;
lcd.clear();
lcd.print("Vodka Tonic in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Vodka, HIGH);
delay(1.5 * oz);
digitalWrite(Vodka, LOW);
delay(1000);
digitalWrite(Tonic, HIGH);
delay(6 * oz);
digitalWrite(Tonic, LOW);
state = 0;
lcd.clear();
lcd.print("Vodka Tonic is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Vodka Sprite
if (state == 'b') {
state = 0;
lcd.clear();
lcd.print("Vodka Sprite in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Vodka, HIGH);
delay(1.5 * oz);
digitalWrite(Vodka, LOW);
delay(1000);
digitalWrite(Sprite, HIGH);
delay(6 * oz);
digitalWrite(Sprite, LOW);
state = 0;
lcd.clear();
lcd.print("Vodka Sprite in ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//White Russian
if (state == 'c') {
state = 0;
lcd.clear();
lcd.println("White Russian in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Vodka, HIGH);
delay(1 * oz);
digitalWrite(Vodka, LOW);
delay(1000);
digitalWrite(Coffee, HIGH);
delay(2 * oz);
digitalWrite(Coffee, LOW);
state = 0;
lcd.clear();
lcd.println("White Russian is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Black Russian
if (state == 'd') {
state = 0;
lcd.clear();
lcd.println("Black Russian in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Vodka, HIGH);
delay(1 * oz);
digitalWrite(Vodka, LOW);
delay(1000);
digitalWrite(Coffee, HIGH);
delay(2 * oz);
digitalWrite(Coffee, LOW);
state = 0;
lcd.clear();
lcd.println("Black Russian is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Screwdriver
if (state == 'e') {
state = 0;
lcd.clear();
lcd.println("Screwdriver in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Vodka, HIGH);
delay(1.5 * oz);
digitalWrite(Vodka, LOW);
state = 0;
lcd.clear();
lcd.println("Screwdriver is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Mudslide
if (state == 'f') {
state = 0;
lcd.clear();
lcd.println("Mudslide in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Vodka, HIGH);
delay(1 * oz);
digitalWrite(Vodka, LOW);
delay(1000);
digitalWrite(Coffee, HIGH);
delay(1 * oz);
digitalWrite(Coffee, LOW);
state = 0;
lcd.clear();
lcd.println("Mudslide is done!");
delay(5000);
}
//Colorado Bulldog
if (state == 'g') {
state = 0;
lcd.clear();
lcd.println("Colorado Bulldog in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Vodka, HIGH);
delay(1 * oz);
digitalWrite(Vodka, LOW);
delay(1000);
digitalWrite(Coffee, HIGH);
delay(1 * oz);
digitalWrite(Coffee, LOW);
delay(1000);
digitalWrite(Coke, HIGH);
delay(2 * oz);
digitalWrite(Coke, LOW);
state = 0;
lcd.clear();
lcd.println("Colorado Bulldog is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Vodka Redbull
if (state == 'h') {
state = 0;
lcd.clear();
lcd.println("Vodka Redbull in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Vodka, HIGH);
delay(1.5 * oz);
digitalWrite(Vodka, LOW);
state = 0;
lcd.clear();
lcd.println("Vodka Redbull is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Moscow Mule
if (state == 'i') {
state = 0;
lcd.clear();
lcd.println("Moscow Mule in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Vodka, HIGH);
delay(1.5 * oz);
digitalWrite(Vodka, LOW);
state = 0;
lcd.clear();
lcd.println("Moscow Mule is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Vodka Martini
if (state == 'j') {
state = 0;
lcd.clear();
lcd.println("Vodka Martini in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Vodka, HIGH);
delay(1.5 * oz);
digitalWrite(Vodka, LOW);
state = 0;
lcd.clear();
lcd.println("Vodka Martini is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Whiskey
//Jack and Coke
if (state == 'k') {
state = 0;
lcd.clear();
lcd.println("Jack and Coke in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Whiskey, HIGH);
delay(1.5 * oz);
digitalWrite(Whiskey, LOW);
delay(1000);
digitalWrite(Coke, HIGH);
delay(6 * oz);
digitalWrite(Coke, LOW);
state = 0;
lcd.clear();
lcd.println("Jack and Coke is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//7&7
if (state == 'l') {
state = 0;
lcd.clear();
lcd.println("7 & 7 in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Whiskey, HIGH);
delay(1.5 * oz);
digitalWrite(Whiskey, LOW);
delay(1000);
digitalWrite(Sprite, HIGH);
delay(6 * oz);
digitalWrite(Sprite, LOW);
state = 0;
lcd.clear();
lcd.println("7 & 7 is done!");
delay(5000);
}
//Jack Manhattan
if (state == 'm') {
state = 0;
lcd.clear();
lcd.println("Jack Manhattan in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Whiskey, HIGH);
delay(2 * oz);
digitalWrite(Whiskey, LOW);
state = 0;
lcd.clear();
lcd.println("Jack Manhattan is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Old fashioned
if (state == 'n') {
state = 0;
lcd.clear();
lcd.println("Old fashioned in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Whiskey, HIGH);
delay(2 * oz);
digitalWrite(Whiskey, LOW);
state = 0;
lcd.clear();
lcd.println("Old fashioned is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Kentucky Mule
if (state == 'o') {
state = 0;
lcd.clear();
lcd.println("Kentucky Mule in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Whiskey, HIGH);
delay(1.5 * oz);
digitalWrite(Whiskey, LOW);
state = 0;
lcd.clear();
lcd.println("Kentucky Mule is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Whiskey Tonic
if (state == 'p') {
state = 0;
lcd.clear();
lcd.println("Whiskey Tonic in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Whiskey, HIGH);
delay(1.5 * oz);
digitalWrite(Whiskey, LOW);
delay(1000);
digitalWrite(Tonic, HIGH);
delay(6 * oz);
digitalWrite(Tonic, LOW);
state = 0;
lcd.clear();
lcd.println("Whiskey Tonic is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//On the Rocks
if (state == 'q') {
state = 0;
lcd.clear();
lcd.println("On the Rocks in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Whiskey, HIGH);
delay(1.5 * oz);
digitalWrite(Whiskey, LOW);
state = 0;
lcd.clear();
lcd.println("On the Rocks is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Jack in black
if (state == 'r') {
state = 0;
lcd.clear();
lcd.println("Jack in black in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Whiskey, HIGH);
delay(1.5 * oz);
digitalWrite(Whiskey, LOW);
delay(1000);
digitalWrite(Coke, HIGH);
delay(6 * oz);
digitalWrite(Coke, LOW);
delay(1000);
digitalWrite(Coffee, HIGH);
delay(1 * oz);
digitalWrite(Coffee, LOW);
state = 0;
lcd.clear();
lcd.println("Jack in black is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Rum
//Rum and Coke
if (state == 's') {
state = 0;
lcd.clear();
lcd.println("Rum and Coke in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Rum, HIGH);
delay(1.5 * oz);
digitalWrite(Rum, LOW);
delay(1000);
digitalWrite(Coke, HIGH);
delay(6 * oz);
digitalWrite(Coke, LOW);
state = 0;
lcd.clear();
lcd.println("Rum and Coke is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Cuba libre
if (state == 't') {
state = 0;
lcd.clear();
lcd.println("Cuba libre in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Rum, HIGH);
delay(1.5 * oz);
digitalWrite(Rum, LOW);
delay(1000);
digitalWrite(Coke, HIGH);
delay(6 * oz);
digitalWrite(Coke, LOW);
state = 0;
lcd.clear();
lcd.println("Cuba libre is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//daquiri
if (state == 'u') {
state = 0;
lcd.clear();
lcd.println("Daquiri in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Rum, HIGH);
delay(2 * oz);
digitalWrite(Rum, LOW);
state = 0;
lcd.clear();
lcd.println("Daquiri is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Rumdriver
if (state == 'v') {
state = 0;
lcd.clear();
lcd.println("Rumdriver in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Rum, HIGH);
delay(1.5 * oz);
digitalWrite(Rum, LOW);
state = 0;
lcd.clear();
lcd.println("Rumdriver is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Rum mule
if (state == 'w') {
state = 0;
lcd.clear();
lcd.println("Rum mule in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Rum, HIGH);
delay(1.5 * oz);
digitalWrite(Rum, LOW);
state = 0;
lcd.clear();
lcd.println("Rum mule is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Rum and tonic
if (state == 'x') {
state = 0;
lcd.clear();
lcd.println("Rum and Tonic in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Rum, HIGH);
delay(1.5 * oz);
digitalWrite(Rum, LOW);
delay(1000);
digitalWrite(Tonic, HIGH);
delay(6 * oz);
digitalWrite(Tonic, LOW);
state = 0;
lcd.clear();
lcd.println("Rum and Tonic is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Brass monkey
if (state == 'y') {
state = 0;
lcd.clear();
lcd.println("Brass Monkey in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Rum, HIGH);
delay(1.5 * oz);
digitalWrite(Rum, LOW);
delay(1000);
digitalWrite(Vodka, HIGH);
delay(1.5 * oz);
digitalWrite(Vodka, LOW);
state = 0;
lcd.clear();
lcd.println("Brass Monkey is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//pina colada
if (state == 'z') {
state = 0;
lcd.clear();
lcd.println("Pina Colada in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Rum, HIGH);
delay(1.5 * oz);
digitalWrite(Rum, LOW);
delay(1000);
state = 0;
lcd.clear();
lcd.println("Pina Colada is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Moonshine
//Apple Pie
if (state == 'A') {
state = 0;
lcd.clear();
lcd.println("Apple Pie in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Moonshine, HIGH);
delay(1.5 * oz);
digitalWrite(Moonshine, LOW);
delay(1000);
state = 0;
lcd.clear();
lcd.println("Apple Pie is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Dreamsicle
if (state == 'B') {
state = 0;
lcd.clear();
lcd.println("Dreamsicle in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Moonshine, HIGH);
delay(1.5 * oz);
digitalWrite(Moonshine, LOW);
delay(1000);
state = 0;
lcd.clear();
lcd.println("Dreamsicle is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Mountain Mule
if (state == 'C') {
state = 0;
lcd.clear();
lcd.println("Mountain Mule in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Moonshine, HIGH);
delay(1.5 * oz);
digitalWrite(Moonshine, LOW);
delay(1000);
state = 0;
lcd.clear();
lcd.println("Mountain Mulea is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Moonshine and Coke
if (state == 'D') {
state = 0;
lcd.clear();
lcd.println("Moonshine and Coke in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Moonshine, HIGH);
delay(1.5 * oz);
digitalWrite(Moonshine, LOW);
delay(1000);
state = 0;
lcd.clear();
lcd.println("Moonshine and Coke is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//After party
if (state == 'E') {
state = 0;
lcd.clear();
lcd.println("After Party in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Moonshine, HIGH);
delay(1.5 * oz);
digitalWrite(Moonshine, LOW);
delay(1000);
state = 0;
lcd.clear();
lcd.println("After Party is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Fire and Ice
if (state == 'F') {
state = 0;
lcd.clear();
lcd.println("Fire and Ice in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Moonshine, HIGH);
delay(1.5 * oz);
digitalWrite(Moonshine, LOW);
delay(1000);
state = 0;
lcd.clear();
lcd.println("Fire and Ice is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Foggy Morning
if (state == 'G') {
state = 0;
lcd.clear();
lcd.println("Foggy Morning in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Moonshine, HIGH);
delay(1.5 * oz);
digitalWrite(Moonshine, LOW);
delay(1000);
state = 0;
lcd.clear();
lcd.println("Foggy Morning is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
//Moonshine shandy
if (state == 'H') {
state = 0;
lcd.clear();
lcd.println("Moonshine Shandy in ");
lcd.setCursor(0,1);
lcd.print("the making");
delay(1000);
digitalWrite(Moonshine, HIGH);
delay(1.5 * oz);
digitalWrite(Moonshine, LOW);
delay(1000);
state = 0;
lcd.clear();
lcd.println("Moonshine Shandy is ");
lcd.setCursor(0,1);
lcd.print("done!");
delay(5000);
}
}
Comments