The Old Fashioned Machine - Automated Cocktail Dispenser
by nnieckoski in Circuits > Arduino
228 Views, 0 Favorites, 0 Comments
The Old Fashioned Machine - Automated Cocktail Dispenser

This Instructable was created as part of the MAKEcourse at the University of South Florida (www.makecourse.com).
The Old-Fashioned Machine is an automated bartender designed to craft a perfect Old Fashioned with the push of a button. The system uses three peristaltic pumps, an 8-channel relay module, and an IR infrared sensor to measure input and control liquid dispensing.
While there are many opportunities for future improvements, this first iteration successfully delivers a complete drink in just 5.7 seconds.
(Note: Legal drinking age in the United States is 21+)
Supplies
Tools Used
- 3D Printer
- ShopBot CNC Machine (programmed with VCarve software)
- Miter Saw
- Power Drill with accessory kit
- Screwdriver
- Wire stripper
Parts List
- (1) Arduino Nano
- (1) USB data sync cable
- (1) Power strip with USB charging ports and AC outlets (15W / 3.1A)
- (1) 12V 5A 60W AC/DC power adapter
- (1) Infrared sensor module
- (1) SG90 Tower Servo
- (3) 12V DC peristaltic pumps (170–460 mL/min flow rate)
- (3) 450mL airtight storage jars with cork lids
- (1) 10 ft length of 1/4" ID food-grade silicone tubing
- (5) 1/16" x 8" x 12" basswood sheets
- (1) 60W soldering kit
- (1) Box of multi-colored wire (various gauges)
- (1) Bag of 0.75" (20mm) zip tie mounts
- (1) Bag of zip ties
- (1) Bag of rubber bands
- (1) 3mm flat leather cord
- (4) 1/4" PP barb Y-tee hose fittings
- (1) 11 oz lowball glass
- (1) Bottle of Peychaud’s Aromatic Bitters
- (1) Bottle of Rose’s Simple Syrup
- (1) Bottle of bourbon of your choice
- (1) Bottle of wood glue
- (1) Can of dark walnut polystain
- (1) 8' x 11' piece of common board (3/8" x 3/4")
- (1) 5' x 7' piece of oak wood (3/8" x 3/4")
- (Plenty) Jumper Wires (female-to-female and female-to-male)
Prepare Panels for CNC




Step 1: Preparing and Cutting the Wood Panels
Begin by sourcing the required wood planks from your local hardware store (e.g., Home Depot or Lowe’s). Once acquired, cut the panels to the following dimensions and prepare the design files for CNC routing.
Wood Panel Requirements
- Front Sign
- Wood Type: Oak
- Quantity: 1
- Size: 16" x 11.375" (unengraved)
- Cutout: 5" x 6" door opening (centered)
- Side Panels
- Wood Type: Common Board
- Quantity: 2
- Size: 16" x 11.375" each
- Front Panel
- Wood Type: Common Board
- Quantity: 1
- Size: 11.375" x 10.625"
- Back Panel
- Wood Type: Common Board
- Quantity: 1
- Size: 16" x 11.375"
- Cutout: 9.5" x 8.375" rear access door (centered)
After cutting the panels, you’ll only need to engrave the Front Sign and Side Panels. CNC machine setup and compatible software may vary based on the equipment available. If you're new to the machine or software, it’s highly recommended to go through tutorials or built-in guides before beginning.
For VCarve Users
- Import the desired JPEG image.
- Convert the image to vectors using the black-and-white contrast.
- Save the toolpaths.
Engraving & Routing Details:
- Front Sign:
- Use a 60° V-bit for quick engraving
- Use a 1/4" up-cut bit for pocketing "THE SALOON"
- Use a 1/4" up-cut bit for profiling the outer cut
- Side Panels:
- Use a 60° V-bit for quick engraving on all graphics
Note: You can personalize the designs as desired—just ensure they are appropriately sized and strictly black-and-white to make vector creation easier during setup.
3D Print Internal Components and Mounts
Most of the 3D-printed parts in this project are designed to enclose electronic components, hold various elements in place, and enhance the overall appearance. Depending on the specific components you choose, the provided STL files may not fit perfectly. Feel free to modify or design your own parts—just be sure to apply a 0.5mm tolerance to ensure a secure, snug fit.
Downloads
Assemble the Wood Housing

Once all wood panels are cut and engraved, begin assembling the housing using 1/2" screws. Save the front sign for last to ensure it aligns flush and straight during final attachment.
For the back access door, lightly sand the edges to smooth out any roughness, then position it carefully to allow for clean, unobstructed movement. Secure the hinge in place and test the swing to confirm it opens and closes freely without catching.
Inner Assembly

