Robotic Bartender - Arduino Based




Introduction: Robotic Bartender - Arduino Based

Please VOTE if you enjoy it!

This is my first Instructable. Constructive criticism is welcomed!


This is a guide on how I built a robotic bartender prototype based on the Arduino UNO. This is both my first Instructable and Arduino project. Since building this, I have come across a few other projects that have surfaced that are similar in design to mine, which are compared later in this Instructable. Also, I have started a second version that will dispense more ingredients at a faster rate, and have an improved user interface and enclosure.

A robotic bartender is generally agreed to be a machine that pours mixed drinks selected by the user (animatronics not necessary). I've seen many robotic bartenders online, but most were aimed at the commercial market, and so, were complex and expensive. I wanted to make one that was more accessible and on the hobbyist/maker level. The design criteria was that it would be relatively cheap and could pour drinks accurately in a reasonable amount of time. Also, unlike most robotic bartenders which are based on computers, such as the Raspberry Pi,this uses an Arduino alone.

This design takes in the user's order via a keypad, and dispenses the drink using pumps. An LCD screen is used to show users what they have selected, and to read back mixers that need to be added that are not supplied by the bartender. Many parts of this project could have been circumvented by simply using an Arduino Mega for the extra pins, but I wanted this project to be as efficient with pins as possible.

Disclaimer: This project should only pursued by those with sufficient technical knowledge and skills. Any individual who pursues the project assumes all risk.

Step 1: Explanation of Design

Under regular operation, a user will select a drink from a printed menu, and enter the corresponding number using the keypad. The Arduino will flip relays, turning on pumps for a set amount of time to dispense the correct amount of liquor according to the drink recipe. This method doesn't require the user to scroll down through a long list of drinks, and instead lets them view the selections all at once. Also, as an option, an insulated tray can be used to hold the bottles in ice as I have done. How and why I did this are detailed in the Mechanical step.

Currently, the initial prototype only dispenses liquor, not mixers. You can change this by modifying the code a little and hooking up the pumps to mixers, but the pumps aren't very fast so pouring may take a little while.The design is expandable and easily modified so extra ingredients can be added if you choose.

Reasoning Behind the Design

Methods for dispensing include using gear pumps, peristaltic (dosing) pumps, gravity fed dispensing using solenoid valves, pressurized dispensing using solenoid valves, dispensing incremental amounts, and more. For my initial design, I am using peristaltic pumps. Peristaltic pumps are precise, but slow. The pros and cons of methods, and why I did not choose them are listed below:

Gear Pumps - Can dispense liquids fairly quickly, but lack accuracy and will allow the fluid to drip back into the bottle. The latter can be corrected using a solenoid, but this becomes more expensive and still leaves the accuracy problem unsolved.

