Big parties need a conversation piece, and what’s better than a drink-making robot? Not only is it a good conversation starter, it also frees up the party host who would normally be the bartender. It turned out that the drink robot was a really good idea. The Mai Tai recipe presented here has the alcohol dialed back making it a good idea for a work party.

The robot is really an Arduino microprocessor (Uno version) that controls a number of pumps. A simple program allows the pumps to turn on for the required time to make a mixed drink. The machine is set to make one drink, but the programming and input switches can be changed to hold dozens of drinks. The idea here, is to get building and understand the basic concepts to make your own drink robot.

This drink robot starts with a recipe for the perfect Mai Tai drink. Since it was modified in a number of ways, I like to call this specific formula Margot’s Mai Tai, after my wife who perfected this particular recipe. There were a number of modifications (mainly the alcohol content was dialed back from three shots to a bit over one). There is a lot of potential for getting way too many people drunk at a party when all they have to do is push a button to make a drink. Also, this formula uses red grenadine and pineapple juice instead of the classic orange juice.

Making the Bot

The first step was to calibrate the pumps and see how fast they pumped liquid at 12 VDC. The motors I used were found on the Internet and cost about $5 each. Since they each draw 120 mA when pumping, I needed to use a power supply that could supply several amps to make the drink. The second design parameter was to determine how fast a drink could be reasonably made. I decided that 35 seconds was a reasonable time to wait for a drink.

The peristaltic pumps from the front.
Back of the peristaltic pumps. Note the current limiting resisters on the blue LEDs placed above the pump motors. From the front, these LEDs strobe in sequence when the machine is waiting to make a drink. When activated, the blue LEDs are used to show which pump is working.

Peristaltic pumps are used to deliver specific amounts of liquids and use a rolling ball mechanism in a section of flexible tube. These pumps are common in the food and medical industries. The smaller versions used in this project are common in the aquarium industry where they deliver chemicals to fish tanks.

The peristaltic pumps I used are able to pump 30 ml in 32 seconds. Be sure to test the delivery amount of any pump you use. I initially tested my pumps with water to get a close timing before having to adjust the times for the different liquids that had different viscosities and pumping speeds. Let’s make a time graph of the pump action:

The area of each graph represents the volume in milliliters that are pumped. The pump that pumps the rum is on for the longest amount of time since it has to pump the largest volume. This is one of the limiting factors for these small peristaltic pumps.

The submersible 12-volt pump is used for its high volume pumping speed and ability to pump pineapple pulp.

One of the limits of the small pumps was they were unable to pump the pulp in the pineapple juice. The recipe calls for 120 ml of pineapple juice with lime juice added. Since nobody wants to wait for a little pump to move this huge volume of liquid, I decided to use a submersible pump that was able to handle both pineapple pulp and had a high pumping volume. This immersion pump is also a 12 VDC pump and was easily controlled by the relay block. This pump was able to move the required 120 ml in about 3.2 seconds. I really wanted to use a larger peristaltic pump for this step but was unable to locate one locally, so I used a submersible pump that was left over from another project. Since I only had one pump that could handle pulp, I combined the lime and pineapple juices before placing the submersible pump in the reservoir. The pulp will really clog the small peristaltic pumps (This is not pulp fiction!). To prevent a syphon, the outlet of the submersible pump is kept above the surface of the juices.

Suggestion: The blue LEDs lights at the top could be upgraded to multi-colored for added effects. Due to the limited time of this set-up, I hooked up current limited blue LEDs that have a 300 ohm resister to keep them from burning out.

The resistor block is manufactured by Elegoo and has 8 Channels. It is controlled by 5-volts from the Arduino Uno. Note: to turn a relay on with this board, a control pin has to be written to a LOW value.
The simplified view of the control relay block. Two of the peristaltic pumps are controlled by the relays. Note: the Arduino pins are written LOW to turn both the relay and pump on.
The “start button” is a doorbell switch bought from a local hardware store.

I wanted to use a doorbell switch and only send two wires to it, so I removed the neon bulb in the switch and replaced it with a green LED. The problem was that when pushing the switch the logic would not be held at a high value. To get around this, I sent the logic pin to the analog read on the Arduino and triggered the drink sequence when the analog value dropped below a certain point. There are several other ways to achieve the same result. The code is a bit simple in that the doorbell switch will only trigger the drink motors when it is read at the end of the LED strobe action. I purposely kept the code simple with delays so that it would be easy to read and understand. I hope that readers will see that these pumps are easy to control and there are a number of things that can be done by pumping fluids in exact amounts besides making mixed drinks. The machine could also be used for various fluid experiments.

The computer code presented below in this article can easily be modified to deliver any drink in any strength desired. It should be noted that the device is not limited to only one drink. The design can be modified to make numerous drinks each selected by a push button.

I hope the reader will be encouraged to try and build his or her own robot. The mechanic and electronics is fairly straight forward which makes this a good project to introduce Arduino, programing, and beginning level electronics.

Code:

/*This program is DrinkRobotMaiTie and makes the spectacular

* drink Margot's Mai Tai

* and was written by

*Ted Kinsman Rochester Institute of Technology

*March 2017 emkpph@rit.edu

*12 v DC motors pump 1 oz of liquor in 32 sec.

*/

