Sign In

Remember Me

Tech Thursday #013: Keg-a-Droid Beer Dispensing Control System

Lately we have been hard at work developing a new robotic beer servant named Keg-a-Droid; you can check out our Kickstarter campaign. Keg-a-droid is a remote controlled, mobile robot equipped with a keg and tap system and this week’s Tech Thursday will demonstrate some components of the beer dispensing control system. More specifically, this is the test setup we used to calibrate our flowmeter output to fluid volume.

Components

Let’s cover the parts used:

Flowmeter – This is a hall-effect based flowmeter. It functions similarly to motor encoders: as fluid flows through the flowmeter, it generates digital pulses that can be counted to determine how much fluid has passed. On Keg-a-Droid, this component will be used to track how much beer has been dispensed.

Encoder Buffer Board (TE-183-002) – This component is used to count the flowmeter output pulses. It features a SPI interface and can easily be combined with an Arduino or other microcontroller.

LCD (LCD-013-420) – This is a 20×4 LCD with an I2C interface. We’re controlling it through the Arduino using the LiquidCrystal_I2C library (https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads). Its current draw is low enough that it can be powered directly from the Arduino’s 5V bus. In this project it is used to display the flowmeter pulse count.

Solenoid Valve – This is just a valve that is opened and closed using a 24V, 150 mA solenoid. When the solenoid is unpowered, the valve is closed. When current flows through the solenoid, the valve is opened and fluid is permitted through. This allows us to electronically enable and disable fluid flow.

High Current TTL Driver (TE-010-800) – This component allows control over the solenoid valve. As the Arduino can’t provide the 24V and 150 mA needed to drive the solenoid, the high current driver has a 5V TTL input that enables or disables the solenoid’s connection to a 24V battery.

24V Battery – Used as the power source for the solenoid valve. On Keg-a-Droid, this is also the source for the drive motors.

Arduino Uno (MCU-050-000) – Control board used to open/close the solenoid valve through the high current driver, read flowmeter pulses from the buffer board, and write the data to the LCD.

Setup

The flowmeter calibration setup is shown in the figure below.

Figure 1: Flowmeter Calibration Setup

Figure 1: Flowmeter Calibration Setup

And here’s a functional schematic showing how the components are connected.

Figure 2: Functional Schematic

Figure 2: Functional Schematic

Note that this isn’t a true wiring schematic since some connections such as the 5V source and channel select line to the buffer board are omitted.

Arduino Code

The code below makes use of the LiquidCrystal_I2C library to talk to the LCD and the SPI library to read from the buffer board. On each loop iteration, it reads the flowmeter pulse count from the buffer board and outputs it to the LCD screen. The solenoid valve is enabled/disabled every ~5 seconds by setting the current driver’s enable pin to high/low. You can replace the solenoid enable logic to use e.g. an external button or a serial command from the PC. We actually used a barcode scanner and scanned specific barcodes to open and close the solenoid, but that code is not included here.



#kegadroid #encoders #arduino #techthursday

Leave a Reply