Bartender Bot

by Jeebus678 in Circuits > Arduino

493 Views, 5 Favorites, 0 Comments

Bartender Bot

IMG_2931.jpg
IMG_2932.jpg
IMG_2931.jpg
IMG_2930.jpg
IMG_2934.jpg

Lo and behold, my latest project: The Bartender (bot). It displays cocktails that can be mixed based on the given input and utilizes a hardcoded database of over 117 cocktails. I wrote my own parser library which you can find here, as well as a separate library for the pumps and GUI control. The whole program totaled to just under 1000 lines of code, but could definitely be more efficient due to my lack of coding expertise. The frame was built from thin sheets of wood I cut out and painted black, and the miscellaneous parts (cupholder, funnel, touchscreen frame, etc.) were 3D printed.


During the R&D process, I found that the most common methods used when creating something similar were either to use peristaltic pumps or a conveyer belt that moved the cup under each required drink (see example). For the sake of simplicity, saving space, and personal aesthetic purposes I decided to go with the peristaltic pump model.

Supplies

  • Wood sheets (60x60cm)
  • 20mm wide wooden rod
  • Jigsaw, power drill
  • Black spray paint
  • 12v LED strip
  • 14x Peristaltic pumps
  • Food grade tubing (make sure it's alcohol safe!)
  • Arduino Mega
  • SD card (a few GB is more than enough)
  • TFT touchscreen display
  • Plenty of jumper wires
  • 14x TIP120 NPN transistors
  • 14x 1k Ohm resistors
  • 14x flyback diode (1N400X series does the trick)
  • Power supply (TXLN 035-212)
  • Breadboard/Perforated board

Research and Design

Nov 27, Doc 53.jpg
Dec 1, Doc 1.jpg
Dec 1, Doc 3.jpg
Dec 1, Doc 4.jpg
Dec 1, Doc 2.jpg

Every project starts with R&D! This is one of my favorite parts because it leaves the most room for creativity. As the project develops, you'll have fewer chances to make significant changes, so it makes sense to plan everything out first. The first image is the schematic I created for the circuit- you'll need to repeat the circuit for every peristaltic pump used. Because the pumps run on 12v and the GPIO output on the Mega is 5v, I had to use a transistor or relay to control the motors. I included a flyback diode as an extra protection measure, and a 1K ohm resistor on the GPIO output of the Mega. The rest of the slides show some of my early sketches and brainstorms for the model, circuit layout, and an early user flow diagram.

Assembling the Prototype

IMG_2781.jpg
IMG_2782.jpg
IMG_2784.jpg
IMG_2783.jpg
IMG_2785.jpg

This is my first prototype that worked as a proof of concept as well as a body for holding everything in place while I tested the code. I made it out of an old box from Ikea that had been lying around and zip-tied all the parts to hold them in place. Don't waste energy making the prototype look fancy!

Implementing the Electronics

BC9664A7-1CAB-4A69-A9E4-A68B7391962F.jpg
D918D859-84BA-4B20-ADE0-2ABC7DFC0E60.jpg
205DC6C9-692D-4718-9E69-7922DACDD726.jpg

After making a basic bare-bones version of the code that tested the circuitry, I attached it to the prototype and hooked everything up. Unfortunately, I couldn't upload the videos on here that showcase testing the pumps and GUI, so I added a picture of my home lab instead. Please excuse the mess!

Setting Up the GUI & Finalizing the Code

9A60DD6F-2C3F-4C5A-AAB4-3A21C5FC259B.jpg
IMG_2851.jpg
1D8BCA64-9DFD-4B81-BBA9-2AA1466D8BCF.jpg

Once my parser was finished, I started working on the GUI and user flow. This was quite the hurdle for me since I had zero experience making GUIs, and the libraries available to design them are a pain in the neck. I didn't want to use a GUI builder (or someone else's parser) because that would dumb down the learning process, so I made it from scratch. After learning the Adafruit_GFX library, using a bit of math, and a lot of testing, I finally made a working (yet buggy) user interface. Once the software part of this was in a working state, I implemented it with the prototype and was ready to build the final model.

Cut and Paint

30127E93-4B97-48BA-9C8D-C5EF5CEC1C09.jpg
A04F58FB-E283-4B6B-8DD5-8C6F90372E12.jpg
IMG_2912.jpg
IMG_2913.jpg
90ed6040-0fcc-4aaa-bd35-3d6f1ffade7b.jpg

After I had planned out the dimensions for the whole thing, I got to cutting and putting it all together. I double-checked that everything was sized correctly, and once I got the green light I went ahead and gave the whole thing a matte black paint job.

3D Printing

42D638CE-6A89-4D70-A8D2-A19D156E325C.jpeg
9E089E26-AABE-4714-8BE3-271E9E740A3F.jpeg
f271ffa6d00f4ee5126099c99a2ca3ac.png
e20a3f1491f67853f7c66bc02ae22691.png
0a80a3dbfaaa3b6869414d11fc19a1e5.png
3b19a827ff546777e6dc9a46a03a54e5.png

I needed a way to attach the pumps without being intrusive to the design while also allowing me to replace them if needed. For this, I bought a wooden rod, designed a part that lets the motor slide into place, and zip-tied each motor down. This gave me the opportunity to not only replace the pumps but also to change the amount I was using. I had also designed a cupholder, a funnel, and something that'll hold the touchscreen in place.

Attaching Everything

22B51141-F6A2-4E3A-B897-F912B87E3E44.jpg
263D744F-8DF9-4863-BBEB-D0CB5D95ED72.jpg
692DC8A4-F819-4F10-B92A-F23716BE0E77.jpg
IMG_2927.jpg
IMG_2942.jpg
IMG_2943.jpg

As everything finished printing, I could begin to put everything together. I started with an LED strip around the top to give the machine a nice aesthetic, and then added pumps that ran from the back to the front. After the pump holders were printed, I attached them to the rack and printed a part that'll hold them in place. I connected all the electronics to the breadboard which I had glued to the bottom as well as the power supply. The great thing about these pumps is that they're incredibly modular- you can replace just the tubing, the head, or the entire motor if needed.

Uploading the Code

CB9C338C-AE2D-4FD4-B386-F2AD219F99DD.jpg
IMG_3046.jpg
IMG_2988.jpg
IMG_2990.jpg
23ED68E0-D8F9-48BD-8278-454410148F78.jpg
5215F82A-D241-44F0-941D-8FBCD8A159D0.jpg

Once everything was in place, I flushed out most of the bugs, uploaded the code, and had my first robot-made cocktail!