Drink Making Unit 2.0
Barbot 2011, the cocktail robotics exhibition, is happening on Friday and Saturday nights this weekend-- April 1 and 2 --in San Francisco. If you haven't been to one of these events (and you happen to like both cocktails and robots), let me tell you: you are missing out.
Last year we built the aptly named Drink Making Unit for the event. The Drink Making Unit used three -ahem- food-safe pumps to craft white russians, and was quite a hit at the show-- especially amongst people who recognized the pumps.
This year, we've designed a brand new bartending machine, Drink Making Unit 2.0, which we are pleased to unveil today, and unleash upon the world this weekend. Aside from the once-again-apt-but-not-very-descriptive name, Drink Making Unit 2.0 has very little in common with last year's machine. The mechanism is all new, and features elements borrowed from sources as diverse as pet stores, chemistry labs, and Japanese gardens. It dispenses any six fluids (up from three), in metered and selectable quantities, and also sports an all-new extra-snazzy control panel.
First stop: the chemistry lab
The starting point for our machine is some classic laboratory glassware: A 500 ml flask and a 10 ml graduated cylinder.
The flask is fitted with a rubber stopper that has two holes drilled through it. We've inserted a length of rigid FDA food-grade plastic tubing into each hole. One side has a long length of tubing, that goes nearly to the bottom the flask, and the other has only a short piece of tubing.
If the flask contains a liquid (say, whisky, for example) and has this stopper on top, then if you should gently pump air into the short-tube side, it will force the liquid out on the other side.
Aside: This is a classic mechanism in chemistry: the glass "wash bottle," (see examples here, the predecessor of today's squeeze bottles. It's also a good example of a rudimentary but effective pneumatic pump for fluids.)
Provided that the air source is clean, this is a good and food-safe method of pumping liquid out of our flasks. However, we're not done yet. The rate that fluid is pumped out will depend on the air pressure, fluid depth, air resistance in the path from the air pump to the flask, and so on. Accordingly, there's no good way to be sure how much liquid we've pumped out, without some way of measuring. And, that is where the graduated cylinders come in.
Deer chasers, not beer chasers
There are any number of possible ways to measure the flow rate of our cocktail components, either directly (paddle-wheel flowmeter, ultrasonic, laser...) and indirectly (monitor the weight of the glass as it changes, laser interruption by liquid level, position of a float in the tank,...). However, we decided to take a different approach and borrowed a classic mechanism from Japanese gardens: The deer chaser. A deer chaser, also known as a shishi odoshi, or sōzu, is a type of water fountain that features a pivoted, unbalanced vessel-- usually a bamboo tube, open at one end --which gradually fills with water. When it reaches a certain level, the balance shifts, the tube tips over, and the water runs out. As the tube is empty, it then tips back into place, making a sharp noise as it lands-- a sort of auditory scarecrow. The cycle repeats, providing a slow, periodic, noise to the garden. The deer chaser can also be used as a means of metering out liquid, by pouring in liquid just until the tube tips over, and then repeating for as many "tube fulls" of volume are required.
In our implementation, the tube that tips is actually the 10 ml graduated cylinder, suitably modified and mounted. The main challenge is to create an angled opening of the tube end, like the ones normally seen on bamboo deer chasers. The angled end makes it so that you can easily pour in liquid, even when the tube is at an angle, and also assists with gracefully decanting the contents once full.
Our graduated cylinders are made of glass, but cutting them is possible with a thin diamond saw blade, along with steady hands, and plenty of patience. (There are plastic graduated cylinders available, but the heft, sound, and appearance of real glass can't be beat.)
Next, we need to grip the graduated cylinder and allow it to pivot. We used a commercial 1/2" plastic pipe to actually hold the cylinder, and bolted that to a laser-cut Delrin backing. The pivot pins themselves are 1/8" diameter plain aluminum rivets-- just like small nails without a point on the end, and are held in place with strong epoxy.
Mounting the cylinders such that they are free to pivot but not too free proved to be a challenge. If there is too much friction in the mount (as we had in our first try with a steel shaft in a bronze bushing), the cylinder might not tip, or if it did, it might not tip back. If there is too little friction (as we had in our second try, with an aluminum shaft resting in an acrylic vee), the cylinder tends to tip too quickly. The biggest problem in that case is that once full, the cylinder would empty only part way before tipping upright again, saying perpetually in the state of 1/2 to 3/4 full-- never approaching full or empty. When the level of friction is correct, as we achieved (finally!) with aluminum shafts in a plywood vee, the cylinder empties all the way before tipping back to the original position. It's also important to position the pivot axis such that it is in line with (not significantly above or below) the center of the cylinder. If this is not the case, the tube position may be truly bistable-- it may stay in the new position once it tips.
Putting it all together
Drink Making Unit 2.0 can be loaded with up to six fluids to dispense, so we have six tipping graduated cylinders.
In the photo above you can see the six cylinders. Above the opening of each cylinder there is a tube leading from the flask, from which the liquid pours out to fill the cylinders.
When the cylinders tip, they need something to tip into. We arranged them in a semicircle, each tipping into a wide-mouth funnel.
And, from the funnel, the fluids that are dispensed drip downward, into the cocktail glass.
The controller
To pump fluids from the six flasks into the six graduated cylinders, we need to selectively pump air into the flasks. We also need to be able to detect when the cylinders tip up, so that we stop pumping. And, it's a good idea to have some sort of interface to select exactly which fluids will be pumped and in what quantities.
Our controller, pictured below, sitting next to the barbot, features an AVR microcontroller, eight pushbuttons, and a 6x8 LED bar graph display, all hidden beneath a tortoiseshell-plastic lid.
One of the challenges for the controller box is to manage the air flow to the six flasks. Two obvious strategies would be to use an air pump followed by six solenoid valves, or to use six separate air pumps.
We opted for the six separate air pumps, after coming across these "Penn-Plax" battery-operated air pumps, intended to keep your pet fish happy when the power goes out. They cost about ten to fifteen dollars each, and are available online or at some local pet stores.
(Also, don't let the "silent" branding fool you-- these are at least as loud as regular plug-in aquarium air pumps.)
These pumps run on two D-cells, configured in parallel (1.5 V), and use about 100-200 mA when running under light load. Since we plan to only operate one of our pumps at a time, we actually only need one set of batteries for the entire set of six-- and this gets a lot smaller.
The pump mechanism is self-contained, and comes out with either zero or one screws, depending on the particular version of the pump.
Aside: There are a couple of different mechanisms in our set of pumps. This particular one has a piston mechanism, driven by the DC motor, some of others had a diaphragm.
Second aside: Once you've removed the pump mechanism from the case, you've got a very nice project box complete with a battery holder and power switch!
To provide a microcontroller-friendly control input for each motor, we used simple motor driver, consisting mainly of of a 2N4401 transistor with a flyback diode.
We likely would have hand-wired the components, except that we happened to have on hand a pile of tiny circuit boards already implementing that circuit. (And before anyone asks: it's the circuit board from the forthcoming Egg-Bot kit diamond engraver attachment.) To make up for the voltage drop in the transistor (the saturation voltage) we ended up actually running the motor drivers from 3 V (two D-cells in series), with a reduced duty cycle.
The microcontroller in the circuit is an ATmega164P, a 40-pin AVR, located in the middle of the big black breakout board. The six air pumps are controlled by six of its outputs.
We also wired up a big LED display-- 48 LEDs in an 8x6 grid. We used 10 mm diffused-lens, warm-white candle-flicker LEDs for an unusual old-timey look-- something like a cross between neon and jittery incandescent.
The LEDs are driven by three 16-bit LED driver chips (type STP16DP05, MAX6969, or one of several other exact substitutes). The LED driver chips are controlled in an SPI chain out of the ATmega164P. The chips are mounted on a stacked pair of Meggy Jr RGB bare circuit boards. (There are no other active electronics on those boards-- we're just using them as breakout boards for the LED driver chips.)
While this grid only uses three LED driver chips, there are actually four of the chips installed on those Meggy boards. The fourth chip is used to control a set of infrared LEDs, which we'll discuss a little later.
Here's what the back of the LED matrix looks like: Lots of wires (one for each LED) and hot glue to mount them in the holes.
Drink Making Unit 2.0 is controlled by eight tactile button switches-- one "reset" on the left, a "go" button on the right, and six in the middle for configuring quantities. Each goes to one input on the AVR.
The LED grid, buttons, and pumps all mounted in the controller box. Note that we have two different styles of pump here, all of which came out of pumps with the same brand and model number on them. We've also added two power switches (visible on the upper right), one for the microcontroller and LEDs (3xAA, 4.5 V) and one for the pumps (2xD, 3 V).
One other detail, which we mentioned earlier, is that we need to be able to detect when the graduated cylinders tip. To do that, we use a photogate consisting of an infrared LED and an infrared-detecting phototransistor. The IR LEDs are driven by the fourth LED driver chip, and the six phototransistors are read by the AVR's analog inputs. When the cylinder tips up, it blocks the beam, and so we can detect it.
In the photo above, you can see the wiring to the infrared components, held in place by the yellow cable ties.
The top cover of the box is a sheet of tortoiseshell-colored acrylic, laser cut with holes for screws and buttons. We also made a nameplate and swappable labels to label different possible fluid sets.
Add a little bit of code, and there we go.
Drink Making Unit 2.0 will be You can also see a video preview of Drink Making Unit 2.0 (as a work in progress), in Make: Live, episode 5, starting at about 11:30 in.





---
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/