Introduction: Cocktail Machine : Smartphone Controlled Arduino/Android

About: 🔩Maker Arduino Raspberry. 🇫🇷🇬🇧 🖨️3D Print and design creation ! 🖨️ ☕My STL design ; https://cults3d.com/fr/utilisateurs/diyfunproject 📲FULL WEBSITE : …

You like technology and party ? This project is made for you !

In this tutorial we will create an automated cocktail machine controlled through an android apps !

Everything for cheap price controlled by arduino

In previous instrucables the cocktail machine was taking a lot of space and could be a bit complicated to make: Here!

Step 1: What We Need:

For this project i will use 8 botlle but you can adapt easily if you want less or more.

-Arduino

-8 channel relay : each channel will be a botlle .(1channel = 1bottle)

-Wire the most important are female to male .

-8 pump the best i found so far.

-Pipe I got 10m.

-Charger

-Bluetooth module

And that's it, just need to add a box for the machine we will see that in the next step!

Step 2: The Structure

Here you can get the plan to make the machine, the software is solid works , if you are based in france this company does it for a fair price ASTC .

If you found some way to improve it please share it !

Step 3: Mounting

Here you can see the major steps for assemble everything.

There is not much to do , once i got got the case , I put the pump on a wood part then screw on the side (see picture)

I did the same for the arduino and relay i set it on a wood part then screw it on the front of the machine (see picture)

That's it you done for this part !

Step 4: Connecting the Relay/Arduino

Let's have a look how to cable everything:

The first picture show how to connect one water pump.

water pump + = RELAY water pump

Negative - = Charger 12V

I used one charger 12V 0.5A(cut the top) the negative goes to each pump (negative) and positive goes to each channel of the relay .

One charger is enough as only one pump will work at the time

Repeat this for the 8 pump.

Arduino :

Also easy you only need to connect the Digital Output to the relay (see schema) and the bluetooth module.

You can personnalize , for me it's like this :

  • whisky DO:5 Relay:5
  • Vodka DO:9 Relay:1
  • ricard DO:8 Relay:2
  • Tequila DO:7 Relay:3
  • GIN DO:6 Relay:4
  • Orange DO:2 Relay:8
  • Water DO:3 Relay:7
  • Coc DO:4 Relay:6

Step 5: The Code

Here you have the code for arduino :

So what it does is : when you will send a cocktail from the app it will send a ''number'' to the arduino.

This number is link to a cocktail wich will activate the pump link to it and done !

Important : When you upload the code don't forget to remove the bluetooth module ortherwise it won't work .

