If you've ever been to an AppliedTrust event you know that we REALLY enjoy our beer. In fact, we even have a few in-house homebrewers. As part of the MyATE program, last year a group of us beer enthusiasts decided we wanted an easier way to share some of those homebrews, as well as our favorite local microbrews, with our fellow engineers. The only logical choice was a kegerator in the office. However, we couldn't have just a simple kegerator in the office; ours had to be different. Ours had to be GEEKY. You might be asking yourself "How geeky can a kegerator be?" We already monitor a ton of servers and services with our Nagios instance, so why not monitor our kegerator as well?
I've been a big fan of the Arduino platform and its ability to make quick projects like this fairly easy. I decided to monitor the temperature of two spots in the kegerator using a DS18S20 as well as a SwissFlow flow meter to determine how much beer has been poured from each keg. If we know how much we started with and how much has been poured, we can guess with pretty good accuracy how much is left.
More details on the shield I designed to connect to the sensors to the Arduino can be found here. Arduino code can also be found here. Mind that the php has been a work in progress and was a quick hack to get it working in the wee hours of the night. There’s still a lot of work there to make it pretty.
The Arduino queries the sensors and submits values to a webserver every 5 minutes, or after every beer poured. The website is a simple php app that keeps track of the temperatures and amount of beer poured. Our Nagios instance can also see this website and is provided with a very simple page of the current temperatures and estimated percent left in each keg.
In the following image we can see that our homebrew keg (keg 2) was a favorite and went faster than the local microbrew.
In the following graph we can see our two temperature graphs. The reason they swing roughly 10 degrees is because the thermostat on the kegerator turns the compressor on to cool the fridge, and then it sits idle and warms up slowly until the compressor needs to turn back on to re-cool the kegs.


