loading

Some months ago I came up with an idea, which was to build a rocket ship simulator for my friends kids and make it cloneable for each of their families. We are all programers, but no hardware guys.

Some planning and I realized I know nothing about hardware, halting a great idea. The arduino I bought sat and went nowhere.Then someone joked I should build an automated bar. After a little research, I found two amazing projects, the Inebriator and bar2d2, but got stumped on approaching hardware and development didn't start. Motors, voltages, and some fundamentals were needed.

Then I stumbled onto http://learn.robotgeek.com/projects/70-shotbot-project.html and lightbulbs went off! Their project was simple, but it showed how to control pumps via logic. From there I thought I could control it from a raspberry pi with a nice interface.

I ordered a boatload of parts, and then on a whim bought some LEDs.

Before proceeding, take the time to read the tutorials on this site:

http://learn.robotgeek.com/getting-started/32-geekduino/56-geekduino-getting-started-guide.html

Seeing the guides, it is easy to understand why I leaned so heavily on this product set, info was in one place. That got me from 0 to 60 in a couple days.

I also found Jeremy Blum's
Exploring Arduino: Tools and Techniques for Engineering Wizardry extremely helpful

Customizing or building on a smaller scale
The beauty of the barmanager library I created is that it allows you to scale up or down the pump number very easily. If you want to start with 4 pumps, go ahead! The customization section of this instructable will walk you through how to change this from the default build of 12 pumps.

Step 1: Be Safe

As with anything alcohol related, you bare the responsibility for your own actions and the actions of your guests.

  1. Grab car keys, safe serve, and be responsible.
  2. Don't drink and drive, make sure your guests don't, and make sure you don't over serve. Consider adding rfid and monitor your guests drinking!
  3. The author(s) of this article take no responsibility , certainly assumes none, and offer this information to inspire inventors only.

Step 2: The Hardware List

Disclaimer

I'm not employed by, associated with, or endorsing any vendor or products. With that said, the RobotGeek products enabled a quick build to happen with no electronics experience.

Links to products are found here http://learn.robotgeek.com/projects/70-shotbot-project.html

These are the products I used to construct each part of the Drinkinator.