Gravity Fed - Finding solenoid valves that can be opened with just the pressure from gravity alone can be difficult (most need a substantial pressure to open). The big problem is that the flow rate will change as the fluid level in the bottle changes, resulting in inconsistent pours. I assume bartenders make small adjustments as a bottle becomes empty. (Their quick pours don't correct this problem).

Pressurized Bottles - Pressurizing the bottles will usually require a CO2 tank that is costly and will need to be refilled. It also adds to the overall size and cost of the bartender. This method will require accurate flow meters for each ingredient as well. It is great for larger, professional models, but isn't in line with the low cost aim of this project. (Version 2 of the robotic bartender will use this method for mixers using a vacuum pump in place of the CO2 tank, but will not use direct feedback for measuring).


Incremental Amounts - Often requires linear or rotational motion and will usually only allow one ingredient to be poured at a time. All other methods allow multiple ingredients to be poured at one time. It also takes a considerable amount of time to dispense one dose, and only allows for multiples of the minimum dose (ie. multiples of 1/2 oz).

Example:Inebriator and B.A.R.Tender

Peristaltic Pumps - Able to dispense precise amount of liquids, while preventing the liquid to flow back into the bottle without the use of a solenoid valve. These are also self-priming. The drawback is that they are slow. For the scope of this project, however, I found that this option fits the best. Although slow, it still makes most drinks at a speed comparable or better than the average person at home will.

I'd like to stress that there are many great robotic bartenders using these designs, including the ones I've shown above. I don't mean to put them down. They just didn't fit within the scope of my design criteria.

Step 2: Materials and Tools


  • Programming for Arduino
  • Soldering
  • Basic Electronics
  • Basic Woodworking/Building


  • Breadboard
  • Soldering Iron/Station
  • Computer with Arduino IDE
  • Helping Hand (Recommended)
  • Drill
  • Saws (table and chop/circular saw)
  • General tools (pliers, hammer, etc.)



  • Arduino UNO (or clone)
  • 8 Relay Board
  • Laptop Power Supply (about 19VDC 3A)
  • 3x Buck Converter
  • 4x4 or 4x3 Keypad
  • LCD Screen with I2C Backpack
  • Male-Male and Male-Female Jumpers
  • Hookup Wire
  • PCB (Recommended)
  • Headers (Recommended)
  • Resistors (Assorted)
  • Large Capacitor (Optional)


  • Tubing - Beverage Grade (McMaster-Carr #5229K52)
  • Fittings - Beverage Grade (McMaster-Carr #5116K16)
    These are the best tubes and fittings I could find. You'll want parts that are both beverage and ethanol safe.
  • Plywood
  • 6 Peristaltic Pumps (see the Mechanical step for discussion of pumps)
    • 5x These
    • 1x These
  • Insulation Board (Optional)
  • Hinges
  • Hardware (nails and screws)
  • Zip Ties

Cost: ~$130 Assuming you already own some of the common supplies
Total Cost: ~$200 Including all materials and tax

I will update with an excel spread sheet including links in the near future.

Step 3: Power I

Caution: The following procedures deal with 120 VAC (mains voltage) and should only be done by those with knowledge of power and electronics. (240 VAC will work, of course, though some parts may have to be swapped out for those that work with this voltage). Be sure to check that your wires can withstand the current running through them.

This project demands power at, at least two different voltages. I ended up needing 5, 6, and 12 VDC power; 12 and 6 volts for the two types of pumps (see Mechanical step), and 5 volts for the other electronics. A standard laptop power supply (~19V, 3.5A) can deliver a sufficient DC wattage, and many people have spares from old computers making it a convenient choice. A buck converter is a DC-DC converter that will be used to step the DC voltage down to a lower voltage.

Take the laptop charger (not plugged in) and cut off the barrel jack that plugs into the computer. You should leave about two inches of wire on the end you're cutting off to save and use later on in the project or for another project. Use a wire stripper to take the outer jacket off of the cable, then strip the inner wires. Some cables have only one insulated wire, and a mesh wire that surrounds it. That was the case in mine.

Now you need to test to polarity. Making sure the wires are not touching each other or a conductive surface, attach your multimeter leads to the wires and plug in the power supply, preferably to a surge protector. Set your multimeter to the correct setting and make note of the polarity, then unplug the power supply. Once you have your polarity you can begin connecting your power supply to the input ends of the buck converters.

I broke out my power supply to a PCB, as shown in the second picture, to which I connected the buck converters. If you are not using a PCB with power rails, as I did, run short lengths of stripped hook-up wire on the underside of the PCB to work as power rails. These rails are soldered at their ends to pads. Each of the wires from the power supply are attached to one of these two rails. Wires can then be soldered to the PCB, bridging the gap to the respective rail with solder as shown in the third picture. These wires can then be soldered to the respective GND and +5V inputs on the buck converters. You can cover any exposed lengths of wire with electrical tape or heat shrink, just remember to slide the heat shrink on the wire before soldering. Isolate the finished connections with a non conductive medium. Hot glue is a common choice.

Step 4: Power II

Once the buck converters have all been soldered, plug in the power supply and attach the leads of your multimeter to the outputs of a buck converter. The output voltage is controlled by the trim pot. Use a screw driver to turn the trim pot until the desired voltage is reached. Repeat with the other buck converters to obtain the different voltages you will be using.

Pump Wiring - (6, 12 VDC)

Once adjusted, unplug your power supply. Solder wires to the positive output terminals of the buck converters used to power the pumps, leaving the negative terminals for later. For me this was the 6 and 12 volt buck converters. The length will vary depending how you may wish to lay out the electronics, but 6-12 inches (15-30 cm) should be good. These wires will be attached to the neutral screw terminals on the relay board. Make any relays that will be switching the same voltage adjacent to each other, and daisy chain their neutral terminals together. Make sure the wire you are using can withstand the current it will be subjected to. The relays and pumps will be connected later in the Assembly step.

Additionally, you can place a fairly large capacitor between the buck converters and the pumps to help with the inrush current demanded by the pumps when turned on. If you choose to do this, breaking out the power from the buck converters to a PCB may be a preferable option. You can also reduce electrical noise by soldering 0.1uF capacitors across the terminals of the pumps' motors. This may also improve pour accuracy.

Electronics Wiring - (5V)

It is best to break out the 5 volts from the 5V buck converter to a PCB as done previously. If you wish to keep the project on a bread board you may do so as well. You will most likely only need power for the Arduino and LCD screen, so two sets of wire will suffice. Attach a male barrel jack connector to one wire pair to power the Arduino. If the barrel jack you cut off from the power supply fits the Arduino's barrel connector, use it, otherwise you'll need to find or buy one.

Step 5: Electronics I - Keypad

A standard 4x4 keypad was used to enter drink orders into the bartender. The keypad goes through a circuit which then connects to power, ground, and one analog pin on the Arduino. Without this circuit, the keypad would require 8 digital pins from the Arduino as opposed to the one analog pin. I got the general circuit and getKeypad() function from this YouTube video:

He has links for the circuit diagram ( and code as well.

The circuit is essentially a voltage divider matrix. The way the circuit works is that the signal will travel through different resistors depending on which button is pressed. This analog signal is then passed through the getKeypad() function in the code that determines which button was pressed. The circuit is shown on the breadboard in the first picture as well as in the link above. Construct the circuit on a breadboard first, then test.

When testing my circuit, some of the buttons, when pressed, returned its adjacent button. This is due to the tolerance of the resistors. The best solution would be to take the analog signal for each button pressed, enter them into an Excel spreadsheet and find the curve of best fit, as shown in the video. Replace the equation in the code with this new equation. I was lazy and added 10 Ohm resistors I had laying around where needed to adjust the signal of a given button to the desired level. This is noted in thethirdpicture. Once you have your circuit working appropriately with the code you can begin permanently affixing the circuit to a PCB.

To build the circuit on the PCB I found it easiest to mount the resistors vertically. This takes up less space. To bridge connections on the underside of the PCB, solder the resistor lead to its ending destination and trim what remains. You can then solder any connection points you need along the length of the lead.

Step 6: Electronics II - LCD

The LCD with the I2C backpack will have four pins, +5V, GND, SDA, and SDL as shown in the picture. SDA and SDL are connected to pins A4 and A5, respectively, as shown in the wiring diagram. It is preferable to connect GND and VCC pins directly to the 5 volt buck converter, however connecting to the Arduino's power should work as well. Note that an LCD without the I2C backpack was used in the diagram as none with I2C were available in the program, Frtizing. On the back of the screen there will be a trim pot that you can use to adjust the contrast of the screen.

Step 7: Electronics III - Relay Board

The relay board has connections for +5V, GND, and eight signal pins, one for each relay. You can set up your relay board to be driven with or without opto-isolators. It is recommended that you use the opto-isolators as this should isolate your Arduino from the relays better, as well as draw less current. To do this, connect the signal pins you are using (1-8) and adjacent VCC pin from the relay board to the digital pins and +5V pins on the Arduino, respectively. Then, remove the jumper from the JD-VCC pin on the relay board and connect this pin and the adjacent GND pin to the 5V buck converter. This website gives further details on how to do this: ( You'll realize in the code that a pump will be set to LOW when you might expect it to be ON. This is because the board I have, as well as most others, are set Active LOW.

Wire the positive power from your buck converter to the neutral screw terminal on the relay. For relays that will be switching the same voltage, the best way to wire them up is to daisy chain the neutral terminals together as shown in the picture. Just make sure the wire you are using can withstand the current going through them. I made a sort of power bus in this prototype, rather than daisy chaining.

Optional: Connect a relatively large capacitor after the buck converter. This should help supply the extra power that is pulled by the inrush current caused when a motor is turned on. I used a 1000uF capacitor as it was the largest I could find locally.

Step 8: Mechanical I - Enclosure


I made the enclosure, seen in the pictures above, from spare wood I had. You can use whatever wood you'd like and modify the enclosure to fit your needs. Drawings to build a roughly identical enclosure are attached in PDF form. All the wood used is 1/4" plywood. The main compartment holds the bottles and the smaller one holds the electronics and is where the drinks will be dispensed from. You can secure these together with screws, nails, brad nails, or glue.

The large holes were made with the drill bit used to cut holes for door knobs. If you don't have this bit that's fine. As long as the hole is large enough to fit the tubes and wires it will work.

Insulated Tray (Optional)
Initially, I planned to use a milk frother to simulate shaken drinks. Shaking a drink thoroughly mixes thicker, more viscous ingredients, aerates the drink, and melts ice more, resulting in a more watered down drink. In order to do this however, there couldn't be any ice in the drink or else the frother would get stuck. To compensate for this, I decided to keep the ingredients chilled on ice and add the water that would have been added from the melted ice.

The insulated tray holds the ice and is made out of rigid insulation board. Using 3/4" boards, I cut pieces in the dimensions of 12x6 (2), 18.5x6 (2), and 12x17 (1). You can use your own dimensions as long as they fit in your enclosure. I found that gorilla glue worked well. After this is done you can line the inside of the tray with plastic or simply take a plastic bag and put it inside the tray as you would a garbage bag. I was able to get how much ice is melted when drinks are shaken and stirred from the results of a makeshift experiment I found. I lacked the extra pump needed to dispense water into the drinks and I didn't have enough time to build the mechanism to lower the frother into the drink so I got rid of this in the code. You can just as easily use the frother by hand.

Step 9: Mechanical II - Pumps and Mount


I ordered two types of peristaltic pumps, one black the other clear, to test the volumetric flow rate before I bought the rest. Unfortunately I made the mistake of testing one of them with batteries that were unable to supply the current needed resulting in inaccurate results. Because of this, the rest of the pumps I bought were the slower ones (black).

Regardless of the advertised specs, I measured the black pump to dispense 70-75 ml/min and the clear pump to dispense at 135 ml/min. This results in a 1.5 oz shot being dispensed in ~39 seconds for the black pump and 20 seconds for the clear pump. Additionally, the clear pump uses gears to turn the components where the black relies on compression and friction.

The black is much easier to mount, mounting similarly to how you would a button. The clear one, on the other hand, is not. I don't know how the clear one is expected to be mounted, though a solution can be to remove the screw that holds on the clear casing and drill the hole in the back part through to the other side. You can then use a longer screw to go through the front and back casing and into a board that can serve as the mount. I didn't bother with this and simply taped it on.

Overall I would definitely recommend the clear pump if you can find it.

Pump Mount

The pump mount was also made from spare wood I had. Take a board or piece of plywood and use the pump to mark off the spacing, referencing how the pumps will sit in the mount as shown in the picture. Then take a drill bit the diameter or your pump motor, mine was1-1/8,and drill holes. After the holes are drilled, place the pump into the hole and mark off where the mounting screws go. Drill pilot holes. When finished, assemble the pumps in the mount and secure them with screws. After the pumps have been secured, solder 1.5-2 ft wires to each of the terminals. Use black wires for ground and use colored wires for positive. Using multiple colors of wire can help distinguish to which pump a wire belongs.

Step 10: Code

I was short on time and so a lot of my code you will find poorly written and constructed. I will post a code later that is more easily modified, but will not be able to test it with the bartender as it has been disassembled for parts.

In general, the code takes input from the keypad, evaluates the selection using switch/case statements, and then dispenses a drink. Each drink is written as a function. A drink is poured by closing the relay and switching the pumps on for specific amounts of time. I controlled the time the relays were closed using the delay() function instead of using timers. This makes the code strange to write when ingredients are ON for different amounts of time, and hard to modify and expand. The new code replaces delay() with timers.

The I2C library and information can be found here:

#include // Comes with Arduino IDE
#include LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address

int keys[] ={ //Stores total keypad input 1, 2, 3, 10, 4, 5, 6, 11, 7, 8, 9, 12, -3,0, -2, 14}; //"123A456B789C*0#D"; int key; //Stores most recent key pressed boolean key_lockout=false; int order[4]; int value=0; //Initialize const int vodka=3; //Based on 6v clear pump, 13.3 sec/oz (20 sec/1.5 oz) const int gin=4; //Based on 12v black pumps, 25.3 sec/oz (38 sec/1.5 oz) const int whiskey=5; const int tripleSec=6; const int tequila=7; const int rum=8; const int water=9; const int simpleSyrup=10;

void setup(){ Serial.begin(9600); lcd.begin(16,2);

pinMode(vodka, OUTPUT); pinMode(gin, OUTPUT); pinMode(whiskey, OUTPUT); pinMode(tripleSec, OUTPUT); pinMode(tequila, OUTPUT); pinMode(rum, OUTPUT); pinMode(simpleSyrup, OUTPUT); pinMode(water, OUTPUT);

digitalWrite(vodka, HIGH); digitalWrite(gin, HIGH); digitalWrite(whiskey, HIGH); digitalWrite(tripleSec, HIGH); digitalWrite(tequila, HIGH); digitalWrite(rum, HIGH); digitalWrite(simpleSyrup, HIGH); digitalWrite(water, HIGH);

// ------- 3 blinks of backlight ------------- for(int i = 0; i< 3; i++) { lcd.backlight(); delay(250); lcd.noBacklight(); delay(250); } lcd.backlight(); // finish with backlight on }

void loop(){ Beginning: { //-------- Write characters on the display ------------------ // NOTE: Cursor Position: (CHAR, LINE) start at 0 lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print("Enter your order"); delay(500); lcd.setCursor(0,1); lcd.print(" *-Clr, #-Enter"); delay(1000); //----------------------------------------------------------- value=0; for (int x=0; x<4; x++){ key=getKeypad(); //Get key pressed if(key==-1){ //If valid key not pressed restart iteration x=x-1; } else{ if(key!=14 && key!=12){ //If not CLEAR or ENTER value = (10*(value)) + (keys[key]); delay(10); lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print("Item #"); delay(10); lcd.setCursor(6,0); lcd.print(value); delay(500); } else if(key==14){ //If ENTER, exit x=4; } else if (key==12){ //If CLEAR, restart x=-1; } } } lcd.clear(); lcd.setCursor(0,0); lcd.print(" Press # to"); delay(10); lcd.setCursor(0,1); lcd.print("Confirm drink"); delay(10); lcd.setCursor(14,1); lcd.print(value); do{ key=getKeypad(); } while(key!=12 && key!=14); if(key==12){ //Restart ordering process goto Beginning; //Return to the beginning of loop() } else if(key==14){ lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print(" Confirmed"); delay(1000); switch (value) { case 1: longIslandIcedTea(); break; case 2: jackAndCoke(); break; case 3: rumAndCoke(); break; case 4: capeCod(); break; case 5: cosmopolitan(); break; case 6: kamikazee(); break; case 7: screwdriver; break; case 8: highball(); break; case 9: gt(); break; case 10: vodkaTonic(); break; case 11: margarita(); break; case 12: seaBreeze(); break; } delay(5); // delay in between reads for stability } } }

//--------Functions----------- int getKeypad(){ //Returns which key is pressed int ret=-1; boolean reset_lockout=false; if(analogRead(A0)<120) key_lockout=false; else if(!key_lockout){ delay(100); ret=15.5-(log((analogRead(A0)-183.9)/58.24)/0.1623);//+0.5; key_lockout=true; } return ret; }

// Menu //Long Island Iced Tea int longIslandIcedTea(){ digitalWrite(vodka, LOW); delay(80); digitalWrite(gin, LOW); delay(80); digitalWrite(tripleSec, LOW); delay(80); //Serial.println("In the matrix"); digitalWrite(tequila, LOW); delay(80); digitalWrite(rum, LOW); delay(80); digitalWrite(water, LOW); delay(6600); digitalWrite(vodka, HIGH); delay(6400); digitalWrite(water, HIGH); digitalWrite(gin, HIGH); digitalWrite(tripleSec, HIGH); digitalWrite(tequila, HIGH); digitalWrite(rum, HIGH); for (int x=0; x<3; x++){ lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print("Add 1oz Sour Mix"); delay(10); lcd.setCursor(0,1); lcd.print(" then MIX"); delay(5000); lcd.clear(); lcd.print("Add ice and "); delay(10); lcd.setCursor(0,1); lcd.print("top with coke"); delay(3000); } }

//Jack and Coke int jackAndCoke(){ //2 oz of whiskey Serial.println("Jack and Coke"); digitalWrite(whiskey, LOW); delay(10); digitalWrite(water, LOW); delay(4500); digitalWrite(water, HIGH); delay(33500); digitalWrite(whiskey, HIGH); lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print("Add ice and 2-5"); delay(10); lcd.setCursor(0,1); lcd.print("ounces of Coke"); delay(8000); }

//Rum and Coke int rumAndCoke(){ //2 oz of rum Serial.println("Rum and Coke"); digitalWrite(rum, LOW); delay(10); digitalWrite(water, LOW); delay(4500); digitalWrite(water, HIGH); delay(33500); digitalWrite(rum, HIGH); lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print("Add ice and 2-5"); delay(10); lcd.setCursor(0,1); lcd.print("ounces of Coke"); delay(8000); }

//Cape Cod int capeCod(){ //2 oz of vodka, 3 oz cranberry juice, lime wedge Serial.println("Cape Cod"); digitalWrite(vodka, LOW); delay(10); digitalWrite(water, LOW); delay(4500); digitalWrite(water, HIGH); delay(15500); digitalWrite(vodka, HIGH); for (int x=0; x<3; x++){ lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print("Add ice & 2-3 oz"); delay(10); lcd.setCursor(0,1); lcd.print("Cranberry Juice-"); delay(3000); lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print("and a lime wedge"); delay(3000); } }

//Bay Breeze int bayBreeze(){ //2 oz of vodka, 5 oz cranberry juice, 2 oz pineapple juice (or equal parts ~2.5 oz each), lime wedge Serial.println("Bay Breeze"); digitalWrite(vodka, LOW); delay(10); digitalWrite(water, LOW); delay(4500); digitalWrite(water, HIGH); delay(15500); digitalWrite(vodka, HIGH); for (int x=0; x<3; x++){ lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print("Add ice & 4-5 oz"); delay(10); lcd.setCursor(0,1); lcd.print("Cranberry Juice"); delay(4000); lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print("and 2oz of"); lcd.setCursor(0,1); lcd.print("Pineapple Juice"); delay(3000); } }

//Cosmopolitan int cosmopolitan(){ //1 1/2 ounces vodka or citrus vodka, 1 ounce Cointreau orange liqueur, 1/2 ounce fresh lime juice, 1/4 ounce cranberry juice Serial.println("Cosmopolitan"); digitalWrite(tripleSec, LOW); delay(10); digitalWrite(vodka, LOW); delay(10); digitalWrite(water, LOW); delay(13000); digitalWrite(water, HIGH); delay(7000); digitalWrite(vodka, HIGH); delay(5323); digitalWrite(tripleSec, HIGH); for (int x=0; x<3; x++){ lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print("Add 1/2 oz lime"); delay(10); lcd.setCursor(0,1); lcd.print(" Juice and MIX"); delay(4000); lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print(" Top with"); lcd.setCursor(0,1); lcd.print("Cranberry Juice"); delay(3000); } }

//Kamikazee int kamikazee(){ //1 1/2 -1 ounces vodka, 1 ounce lime juice, 1 ounce triple sec, Lime wedge for garnish //shake Serial.println("Kamikazee"); digitalWrite(tripleSec, LOW); delay(10); digitalWrite(vodka, LOW); delay(10); digitalWrite(water, LOW); delay(13000); digitalWrite(water, HIGH); delay(7000); digitalWrite(vodka, HIGH); delay(5323); digitalWrite(tripleSec, HIGH); for (int x=0; x<3; x++){ lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print("Add 1 oz Lime"); delay(10); lcd.setCursor(0,1); lcd.print(" Juice and MIX"); delay(4000); lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print(" Add Ice"); lcd.setCursor(0,1); lcd.print("and lime wedge"); delay(3000); } }

//Screwdriver int screwdriver(){ //1 1/2 -1 ounces vodka, 5 oz orange juice Serial.println("Screwdriver"); digitalWrite(vodka, LOW); delay(20000); digitalWrite(vodka, HIGH); for (int x=0; x<2; x++){ lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print("Add Ice and ~5"); delay(10); lcd.setCursor(0,1); lcd.print("oz Orange Juice"); delay(3000); } }

//Highball int highball(){ //1.5 ounces whiskey, ginger ale Serial.println("Highball"); digitalWrite(whiskey, LOW); delay(38000); digitalWrite(whiskey, HIGH); lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print(" Add Ice and"); delay(10); lcd.setCursor(0,1); lcd.print(" Ginger Ale"); delay(8000); }

//Gin and Tonic int gt(){ //1.5 ounces gin, 2.25 tonic or 2:3, 1/4 oz lime juice Serial.println("Gin and Tonic"); digitalWrite(gin, LOW); delay(38000); digitalWrite(gin, HIGH); for (int x=0; x<3; x++){ lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print("Add Ice, 2-5 oz"); delay(10); lcd.setCursor(0,1); lcd.print("of Tonic and..."); delay(3000); lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print(" 1/4 oz"); lcd.setCursor(0,1); lcd.print(" Lime Juice"); delay(3000); } }

//Vodka Tonic int vodkaTonic(){ //1.5 ounces vodka, 3-4.5 tonic, 1/4 oz lime juice Serial.println("Vodka Tonic"); digitalWrite(vodka, LOW); delay(20000); digitalWrite(vodka, HIGH); for (int x=0; x<3; x++){ lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print("Add Ice, 2-5 oz"); delay(10); lcd.setCursor(0,1); lcd.print("of Tonic and..."); delay(3000); lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print(" 1/4 oz"); lcd.setCursor(0,1); lcd.print(" Lime Juice"); delay(3000); } }

//Margarita int margarita(){ digitalWrite(tripleSec, LOW); delay(10); digitalWrite(tequila, LOW); delay(10); digitalWrite(water, LOW); delay(13000); digitalWrite(water, HIGH); delay(12700); digitalWrite(tripleSec, HIGH); delay(12870); digitalWrite(tequila, HIGH); for (int x=0; x<3; x++){ lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print("Add 1/2 oz of"); delay(10); lcd.setCursor(0,1); lcd.print("Lime Juice &..."); delay(3000); lcd.clear(); lcd.setCursor(0,0); //Start at character 4 on line 0 lcd.print(" MIX"); lcd.setCursor(0,1); lcd.print(" then add ice "); delay(4000); } }

//Sea Breeze int seaBreeze(){ //1.35 Vodka, 4 Cranberry juice, 1 Grapefruit juice Serial.println("Sea Breeze"); digitalWrite(vodka, LOW); delay(18000); digitalWrite(vodka, HIGH); }

Step 11: Assembly

Once you have all the individual parts finished, it's time to put it all together. Insert the fittings into the tubes of the pumps. Arrange bottles beneath/behind the mounted pumps making sure they are in a configuration that will fit inside the enclosure. Take one end of the tubing and insert it on an output fitting. If you are unsure of which side is the inlet or outlet, test before doing this step. Run this tube to the opening of the nearest bottle and then down to the base. Cut the tube to length. Repeat for the others.

Place the pump mount, and insulated tray if you built it, into the enclosure. Run the wires attached to the pumpthrough the hole into the electronics compartment. Secure the positive wires into the respective relay board screw terminals. Solder the ground wires of like voltages into a junction with a short wire entering from the other side. Seal with heat shrink. Solder the end of the short length to the negative output of the respective buck converters.

To run the tubing that will dispense the ingredients, take the tubing and run it up through the dispensing hole, through the electronics compartment and through the other hole to the pumps. Secure the tube to an outlet fitting and cut the tube so that it ends at the dispensing hole. Remember not to have the tube taught when doing this. Repeat for the other pumps, and when finished secure the ends together with a zip tie so that they all end on a uniform plane.

Due to time constraints, I simply brought LCD screen and keypad outside of the electronics enclosure by running the wires in the gap between the door and the enclosure and securing them to the top of the bartender with tape. The plan was to cut a rectangle to mount the LCD in, and to cut a slot for the keypad wires and glue the keypad on the front. I recommend going with that option.

Now mount your electronics and power components to the door of the bartender using screws. Once again, due to time constraints, I used zip ties to do this as seen in the pictures. Once secured you can run the power supply through the whole in the back splash and out the back. Make sure the power supply does not get wet from ice or condensation.

Step 12: Discussion

This includes comparisons and opinions of other bartenders as well as any answers to questions that will be helpful for everyone.

After making the robotic bartender I came across another called Bar Mixvah. Mechanically, this is most similar to mine. It uses the same peristaltic pumps I used as well as an Arduino. The difference is that it's user interface is computer based and communicates with the Arduino through WiFi via another computer. This design has a much nicer looking UI, and, I assume, would be much easier to expand upon as you would then have access to GUI libraries. My design is stand alone and does not need to be hooked up to a computer once programmed, but of course lacks the WiFi support and aesthetic. I think Bar Mixvah is a really nice design that can be accessed by the hobbyist. The creator of it has posted a good tutorial on his website.

For the commercial market, there is Bartendro and Monsieur. Both use peristaltic pumps with high flow rates and have touchscreen interfaces. Bartendro seems to be aimed a bit more towards the hobbyist/maker market being that they sell individual pumps and have open source code. It also doesn't have an enclosure which I believe hurts its success as a commercial/consumer product. Monsieur has an enclosure and internal cooling capabilities. Both are well made and similar in design, but Monsieur seems to cater more specifically to the commercial (high-end home and bar) market and has an interesting business plan.

Microcontroller Contest

Participated in the
Microcontroller Contest

First Time Author Challenge

Participated in the
First Time Author Challenge

Be the First to Share


    • Metal Contest

      Metal Contest
    • Halloween Contest

      Halloween Contest
    • Crayons Challenge

      Crayons Challenge



    Question 2 years ago on Introduction

    Hey I am working on a project where I’m trying to use a gravity feed system for a few bottles of liquor. Everything in my setup works other then the fittings for the bottle. I need something that can fit into the bottles and not leak while also allowing liquid to flow down the tubes to a tap.


    Question 3 years ago

    Hey man, i like your idea of a robotic bartender, i'm also in the first stages of making a prototype. I have a problem that maybe you can solve, you said that you're using a laptop power supply for the pumps and arduino, how did you regulate how much voltage is going to end up on each pump? Did you think about using a rechargable battery? maybe you can help me sort out this, thank you in advance.


    Answer 2 years ago

    Hey JoseZ44, I did indeed use a laptop power supply. Didn't realize anyone had looked at or commented on this project. It's been a while. I actually came across my own project because I was considering making another bartender. I know this is a year late, but this would be my advice:

    The laptop charger is going to output around 19V and anywhere from 3-6 amps usually. I just used some cheap buck converters to get it down to the voltages I needed. A buck converter is a DC-DC step down voltage converter. The popular cheap options usually have a 3A max. I broke out power to the Arduino, from which I also powered the screen and buttons. I used another to provide power to the 5 pumps. And I used one more to power the one pump that was different from the others. Each of those pumps were controlled via a relay.
    Rechargeable batteries are certainly possible, especially if you're using 5V pumps. Then you could find a simple, portable phone charger and run your whole project off that. You'd need to check for your overall amperage though. Most of those chargers can only output 2.4A. So, if your Arduino is taking in 1A, and you have 5 pumps running at 200mA, you'd pretty much have the battery maxed out. And the size of the battery would determine the run time.


    Question 4 years ago on Step 12

    this is an amazing project
    can you please upload the circuit design you used as photos are not very clear to make the circuits
    thanks in advance

    The robotics fan
    The robotics fan

    5 years ago


    your project is awesome but i have been thinking that it would be really really awesome to add multiple drinks and also add a RFID so we can add credit to smart card and use its credit as money like an atm card.

    i have been trying to make something like it, but unfortunately i didn't succeed. Does any body have any bright ideas??????

    if so please make an instructable about it, or if you already know someone who has made it, please put the instructions link.

    Thank you.


    7 years ago

    Very nice instructable and very detailed.
    In the material list you mention by pumps 5x these and 1x these but I'm missing product code or something ;)
    Since I wanna try this one out :D


    Reply 6 years ago

    Could you use a single pump with multiple valves and have all the tubes coming form the bottles connect to a single common point?

    Also you only used pumps right? How come not pumps AN valves?

    Great job by the way i'm looking to do something similar.


    Reply 6 years ago

    This is a bit late, but if it helps, I didn't use valves as one of the key aspects of this project was to do it as cheaply as possible. They also add unnecessary complexity.

    You could use a single pump with multiple valves and have the tubes tie into a manifold, but not with peristaltic pumps. They're very slow on their own and you'd have to draw all of the ingredients equally which would prevent you from having a drink selection.

    What you could do is get an air vacuum/compressor pump to pressurize the bottles then have tubes with valves to control the flow of the ingredients. I started another, larger bartender like this. It is much harder to control the flow precisely this way, however, as they're aren't any affordable flow meters for such small flow rates and the Arduino only has so many pins. What I was doing was recording the pressure from the pump and calculating the flow rate given the pressure, but with the tubes and valves I was using being so small, all the equations in my textbooks went out the window. I'll probably just do a line/curve of best fit from experimental data if I ever pick up that project again.

    With the Raspberry Pi Zero being so cheap now, might be better to go with a Pi based project.