6-Shooter: Arduino Drink Mixing Station
by robotgeek_official in Circuits > Arduino
15081 Views, 196 Favorites, 0 Comments
6-Shooter: Arduino Drink Mixing Station
Want to mix drinks with a push of a button? The 6-Shooter can mix and match combinations of 6 different drinks with a single pump! Just select your drink from the list, push the button, and off it goes pouring your drink and giving you a light show, no less! In this instructable we'll be making something similar to the Somabar. Note that this is a fairly expensive project, but it really blows minds at parties. Want to make your own? Let's get started!
Project Parts List
This is the suggested list of parts.
- 1 x Geekduino or other Arduino UNO/duemilanove equivalent
- 1 x RobotGeek Sensor Shield
- 1 x duino Mount
- 1 x Mega Workbench
- 1 x 4 Line LCD Control Panel
- 1 x RobotGeek Drink Station
- 1 x 16 Neopixel Ring
- 1 x Large Pump
- 7 x Solenoid Valve
- 8 x RobotGeek Relay
- 1 x 12V10A Power Supply
- 1 x 6V2A Power Supply
- 2 x DC Power Squid
- A roll of Silicone Tubing
- A pack of 3-pin Couplers
- 1 x Standoff Variety Pack
- Some Extra RobotGeek Sensor Cables
- 2 x Check Valves
- 1 x 6-outlet Splitter (has a total of 8 connection points)
Wiring
This looks like some pretty intense wiring, and it is a bit of a mess, but it's really just the same process repeated several times over.
To hook up your Solenoid Valves to Relays:
- Get your Relay, Solenoid Valve, DC Female Jack Pigtail, and a wire nut ready
- Attach a wire from the Solenoid Valve to the center terminal on your Relay
- Attach your Ground wire from the DC Jack to NO or Normally Open on your Relay
- Attach the other lead from your Solenoid Valve to the Voltage wire from the DC Jack, either by using a wire nut or soldering the connection. We used wire nuts because we're fans of quick and dirty, but you'll get a better electrical connection by soldering.
The same process as listed above applies to the pump, minding that the Negative (Black, Ground) lead goes to the center terminal on the Relay, and the Positive (Red, Voltage) lead goes to the DC Jack's Voltage wire.
Build your LCD Control Panel and RobotGeek Drink Station before wiring.
Attach your components to the Sensor Shield:Component: | Sensor Shield Port: |
Pump Relay | DIO-2 |
Air Line Solenoid Relay | DIO-4 |
Neopixel Ring | DIO-6 |
Solenoid Valve Relay 1 | DIO-7 |
Solenoid Valve Relay 2 | DIO-8 |
Solenoid Valve Relay 3 | DIO-9 |
Solenoid Valve Relay 4 | DIO-10 |
Solenoid Valve Relay 5 | DIO-11 |
Solenoid Valve Relay 6 | DIO-12 |
RobotGeek 4-line LCD | I2C |
Up Button | AIO-0 (as DIO-14) |
Up Button | AIO-1 (as DIO-15) |
Up Button | AIO-2 (as DIO-16) |
Up Button | AIO-3 (as DIO-17) |
Assembly
Arrange your components so that the wires are not stressed and the electronics are clear of liquid danger. Another consideration is keeping wire mess contained between the two workbench plates. Check out the pictures for inspiration on arranging your components, and check out the wonderful diagram (ten thousand hours in mspaint) to make sure you're running your liquid lines with the proper orientation to function with the pump.
Programming and Testing
You'll need to grab the RobotGeek Libraries and Tools. Included are all the libraries used for the 6-Shooter, and the demonstration code to get you running. Put it in your Arduino folder, open the IDE, and load up:
File → Sketchbook → RobotGeekSketches → Demos → drinkStation
And let's take a look at the code.
// Selections String selectionLine[14] = { " ", //buffer line. Leave here or experience terror. "1. Red ", "2. Green ", "3. Blue ", "4. Yellow ", "5. White ", "6. Black ", "7. Red & Yellow ", "8. Green & Blue ", "9. Black & White ", "10. Black & Yellow ", " ", //buffer line. Leave here or experience terror. " ", //buffer line. Leave here or experience terror. "End of List " //buffer line. Leave here or experience terror. };
This is the list of drinks. These names will show up on the LCD screen, and can be scrolled through to be selected. You can change this to accurately reflect the drinks and mixtures available.
int PUMP_TIME = 2500; //Time for pumping station to run in milliseconds
This is the default pump running time. You can change this to deliver larger shots by default.
LiquidCrystal_I2C lcd(0x27, 20, 4); //I2C 4 Row 20 Col LCD Screen at 0x27 //LiquidCrystal_I2C lcd(0x3F, 20, 4); //I2C 4 Row 20 Col LCD Screen at 0x3F
This is where we call the screen. Some screens are addressed differently than others, so if the screen doesn't display the list when you load up the sketch, change the address here.
if ( debounce[2].fell() ) { switch (drinkSelectCounter) { case 1: // Red lcd.setCursor(0, 0); lcd.print(promptLine[2]); colorWipe(strip.Color(255, 0, 0), 50); // Red digitalWrite(PUMP_RELAY_PIN, HIGH); // Turn on the pump digitalWrite(SELECTED_RELAY_PIN[0], HIGH); // Open Solenoid valve 1 delay(PUMP_TIME); // Run for the set amount of time digitalWrite(SELECTED_RELAY_PIN[0], LOW); // Close Solenoid valve 1 digitalWrite(CLEAN_RELAY_PIN, HIGH); // Open Solenoid valve 7 delay(PUMP_TIME); // Run for the set amount of time digitalWrite(CLEAN_RELAY_PIN, LOW); // Close Solenoid valve 7 digitalWrite(PUMP_RELAY_PIN, LOW); // Turn off the pump break;
This is the call for the drink, and the operations for the first drink on the list. You can add or change each case as you see fit for the drink you want to mix. Each case is a line of actions, starting with changing the prompt on the screen, followed by turning on the lights, followed by the sequence of opening the proper valve and running the pump. You should only run the pump if at least one valve is open.
Upload the code to your microcontroller and give it a whirl! We suggest testing it with some water first, just in case something in your build is funky. Make sure to test every valve individually before testing mixtures. Once you are satisfied with the operation, start planning a party!
Party Down!
Now you have an automated bartender! Your guests will flip when they get a perfectly crafted drink from a robot with the push of a button! What can you do from this point? What about adding bluetooth functionality and making an app for your guests to select their drinks from their phone (MIT App Inventor is a great tool for this)? How about adding a robot arm to deliver the drinks to multiple glasses and really knock their socks off? Maybe you could find a way to put this bad boy on a rover and have a drink serving droid rolling around your house? As always, we'd love to hear what you come up with!