Introduction: Beverage Appliance With Web Interface

Picture of Beverage Appliance With Web Interface

The Beverage Appliance dispenses a mixture of any four liquids.

The Beverage Appliance is controlled via web interface.

The controller is composed of a Raspberry Pi, a relay, and a custom relay controller.

The image of modified Raspberry Pi software is available here:
https://github.com/cpbtechnology/Beverage-Applianc...


The image includes the relay controller software, the web interface.

The Beverage Appliance is created from off-the-shelf parts with some 3D printed parts. These parts are also available here:
https://github.com/cpbtechnology/Beverage-Applianc...


Credits:
Lead Engineer: Rick Valdez
Appliance Engineers: Erick Perez, Rick Valdez
Software Engineers: Mike Bosch, Jimmy Pino, Serdar Karatekin

Step 1: The Web Interface

Picture of The Web Interface

This is the Web Interface loaded from the Raspberry Pi.

Step 2: Install Beverage Appliance Image on the Raspberry Pi

Picture of Install Beverage Appliance Image on the Raspberry Pi

Download the Beverage Appliance .bz2 image file from (right-click and Save):
http://rockymountaintech.org/beverage-appliance-20...

Copy the extracted Raspberry Pi image onto an 8-gig SSD card.

Sample Instructions: http://elinux.org/RPi_Easy_SD_Card_Setup

Insert the new SSD card into the Raspberry Pi.

Attach to the Raspberry Pi a monitor, keyboard, mouse and Internet.

Plug in the Raspberry Pi to a power source.

Once the system successfully boots, launch Midori.

Check that you have a good Internet connection by surfing to Google.com to check loading.

Browse to the local URL: 127.0.0.1 - the above image should appear.


Step 3: Building Raspberry Pi Image From Scratch

Picture of Building Raspberry Pi Image From Scratch

Download the NOOBs installation of the Raspberry PI and follow the installation instructions here:

http://elinux.org/RPi_Easy_SD_Card_Setup

Install basic software and install the Beverage Appliance web interface by following the instructions here:

https://github.com/cpbtechnology/Beverage-Appliance/blob/master/pi-setup-documentation-public.txt

Step 4: Review of Digital Hardward

Picture of Review of Digital Hardward

The complete digital setup. We’ll describe each part next.
There are three parts.

1) Raspberry Pi - controls relays and website

2) Breadboard - Homegrown 12 volt to 5 volt relay converter.

3. Relay switch. The 12 volts activate the large blue switches, the 5 volts controls the led lights on the board itself.

Step 5: Breadboard Circuit Diagram

Picture of Breadboard Circuit Diagram

The circuit diagram for the bread-board.

a) 12v In - 2.1 mm CD Barrel Jack

b) 10uF Electrolytic Capacitor, 35v

c) Voltage Regulator - 5v

d) 1uF Electrolytic Capacitor, 16v

e) 12v Out - Screw terminal, 2 pins

f) 5v Out - Generic male header - 2 pins

Step 6: Breadboard Circuit - Diagrammed

Picture of Breadboard Circuit - Diagrammed

Solder the breadboard with these parts.

a) 12v In - 2.1 mm CD Barrel Jack

b) 10uF Electrolytic Capacitor, 35v

c) Voltage Regulator - 5v d)

e) 12v Out - Screw terminal, 2 pins

f) 5v Out - Generic male header - 2 pins

Step 7: Wiring 12v Out to Relay Circuit

Picture of Wiring 12v Out to Relay Circuit

From the breadboard there is one 12v Out (E).

Red is power.

Black is ground.

The power wire loops to the first relay block.

The ground wire connects to the other ground wires later in the tutorial.

Step 8: Wiring the Relay Block

Picture of Wiring the Relay Block

We’re using 4 of the 8 relays.

1. Run the power from the breadboard to the center pin of the three pins associated with each relay.

2. Cut small pieces of wire and loop from one center pin to the next center pin for all three remaining relays.

Step 9: Wiring Up the Relays for the Solenoids

Picture of Wiring Up the Relays for the Solenoids

We’re using shielded Security Cabling.

Expose the four wires: white, red, black, green.

Two sets of wiring will control the four solenoids using a total of eight wires.

Green and black are ground.

Red and white are power.

In the diagram shown, the red wire is colored white for easier identification.

Connect the red & white wires to position 3 of each of the relays.

Note in this diagram all four wires are colored white.

Strip and connect the two sets of green and black wires to the single ground wire from E.