Pump Electronics - aka Drinkzilla

  • 12 pumps (no powercord)
  • 12 drink spouts
  • 2 large workbenches ( you don't need these)
  • Geekduino
  • Sensorshield
  • Sensor cables
  • 2 dc squid cables
  • 2 6v power cables
  • Arduino mount
  • 1 white funnel (bpa free!)
  • The pump kits came with silicone tubing but I bought a tube pack so I can replace them later, as they wear down.
  • Power bar


Interface - Drinkinator

  • Raspberry pi 2
  • 16mb sdhc card
  • Raspberry official touchscreen
  • Power adapter 5v
  • Usb cable
  • Logitec Wireless keyboard/mouse. I use this for programming the pi and hide it while the Drinkinator is in use.



Lightshow - Lightzilla

  • Neopixel ring -16 size
  • Neopixel jewel - 7size
  • 20 or 22 gauge wiring(smaller wire was better for neopixels)
  • I used an arduino mega that was gathering dust, but that is overkill. Use a nano!


Woodframe
I used 2x2" wood posts and used compressed particle board for bottom, middle and cover

  • hinges
  • 3" wood screws
  • white primer
  • black paint
  • wire guides


Drink Tray

  • Glass ash tray
  • Silicone sealant
  • Left over wood from posts and horizontal pieces
  • Wood glue
  • small nails to affix workbench to frame (optional)


Tools

  • Knife
  • Wire stripper
  • Drill
  • Hammer
  • Table and Saw

Step 3: Software List

Pi OS/Programs

  • Jessie Debian OS
  • Kivy
  • Pyserial
  • Arduino IDE 1.0.6! Geekduino requires this.

Arduino Library

  • Adafruit neopixel library - which I bastardized it's light example to control jewel and ring independently but connected.


Development - Arduino/geekduino programs

  • I started with my netbook/windows to program the arduino and test the pumps in the arduino IDE.


Development - Pi

  • When I started the interface for the raspberry pi, I literally used nano on the pi to create the interface.


Download the software packages found here
NOT AVAILABLE AT THIS TIME - I have concerns that a business might be using my code and making money off this. I might release sections of code to help up and coming inventors, but not a full product to help deter those companies.

Step 4: Breaking It Down

Compared to other instructables, this is a small project, but if this is your first, it is a big undertaking.

Break it into problems

  1. geekduino, pumps, and programming. Get the Drinkzilla program up and running. Use the serial monitor in the IDE to send test commands. Once electronics work , build a frame/case.
  2. Build a case.
  3. Pi, touchscreen - get it running
  4. Kivy - get the demo program running
  5. Kivy - get the Drinkinator program running.
  6. Integration test (with water!)
  7. Once everything works, tackle the neopixel project. We deliberately used a second arduino to keep this simple. We did start to add serial hooks, but in the end decided to make it standalone and just run patterns all night
  8. Beta test
  9. Usage
  10. Storage and cleaning


A note about this step's Image

We drew out everything to start, had a solid design, but we were flexible enough to simplify and adapt as we learned new things. While the final outcome wasn't the exact design, it was pretty darn close! In fact we had build the framework to support the utilities shown in the above diagram, now we just need to build fancy interfaces to do the work, but that wasn't necessary, so we didn't try to do it since text editing the resource files is trivial for now. In other words, don't take on too much, and keep it simple until you have all the pieces working!

Step 5: Pump Assembly and Geekduino Control

So your shipment has arrived, but then you have a big shocker, you have to assemble the pumps!

Go to the documentation and read the guide. It is very graphical

  1. Build all the pumps
  2. Build all the spouts
  3. Put the pumps /spouts on a workbenchboard like in shotbot video.
  4. Put in tubing
  5. Label the pumps 0-11
  6. Using the Drinkzilla file as a guide, plug each pump into the appropriate pin. Note analog pin 0-7 corresponds to digital 14-21, as per http://learn.robotgeek.com/2-uncategorised/183-getting-started-with-robotgeek-wiring.html.
  7. Plug the squid cables into each pump and plug the power cables into the squids.
  8. Attach geekduino to sensor shield
  9. Using arduino IDE upload the drinkzilla sketch to the geekduino

Step 6: Testing Pump Hardware

Testing Rig

  • Put pump/spout/workbench on a box, similar to shotbot video. In my case I did a quick rig that took about an hour to build. What I learned was the pump and spout must be above liquid source!!!
  • Get a large drink container , fill it with water, taking care to put input tubes from pump into it. Under the spouts, put another large container to catch the output.


Testing just the pump

  • Press red button on top of each pump and prime the tubes. If it fails you may have made a mistake in wiring or input tube.


Testing pump with geekduino
To test, plug geekduino into your computer and upload the Drinkzilla code.

In the Arduino IDE serial monitor (the button on the top right of the screen), try these commands, but make sure to change the dropdown to NEWLINE in the serial monitor.

to test pump 0-4 send
RECIPE:0|20|4000+1|20|4000+2|20|4000+3|20|4000+4|20|4000+

pump 5-9 Send
RECIPE:5|20|4000+6|20|4000+7|20|4000+8|20|4000+9|20|4000+

pump 10-11 Send
RECIPE:10|20|4000+11|20|4000+

If a pump fails, check wiring, then check you used right pins. If a pump runs for no reason, it is the same cause. I chose the pins I did because they are not reserved for other things by the geekduino.

A note about this step's gallery

Prototyping is an important part of development. In this case I went "all in" with the hardware and when I built a case I was lucky I tested it early before spending significant amounts of time developing it. The first rig I had was very compact and you can see I had the source and the destination cups below the pump. I thought the pumps were leaky because liquid still flowed even when the pumps weren't running. Then I rewatched that robot geek video and realized the spouts had to be at same height. As a result, I moved on to Mark II and had a bigger, but way more awesome rig with more room to do cooler stuff. Even better, I didn't take too much of a hit weight wise.

Step 7: Case Assembly

After integration the pumps, tackle building the case.

Make sure spouts are same level as the pumps. In my case the liquor bottles are placed in the area below the pumps.

Build Walkthrough
Part 1:
https://youtu.be/dDy7FfWGMSA
Part 2:
https://youtu.be/H9T0ltZ1mLA

My case is light and transports very easily

Step 8: Preparing the Raspberry Pi2 and Touchscreen

Not being a linux guy, this was painful. Debian is like taking a trip back to windows 3.1.

Some important points

  • Setup Jessie to boot to command line. This solves the ctrl-c not working in kivy. Launching a kivy app from within the os gui's cli/terminal doesn't work. It must be a boot to command line!
  • Ctrl -c to exit a kivy app


Videos of setup
Pi - https://youtu.be/xQ5f65VZEPY
Part 2 - https://youtu.be/AouPnWxBNek
Part 3 - https://youtu.be/2TWPYCQd1BQ

The Drinkinator code must be placed in a folder on the Pi, and ran via python "python main.py". If you just want to test the interface and don't have the hardware ready yet, just use "python main.py debug". It disables the serial hooks and enables more robust log lines.

Step 9: Setting Up the Drinkinator Program on the Raspberry Pi

The entire Drinkinator folder code must be placed in a folder on the Pi, and ran via python "python main.py".

If you just want to test interface and don't have the hardware ready yet, just use "python main.py debug". It disables the serial hooks and enables more robust log lines.

Step 10: Integration Testing

Using the same test rig you used to test the Geekduino, run a usb cable to the Geekduino from the raspberry pi.

Run "python main.py"

If it fails, your usb port might be different. Correct the line

serial.Serial('/dev/ttyUSB0',9600)
in main.py

You can figure out the proper port name by following the troubleshooting steps here
http://www.seeedstudio.com/recipe/166-basic-pi-lt-gt-arduino-communication-over-usb.html

Once loaded

  1. Pick a size
  2. Pick a drink
  3. Click 'Serve'

The line to the right of the recipes is a scrollbar. There are 21 recipes at the time of this writing.

Step 11: Drinktray Light Show

Neopixel Setup
Wire the neopixel jewel and ring as pictured.

We actually took one of the sensor wires and repurposed it so we didn't have to solder it to the Arduino. We liked the idea that pieces are modular and easily removed.

Install the Lightzilla program in this second Arduino and test the program. It takes a few seconds but it should start running infinite patterns.

Drink Tray
We took a board and used a drill attachment to make a big round hole about 1/4" larger than the neopixel ring.

We cut a second board the same size and glued it below the board with the hole. This gave us a space for the neopixel to sit. We then primed and painted everything.

We then drilled a large hole in the middle of this resting place and threaded the neopixel wire through it to an Arduino sitting on the underside of the tray. We then used super adhesive tabs to secure the ash tray to the wood then used silicone around the tray to seal it! This Arduino will have its own power cord to power the board and neopixels. Since there is only two neopixels there should be a sufficient amount of power without needing a separate power for the neopixels.

Step 12: Setup for Real Use

Look at inventory.txt

Place the appropriate liquors in the appropriately numbered bottles. Place bottles under the pumps. I actually wrote the numbers on the underside by the tubes to make it easy. Similarly I had a printed version of inventory.txt in case I needed to do refills.

I placed juices in a side tupperware filled with ice to keep them chilled. See the virtual walkaround to see what it should look like:
http://youtu.be/n5kO0W1mFEg

  • Plug in geekduino (power)
  • Prime pumps (see note below)
  • Attach geekduino to Pi via usb
  • Start drinkinator program
  • Start serving!



Priming the Pumps
This is a fun activity. Basically you use the manual pump buttons and free pour several shots. If you know your recipes, it can take as little as four shots to prime everything!

In my case I use the following to create four shots manually to prime the pumps

  • Polar bear
  • Blue lagoon
  • Butterscotch
  • Walk on the beach (passion)
  • Little piece of heaven (?)

Step 13: Customizing

Glass sizes
In Drinkinator's main.py code on pi, update drinksize amounts to correspond to your glass sizes. Eventually I will create a "glasssize.txt" to make this easy. The current glass sizes are essentially:

  • Glass=2oz shotglass
  • Tall=3oz shotglass
  • Glass =tumbler glass

I believe 3000=1oz and you will want to calculate to about 80% of that.

Inventory and Recipes
The bar manager library was a simple / quick program that does three key things:

  1. Inventory.txt says what liquids are on what pump. When barmanager loads the recipes it creates a menu consisting of all recipes that have ingredients found in inventory.txt. This menu is used to generate the buttons on the touchscreen.
  2. The bar manager loads recipes specified in drinkindex.txt. The actual recipes are found in the recipe folder. To add a recipe, create a text file in same format as the others, then create a reference in the drinkindex.txt
  3. If you have a good recipe, convert amounts to percentages of the recipe. The bar manager will convert it to amounts when it has to look at size if glass it has to fill.


The beauty of the barmanager library is that it allows you to scale up or down the pump number very easily.

Changing number of Pumps

Inventory.txt indicates the number of pumps and what ingredients are on what pump. Adding or removing these lines tells the PI what's available. You then need to update drinkzilla program to recognize (or remove) what pin numbers your new/removed pumps are on. Once this is done, just restart the Drinkinator program/upload the new arduino program and the barmanager will figure out everything.

A note about customization
I fully intend to build in utilities into the kivy program to manage these so the text files are never modified manually.

Step 14: Maintenance

So at the time of writing this, I couldn't find any manufacturer recommendations for this. Please give feedback if you have some good ideas!

My thinking in this is that liquor and sugary liquids like rum, blue caracao will stain and cause blockage.

My solution is to first remove liquor bottles. Then empty the tubes as much as possible by serving 3 or 4 shots. In my case I served polar bear, piece of heaven, butterscotch, blue lagoon and this pretty much emptied all the tubes. In some cases I had to use the red manual button to finish the job. No wasted alcohol, just strong last shots :)

