Keg Level Sensor: A new way to measure beer volume
About two years ago, I decided it’s time to get back into homebrewing. Let’s clarify that one of the primary motivators for me to stop brewing about 10 years ago was all the time that I had to set aside for washing and sanitizing bottles. This time was going to be different. After convincing my wife to move the kitchen table outside to make room for a kegerator, I knew I had the green light.
Kegging batches was going great, but I was really starting to get tired of that soul-crushing feeling of a keg blowing when I had no idea I had already drank that much. In line with most of my other first-world problems, I decided to do absolutely nothing about it. Fast forward to March 2020: Pandemic, quarantine . . . golf courses are closed, so can’t go out and shoot double bogey on every hole. Breweries are closed, so I can’t sit around and complain about my golf game to strangers. And finally I’m stuck inside forced to drink whatever hooch I brew in my backyard.
With all the extra time on my hands, I decided that I would pick up a new hobby . . . electronics. With a background in industrial automation in the water industry, I knew there had to be another way to monitor the keg level than using flow sensors or scales. Not that I’m opposed to those measurement methodologies, I just thought to myself, “Why can’t I just have a sensor as part of the keg lid”?
I decided to pull the trigger on a time-of-flight sensor to measure the distance from the lid to the surface of the beer. I knew that this distance could be easily converted to a unit of volume. While I was at it, I realized that if this sensor is going to be part of the lid, why not monitor temperature and CO2 pressure while I’m at it? At that point, I knew I had to build a sensor that could measure everything from inside of the keg. Sacrificing an old Corny keg lid and designing a 3-D printed enclosure, I built an integrated keg lid level, temperature, and pressure sensor. For about $65 (USD), you can build one of these for yourself!
This sensor has been useful and a lot of fun. It’s great to have an idea of how much is left in the keg to plan future brew days and schedule the current brew fermenting. I also decided to take it a step further and develop a mobile app. Using the mobile app, if the in-laws come by to watch the cat while my wife and I are out of town, I’ll know if they didn’t try any homebrew . . . which is basically a requirement when they come over. This could come in handy for homebrewers who are parents of teenagers as well.
Moving forward, and with awesome support from the homebrewing community, I have been developing this model for support with Android and iOS, open-source hardware like Arduino and Raspberry Pi, and other brewing community platforms.
Tools and Materials
- Drill press with drill bits for stainless steel
- Soldering iron
- 3-D printer
- 3-D printed sensor enclosure (https://www.thingiverse.com/thing:4670817)
- VL53L0X Time-of-Flight breakout board (25 mm x 12.2 mm board)
- HSCMAND150PA4A3 pressure and temperature sensor
- Male 4-pin GX16 aviation connector
- Corny keg lid
- Food-grade epoxy (recommend ZDSticky)
- 22 AWG stranded wire, multiple colors recommended (red, black, blue, white)