Instructables

RFID touch screen Automated Bar - Barduino v2.0 with Facebook Integration!

Featured
Picture of RFID touch screen Automated Bar - Barduino v2.0 with Facebook Integration!
Photo 06-05-2014 16 21 20.jpg
Photo 06-05-2014 16 21 05.jpg
Photo 06-05-2014 16 13 49.jpg

Got an Arduino? Like parties / alcohol? Can't be bothered to make your own bar quality cocktails? Make a Barduino!

Its back, with new features in v2.0:

  • Facebook integration - Facebook registration Page to track and graph drink consumption
  • Touchscreen with gesture support
  • RFID user login - sync with Facebook profile photo
  • SQL drink database
  • After party drink stats
  • Illuminated drink dispenser

The fully automatic bar uses simple solenoid valves, CO2, an Arduino Uno and a touch screen computer! CO2 and valves could be replaced with pumps but we found pressured drinks to be better.

It dispenses all sorts of cocktails from 4 different mixers and 4 different types of alcohol!

Construction is from an old ikea cabinet and the inner works are easily obtainable from ebay etc

Required parts:

  • Arduino Uno
  • 8 Solenoid Valves
  • John Guest (or similar) push-fit fittings
  • PVC pipe
  • CO2 supply with pressure regulator
  • 12v power supply
  • Touch screen computer or similar interface
  • RFID Reader + Tags
  • 8 drink bottles with screw caps
  • Cabinet of some sort - we used an Ikea cabinet
  • Hot glue gun + glue
  • Cooling Fan if your computer needs it
  • Friends + Alcohol

danieljcooper + andyman5002

*UPDATE* - Our website is now up: Barduino.co.uk

 
Remove these adsRemove these ads by Signing Up

Step 1: Choose / Make a Cabinet

Picture of Choose / Make a Cabinet
Photo 06-05-2014 16 14 00.jpg
Photo 06-05-2014 16 19 33.jpg

First thing is to find a suitable enclosure for the valves, arduino, CO2 and computer. This will depend on where you want to use the bar etc.

The principals remain the same for all cabinets, valves with tubing controlled by an arduino with associated electronics. The cabinet will determine the length of tubing and connectors required to get the drink to dispense where you want it to. See our photos for an idea of the tubing and connectors.

We chose an Ikea cabinet to minimise the amount of wood work needed. The cabinet needed minor alterations and also a housing needed to be created to hold the touch screen computer.

Step 2: Wire the valves - tubing and electrical

The valves need to be powered by a 12v supply. The supply is controlled to each valve independently by the Arduino. The pattern in which they are turned on depends on the drink 'recipe' which is contained in the SQL database. The windows app reads this from the SQL database and sends the pattern to the arduino which in turn powers the relevant valves.

We are by no means electrical experts so the board we created is probably not best practice but it comprises of resistors and transistors ( high power ones ) which take a 5v input from the arduino to control the valves.

All the tubing we bought used push fit connectors to allow for easy disconnections and cleaning etc. The valves themselves were ordered from eBay at a cost of £3 each. The bottles are configured so they are under constant pressure from the regulated CO2 supply, when the valve opens this allows the liquid to exit.

The tubes from the valves terminate onto a standard 2L bottle. The tubes are passed through the threaded cap and sealed using hot glue.

The drinks are then dispensed from the tube which is illuminated when a user is logged in.

Step 3: Windows Code

Picture of Windows Code
Photo 06-05-2014 16 25 15.jpg
Photo 06-05-2014 16 20 29.jpg
Photo 06-05-2014 16 24 40.jpg

The user interface for the bar was coded in C++ and runs on Windows 7. The software has numerous modes:

  1. User mode - Normal Operation when a user is logged in
  2. Admin Mode - Used for adding additional users and enabling other modes - cleaning and closed
  3. Closed Mode - No one can login apart from admin
  4. Cleaning - will clean the valves for 30 seconds at a time

The software connects to an SQL server which contains a user database and a drinks database.

When an RFID tag is presented to the reader the arduino notifies the windows code by serial. The barduino app then contacts the SQL server to check if the user exists and what privileges they should have. Admin user will be presented with the admin screen only. A normal user will be presented with the first drink in the database.

The App pulls a users Facebook profile photo using a URL stored in SQL and displays this in the bottom left if they have pre registered.

Source code will be available soon - all be it buggy.

Step 4: PHP / Website registration

Picture of PHP / Website registration
Screen Shot 2014-05-06 at 16.45.39.png

The website is a front end for the SQL database.

It can be used for user registrations and also the after / during party stats. Who's drunk what etc.

Every time a drink is dispensed the Barduino App records what was dispensed and who drank it. It also updates their 'drunk level' or running total of consumed drinks.

Source available later.

Step 5: Arduino Code

Picture of Arduino Code
Photo 06-05-2014 16 27 54.jpg
Photo 06-05-2014 16 28 29.jpg

