Arduino Kegerator

Here is the Keg monitoring app I put together with an Arduino.

http://keg.maager.com

It's made up of a standard Arduino Duemilanove USB, Arduino Ethernet shield, some DS18B20 1-Wire temp sensors, and a magnetic reed switch.

It's based on SparkFun's Kegerator, with some new ideas on the web side of things as well as measuring the keg volume.

Right now it seems fairly accurate with just using a reed switch to determine the amount of time the handle is pulled, multiplied by the flow rate of the keg. My regulator keeps things pretty accurate in terms of flow rate, so we shouldn't be too far off.

The web side of things is all custom PHP and Ajax. The Arduino simply uploads it's sensor readings every minute to a PHP script, the call looks like:

/logsensor.php?keg_temp=36&basement_temp=57

PHP handles the rest and puts that in MySQL.

When the tap handle is pulled, the reed switch transitions to open and calls an interrupt function on the Arduino. The function makes note of then the handle was pulled (millis()) and then determines the length of time the handle was pulled when it transitions back to a closed state. This is stored in an array (as we could have multiple pulls per minute), and every minute the array of data is uploaded to PHP via an HTTP GET request similar to the sensor call above.

Everything is stored in a MySQL database and used for statistics. This way we can trend how much is being drank, when the keg will be done, etc, etc...

Hope everyone enjoys it. 8-)

That is very cool and looks like a very well done project. You should let sparkfun know you improved on one of their projects. Who knows, maybe theyll feature it. I wouldnt mind seeing a pic of the setup tho

Great web page with live updates. :)

Your idea to gauge remaining volume based on a "flow sensor" was clever. I have two tanks that I would like to gauge (measure volume/free capacity). They're about ten gallons each, square and built from semi transparent plastic. One is used for waste (actually suers) and the other for fresh water.

For your keg I assume you will need to manually input volume when you fill up. Have you given some thought to how this may be automated?

I have reopened my "project" several times and considered scales (underneath), pressure sensor within the tank and so forth, but have not yet found any "reasonable" alternative that has struck me as simple and effective.

Hi BenF, The keg size is variable, for instance the current keg in there is 13.3 gallons which is fairly common, but other times it could be 15.5 gallons or 5.5, etc, etc. The web page was built with this in mind, so adding a new keg takes about 2-3 minutes of entering the volum, beer name, brewery, etc and that's it.

The other solution that I have seen, and that you might be interested in is the Swissflow flow meters:

http://cgi.ebay.com/NEW-SWISSFLOW-SF800-INFRARED-IN-LINE-FLOW-METER_W0QQitemZ370193262782QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item56313ce8be

The kegbot (http://kegbot.org/) project uses those to do it's measurements. It seems like a good solution to measure the amount of flow through the line, but in my case I am curious to see how accurate this will be without an inline meter.

If my version is not accurate enough, I'll go for the Swissflow and re-program things.

Have fun,

Peter

That is very cool and looks like a very well done project. You should let sparkfun know you improved on one of their projects. Who knows, maybe theyll feature it. I wouldnt mind seeing a pic of the setup tho

Thanks! I will work on getting some photos up sometime soon.

Peter

I likey! ;D

I love this!

I have a couple friends who brew and have a 4-tap beer fridge in their rec room. (They bought it from a bar that was closing) I should see if they are interested in this for theirs. It would be so much fun to make. :D

Those Swissflow units look nice too.

That is a great project! Theres just nothing quite like combining beer with electronics :)

Any chance you could post your code? Ive been looking into combining the arduino with the web, and examples are always appreciated.

That is very cool and looks like a very well done project

This things great! Almost makes me wish I still drank.... :-/

I could build something like this to dispense home brewed soda though... :D

Anyone thought about using an rfid reader to actually make sure someone doesn't have toooooo much to drink??? ;)

I could build something like this to dispense home brewed soda though...

ROOT BEER!

ROOT BEER!

The only kind I drink! Been almost 15 years now.... ;D

It's weird how much funnier people are at the bar when you're the only one that's sober... :P

Hi All, Thanks everyone for such positive reviews, I am hoping to get this project developed further and in a more streamlined package.

I posted the source code here:

http://keg.maager.com/source/Kegerator/Kegerator.pde

While this prototype version is running, I am thinking about building another version that includes some more permanent features. Right now the project is essentially a USB board plugged into a breadboard with some jumper wire, not the greatest solution for something permanent.

I have been looking for Eagle files for the Arduino Pro Mini, which would let me place it in an Eagle PCB layout, which would be excellent. Unfortunately I can't seem to find any. How are people integrating the Arduino into their custom PCB's?

Anyone thought about using an rfid reader to actually make sure someone doesn't have toooooo much to drink??? Wink

Interesting idea, I am trying to think of a component that you could put inline to stop the flow unless a RFID is swiped first. Some sort of inline pneumatic valve might do the trick...This would be good for houses with the underage present :-)

e12pilot,

Check out the kegbot project web site - http://kegbot.org/.
They have links to many people that built kegerators. Some of them are using rfid tags to serve their beer automatically and log who has drawn how much beer. :o