Soda Pop Machine - with Arduino and Processing

I wanted to create something mechanical for my Grade 10 and 11 Computer Science students to control.

The result is a ‘Soda Machine’ that accepts coins, dispenses a cup ,and then dispenses ‘flavour’ liquid and then water.

Turned out great! It uses straightforward arduino code for a basic de-bounced switch (the coin counters), a photo-cell to detect that a cup is in the receptacle before liquid is dispensed and a servo to actuate the cup dispenser.

Processing is used for the user interface, to accept serial.writes from Arduino each time a coin is inserted, to send an activate command to Arduino to actuate the servo and to send actuate commands to Arduino to dispense the ‘flavour’ and water from the two tanks for predetermined lengths of time.

The valves are simple cheap ‘water/gas’ valves ordered from China ($5 each) (which need 12V DC to operate) and the coin counter was made with spare wood, gutter-vinyl and springs from click-pens.

The cup dispenser is a cheap ($10) unit from China. I just removed the finger-spring for dispensing a cup and replaced it with a servo and an actuator arm with the basic servo code found everywhere.

Arduino is a great platform to stimulate creativity! I had a blast! I hope my students do as well!

Here’s a video of the machine in operation


That's a cool vending machine, vending machines such as these commercially are $2,000+.

Good project, it's funny.