Automatic drink mixer (aka Drink-O-Matic Deluxe)

While browsing the web, I found this automatic drink mixer called Bar2D2. A very nice build, which inspired me to do my own automatic drink mixer. I didn’t need it to move around by itself, which simplified the construction a lot.

Instead of using compressed air, I went for a solution using pumps. This might be the biggest flaw in my design, as it shows under testing that the pumps stirs the beverage  so much, that there’s is no CO2 left when it hits the glass. So be careful if you’re planning to go for a pump based solution and need to mix carbonated beverages.


  • 6 tanks (juice bottles with the bottom cutted off)
  • 6 pumps
  • 6 solenoid valves
  • PVC cup for mixing the 6 lines together (milled on lathe)
  • Aluflex (aluminium profiles) based frame

The bottles, I bought at my local grocery store. Pumps, solenoids, hose barbs and silicone tubing I bought on eBay.
The PVC cup and aluminium for the frame was just old cuts laying around.

Electrical (and software)

  • 12VDC Pumps and solenoids
  • Atmel mega48 Microcontroller
  • Powertransistors for pumps and solenoids
  • USB to UART adapter for communication with PC
  • IR proximity sensor for cup detection
  • RGB LED strip for increased fancy factor and machine state indication (fading colors = idle,   green = cup detected,   red = filling in progress,   blinking green = drink is ready)

Old, extremely current hungry power transistors, with smaller signal transistors in front. Poor design, but it was what I had at my hands at the moment.

A simple description of the firmware on the microcontroller:

  1. The atmega idles until it detects a cup.
  2. Waiting to receive mixing ratios from the PC.
  3. Now it will begin to fill the cup, as long as the cup isn’t removed by operator.
  4. When the filling is complete, the LED strip will blink green until the cup is removed.
  5. Return to idle mode

Some of the key features in the PC client software:

  • Choose the currently loaded ingredients, and set cup size
  • Select drinks that can be made with the ingredients loaded
  • Make your own custom drinks
  • Randomizer function, which makes a drink with random mixing ratios
  • Manually run each line (pump+solenoid) for testing and cleaning purposes

All AVR code was written in AVRStudio4 and compiled with avr-gcc/WinAVR. All PC code was written in LabVIEW 2011.


Building the Drink-O-Matic was great fun, both the mechanical, electrical and software part. But I learnt a few things (which is the biggest reason I build things like this):

  • Air in the pumps, causing bad pump performance (Allow venting, or see next point)
  • Loss of carbonation because of the stirring (Go for a compressed air solution with pressure regulation instead of pumps)
  • Inlet pressure on pumps dropping propotional to the tank level, giving a flow rate dependent of tank level (Speed control of pumps with calibration curves in firmware or see previous point)
  • Burned some transistors by forgetting current limiting resistors on some of the power transistors (Don’t be me)

Feel free to ask me questing about this build in the comment section or via mail.

Here’s some more pictures (by Torstein) and a short video clip. And remember, drink responsibly!