#define Rum 1 // (pump1)12VDC motor to pump rum on pin 1

#define LED8 8 // (pump1)LED to tell rum is pumping


#define Curacao 2 // (pump2) Curacao (orange) liquor connected to pin 2

#define LED9 9 // (pump2)LED to tell Curacao (orange) liquor is pumping


#define Orgeat 3 // (pump3) on pin 3

#define LED10 10 // LED above pump 3 connected to pin 10


#define Grenedine 4 // pump4 on pin 4

#define LED11 11 // LED above pump4 connected to pin 11


#define PineLime 5 //pump5 connected to pineapple and lime juice

#define LED12 12 // LED above pump5 connected to pin 12


#define doorbell 13 // trigger switch uses a doorbell

#define pump6 6 // pump 6 big submersed pump


int strobe=100; // this controls how fast the LEDs will blink in line

int sensorPin = A0; // analog read : used to tell if doorbell switch is pushed

int sensorValue = 0;  //value written to when analog value is read from doorbell


void setup()

{

pinMode(Rum, OUTPUT);

pinMode(LED8, OUTPUT);

pinMode(Curacao, OUTPUT);

pinMode(LED9, OUTPUT);

pinMode(Orgeat, OUTPUT);

pinMode(LED10, OUTPUT);

pinMode(Grenedine, OUTPUT);

pinMode(LED11, OUTPUT);

pinMode(LED12, OUTPUT);

pinMode(doorbell, INPUT);

pinMode(pump6, OUTPUT);

digitalWrite (LED8, LOW); //led 1 on

digitalWrite (Rum, HIGH); //pump 1 off

digitalWrite (LED9, LOW);

digitalWrite (Curacao, HIGH); //pump 2 off

digitalWrite (LED10, LOW);

digitalWrite (Orgeat, HIGH); //pump 3 off

digitalWrite (LED11, LOW); //pump 4 off

digitalWrite (PineLime, HIGH); //pump 4 off

digitalWrite (LED11, LOW);

digitalWrite (Grenedine, HIGH);//pump 5 off

digitalWrite (pump6, HIGH);//pump 6 off

delay(1000); // let relays settle down before running the first time.

}

void loop()   //this part of the code loops and loops forever

{

sensorValue = analogRead(sensorPin);

//this part makes the LEDs strobe to make the robot look cool

//this stops when the start button is pressed

//if bottom is pressed the LEDs show which motor is running

digitalWrite (LED8, HIGH); //turns on LED on pin 8

delay(strobe);         // controls how fast the LEDs flash

digitalWrite (LED8, LOW); //turns off LED on pin 8

delay(strobe);

digitalWrite (LED9, HIGH); //turns on LED on pin 9

delay(strobe);

digitalWrite (LED9, LOW); //turns off LED on pin 9

delay(strobe);

digitalWrite (LED10, HIGH); //turns on LED on pin 10

delay(strobe);

digitalWrite (LED10, LOW); //turns off LED on pin 10

delay(strobe);

digitalWrite (LED11, HIGH); //turns on LED on pin 11

delay(strobe);

digitalWrite (LED11, LOW); //turns off LED on pin 11

delay(strobe);

digitalWrite (LED12, HIGH); //turns on LED on pin 12

delay(strobe);

digitalWrite (LED12, LOW); //turns off LED on pin 12

delay(strobe);

sensorValue = analogRead(sensorPin);

if(sensorValue < 300){

digitalWrite (LED8, HIGH); //led 1 on

digitalWrite (Rum, LOW); //pump 1 on

digitalWrite (LED9, HIGH);

digitalWrite (Curacao, LOW); //pump 2 on

digitalWrite (LED10, HIGH);

digitalWrite (Orgeat, LOW); //pump 3 on

digitalWrite (LED11, HIGH);

digitalWrite (Grenedine, LOW);//pump 4 on

delay(8000);       // waits 8 sec to pump 1/4 oz of liquid

digitalWrite (LED10, LOW); // turns off Orgeat LED P3

digitalWrite (Orgeat, HIGH);   // turns off Orgeat pump P3

digitalWrite (LED11, LOW);   //led for pump 5 off

digitalWrite (Grenedine, HIGH); //turns off pimp 4

delay(8000);     // waits 8 sec to pump 1/4 oz of liquid

digitalWrite (Curacao, HIGH);   // turns off Curacao pump 2

digitalWrite (LED9, LOW); // turns off Curacao LED 2

// at this point the Curacao has been on for 16 sec and has pumped 1/2 oz

delay(16000);   // waits 8 sec to pump 1/4 oz of liquid

digitalWrite (LED8, LOW); //turns off pump 1 LED

digitalWrite (Rum, HIGH);   //turns off pump 1 (RUM)

digitalWrite (pump6, LOW);   //turn on pineapple pump (pump6)

//digitalWrite (PineLime, LOW); //low turns on relays to turn on pump

delay(2500); //delay 4 seconds to pump pineapple juice

digitalWrite (pump6, HIGH);     // turn off pineapple pump (pump6)

//digitalWrite (PineLime, HIGH); // turns off relays to pineapple juice

}

}