Tape or wrap the wiring for a secure connection.

Step 10: 5v to Control Relay Board

Picture of 5v to Control Relay Board

5v power out from breadboard to control relay board.

Run two jumper wires from the 5v Out on the breadboard to the pins on the relay board.

Green power runs to the jumper marked VCC. This is the last pin in the center row of pins.

Black ground goes to the first pin of the three at the top of the relay. It is marked GND VCC.

Step 11: Wiring the Pi to the Relay Board

Picture of Wiring the Pi to the Relay Board

Use female jumper cables to connect the Raspberry Pi to the relay board.

Step 12: Relay Pin Diagram

Picture of Relay Pin Diagram

Match the Relay Pin to Pi Pin diagram to wire the two together.

Step 13: Cables Out of Raspberry Pi

Picture of Cables Out of Raspberry Pi

This is what the cabling will look like coming out of the Raspberry Pi.

Step 14: Completed Wiring of Relay

Picture of Completed Wiring of Relay

The picture illustrates the completely wired relay board.

Step 15: Review the Files in the 3d-models Folder

Each model has two sets of files - 123dx and stl

123dx is the format used by Autodesk 123D Design free application.

stl is the output format read by the Afina H-Series printer and other 3d printers.

Step 16: 3D Printing - Print Out the Bottle Bracket Holder

Picture of 3D Printing - Print Out the Bottle Bracket Holder

Print out four of the Bottle-Bracket-Holder.stl files on your 3D printer.

This is the large flat support that will hold the bottle.

Step 17: Print Solenoid Adapter

Picture of Print Solenoid Adapter

Print four copies of the Solenoid Adapter.

Print the model on the finest settings.

Clean the model very thoroughly because a water-tight seal is needed.

This replaces the part on the retail product.

Step 18: 3D Printing - Gang Valve

Picture of 3D Printing - Gang Valve

Print one copy of the Gang-Valve.stl

This brings all the liquids together. The spigot attaches here.

Notice that one end is open for easy cleaning of the model.


Step 19: Print 3D Top of Bottle Insert

Picture of Print 3D Top of Bottle Insert

Print four copies the Top-of-Bottle.stl

This connects to the Bottle Bracket Holder to funnel the liquid.

Step 20: 3D Print Spigot Bracket 3A and 3B

Picture of 3D Print Spigot Bracket 3A and 3B

3D print out Spigot Bracket 3A and 3B from spigot bracket.stl.

This part holds down the Gang Valve onto the base.

Step 21: 3D Vacuum Relief Valve

Picture of 3D Vacuum Relief Valve

3D print out two of the Vacuum Relief Valve.

This part is needed to allow the free flow of liquids out of the longer flow tubes.

Step 22: 3D Print Spigot

Picture of 3D Print Spigot

3D print spigot model.

The spigot is the final out-flow of the beverage appliance.

Step 23: Print Gang Valve End Cap

Picture of Print Gang Valve End Cap

3D print the gang valve end cap to seal the unit.

Glue to end cap with cyanoacrylate glue.

Check for leaks.

Step 24: Disassemble Solenoid

Disassemble Solenoid

Unscrew the Solenoid and Save silicon ring - VERY IMPORTANT

Insert into replacement printed part. replace silicon ring, plunger and solenoid body.

The part can be ordered from an eBay or other seller such as this:
http://www.ebay.com/itm/1-2-Gravity-Feed-Electric-...

Step 25: Attach Bottle Insert to Solenoid

Picture of Attach Bottle Insert to Solenoid

Attach and glue solenoid adaptor to Bottle Insert. Glue with Cyanoate Glue such as Bob Smith Insta-Cure Glue.

http://www.amazon.com/Bob-Smith-108-Insta-Cure-Fil...

Use plenty of glue, very carefully. Ensure a water-tight seal.

Step 26: Deconstruct the Bar Caddy

Picture of Deconstruct the Bar Caddy

A Bar Caddy is used to hold the bottles.

We used the Final Touch Bar Caddy Dispenser.

http://www.finaltouchwine.com/FTA1814.html

Step 27: Dispensing Armature of Bar Caddy

Picture of Dispensing Armature of Bar Caddy

Remove dispensing armature as if to replace a bottle.

Step 28: Save Rubber Stoppers

Picture of Save Rubber Stoppers

Remove the rubber stoppers from the top of each of the four bottle dispenser assemblies. It should slip off. Do not cut it.

Set the rest aside.

Step 29: Solenoid and Bottle Assembly

