Beverage Appliance With Web Interface

by cpbinstructables in Cooking > Beverages

61805 Views, 327 Favorites, 0 Comments

Beverage Appliance With Web Interface

52b9f5eadbf3ec0070000099.jpg
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

The Web Interface

browser screen - hey cutie.png
This is the Web Interface loaded from the Raspberry Pi.

Install Beverage Appliance Image on the Raspberry Pi

pi-with-website-on-screen.jpg
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.


Building Raspberry Pi Image From Scratch

pi-with-website-on-screen.jpg
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

Review of Digital Hardward

complete-setup.JPG
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.

Breadboard Circuit Diagram

circuit-diagram-labeled.png
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

Breadboard Circuit - Diagrammed

bread-board-labeled.png
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

Wiring 12v Out to Relay Circuit

circuit-board-12v-out.png
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.

Wiring the Relay Block

relay-pins-wiring.png
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.

Wiring Up the Relays for the Solenoids

solenoid-wiring.png
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.

5v to Control Relay Board

5v-out-to-relay.png
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.

Wiring the Pi to the Relay Board

wiring-pi-to-relay.png
Use female jumper cables to connect the Raspberry Pi to the relay board.

Relay Pin Diagram

pi-wiring-diagram.png
Match the Relay Pin to Pi Pin diagram to wire the two together.

Cables Out of Raspberry Pi

pi-wires.JPG
This is what the cabling will look like coming out of the Raspberry Pi.

Completed Wiring of Relay

relay.JPG
The picture illustrates the completely wired relay board.

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.

3D Printing - Print Out the Bottle Bracket Holder

single piece bottle holder v3.png
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.

Print Solenoid Adapter

Solinoid Adaptor.png
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.

3D Printing - Gang Valve

gang-valve.png
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.


Print 3D Top of Bottle Insert

top-of-bottle-stage.png
Print four copies the Top-of-Bottle.stl

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

3D Print Spigot Bracket 3A and 3B

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

This part holds down the Gang Valve onto the base.

3D Vacuum Relief Valve

vacuum-break-tube.png
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.

3D Print Spigot

spigot-final.png
3D print spigot model.

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

Print Gang Valve End Cap

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

Glue to end cap with cyanoacrylate glue.

Check for leaks.

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-...

Attach Bottle Insert to Solenoid

solenoid-and-bottle-insert.png
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.

Deconstruct the Bar Caddy

final-touch-bar-caddy.png
A Bar Caddy is used to hold the bottles.

We used the Final Touch Bar Caddy Dispenser.

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

Dispensing Armature of Bar Caddy

52bc8e7edbf3ecc9470000b4.jpg
Remove dispensing armature as if to replace a bottle.

Save Rubber Stoppers

rubber-stopper.png
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.

Solenoid and Bottle Assembly

52bc1b7adbf3ec44b1000046.jpg
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.

Dispensing Assembly

52bcc700dbf3ec48350000e9.jpg
Another view of the dispensing assembly.

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

Mini-Valve Addition

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

Assemble the Base

52bd665adbf3ececf6000129.jpg
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.

Mount the Caddy to the Base

52bd67b8dbf3ec3eef000169.jpg
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.

Mount the Electronics

52bd68dbdbf3ecc947000164.jpg
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.

Threaded Security Cables

52bd6b21dbf3ec0e510001a4.jpg
Another view of the threaded security cables.

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

Thread Security Cables

security-cable-wiring.png
Thread the security cables through the base and up the beverage caddy.

Secure with strip-ties as shown here.

Attach Quick-Clips

quick-clip-closeup.png
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!

Security Cable With Clips Added

security-wiring-clip-end.png
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!

Completed Wiring Example

completed-wiring.JPG
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!

Gang Valve Assembly

52bd7e46dbf3ec0e510001be.jpg
52bda167dbf3ec48350001bb.jpg
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.

Vacuum Relief Valves

52bd831edbf3ec4ba7000192.jpg
Cut 150 mm tubing.

Insert vacuum relief valve.

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

The Answer to Life, the Universe, and Everthing.

Assemble the Spigot

52bd8374dbf3ec4ba7000194.jpg
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.

Gang Valve Brackets

52bd845ddbf3ec0e510001c3.jpg
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.

Gang Valve Assembly Completed

52bdccaedbf3ec8a18000007.jpg
The completed gang valve assembly with spigot attached.

Ensure spigot out-pour is facing down.

Connect the Solenoids to Power

52bf44472f7cc62c3d00017f.jpg
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.

Complete Chassis

52bdde47dbf3ec4358000054.jpg
The chassis completed with solenoids and tubing attached.

The Assembled Appliance - Angled View

52bddf33dbf3ec8a18000015.jpg
The Assembled Appliance - Angled View

Assembled Beverage Appliance

assembled-view-from-front.JPG
The assembled appliance, front view.

Test Rasperry Pi

pi-with-website-on-screen.jpg
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.

Raspberry Pi IP Address

ip-address.jpg
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.


Top the Pours With Duck Valves

duck-valves-in-bottles.png
Top each bottle with a silicon duck valve.




Load Beverage Bottles

Remove quick clips from solenoids.

Gently pull off the dispensing assembly.


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.


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.


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!