Once the wooden housing is fully assembled, begin mounting the 3D-printed components in their designated positions:
- Cage – Align flush with the front opening of the housing.
- Mason Jar Holders – Install at the rear of the box, positioned just inside the back access door.
- Lid Pegs – Attach one in each corner, approximately 1/2" below the top edge of the box.
- Relay/Battery Stand – Mount on the left side of the interior near the cage (from a top-down view).
- Pump Shelf – This will be covered in a separate step due to its importance, but it installs on the right side.
- Arduino Housing – Position in the center of the housing for balanced access to all major components.
Secure the Peristaltic Pumps

The pump shelf is a critical component, as it supports all three pumps—which are heavier than they appear. To ensure stability, use the appropriate screws and always pre-drill pilot holes to avoid stripping the wood. While hot glue can be applied at key points for added reinforcement, the primary method of attachment should be screws.
Before installation, take time to level and mark the desired position of the shelf. It must sit low enough to remain below the lid pegs but high enough to avoid interfering with liquid flow.
Note: A potential design improvement would be to reinforce the shelf structure with additional supports to prevent forward tilt and reduce the need for last-minute adjustments.
Battery and Relay Setup

The AC/DC power supply provides the necessary voltage for the relay module to drive the peristaltic pumps. To begin, cut off the barrel connector (bulb end) of the power supply. Separate the black (negative) and red (positive) wires, and strip both ends using a wire stripper.
Next, cut three equal-length pieces of copper wire, long enough to reach from the power supply to the relay module. Strip both ends of each wire. Twist one end of all three wires together with the red wire from the power supply, then secure the connection tightly with a wire cap.
Connect the other ends of the three red wires to the relay module, placing each into the middle terminal of relay channels K1, K2, and K3. Use a precision screwdriver from your soldering kit to tighten them in place.
Finally, use female-to-male jumper wires to connect the following pins on the relay module: VCC, GND, K1, K2, and K3.
Connect the Pumps to the Relay

For the pumps, you’ll need six pieces of copper wire—three red (positive) and three black (ground). Cut and strip them to the appropriate length, ensuring they can reach from the relay module to each pump.
At the back of each peristaltic pump, you’ll find marked "+" and "−" terminals. Solder the stripped ends of the red and black wires to their corresponding terminals on each pump.
Route the wires through the pump shelf and connect the red wires to the leftmost “normally closed” terminals on the relay module.
Repeat the process for the black wires. These will serve as ground connections—twist the ends together with the black (ground) wire from the power supply and secure them using a wire nut.
Install Tubing


The next key step is properly installing the tubing. Ensure you have all required components on hand: Y-connectors, airlocks, and 1/4" food-grade silicone tubing. If you purchased the same peristaltic pumps used in this project, they likely came with an additional airlock attachment. This piece is useful for connecting the built-in pump tubing to extended 1/4" tubing.
At the dispensing end, attach a Y-connector and secure an airlock to the top of it. On the intake side (from the mason jars), insert the additional airlock between the jar and the pump tubing. Use zip ties at all connection points to ensure a tight, leak-free fit.
Install and Wire the Prime Button Panel

To install the buttons into the case, start by aligning each one in its designated position. Use a 1/8" drill bit to create holes for the prongs to pass through.
Each button has four prongs—two on each side. Due to polarity, select only one side (two prongs) to use. Once chosen, fold the unused prongs inward to help secure the button in place.
Next, solder a red copper wire to the top prong of your selected side, and attach a black female connector to the bottom prong. Repeat this process for all buttons.
Once all six buttons are wired, group the red wires and secure them under the RED wire nut. Do the same with the black wires under the BLACK wire nut.
Final Wiring and Cable Management

Keep in mind that pin assignments may vary depending on whether you're using the provided code or making modifications—so double-check your connections carefully.
You’ll have multiple wires coming from the relay module, servo motor, and IR sensor. As you wire everything, try to stay mindful of cable management. It may be helpful to handle most of the wiring before installing the components into the housing. This was something I overlooked, and my wiring ended up messy—manageable with zip ties, but it could have been much cleaner with better planning and execution.
Upload and Customize Code
The code is straightforward, but be sure to update the pin assignments if you’ve used different connections. Also, note that the logic levels (HIGH/LOW) may appear inverted due to how the relay module is manufactured.
One customizable aspect of the code is the duration for which the peristaltic pumps receive power—adjusting this value will control how much liquid is dispensed.
Downloads
Final Testing and Calibration

This is it—the final step! Double-check that all pumps are operating correctly and consistently dispensing the right amount of liquid. If adjustments are needed, you can easily tweak the timing values in the code.
Don’t forget to test the prime buttons as well—make sure each one activates the correct pump. A bit of trial and error is normal, and with a little practice, you’ll have a reliable setup that’s sure to impress.
Thanks so much for your interest in this Instructable! If you have any questions, comments, or feedback, feel free to drop them in the comments below. Happy making!