SmartKegerator - Automatic pour-logger using facial recognition

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

philharlow

Member
Joined
Mar 10, 2013
Messages
6
Reaction score
1
Hello,

I'm not sure if this is the right place to post this, but I just finished the first iteration on my smart kegerator project and wanted to share with anyone interested. There's no brewing, just serving. All the source is public and I will be writing a more detailed walkthrough soon!


Youtube walkthrough:


Project page:
http://philsprojects.wordpress.com/2014 ... kegerator/
 
Last edited by a moderator:
I love it. It is definitely not something I would use only because the people pouring beers in my house include me and me. Neighbors will come over from time to time but I often just serve them. I've yet to encounter a place where I wanted to monitor people. Now, measuring volume and perhaps cost, that would just be neat. I just feel as though I would ostracize people who I want to share my beer with by playing this game about monitoring consumption. Where I could see this working well is in a setting where you have a kegorator in a shared space.

Now, how much did you charge for that extra push of beer from the other tap? :)
 
That is very impressive work. Kudos!

Why the perceived need to add mass sensors? Are the flow meters not accurate enough?

I agree the "personal" accounting part would be overkill for my situation (there's just me, the wife, the kids when they are over, and occasional visitors - and nobody is "kicking the can" ;) ) but the "beer" and kegerator accounting parts are definitely something I'm hoping to integrate into my dispensing system some day.

Cheers!
 
Very cool. Similar to a project we're working on. :)

Is this code truly released as Public Domain? I'm tempted to scour it for ideas, but don't want to step on toes.
 
Seems to me that this could work well for people with underage kids if the system can be setup to only work for authorized people. Might also work if you could input pictures of people that are off limits, or just provide photos of those who have pulled the tap.

Ignore this comment if already implemented.
 
^ Brilliant - but at least right now, apparently out-of-scope. That would require solenoid valves on the beer lines...

Cheers!
 
Thanks for the replies everyone!

@Hello haha yes, it would certainly be most useful when put in a public space. The end goal is to be able to leave the kegerator in the kitchen or garage unattended, and everyone can pour as much as they'd like. haha this was actually my first pour after refilling both kegs, and I hadn't had a second beer on tap for a couple months, so you got to watch me find out that the tap handles are too close :) I had actually put a check for that in the code and you can can see the display change to "Uh-oh! Both beers detected!" right after the accidental pour
@day_trippr I originally wanted weight sensors to give me a better estimation of keg volume in situations where the system goes down for awhile (crash, power outage, etc) and also if I installed a half full keg, without needing to enter some guesstimated starting volume, if that makes sense. After using the system for a bit, I do think the flow meters will be accurate enough (even though they have a 5-10% tolerance) but I'd still like to weigh the co2 tank to get any idea if that's running low
@thadius856 the source is all public and the link is in the blog post :) Feel free to browse/copy/hack. I'll be writing up more on the hardware installation details later, but it should be pretty straightforward.
@TonyG adding some type of flow valve into the lines is the most common suggestion/idea I get. My goal was to create an entirely passive system, ie requiring no human input, and didn't want a situation like a software bug or power outage to prevent beer from flowing, so I shied away from that idea. I do log the pictures snapped while pouring, so you could review the pours and look for youngsters, but if you did want to install valves, a system like RFID cards would probably be best as a picture of a parent's face would be enough to trick this extremely cheap facial recognition algorithm (the pi isn't very powerful!)
 
I want to build this! My beer goes soo fast and I know I dont drink a large majority of it. I need some leverage against my roomates.lol
 
Pretty rad! I just saw your project over on Hackaday earlier today. I'm not sure how much you've looked into mass sensors, but there are some inherent issues with them - there's a few threads floating around here that get into it. Love the ingenuity!
 
Excuse my naivety, but I'm just now seeing what Raspberry Pints is, and now the "collaboration" comment finally makes sense! :)
I definitely haven't done anything magical with the flow meters, so I'm not getting any better accuracy than you guys. My initial plan was to round the input, like anything from 14-18 ounces rounds to 16, 10-14 rounds to 12, etc, so I opted for the cheaper adafruit flowmeters over the swissflows. But I seem to get pretty consistent results just using a ticks/liter calculation. I do notice inconsistencies if they don't open the tap completely and slowly pour the beer, but I haven't done any thorough testing. In adafruit's example python script they used a tick/second flow rate calculation that would probably yield more accuracy, but since I'll be running facial recognition while I'm pouring, I don't expect precise timing to work. I also had to add some filtering to prevent false pours, requiring at least 5 ticks in less than 5 seconds to begin a pour. But a lot of this is a crude first implementation to start logging data, and I'll worry about accuracy more when it comes time to actually charge people.
I'll be watching the Raspbery Pints project tho!
 
I know I'm bringing back an old thread, but I would LOVE to implement this on my system. I have a few friends/roommates that drink more than their fair share. Would like to regulate that. Haha


Sent from my iPhone using Home Brew
 
Excuse my naivety, but I'm just now seeing what Raspberry Pints is, and now the "collaboration" comment finally makes sense! :)
I definitely haven't done anything magical with the flow meters, so I'm not getting any better accuracy than you guys. My initial plan was to round the input, like anything from 14-18 ounces rounds to 16, 10-14 rounds to 12, etc, so I opted for the cheaper adafruit flowmeters over the swissflows. But I seem to get pretty consistent results just using a ticks/liter calculation. I do notice inconsistencies if they don't open the tap completely and slowly pour the beer, but I haven't done any thorough testing. In adafruit's example python script they used a tick/second flow rate calculation that would probably yield more accuracy, but since I'll be running facial recognition while I'm pouring, I don't expect precise timing to work. I also had to add some filtering to prevent false pours, requiring at least 5 ticks in less than 5 seconds to begin a pour. But a lot of this is a crude first implementation to start logging data, and I'll worry about accuracy more when it comes time to actually charge people.
I'll be watching the Raspbery Pints project tho!

Ahh nice, I was actually curious about using the much cheaper Adafruit flow meters over the expensive Swiss Flows Ones. I'm looking to setup flow rate meters on my next project which will be an 8-Tap Keezer coming from my current 3-Tap Keezer. Do you have your flow rate meters hooked up to a breadboard or are you using a seperate Arduino controller? In either case I'm trying to figure out the best way to be able to monitor 8 separate taps, as I'm not sure if I'll need multiple Pi's or Arduinos for that many inputs...
 
fwiw, the developers of Raspberry Pints were convinced that the RPi couldn't keep up with the SF800 meters so they use a single UNO to do the counting and then pass a "pour packet" up to a python script running on the RPi which in turn updates the pours database that the web gui sources for the tap list display. [deep breath]

It'll support as many meters as there are available digital IO pins on the AVR.

It works a treat. I've been running a six tap system since the v2.01 code that got the meters working and the accuracy is amazing - more accurate than the consistency of my keg fills. Keg kicks are within a pint or two of prediction. Pretty hard to beat that!

Cheers! :mug:
 
fwiw, the developers of Raspberry Pints were convinced that the RPi couldn't keep up with the SF800 meters so they use a single UNO to do the counting and then pass a "pour packet" up to a python script running on the RPi when in turn updates the pours database that the web gui sources for the tap list display. It'll support as many meters as there are available digital IO pins on the AVR.

It works a treat. I've been running a six tap system since the v2.01 code that got the meters working and the accuracy is amazing - more accurate than the consistency of my keg fills. Keg kicks are within a pint or two of prediction. Pretty hard to beat that!

Cheers! :mug:

Well that's great to know then! What hardware are you using for your 6-tap setup? I have a Pi but don't have an Arduino yet and was looking at the ala mode board mentioned on the Raspberry Pints site, but I have no idea how many flow meters this board can actually support, is there an easy way to tell or is it based off of the number of pin inputs available or something along those lines?

I'm experienced with Linux and the like, but am relatively new to the world of Arduino and Microcontrollers so please excuse my inexperience.
 
I built a mini-rack-mountable enclosure and stuffed the RPi, AlaMode, an Uno, 5V power supply, dual relay module and a crapload of connectors to run RaspberryPints and multiple BrewPi instances. It slides into the dolly under my keezer and drives the monitor perched atop my tower ('til I get around to an actual mount).

You should get familiar with the current-version Raspberry Pints thread. It's a loooong thread but it's loaded with nuggets.

For sure, the AlaMode can handle at least 8 taps using "digital IO" pins 2,5,6,7,8,9,10,11, may be able to do 9 adding IO 12, and perhaps even 10 adding IO 13.

[Pins 0 & 1 are the hardware UART signals so they're out, pin 3 is also wired to the RTC and may not be reliable, I had problems using pin 4 (that I haven't gone back to confirm), and pin 13 is also connected to the "blink LED" - which I use to confirm the AlaMode detected a pour. The original Arduino code doesn't do that, so pin 13 should be available to host another meter. And I never tried IO 12].

Cheers!

brewpints_02.jpg


brewpints_43_sm.jpg


brewpints.jpg
 
I built a mini-rack-mountable enclosure and stuffed the RPi, AlaMode, an Uno, 5V power supply, dual relay module and a crapload of connectors to run RaspberryPints and multiple BrewPi instances. It slides into the dolly under my keezer and drives the monitor perched atop my tower ('til I get around to an actual mount).

You should get familiar with the current-version Raspberry Pints thread. It's a loooong thread but it's loaded with nuggets.

For sure, the AlaMode can handle at least 8 taps using "digital IO" pins 2,5,6,7,8,9,10,11, may be able to do 9 adding IO 12, and perhaps even 10 adding IO 13.

[Pins 0 & 1 are the hardware UART signals so they're out, pin 3 is also wired to the RTC and may not be reliable, I had problems using pin 4 (that I haven't gone back to confirm), and pin 13 is also connected to the "blink LED" - which I use to confirm the AlaMode detected a pour. The original Arduino code doesn't do that, so pin 13 should be available to host another meter. And I never tried IO 12].

Cheers!

Thanks for the info, this was very informative. I'll definitely check that thread out as it seems to include a host of useful info!
 
Back
Top