The arduino code connects to the windows App. It communicates via serial.

The protocol is basic and could probably be improved. It basically sends the string of what valves need to be opened encapsulated in <> eg:

<4455> will open valve 4 twice and valve 5 twice. The valves are opened for a pre determined time which is based on a shot measure. This varies based on the pressure so you would need to time this based on your setup to get an accurate measurement.

Other commands exist for cleaning etc.

The source will be available soon.

mlubbers2 months ago

What size CO2 tank are you using and how often does it need to be refilled? What did you use to distribute the pressure from the regulator to the 8 bottle tubes for the required solenoid pressure?

gradof6b2 months ago

THis is awesome, any chance you'd be willing to post the code? I've been wanting to do a dog treat project using different RFIDs to keep track and I'm at a bit of a stand still

I'm currently working on a Linux version of the bar so we can release that. What are you stuck with?

andyman50022 months ago

Our website is now up: http://www.barduino.co.uk/ :)

cool project. that's a madras, not a screwdriver though. :)

Smtty092 months ago

Do you have an estimation on what your total costs have been and what all you see yourself adding in the future?

Cost wise its been an ongoing project from the v1 bar we made so don't have a running total. We were thinking of turning it into a headless machine for v3.0, so all you would need is the actual drink dispenser no touch screen computer and it would all be controlled from an app on your phone? Not really had any other ideas yet, I'm sure the community can come up with some :)

Are you using positive pressure displacement within the bottles and using the valves as gateways?

On the head unit idea are you thinking of a Raspberry Pi in conjunction with arduino or bluetooh, or swapping arduino to a Yun and communicating through a network with a hosted webpage?

Yeah thats right the valves stem the flow of the liquid when closed, keeping the pressure in the bottles.

We are wanting to migrate all the code onto the Raspberry Pi and use GPIO pins and remove the Arduino all together. Probably initially we will just handle network communication on the Raspberry Pi and keep the arduino, eventually phasing this out. The bar software will then run as a service and the app will communicate with this over the network.

If you want to limit connectivity range (ie so friends aren't making drinks from their house) going with a bluetooth dongle on the Pi as the connection as opposed to using web connectivity may be a route. I may end up building one once I finish my current endeavor. Good idea.

We were thinking of some how associating an RFID tag / user / nfc with the app so they still have to present the tag to get the drink poured. That way we don't get random drinks pouring until someone is there to get it. Yeah go for it! Have to post back with your results!

Can you link to your pressure regulator? I see that the requirements for the valves is 3 PSI. Any issues with the pressure popping off the hot glue seals on the stoppers?

protorob2 months ago

I'm so interested in reading that code!

Congrats, this is a very cool projet.

Its not brilliant! Not a developer by trade unfortunately!

garymunson2 months ago

Great project! Makes me want to find an old coffee vending machine to hack so I'd have an automated 'cup dropper' to make it totally automated for the lazy like myself!

We really wanted to find a cup dispenser but they were so difficult to come by. Then we thought about making one but seemed really complex! An old coffee machine would be perfect!

mcdonalds also use to use cup dispensers in some of their stores where the computer dropped the cup them filled it. they did the same with the french fries. they stopped using them. perhaps due to cost or perhaps because the technology was not reliable enough.

garymunson2 months ago

Since the CO2 source has a regulator, I'd think the dispensing would stay fairly consistent until the CO2 was almost exhausted. Do you vary the 'on time' of the solenoids with the software to change percentages of the mixes?

Dispensing is pretty consistent, it does vary slightly I think. All the bottles share the same pressure rail. So as drinks are dispensed the pressure drops slightly across them all until the regulator has built up pressure in all the bottles again. The Arduino basically has a measured time which equates to a shot, it opens the valves based on the string it receives. The windows app simply tells the Arduino to open twice or however many times to increase the strength eg <444> would open the 4th valve for 3 times the length of a standard shot or 3 shots.

The arduino doesnt really get chance to close the valve so it effectively stays open until the full string has been processed / executed.

This is awesome! Thank you for posting it!

Glad you like it :)

Awesome project! I have been looking to do something similar, and even considered those valves but I read warnings that they shouldn't be used for drinkable liquids... Maybe you're assuming the alcohol content will kill off all chemicals/contaminants?! Does the plastic affect the taste of the drink?
Great work!

We flushed them heavily before use and fully dismantled / cleaned them. I couldn't really taste any difference. We also used industrial line cleaner which bars and pubs use to flush the lines.

Jan_Henrik2 months ago

Very nice project!

Thanks! A lot of fun using it too!

ccolson2 months ago

How about a breath analyzer? :)

baz40962 months ago

Maybe you could add weighing scales under the dispenser to work out if the right amount has been dispensed, regardless of CO2 pressure?

Good idea - think we will be adding that to the v3.0 wish list