Introduction: Automated Bar
This project aims to produce a low-cost automated drinks vending system for use in high-end consumer and commercial applications. Traditional systems in bar automation utilise servo motors and large stiff rails with belt driven platforms. While an awesome project for anyone these systems can be cost-prohibitive, so we've developed a more affordable, maker-friendly design.
- Scalable to any assortment of spirits/mixer
- Google API integration for voice ordering
- Extensive crawled database of recipes
- Raspberry Pi 3 Model B
- Low-cost aluminium extrusion structure
- 3D printed PLA fixtures
- 9g servo actuators
Step 1: Parts List & Resources
The hardware requirements have been abstracted and pre-designed for you. However, you still need access to some resources that are not always easily accessible.
You will need access to:
- Dremel or bandsaw
- Soldering iron
Note: The following parts and prices are all in £ GBP and websites might be UK centered, however these parts are easily available in most areas. Some of the materials will be cheaper if ordered from China.
- 8 x Beaumont Spirit Optic & Stand 25 ml : £18.32 - CaterSpeed/Alibaba
- 5 meters x PVC Tube (6mm x 8mm) : £5.29 - ebay
- 20 x Extrusion 90° Brackets : £7.16 - ebay
- 20 x Drop T-Nut : £3.36 - ebay
- 20 x M5 10mm : £3.39 - ebay
- Stiff Wire : £1.49 - ebay
- 4 meters x Aluminium extrusion (20mmx20mm) : £22.96 -RS
1 x GP2Y0D805Z0F sensor, distance, 50mm, digital : £3.14 - Farnell
Step 2: Electronics & PCB
Full PCB schematics, photomasks, and BOMs are available through the Altium CircuitMaker community here.
The final boards are 2-layer, under <100x100mm, and can be obtained for $0.20 a piece through JLCPCB's prototyping service.
The populated board provided the following core features:
- 8x Servo channels
- 1x Load cell amplifier input
- 1x Digital proximity sensor input
- 2x Debug GPIO pins with LEDs
For future development, pads were also provided for:
- 8x Additional servo channels
- 4x General purpose ADC inputs
- 1x Spare load cell amplifier channel
- 2x Opto-isolated solenoid drivers with 12V rail
Step 3: 3D Printing
There are 4 different parts that need to be printed.
- Servo mounts
- Optic clips
- Proximity sensor bracket
- PVC Tube holders
Eight servo mounts and clips, one proximity sensor and two tube holders need to be printed. The files are available here.
The dispensing systems operates through a 9g servo mounted on each optic, with a metal strut connecting it to the base of the plunger. As the servo rotates, the plunger mechanism is pulled upwards, closing the fill-line to the bottle, opening the dispenser line, and allowing air return via a sprung element within the optic.
Food grade PVC tubes run from each optic and are held centrally above the receptacle by the two aligning components.
Behind the load cell is a digital proximity sensor, providing detection of a cup on the plate, held in position by a sliding printed mounting on the extrusion.
Inventor parts and assembly files are provided, with additional STL models for printed components. Technical drawings for key parts are also included, and can also be derived from the inventor documents in mm scale.
Step 4: Frame
1. Cut the extrusion into segments (4 x 400mm, 7 x 300mm, 1 x 15mm)
2. Assemble into a cuboid using the 90 degree brackets and T-Nuts at 90 degree junctions. Use the 400mm sections as the vertical posts, leaving one of the 300mm sections free as shown.
3. Connect the 15mm piece to the center of the lower back cross section.
4. Attach 3D printed proximity sensor and cup holder to the 15mm section as shown.
5. Epoxy the plate to the load cell and bolt to the end of the 15mm section using the T-Nuts and 20mm M5 bolts.
Step 5: Optics
For the optics to be operated by the servos the main spring needs to be removed.
1. Remove the plastic housing and large spring from the lower section of the optic.
2. Attach the 3D printed parts and servos as shown.
3. Connect the servos to the base of the plunger, through the holes in the servo arm and the printed part, using the stiff wire.
4. Attach the optics to the stands and clamp them to the frame evenly spaced out to avoid any uneven loads.
Step 6: Software
All of the software required for this project is available on our github.
The software consists of two main sections: the server and the firmware. Firmware is the c++ source code that compiles to a shared object that contains the automated bar logic and interacts with the load cell (HX711), servos and proximity sensor. The server directory contains the a python web server that imports the shared object as a module, once it receives a webhook from dialogflow it subsequently parses and accesses the desired behaviour through the binding.
Logic and Behaviour
The behaviour of the automated bar can be represented as a state machine shown above. Once a cup has been placed the machine is ready for an order, once received it will begin to dispense. When completed it will go back to a ready state for another drink and if the cup is ever removed it will go back to waiting it to be placed. The cup detection is done by the proximity sensor which returns a boolean value depending on whether or not it reads high or low. Dispensation is monitored by the weight sensor; once the python web server receives an order it calculates the required weight to dispense from the required volume and a density lookup table. The servos mapped to that drink are then found and subsequently actuated until the weight is matched. Once completed the the server returns a response to dialogflow indicating to the user that their drink is ready.
Step 7: Help & Issues
We hope you've enjoyed our guide, and we'd love to know if you decide to build it yourself! If you have any issues feel free to drop a comment below and we'll be happy to help you out.
The extra functionality on the board should allow you to expand your system up to 16 different drink components, as well as add a number of other mechanical actuators or sensors. Alternatively, feel free to fork either our hardware or software design files and add your own ideas! We'd love to see what the community can make of this.
Thanks for taking the time to read this through, and we wish you all the best with your own project: Eddy, Joe, and Pete.