Then, placing a drink container with hot water, I ran each pump for 30 seconds, draining the output to the sink using funnel and a large tube.

  • Remove funnel, remove tubes, wash all.
  • Run pumps with a cloth under each pump to drain remaining liquid.
  • Seal tubes and funnel in bag until next use when finally dry.

Step 15: Drinks and Ingredients Notes

Canadians get peppermint schnapps, creme de menthe and creme de cocoa in clear liquids. They look/taste different then 'AfterEights' and actually should be served very cool by shaking with ice, hence the "polar bear" name.

Looking back I noticed some recipes may have been overwritten. I plan on going and fixing them. I will likely make a customdrinkindex.txt so updates don't overwrite any user added recipes. That should be done by end of year.

Step 16: Visual Touches for Fun

Step 17: Taking the Drinkinator to the Next Level

Check out the Music Light Effects I've added to the Drinkinator:

Drinkinator V2.5 Visual - See other videos on youtube channel for the different music modes

KORKEN<br>Bottle with stopper, clear glass<br>Diameter: 4 &quot; / 9 cm<br>Height: 11 &quot; / 29 cm<br><br>
<p><a href="https://beta-static.fishersci.com/images/F239-01~wl.jpg" rel="nofollow">https://beta-static.fishersci.com/images/F239-01~w...</a></p><p>Those bottles would be much easier to refill in case of need.<br><br>While taking FPGA classes one of the team made something similar to this but without alcohol 2 years ago</p><p>With simple weight sensors you can detect if one of the drinks are all used up and refill the bottle and maybe a red led under it blinking to show you which one is the one needs the refill.<br><br>A small cooling system or the whole build is also necessary at some point or an ice dispenser. I can imagine lots of people looking at this and having ideas flying around. Good job with the guide.<br></p>
<p>what kind of bottle is that anyways? it only loads a picture of it and no other information about it with the link you gave</p>
The bottles are very similar to the ikea ones I have. Ya the icedispensing thing is something i have toyed with but way out of my capabilities to build. I just figured out how to do softdrinks dispensing so may do something in the new rum/rye/whiskey machine I will do over the holidays
<p>Very cool! Thanks for sharing!</p>
Someone more comfortable building relays, and wiring buttons etc could easily reduce 40$ a pump to 5$ if you know what you are doing
So even though Im building the drinkinator v3 from the ground up, even the software, I bought another 20 robot geek pumps because they are just that awesome!
One of the reasons the robot geek pumps are featured in my projects is trossen robotics (the maker) did an awesome job doing plug and play hardware. Pumps have built in relays that interface directly into an areuino shield (geekduino) so you can focus on interface/pi/case
I did a lot of trial and error sobthe cost is far far higher than Im willing to admit. The real killer cost wise was the pump kits.. you can probably find far cheaper if you know what you are doing and save half the build cost, at least! But for a newbie, this kit is perfect.
<p>Great project! How much did all of the materials cost you? </p>
<p>Nice, thanks. </p>
I will likely release the arduino code but the GUI I will likely withold but make an instructable on how to create kivy interfaces
<p>I really like to make it ! But how could i do without your code ?</p><p>I understand your point of view about making money from your instructable.</p>
<p>I am very impressed! Amazing!</p>
<p>I also published a new Instructable called the &quot;Drinkinator Music light organ&quot;</p>
<p>I repaired the article</p>
<p>This is awesome! I wish that I had one of these at some of my college parties.</p>
Thanks for bringing this to my attention. Seems like the last edit of my article broke it, I will revert /fix it after work tonight.<br><br>Im reorganizing the github, just taking longer than expected. I had to rebuild the Drinkinator this fall after breaking it at a party (rolled down a hill at a wedding).<br><br>Dubbing the current rebuild as v2.5, and hope to complete it in the next two weeks.<br><br>-Shawn
<p>Hi,</p><p>Your project is so complete !! And the V3 looks great too.</p><p>I cannot reach on Github your source ? Are you not sharing it anymore ?</p><p>Thanks</p>
Just a note. This is for non-commercial use. I retain the rights to this
https://youtu.be/n4vInTz26ew
Work has been crazy but finally found some time to work on stuff ! Nezt comment will have video link
Anyways, the ingredient manager is trivial to write. Will get to it wventually. Oddly enough , even with the current recipe list of 28, 90% of the 500 shots it has served are just five recipes! According to my analytics.
The bat manager was built on three principles:<br>1) Ever expanding bar menu with known ingredients (another reason why web imports are hard because then you need smart matching for stuff like orange juice vs oj, etc). I cant remember the name but, there is a file with pump number and ingredients. The ingredients must appear in the master ingredient list file.<br>2) number of pumps can be scaled up or down by just telling it the ingredients and what pump they are on. <br>3) bar manager only shows recipes that can be served using the ingredients the pumps have. This is neat because if I change what is on each pump, I restart the program and it regenerates the menu to reflect the new ingredient list!
Very smart (the instructables app sucks)
Drinkinator doesnt care what the ingredients are as long as it has recipes that match it, btw.<br><br>My bar manager is cery smart.
The intent was always to have a gui that modifies the ingredients tezt file. The bar manager then looks at that file and figures out what to serve.<br>Soda wont work with pumps. Iy requires a pressurized solution to work. That's my next big project after v3 drinkinator.
<p>Nice thanks :) I will continue tomorrow. Haven't looked hard but everything android is open so I have some ideas ;) I don't have the app so I did't know that but that is not good. </p><p>Thanks for quick answers, will check the youtube channel after I get up.</p><p>what did you think about the ingrediense selection in the interface idea? If you have a big libuary it can sort out the drinks you can't make. (need to be able to tell the drinkinator that sodas will be added after. </p>
http://youtu.be/2TWPYCQd1BQ
Re: kivy, this is my channel. The video has a bad cut, but the content is good. The notes for the video has lots of detail.<br><br>
Oh, as for the coin hooks, the new version Im using will use rfid. Likely will complete it in mAy (late), you would just replace the rfid hooks with the coin accoter code
Seriously the chat interface of the ios app is horrible. I can spell. But I cant see what I type after 4 words..
Regarding open libraries. None of the ones I found had the drinks I wanted as open source so I gave up. If tou come up with something, why noy put on giyhub and share?
Regarding the coin accepter, Im sure there are videos aomewhere since this is sparkfun.
Regarding kivy, checkout my channel on youtube. I did extensive videos and the nites are all in the description of the videos
<p>And any ideas on how to add a coin accseptor to this? <br><a href="https://www.sparkfun.com/products/11636" rel="nofollow">https://www.sparkfun.com/products/11636</a><br><br>give out arcade coins for drinks ;)</p>
Love the score board idea! There are logs kept in a logs folder for analyzing usage. That is how I know we did 131 shots on halloween and which drinks. Extending that for tracking who is a good idea, especially if we wanna cut someone off. That might be funny to control that on a mobile app
<p>Chromecast casting of a scoreboard ;) and a breathaliser test before you can get drinks ;)</p>
<p>I am really bad at programming but how to I get the software part up and running I don't get the kivy and pyserial part ;)</p><p>would be great if you guys can explain how you did that part in more details ;) I am also doing this whit other pumps so I will change the timing to what is correct for me, but stuff like that I thing I will manage. </p><p>Upgrade option: select in the interface of a group of ingredience and what pump you have witch one in, insted of the text file. and I think there is possibillities to download libaries of drinks so you don't need to just add your own, but for my purpose I will use the txt files and add my own special drinks :)</p>
I ran very warm water for four to five minutes after use. Only once did I ever leave it over night. No adverse effects that I know of
<p>Hi, did you ever run into issues with cleaning the pumps? Is it ok to run sugary fluids through them as long as you run water through them during the cleaning process after? Im really curious to know. Thanks!</p>
<p>Nice instructable. Added it to my favorites.</p>
Also added a &quot;suggest a drink&quot; which is randomized from the top 5 drinks
I just implemented drink analytics and also added a cool 3d printed lightbox
Just finished glass presence check kogic. Will post soon....
<p>Nice, I like the idea of using RFID tags as a scoreboard to find out who managed to drink the most :P</p>

About This Instructable

14,464views

250favorites

License:

Bio: A beginners guide to raspberry pi and Arduino development by beginners.
More by Nextprojectawesome:Drinkinator Musical Light Organ (flashes to Music) The Drinkinator - The Portable Party Bartender! 
Add instructable to: