Low Cost Beer Monitoring System

by ricklloyd24 in Circuits > Arduino

175 Views, 4 Favorites, 0 Comments

Low Cost Beer Monitoring System

Final.JPG

Build your own beer keg monitoring system that keeps track of how many glasses of beer are left in each keg. The entire system costs less than $100 for 5 beer taps.

Features:

  • Tracks number of glasses of beer left.
  • Controls Beer freezer temperature
  • Provides email and text message notifications.
  • Provides local and remote displays via Wi-Fi.
  • Accessible anywhere in the world with Port Forwarding
  • Monitors up to 5 beer taps.
  • Temperature Stability +/- 0.75 degrees F
  • Works with all DHT and/or MCP9808 Temperature Sensors
  • Up to 3 temperature sensors can be used.

Introduction

Currently there are two types of systems to measure how much beer is left in the keg:

  • Flow measuring.
  • Weight of Keg.

Flow measuring systems are cheaper (6 taps about $500) but they have limited utility and you have to clean them every time you clean your beer lines (every 6 weeks).

Weight of keg systems are none intrusive, but very expensive ($1000 for 5 taps). They are not integrated with your entire system. This system measures the weight of the keg but is low cost.

Theory of Operation

The theory of operation is quite simple. The data you need is:

  • 1)   Scale reading with nothing on the scale (Empty Scale Quanta)
  • 2)   Scale reading with a full keg of beer on the scale (Full Scale Quanta)
  • 3)   Scale reading of current keg (Current Scale Quanta)
  • 4)   Weight of a full keg (Full Keg Weight)
  • 5)   Weight of an empty keg (Empty Keg Weight)

The system automatically measures the first three items, all you need to do is measure the full key weight and the empty keg weight. I just use a bathroom scale.

Reading Per Ounce = (Full Scale Quanta – Empty Scale Quanta) / (Full Keg Weight * 16)

Current Ounces = (Current Scale Quanta – Empty Scale Quanta) / Reading Per Ounce

Glasses = (Current Ounces – Empty Keg Weight) / 12 Ounces per glass

Supplies

BOM.jpg

Tools Required

  • Arduino Software (download for free). Arduino experience is recommended.
  • Soldering Iron (Amazon $10, Soldering Iron Kit - 9-in-1 With 5 Tips, Solder Wire)
  • Connectors and Crimping Tool (Amazon $30, Kit with 1550PCS Male and Female 2.54mm Terminals)
  • Multi Meter (Recommended Harbor Freight $7, 7-Function Digital Multimeter)
  • Drill Motor, Saw
  • Small Pliers, screw drivers

Hardware

image1.jpeg

The above block diagram shows the entire system.

If your beer storage unit already has temperature control, you will not need the temperature sensors or relay. If you only want a local display, you can eliminate the ESP32 D1 R32 board and the interface wire. 

My beer freezer is in the pool shack which does not have Wi-Fi. To get Wi-Fi, I installed an old ESP32 board under the eave and ran a cable between the two processors. They talk to each other on a serial interface.

I provided the following steps for the some of the hardware. More detailed steps and the software are available on GitHub. 

VGA Monitor

VGAInterface.jpg
VideoDisplay.jpeg

VGA Monitor

For this project I selected a VGA monitor for my local display. VGA monitors are large and easy to read for my guests. They are also readily available and cheap. I got mine free at a garage sale. They were closing and the monitor was still there, so they gave it to me. I also bought a VGA monitor at a thrift store for 10 dollars. The monitor came with a power cord and VGA cable.

VGA Adapter

You need a VGA adapter to connect the VGA cable to your processor board. I used a VGA Female 3 Row 15Pin Connector Breakout adapter shown on the right. Available from Amazon.


Keyboard

KeyboardSchemtic.jpg

Keyboard