Picture of Solenoid and Bottle Assembly

Slide on the bottle mount on to the top of the bottle pour.

Slide the rubber stopper on top of the bottle mount.

No gluing is required.

Step 30: Dispensing Assembly

Picture of Dispensing Assembly

Another view of the dispensing assembly.

Note that the bottle support has the wide notch facing upward.

Step 31: Mini-Valve Addition

Slip 11mm white mini-valves on top of the dispensing assembly before inserting into bottles.

Step 32: Assemble the Base

Picture of Assemble the Base

A champagne box is used for the base.

This one was purchased at Total Wine (without the champagne.)

Any box or base will do with at least 6 inches of inside clearance.

The base will get wet - don't use cardboard for the base.

Step 33: Mount the Caddy to the Base

Picture of Mount the Caddy to the Base

Mount the bar caddy frame on the box.

This can be done by drilling screws into the base of the bar caddy from underneath the box. Brackets could also be used.

This is a heavy project once completed, so use strong screws or brackets.

Mark the back edge of the bar caddy and drill a 1/4” hole to thread the control cables.

Step 34: Mount the Electronics

Picture of Mount the Electronics

Mount the electronics onto a board with brackets or screws.

Mount the electronics board into the bottom of the box.

Thread the security cable through the hole in the base.

Note the loop added to the security cable.

This ensures that liquids that spill on the hole will drip down to the table and not touch the electronics.

Step 35: Threaded Security Cables

Picture of Threaded Security Cables

Another view of the threaded security cables.

Note that the orange quick-clips are added AFTER the threading of the security cables.

Step 36: Thread Security Cables

Picture of Thread Security Cables

Thread the security cables through the base and up the beverage caddy.

Secure with strip-ties as shown here.

Step 37: Attach Quick-Clips

Picture of Attach Quick-Clips

Attach quick-clips to the ends of each wire in the security cable.

Each cable has four wires and can drive 2 bottles.

There will be two power and two ground wires.

CAUTION: Mark the pairs of wires so that one power and one ground per bottle are used!

Step 38: Security Cable With Clips Added

Picture of Security Cable With Clips Added

Use Male/Female Quick-Disconnects

Two power and two ground from each security wire will control the flow from two bottles.

Attach Male/Female Quick-Disconnects to the matching end of the wired cables.

Note that red and green are one circuit and black and white are another circuit.

Do no mix the colors!

Step 39: Completed Wiring Example

Picture of Completed Wiring Example

Completed wiring of both cables.

2 Security cables with four wires each.

A total of 8 wires.

Two per solenoid.

CAUTION: Mark the pairs of wires so that one power and one ground per bottle are used!

Step 40: Gang Valve Assembly

Picture of Gang Valve Assembly

Assemble the gang valve with 1/2” tubing and plastic flanged 90 degree adapters available from your local hardware store.

Four 100 mm - Vertical tubing connected to the gang valve.

Two 40 mm - Horizontal tubing connecting the two flanged 90 degree adapters.

Two 150 mm - Horizontal tubing connecting the two flanged 90 degree adapters.

Four 35 mm - Vertical tubing connected to the bottle output tubes.

Secure bottom of tubes to the gang valve with hose clamps.

Step 41: Vacuum Relief Valves

Picture of Vacuum Relief Valves

Cut 150 mm tubing.

Insert vacuum relief valve.

This valve allows liquid to continue to flow after the solenoid has closed.

Step 42: The Answer to Life, the Universe, and Everthing.

Step 43: Assemble the Spigot

Picture of Assemble the Spigot

3D print out the spigot.
Attach short tubing.

Connect the output of the gang valve with the short tubing and secure with a hose clamp.

Step 44: Gang Valve Brackets

Picture of Gang Valve Brackets

Carefully measure and location of gang valve.

Screw in the gang valve brackets.

These hold the gang valve and tubing in place.

The closed ends should be facing the outside edge.

Step 45: Gang Valve Assembly Completed

Picture of Gang Valve Assembly Completed

The completed gang valve assembly with spigot attached.

Ensure spigot out-pour is facing down.

Step 46: Connect the Solenoids to Power

Picture of Connect the Solenoids to Power

Attach the leads to the solenoids.

Use caution to attach the correct power and ground leads, one per solenoid.


There are four wires coming from each security cable. Two are power and two are ground.

Double check each output before attaching to the solenoids.

Step 47: Complete Chassis

Picture of Complete Chassis

The chassis completed with solenoids and tubing attached.

Step 48: The Assembled Appliance - Angled View