<p>char junk;<br>String inputString="";</p><p>void setup()                    // run once, when the sketch starts
{
 Serial.begin(9600);            // set the baud rate to 9600, same should be of your Serial Monitor
 
 pinMode(2, OUTPUT);
 digitalWrite(2,HIGH);
 
  pinMode(3, OUTPUT);
   digitalWrite(3,HIGH);
   
   pinMode(4, OUTPUT);
   digitalWrite(4,HIGH);
 
   pinMode(5, OUTPUT);
   digitalWrite(5,HIGH); 
   
   pinMode(6, OUTPUT);
   digitalWrite(6,HIGH);
   
   pinMode(7, OUTPUT);
   digitalWrite(7,HIGH); 
   
   pinMode(8, OUTPUT);
   digitalWrite(8,HIGH); 
   
   pinMode(9, OUTPUT);
   digitalWrite(9,HIGH); 
   
   
}void loop()
{
 
  if(Serial.available()){
  while(Serial.available())
    {
      char inChar = (char)Serial.read(); //read the input
      inputString += inChar;        //make a string of the characters coming on serial
    }
    Serial.println(inputString);
    while (Serial.available() > 0)  
    { junk = Serial.read() ; }      // clear the serial buffer
    if(inputString == "1"){         //whysky coca
            digitalWrite(5, LOW);    //whyski
      delay(1500);                  //temps distrib whisky
      digitalWrite(5, HIGH);
      delay(1500);                   //
      digitalWrite(4, LOW);           //coca
      delay(3000);                    //temps distrib coca
      digitalWrite(4, HIGH);           //
       delay(1500);
    }else if(inputString == "2"){   //wodka orange
      digitalWrite(9, LOW);          //wodka
      delay(1500);
      digitalWrite(9, HIGH);
      delay(1500);                        //
      digitalWrite(2, LOW);                //orange
      delay(3000);
      digitalWrite(2, HIGH);          //
     delay(1500);
      }else if(inputString == "3"){   //ricard eau
      digitalWrite(8, LOW);          //ricard
      delay(1500);
      digitalWrite(8, HIGH);
      delay(1500);                        //
      digitalWrite(3, LOW);                //eau
      delay(3000);
      digitalWrite(3, HIGH);          //
    delay(1500);
      }else if(inputString == "4"){   //COCA
      digitalWrite(4, LOW);          //COCA
      delay(1500);
      digitalWrite(4, HIGH);
      delay(1500);                        //
 
      }else if(inputString == "5"){   //whisky gay
      digitalWrite(5, LOW);          //whysky
      delay(1500);
      digitalWrite(5, HIGH);
      delay(1500);                        //
      digitalWrite(2, LOW);                //orange
      delay(3000);
      digitalWrite(2, HIGH);          //
    delay(1500);
      }else if(inputString == "6"){   //tequila orange
      digitalWrite(7, LOW);          //tequila
      delay(1500);
      digitalWrite(7, HIGH);
      delay(1500);                        //
      digitalWrite(2, LOW);                //orange
      delay(3000);
      digitalWrite(2, HIGH);          //
    delay(1500);
      }else if(inputString == "7"){   //gin orange
      digitalWrite(6, LOW);          //gin
      delay(1500);
      digitalWrite(6, HIGH);
      delay(1500);                        //
      digitalWrite(2, LOW);                //orange
      delay(3000);
      digitalWrite(2, HIGH);          //
      delay(1500);
//shooter
      }else if(inputString == "8"){   //whisky
      digitalWrite(5, LOW);          //whisky
      delay(1500);
      digitalWrite(5, HIGH);
     delay(1500);</p><p>      }else if(inputString == "9"){   //wodka 
      digitalWrite(9, LOW);          //wodka
      delay(1500);
      digitalWrite(9, HIGH);
     delay(1500);</p><p>      }else if(inputString == "0"){   //tequila
      digitalWrite(7, LOW);          //tequila
      delay(1500);
      digitalWrite(7, HIGH);
     delay(1500);</p><p>      }else if(inputString == "a"){   //gin
      digitalWrite(6, LOW);          //gin
      delay(1500);
      digitalWrite(6, HIGH);
      delay(1500);</p><p>      }else if(inputString == "b"){   //tgv
      digitalWrite(7, LOW);          //tequila
      delay(500);
      digitalWrite(7, HIGH);
      delay(1500);                        //
      digitalWrite(6, LOW);                //gin
      delay(500);
      digitalWrite(6, HIGH);          //
      delay(1500);
     digitalWrite(9, LOW);                //wodka
      delay(500);
      digitalWrite(9, HIGH);</p><p> //soft
      }else if(inputString == "c"){   //orange
      digitalWrite(2, LOW);          //orange
      delay(3000);
      digitalWrite(2, HIGH);</p><p>      }else if(inputString == "d"){   //eau
      digitalWrite(3, LOW);          //eau
      delay(3000);
      digitalWrite(3, HIGH);
     </p><p>      }else if(inputString == "e"){   //coca
      digitalWrite(4, LOW);          //coca
      delay(3000);
      digitalWrite(4, HIGH);</p><p>    }
    inputString = "";
  }
}</p>

Attachments

Step 6: The Android Apps

In order to control our cocktail machine with our phone, we will create an app with MIT app inventor .

Only requirement a gmail acoount. You can upload my app and modify it in the app inventor it is very easy to use but i will advice to check some tutorial before.

To be able to install the app you have to go to your phone setting (in security) allow unknown sources.

Important :
To send value from the bluetooth i used the object "send text" so it will send the number 1 / 2 etc.

You can also use the "send byte number" but it use ASCII so in order to send 1 to the arduino you need to send the value 49 Pay attention to the difference .

Step 7: Conclusion

Here we are just few steps to follow .

The most complicated part would be to create the case that fit your needs mine is a bit bigger than needed but i can stock up some botle .

You can change all the drink i used without changing the code (if you use the same quantity ) , just need to change the picture in the app !

I added Voice recognition in case someone is to "tired" to use the app !

Hope you envoy this instructables please share any idea of improvement for the next version !

Arduino Contest 2017

Participated in the
Arduino Contest 2017

Metal Contest 2017

Participated in the
Metal Contest 2017

Remote Control Contest 2017

Participated in the
Remote Control Contest 2017