Introduction: Cocktail Machine

You love parties and technology? You want something to make your college colleagues jealous? Then you need a cocktail machine. Here I show you how to build one yourself.

Step 1: Tools/Materials

Tools:

- Soldering Iron

- Cordless screwdriver

- Saw

- Multimeter

Materials:

-An Arduino Uno

- Pumps (we used old pumps salvaged from an old coffee machine)

- A Relais Module

- A 5V Power supply for the Arduino

- 12V Power supply for the Pumps

- Tubes that fit the pumps

- A funnel

- Some sparewood for the housing

- Screws

- Jumper Wires

- A Breadboard (to test the wiring)

- Some PCBs

Step 2: Safety

Some pumps work with mains voltage. If you're too inexperienced with electricity, better use those with 12V. If you work with mains voltage, then really be careful. Always switch the power off when it's not needed. Also be careful with what you touch. Mains Voltage is absolutly Dangerous.

Step 3: The Electronics - Relay

First let's take a look at the relay module. A relay is an electromechanical switch. It works in the same way as a manual switch, but instead of having to manually push the switch, you apply power to it to change the switch position. It is very useful for turning the power of a device on and off automaticallysince it can switch higher power devices with a low power.

For Conveniance Ground is now shorted with 'GND', 5V with 'VCC' and 12V with 'life'.

Nowwe have to Power the Relay. For that you need to connect VCC-PY with the 3.3 volts of your Arduino, GND to GND and VCC with the 5 volts of your Arduino. Now just connect an Arduino pin with an relay pin. Watch out, the relay often is 'low active' which means that the Relay switches if you connect the pin to GND. If you program it yourself, you have to program the pin as 'normally HIGH'.

After the board is connected, we connect the each pump to a relay. To do that we screw the GND wire to one of the two 'normally open' connections of the relay. In my case it GND goes to the middle hole, and from there to the GND of your 12V powersupply. The 'Life' of each Pump must be assigned to the other slot of the 'normally open' connection. In my case the first hole a relay.

Tip: you can use the multimeter in continuity test mode to determine wether the relay slots are 'normally open' or 'normally closed'. If you touch two relay slots and it "beeps" than those two are 'normally closed'.

Summarized: It's best to connect your 12V power supply directly to a power distributor rail. From there the 12V go to the pump. The other cable of the pump then goes to one slot of the relay. The other slot of the relay then to GND.

Step 4: The Electronics - PCB

We still need something to tell the Arduino when we order a drink. This is done with Buttons. You can just put the button between 5V and an Arduino pin, but chances are high that the pin will 'float'. This is because the Arduino pins are in input mode and have a high resistance. So if we press the button, the Arduino gets an 'HIGH' signal, but if we release the button, casually speaking, the electricity has nowhere to go. So it often stays somewhere in between 5V and ~0V. This often messes with the signal. This is why we need a so called Pull-Down-Resistor. It connects the part between Pin and Button to GND and keeps the signal interference-free. Its resistance isn't that important. Something in between 1k and 100k Ohm will do.

Next we need a LED that indicates which Button was pressed. LEDs are current controlled and need a Resistor that protects them. This Resistor is more important. It has to be at least 220 Ohm. Everything lower than 220 Ohm will probably destroy the LED. The higher the resisance the darker the LED will shine. I recommend something in between 220 Ohm and 470 Ohm.

Since it can be hard to explain circuits with words, i also made a picture of it.

General tips:

- Soldering is much easier with a shiny, clean tip

- First heat up the components you want to connect by touching it 1-2 seconds with your soldering iron, then gently press the solder on it, and release your soldering iron.

- Dont blow on your solder to make it cool faster. This can result in a bad connection.

- Only solder in a well ventilated enviroment, or better us a fume extractor. The fumes can be harmfull.

- A "helping Hand" or "Third Hand" can come in handy.

Step 5: Build the Frame

Before we start working we think about the shape of the device. In our case there must be enough space for five bottles, 5 pumps, soem tubes and cables, the electronics and a funnel. The bottles should be easily accessible and the electronics hidden.

We put a plywood board upright, and mark the places where the bottles will come later.

Tip: Actually Take Bottles to mark the space. This way it probably wont be too small. Next mark the place where you put your cocktail glass.

Next we turn the wood around, and mark the places where the pumps will be attached. Also think about where the hoses lead along and where the electronics go. If everything is marked its less likely to make a misstake.

Now that everything is marked and the electronics were tested, its time to screw everything to the plywood board. You should test at least the pumps before assembling, not that they pump in the wrong direction. Don't forget to drill holes for all the hoses. When you're done it should look similar to our construction on the picture. For the funnel we used an old bottle. (Don't tell anyone)

Step 6: The Program

Installing the programm on the Arduino is pretty easy. Download the Arduino IDE, and install it. Then you download the program you wish to install. Open it, go to "tools" and select the right USB port. Then you plug in your Arduin Uno and click on Upload.

You may have to change the pin configuration, so it fits your setup. You do that in the 'config.h' file. Last thing to do now is to change the drink values (also in the config). The first of the six numbers is the volume of the drink in millilitres. The following numbers are the composition of the drink as parts of one. This is why the numbers combined have to result in one, otherwise the program wont work. And you're done.

pro tip: Theresalways the lazy option, which in this case means not changing the drink values at all. The pin setup on the otherhand must very likely be adapted.

Step 7: Finish It

Last but not least is the finishing touch. The machine still looks kind of naked. That's why we're covering everything up with more wood now. At this step you can give free rein to your inner artist. Don't forget to grind away sharp Edges. Also there basically is no end in creativity. You can always expand the machine as much as you like. Some further ideas for example are an user Interface with a LED screen. Or some fancy blinking Lights. Especially blue looks good in the dispensing area.

Now enjoy your drink.

Step 8: Troubleshoot

Machine isn't working

- Make sure the wiring is correct. Open the program and look up the used pins.

- Your solder connections may be broken. Use the continuity test mode of your multimeter to check if the solder points are alright.

- Check your relay connections. Did you use the 'normally open' connection?

- Is your power supply plugged in?

Pumps make weird noises

- Check if your pumps are wrong way round.

- DC pumps have a certain polarity, did you wire it correctly?

I press a button, but the wrong LED turns on

- You swapped the corresponding Arduino LED pin. Just switch the cables and it should work correctly.