I selected a PS2 keyboard for this project because they are very easy to interface. You can normally find PS2 keyboards at garage sales and thrift stores, but they are getting harder to find. You can tell it is a PS2 keyboard by the distinctive round PS2 connector. For a while they made PS2 compatible keyboards with a USB connector, but unless the keyboard specifically says PS2 compatible it will not work. If you can't find a used PS2 keyboard, new ones are available on Amazon for about 20 dollars.

The PS2 keyboard requires 5 volts to operate and the ESP32 operates on 3.3 volts. So, you need to make sure that the keyboard is wired to 5 volts and the pullup resisters are connected to the 3.3-volt supply. The PS2 output is an open collector interface.

PS2 breakout adapters like the one shown are available but can be hard to find. There are USB to PS2 adapters readily available, so you can use a USB breakout adapter instead.

Scale Design

FinalScales.jpg
NoRetainers1.jpg

For the scale plate I used Aluminum Composite Sign Panel sheet. The sheets are 1/8 inch thick and come in a variety of sizes. The most common is 12 inches by 24 inches. You can use standard wood cutting tools to work with the plates.

I made two sizes of scale plates. 9.25 inches for Corny and 1/6 Barrel kegs. 12.125 for the Slim 1/4 Barrel.

Making the Scales

I used two different methods to make the scales. The figures show the two different methods. For the first one I used a table router and a table saw. The holes are for the strain gauge and on the center line of the plate. I made them through holes so you can align the strain gauge in the slot. I routed an area is for the HX711 board. You route out the area leaving a 1/16 inch top. You cut a through area for the pins to go through the board.

With the scrap aluminum plate, I made some retainers to hold the the strain gauge retainer in place. For the retainers, you route out an area and again leave 1/16 inch top material. The retainer only keeps the strain gauge from moving. All the keg weight is supported by the plate and the strain gauge. I also made a little retainer to hole the HX711 board in place.

To hold the retainers in place I used 1/4-inch flat head machine screws. I drilled and tapped the plate to hold the screws. You can also use sheet metal screws, so you don't have to drill and tap.

If you don't have a router table you can cut the holes in the plate and use sheet metal screws to hold the strain gauges and HX711 board in place.

Keg Holder

I made keg holders for the kegs. It is important to use these to protect the HX711 connector from getting squashed and provide a hard surface for the strain gauge to sit on. My freezer bottom was soft and strain gauge pressure point went right into the bottom. The keg holder uses 1x2 lumber for the frame with a hard plate on the bottom. I used vinyl plank flooring on the bottom. It is completely waterproof, has a nice rubber backing for the bottom and has a very hard surface. The bottom is just nailed to the frame.

Relay

FreezerControl.jpg

The Freezer Control Relay is used to turn On/Off the freezer. If you are using a refrigerator or you already have a freezer controller you do not this relay.

The following are the specifications for the relay I selected.

The power switch is compatible with 10A 250VAC. An Optocoupler Isolator:3V/3.3V power relay module supports photocoupler isolation control.

The freezer I use was an Insignia™ - 10.2 Cu. Ft. Chest Freezer. The start up current is 21.4 amps and the On current is 2.0 amps. The relay has handled the startup current fine.

The above schematic provides an overview of the connections. I included a picture of my final product. I got the line cord off a food blender that was broken. The line cord has 16-gauge wires. The plug and the box were pieces I had laying around. The relay is enclosed inside the electrical box. The plug in the box goes to the freezer. I broke the power tab in the AC socket, so each socket is individual. I wired one socket to the relay normally open connection and the other to the relay normally closed connection. When the freezer is on the power socket is off and when the freezer is off the power socket is on.

Software

The software is available at https://github.com/RickLloyd24/Beer-Keg-Monitor. There are also software writeups to explain key features.

All the writeups assume that you are an experienced Arduino user. I don't include how to install Arduino, installing libraries or the Arduino interface.

If you are not an experienced Arduino user try doing some simple example projects. After you have completed these projects try doing the VGATest.ino example on my GitHub site. If you can get this far the rest should be easy.