Picture of The Assembled Appliance - Angled View

The Assembled Appliance - Angled View

Step 49: Assembled Beverage Appliance

Picture of Assembled Beverage Appliance

The assembled appliance, front view.

Step 50: Test Rasperry Pi

Picture of Test Rasperry Pi

Connect the Raspberry Pi.

Download and install the Beverage Appliance Image.

Or visit Github and follow the installations to install the application from a clean N00bs image.
(Insert Link Here)

Open Midori to test that there is connection to the Internet.

Enter 127.0.0.1 to ensure the website pops up.

Step 51: Raspberry Pi IP Address

Picture of Raspberry Pi IP Address

You'll need the Raspberry Pi's IP address to enter into your computer or mobile browser.

Open the Terminal program to review the IP Address.

Enter the command ‘ifconfig’. Look for inet number.

Enter this number into your device and check the web application appears.


Step 52: Top the Pours With Duck Valves

Picture of Top the Pours With Duck Valves

Top each bottle with a silicon duck valve.




Step 53: Load Beverage Bottles

Remove quick clips from solenoids.

Gently pull off the dispensing assembly.


Step 54: Using the Web Interface

This video shows how to use the web interface.

Use the web interface with empty bottles to test they system.

You will hear clicking from the relays if all processes are working.


Step 55: Editing the Web Interface

The beverage listing are controlled by two files:
/Data/ingredients.json
/Data/recipes.json

Ingredients.json is an array of bottle ingredients assigned to the four Raspberry Pi pins. Do not edit the pins.

"name": "Grapefruit Juice",
"id": "GJ",
"pin": 22

Enter in the name of the ingredient and it's ID acronym in the list. You may use any name and any two character ID.

Mark on each solenoid the matching pin number to help ensure the bottles are loaded to the correct dispenser.

recipe.json is an array of the four ingredients. Up to 12 beverage combinations may be displayed. It is a more complex array - use care when editing.

"name": "Greyhound"
"id": "GH",
"ingredients":
[
{
"id": "V",
"amount": 1.5
},
{
"id": "GJ",
"amount": 4
}
]

Amount is the number of seconds each solenoid stays open. 1 second approximates 1 oz of beverage.
In the Greyhound, V stands for vodka, and GJ stands for grapefruit juice.

This is read from the matching ingredients.json file.


Step 56: Test Beverage Appliance With Water

Test the beverage appliance with water for leaks.

Some dripping may occur within the unit. But nothing should leak outside of the spigot.

Pour some beverages and enjoy!

Comments

mstyle183 (author)2014-01-14

this is genious.. i been meaning to do this myself and actually got this liquor dispenser for christmas. thanks for sharing this

Thank you mstyle183

lucasmeister (author)2014-01-06

Hi,

Good tutorial. I cannot see the final Spigot in git though?

Thanks

Good catch lucasmeister - refresh your git and you'll see it there.

Great thanks - it's there now.

One other thing. Looks like spigot bracket 03A is the same as spigot bracket 03B?

I'm presuming I need one of A and one of C?

Cheers

Yes, B slipped in there.

Thanks :)

Is there another name for these 11mm duck valves? Where can I get them?

xd12c (author)2014-01-02

CA glue is weakened by liquid over time. May want to look into a 2 part epoxy.. LocTite makes a 2 part solid epoxy for p;lumbers that should work well.

Great Instructible! Makes me wanna learn electronics so I can make it :-)

cpbinstructables (author)xd12c2014-01-03

Thanks for the tip xd12c. We're working on simplifying the electronics. We'll post an update once it's ready.

rdubtheleo (author)2014-01-02

Great Instructable. Although I am resourceful, a complete parts list all in one place would be great. Like a list of ingredients for your awesome instructable!!! Thank you very much!

thank you rdubtheleo - we're putting together such a list and will add it to the Instructable.

thank you rdubthleo - we're putting together such a list and will add it to the Instructable.

IcedZ (author)2014-01-01

I have been looking for a this valve (gravity feed) for over a year!!!! THANK YOU!!!!

And GREAT tutorial. I may do something similar when I get my printer.

jackricci (author)2013-12-31

those are called hose clamps

Thank you Jackricci

beingobserver (author)2013-12-31

Great Project!

Thank you for sharing.

Thank you Beingobserver!

About This Instructable

60,089views

324favorites

More by cpbinstructables:Beverage Appliance with Web InterfaceEngineering a 2D Printed Logo into a 3D Object
Add instructable to: