BarBot

Raspberry Pi drink mixer written in Go

barbotbarbotglow
I am now a BevOps Engineer!

Getting some drank

drinkbot
So, have you ever been to a party with a terrible bartender? No bartender? Who wants to pour their own drink like a peasant? BarBot can and will change all that! BarBot is a simple, effective way to entertain and intoxicate your guests. Four liquids can be installed and mixed for creative compositions. I designed BarBot so party guests can simply walk up, place their cup on the platform and select a drink from the simple interface (accessible from a smart phone or tablet). A fun loading screen lets you know that your drink is being compiled! The menu then comes back for another selection to be made. Drink up!

How it works:

The Raspberry Pi is listening on 2 ports; apache2 webserver on 80 and Golang on 8080.  The menu page is loaded onto your tablet or smart phone. Once a button is selected from the web interface, the options are hidden so multiple selections cannot be made. Then an AJAX request to the BarBot program is made. BarBot receives the request, and then compiles the selected drink by triggering the relays to corresponding pumps, (A pump normally pours at the rate of 1ml per second). After the drink is poured, the BarBot program responds to the AJAX request by loading the page. The menu buttons then return.diag1
DRINK IS DONE COMPILING!

BarBot Parts list:
Raspberry Pi A
SainSmart 8-Channel Relay Module
Adafruit Peristaltic Liquid Pumps
WiFi USB adapter
2 amp USB charger for Pi
12v Power adapter for the Pumps
12v green LED strips
Sink Pipe
Shower drain
Bucket
Black project board

Why this configuration?pi and pumps
Simple and most of all CHEAP!
Raspberry Pi A was selected because it can correctly power and trigger the 8-Channel Relay Module. If you have a Raspberry Pi B and this relay module it’s more difficult. Adafruit Peristaltic Liquid pumps were selected because the peristaltic pump never touches the liquid, instead it massages the tube to pull the liquid through.

 

 

 

Casing10363398_10152455876509607_2422675239067902499_n
After modeling what I wanted in 123D Design I went to my local hardware store and scoped out possible materials. I settled on chalkboard. It is lightweight, and looks cool, but mostly because I like the idea of being able to write the menu or BevOps math on the side. The front was crafted with transparent acrylic so everyone could see and admire the handy work. Plus, the sweet green lights make it look super futuristic and awesome!

THE CODE
I hard coded BarBot to use four liquids. Later I may add the ability to use a config file but for now it’s locked in with Whiskey, Vodka, OJ, and Cranberry Juice. GET THE CODE HERE. Compile the code to ARM run on boot, then drop the index.html file into an Apache server on the Raspberry Pi.

Scope creep
I have added the ability to make the BarBot to receive commands via voice. A simple GET request to a specific drink page via Tasker and AutoVoice.

Final thought
BarBot has been a big hit at every party I’ve brought it too, and also the office loves it (yes, we drink at work). Why pour a drink with your own hands when a robot could do it for you? I, for one welcome our new robot overlords. As long as they get me drunk.

9 thoughts on “BarBot

  1. Good post. I learn something totally new and challenging on websites I stumbleupon on a daily basis. It’s always helpful to read through articles from other writers and practice something from their websites.

  2. barbot.go:8:9: cannot find package “github.com/stianeikeland/go-rpio” in any of:
    /home/pi/go/src/github.com/stianeikeland/go-rpio (from $GOROOT)
    ($GOPATH not set)
    I keep getting this error any help would be appreciated

    1. Looks like your environment isn’t set up add the following lines to ~/.bashrc

      export GOPATH=$HOME/go
      export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

      Then that first error mentioning go-rpio run this command after rebooting

      go get github.com/stianeikeland/go-rpio

      It should add the go-rpio package to your go.

  3. Hey! How was the flow rate? I am thinking of buying those pumps, but I’m concerned they will pump too slow… How big is the glass you filled and how long time did it take?

    1. Too long. It’s too slow for filling a cup. Since peristaltic pumps don’t work too well with anything carbonated hard alcohol with juice was the way to go. Don’t use those pumps if you want something fast. The BarBot was excellent for impressing people at a party, efficient it was not. Some math to help if a pint is ~473ml and 1 pump speed is 1ml a second…. then a little under 8 minutes to fill a pint.

Leave a Reply

Your email address will not be published.