A Smart Kegerator: Better Beer Management Through Technology
Given that it is St. Patrick’s Day, I thought it would be fitting to talk about my kegerator. What’s so special about my kegerator, you might ask? Beyond the fact that it dispenses homebrew in a cold, carbonated fashion, not much. In fact, my kegerator suffers from the same deficiency as most other setups: it has no idea how much beer is actually in the keg. This becomes an issue when you have friends over to enjoy some homebrew, only to find that the keg has gone belly up after two and a half pours. So I started to think about an easy way to give my keg some “smarts,” something that would estimate the quantity of beer remaining in the keg.
I started thinking about this after reading a blog post on Engadget about integrating an Arduino into a kegerator with the purpose of “checking-in” beers on Untappd (a social networking platform for the avid beer connoisseur). Using a simple flow meter, the Arduino would make an API call to Untappd every time it saw a beer being poured. A 5-minute lockout period between API calls was introduced to avoid superfluous check-ins when you are topping off a pour. I found this to be incredibly fascinating, first because I am a huge fan of Untappd and beer, but secondly because I had never thought about integrating electronics into my kegerator. After seeing the post, I thought to myself, “well… if you are going to bother putting a microcontroller in a kegerator, you could do more…” With a couple of additional components, you could monitor many things like beer volume, which is a vital component of any kegerator. The volume of beer remaining in the keg can be determined by monitoring the overall weight of the keg, so measuring the weight of the keg would solve my ‘no beer’ problem. With a simple amplifier circuit (seen below) and a cheap load cell found in most digital bathroom scales, a microcontroller can intelligently respond to a keg that is too low. I designed the above circuit when I first arrived at Mindtribe as an introduction to Altium and the MT process. The circuit was designed with this load cell in mind. You can think of the load cell as two resistors that form a half bridge. The resistance will vary by the magnitude of compression or tension that is applied to it. Then when a static voltage is applied, the small change in resistance will correspond to a small change in voltage. However, this change is extremely small, so it requires a significant amount of gain to see the signal properly. This particular load cell has a full scale range swing of 3.3mv when powered with a 3.3v power supply, so a gain of 1000 was used. However, with such a large gain, part-to-part variations can lead to large offsets between load cells. This is why the reference for each sensor is tunable with a potentiometer. I then wrote a quick python script running on a BeagleBone Black that converts the raw voltage into weight and estimates the volume of remaining beer. From here, it’s not hard to imagine wrapping the volume, and possibly other measurements such as temperature, into a web page that that can be checked on a computer or mobile device. In fact, after doing a bit of research, there are some people who have done just that. The people at Sparkfun.com wrote a nice blog post about a tweeting kegerator. And for those of you who haven’t heard of kegbot.org, they have a system that keeps track of additional stats such as beer consumption per person. There is still much room for improvement. As a next step I would like to store the weight and additional information in a database so it could be easily displayed on a webpage that is hosted on the BeagleBone Black. I hope to be back in a couple of weeks to give an update.