• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

Arduino Keg Sensor for Level, Temperature, and Pressure with Display

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
So thinking about this device compared to a flow meter (using RaspberryPints as an example host)...

Unlike a flow meter which can (and does) trigger flow counts "automagically" via the meter pulses plumbed into Arduino interrupts, and then "are self-terminating" wrt pour amounts (the stopped meter can then be detected by the counting code), I believe a device like this has to be constantly polled and the detected liquid column height banged against the "previous" legit measurement to detect a difference. That's going to put a bit of extra stress on communications, so one would want them to be solid...

Cheers!

I'd think waking up and checking every so often (e.g. iSpindel style) should work just fine. Unless you've got a bunch of people over drinking, every 30-60 minutes should be way more than enough. At least in my use case, I'm not looking for real time data, I'd just want to know when a keg is getting down to the last few pints.
 
something like this
 

Attachments

  • Untitled1.png
    Untitled1.png
    18.4 KB
I'd think waking up and checking every so often (e.g. iSpindel style) should work just fine. Unless you've got a bunch of people over drinking, every 30-60 minutes should be way more than enough. At least in my use case, I'm not looking for real time data, I'd just want to know when a keg is getting down to the last few pints.

I was think along the same lines as you. Logic can even be included to check more frequently if the was a recent drop in volume (so that if you are having a party, it pings more often to keep an accurate gauge).
 
If it was an hour I guarantee you half my pours alone would be missed each day :D And if there was a gathering...

No, ideally it really needs to be polled pretty near constantly. Using fixed intervals could have your friend's pour registered but yours maybe not.
You could try some adaptive method - eg: keep an eye out for some time after a pour to see if there's another one coming, then eventually time-out and revert to a slower polling cycle - but even that can miss events...

Cheers!
 
If it was an hour I guarantee you half my pours alone would be missed each day :D And if there was a gathering...

No, ideally it really needs to be polled pretty near constantly. Using fixed intervals could have your friend's pour registered but yours maybe not.
You could try some adaptive method - eg: keep an eye out for some time after a pour to see if there's another one coming, then eventually time-out and revert to a slower polling cycle - but even that can miss events...

Cheers!

I think you and I are saying the same thing. However, it would only miss pours until the next time it polled, right? You just compare the distance since last measure then your right back on track and the device could start polling more frequently. The goal is to measure remaining volume, not the amount of glasses poured, right?
 
If it was an hour I guarantee you half my pours alone would be missed each day :D And if there was a gathering...

No, ideally it really needs to be polled pretty near constantly. Using fixed intervals could have your friend's pour registered but yours maybe not.
You could try some adaptive method - eg: keep an eye out for some time after a pour to see if there's another one coming, then eventually time-out and revert to a slower polling cycle - but even that can miss events...

Cheers!

Yeah, just sounds like we have different goals. I don't care to catch each and every pour, I just want a ballpark of how low the keg is. Even missing 4 pints is only half a gallon (10% of the keg), and I'm fine with that. A sudden dip in my graph showing it went from 3 to 2.5 gallons since the last data point is still WAY more info than I have today.

The biggest thing I want to know is when I'm down to the last half gallon or so and should be expecting it to kick any second.

Plus, if you look at the graph in the OP, over about 19 hours the level didn't change but there was definitely some variance in the measurements.
 
fwiw, I would totally expect some jitter in this type of sensing, it's the nature of the beast. A flow meter only has to respond when fluid is moving, but a level sensor is constantly pinging.

Anyway, I can accept a paradigm that isn't strictly pour-related (at least wrt recording). While it's not my thing, if all one seeks is knowing where a keg is at a random point in time, this solution could be as apt as any I'm aware of...

Cheers!
 
Wow thanks for the interest and feedback guys! Sorry to hear if there are any issues with the topic responses. Any feedback (short, long, positive, negative) is welcome in my book. Comes with the territory of building something unique IMO.

Depends on how sexy the wiring job is... He did say there was a temp and pressure sensor in there as well, so I was mostly curious how it was all working in that box on only 4 pins. Could be an ESP type board in the box, but with I2C I guess they could all be on the same 4 with logic in the external display box.

Although now that's got me thinking. Depending on the ToF power draw, you could hook this up with a D1 mini and a couple AA batteries and perhaps skip drilling the lid.

@rsquared the sensor is an I2C device, but the WiFi controller is in the external display. This was done to be able to view the display when walking by the kegerator (and not having to open the door), I could plug a USB cable into the external display without drilling or running another cable into the kegerator, and making sure the antenna didn't have any issues connecting to my home WiFi. I had thought that a rechargeable battery powered solution would be cool, but to get the frequency of updates I wanted, this wouldn't really be acceptable. I feel that I'd be charging this all the time, and it would turn into a hassle. This is really nice to be able to just walk by and take a peek at the values.

I'm sincerely interested in seeing how this works longer-term & under pressure. I really wish load cells would work long term as they seem like they would be awesome, but yeah - with the drift it just isn't fit for purpose. Flow sensors are great for measuring pours, but the idea of being able to take a direct keg measurement just feels like the holy grail if it works.

This is an awesome project @UncleD . How long has this been in place? Have you noticed any leaks of CO2?

@Thorrak thanks for the feedback, it's definitely a fun project. I've been enjoying following your TiltBridge project as well! As far has how long it's been in place, about 2-3 months now. I've done 3 different batches, and I've been really happy with it. Turned out better than I ever thought it would be. No CO2 leaks, the epoxy creates an excellent seal. I actually added the PSI sensor because I accidentally overcarbonated a batch of beer after kegging. I adjusted my pressure regulator and went out of town and I accidentally adjusted it way too high (like 50 PSI), what a PITA to get back to normal after that. So yeah. the PSI sensor is definitely a parameter worth monitoring, especially if you aren't able to check on it at home easily.

I am testing out a mobile app I developed to provide push notifications if any of the values get above or below a user-defined threshold. Reminds me of another story where I was out of town and the person watching my house accidentally unplugged my kegerator to plug in something and didn't realize it. Would have been nice to get a notification that the temp was high, lol.

fwiw, I would totally expect some jitter in this type of sensing, it's the nature of the beast. A flow meter only has to respond when fluid is moving, but a level sensor is constantly pinging.

Anyway, I can accept a paradigm that isn't strictly pour-related (at least wrt recording). While it's not my thing, if all one seeks is knowing where a keg is at a random point in time, this solution could be as apt as any I'm aware of...

Cheers!

@day_trippr you are correct, this sensor will bounce up and down about 0.1 GAL, because it's regularly checking the distance to the top of the level of beer in the keg. It's certainly a different paradigm than the flow sensor. The flow sensor is assuming a beginning volume and removing from that volume based on the flow out of the keg. This is continually monitoring the level, temperature, and pressure. I have the display updating every 10 seconds, and I have it set to log readings to by cloud DB every 1 hour. These can be modified, but I have found that's often enough for me. Interesting idea by @Dexlor to modify the cloud update frequency based on ROC (rate of change). My thought process was that if I was having a party, I'm already standing in front of the display. The cloud update is more to allow me to see where levels are at when I'm not home, and more importantly, notify me if something happens.

It's great to see other brewers interested in this. I'm going to keep testing sensor stability, durability, and cloud/mobile integration. If I put together a "beta testing group buy", would there be any takers?
 
Although this thread is where the moderation actions are taking place, I would definitely agree that it’s the wrong place to discuss them, given @UncleD isnt the one driving/requesting them. I’ve posted my thoughts on them over here: https://www.homebrewtalk.com/threads/diy-forum-moderation.683572/

As I responded in that thread, the best way to address moderation issues is directly with the moderators, by reporting a post or via DM/Conversation.

I'll start a conversation with the other moderators and administrators about moderating posts like those deleted in this thread. Thanks for raising it.
 
I'd be down to beta test. Also, I would be willing to contribute time in coding if you need any help and my skills are actually useful.
 
This is really cool. How is the sensor sealed from the beer, it looks like there is a window in the box that the camera shoots through?
 
Why not poll every hour (or something) with the ability to poll on demand? So for most of the time and users an hour is prob fine, but if you've got all those friends drinking poll manually as often as you wish...just a suggestion.
 
Why not poll every hour (or something) with the ability to poll on demand? So for most of the time and users an hour is prob fine, but if you've got all those friends drinking poll manually as often as you wish...just a suggestion.

In the setup I was describing (no wires, fully contained along with a battery inside the keg), the device sleeps for that hour to save battery then wakes up to read the sensor and push to your server/logging interface. Because it's locked away inside the keg, there's no way to wake it from sleeping, but you could have a setup where you set "party" mode on the server, and the next time the device wakes and sends data the server gives it an updated config with a 5 minute sleep time.
 
This is really cool. How is the sensor sealed from the beer, it looks like there is a window in the box that the camera shoots through?

@Nathan Graen the sensor is sealed around the surface and the surface itself can be exposed to liquids. It does have to be dried off or shaken after cleaning before re-installing or any liquid on the surface will affect the readings... However, because it's facing downward, the problem usually works itself out.

Why not poll every hour (or something) with the ability to poll on demand? So for most of the time and users an hour is prob fine, but if you've got all those friends drinking poll manually as often as you wish...just a suggestion.

@fphredd The controller isn't "polled" from the cloud server, it "pushes" the data to the cloud. Data usage is a whole different conversation, there are limits to how much data can be transferred. The more data, more often, the higher the hosting cost. Adding an "on-demand" option would be cool, but I worry about potential abuse...

In the setup I was describing (no wires, fully contained along with a battery inside the keg), the device sleeps for that hour to save battery then wakes up to read the sensor and push to your server/logging interface. Because it's locked away inside the keg, there's no way to wake it from sleeping, but you could have a setup where you set "party" mode on the server, and the next time the device wakes and sends data the server gives it an updated config with a 5 minute sleep time.

@rsquared this would be really cool to have everything self contained, and was actually one of my first thoughts. The downside, is that these sensors have warmup times before you can trust the data, and the size of battery that could be put in there would be really small. WiFi based controllers consume more power than BLE controllers (like the Tilt for example). I haven't done any calcs on this, but I would imagine needing to regularly charge it up (in a matter of days, not weeks or months). So much that it would just make sense to have a waterproof USB port on the lid, and have it plugged in 24/7. But at that point, you're already running a cable to the lid, why not have that be a cable that's connected to a powered WiFi controller with the luxury of a display. But that's just my opinion.

Just gauging interest here, how many of you folks like the touch screen display? Or Would you rather have no display and have it configured exclusively from a smartphone or PC? I was kinda digging the touch screen display so I don't have to pull up my phone every time I walk by, but maybe i'm old fashioned? haha!
 
Just gauging interest here, how many of you folks like the touch screen display? Or Would you rather have no display and have it configured exclusively from a smartphone or PC? I was kinda digging the touch screen display so I don't have to pull up my phone every time I walk by, but maybe i'm old fashioned? haha!
I'm in the "Both" camp. cheap little 4X20 LCD and phone access
 
@rsquared this would be really cool to have everything self contained, and was actually one of my first thoughts. The downside, is that these sensors have warmup times before you can trust the data, and the size of battery that could be put in there would be really small. WiFi based controllers consume more power than BLE controllers (like the Tilt for example). I haven't done any calcs on this, but I would imagine needing to regularly charge it up (in a matter of days, not weeks or months). So much that it would just make sense to have a waterproof USB port on the lid, and have it plugged in 24/7. But at that point, you're already running a cable to the lid, why not have that be a cable that's connected to a powered WiFi controller with the luxury of a display. But that's just my opinion.

I'm working on some software for an iSpindel (which uses a WiFi ESP8266 based board) right now, and those take an 18650 battery, which is not a whole lot bigger than a AA battery (65mm vs 50 mm tall, and 17 vs 13 mm diameter). They're nominally a 3.7 volt battery, but at full charge get up to around 4.2. The point of all that is, I've had this iSpindel sitting on my bench pushing data every 15 seconds for the past 48+ hours, not bothering to turn it off between coding sessions, and it's dropped from reporting 4.08V to 4.00V in that time. People regularly get several weeks out of an iSpindel with a 15 minute cycle in a fermenter. My thought on 1 hour cycles was to push that uptime from weeks hopefully into the months range.
 
It's great to see other brewers interested in this. I'm going to keep testing sensor stability, durability, and cloud/mobile integration. If I put together a "beta testing group buy", would there be any takers?

Me !!! As a software developer I'd love to integrate this into my projects :)

Just gauging interest here, how many of you folks like the touch screen display? Or Would you rather have no display and have it configured exclusively from a smartphone or PC? I was kinda digging the touch screen display so I don't have to pull up my phone every time I walk by, but maybe i'm old fashioned? haha!

The phone (mobile) option sounds good to me as I already have an iPad on my kegerator so show what's available on tap, among other things. Next step was to find the "best" way to get volumes...
 
I'm interested, both in a version with the local display as well as web only. (I find my Raspberry Pi's are not running as reliably as they should, so a local display makes sense to me.)
 
Just gauging interest here, how many of you folks like the touch screen display? Or Would you rather have no display and have it configured exclusively from a smartphone or PC? I was kinda digging the touch screen display so I don't have to pull up my phone every time I walk by, but maybe i'm old fashioned? haha!


I would just do the display less and have it report in another dashboard. Hook up a cheap monitor or something. I'm sure with Thorrak's interest, it could be integrated into Fermentrack.
 
Well, one never knows how a developer will react ;)
But from arm's length a serving keg volume indicator doesn't fit into Fermentrack's existing mission.
A closer relationship would be one of the RaspberryPints paradigms...

Cheers!
 
Just gauging interest here, how many of you folks like the touch screen display? Or Would you rather have no display and have it configured exclusively from a smartphone or PC? I was kinda digging the touch screen display so I don't have to pull up my phone every time I walk by, but maybe i'm old fashioned? haha!
I'm in the "Both" camp. cheap little 4X20 LCD and phone access
I want nixie tubes.
 
Just gauging interest here, how many of you folks like the touch screen display? Or Would you rather have no display and have it configured exclusively from a smartphone or PC? I was kinda digging the touch screen display so I don't have to pull up my phone every time I walk by, but maybe i'm old fashioned? haha!
I'm in the "Both" camp. cheap little 4X20 LCD and phone access
Definitely both.
 
I would just do the display less and have it report in another dashboard. Hook up a cheap monitor or something. I'm sure with Thorrak's interest, it could be integrated into Fermentrack.
Well, one never knows how a developer will react ;)
But from arm's length a serving keg volume indicator doesn't fit into Fermentrack's existing mission.
A closer relationship would be one of the RaspberryPints paradigms...

Cheers!

Probably not ideal with Fermentrack, but @LBussy and I have another project in the works this would be perfect with, so long as @UncleD is interested in allowing his work to be integrated with other projects!
 
Sounds like there is a mixed bag in terms of interest in the display or not. The good news is that the sensor can function independent of the display for those that want to integrate into their own custom system, or a community supported system. Basically you don't NEED the controller/display for the sensor to function. I'll look into setting up a small batch of sensors and displays to get in the hands of some of the interested parties for some testing and feedback. Stay tuned homebrew community...

Probably not ideal with Fermentrack, but @LBussy and I have another project in the works this would be perfect with, so long as @UncleD is interested in allowing his work to be integrated with other projects!

I would definitely be interested in what you guys are working on. In the interest of keeping this thread on topic, shoot me a PM or link to another thread with what you guys are working on and I'm happy to chat!
 
I can see having a display being mixed - some want to walk by and see it, it's a fun hobby and fun to geek out on. Sometimes super useful info as well. Other times, some don't want it in their living area / bar perhaps, don't want to find a place for it, and / or just won't actually check it very often.

I'd be good with a phone app, I'd just check in once in a while when I start thinking - "Hmm, I've poured a lot of beer out of this keg, wonder if it's almost gone yet?"
 
I would be most interested in a version without a display. That's only because I have a five keg coffin keezer and it's a fair amount of work to open it up, so a display would not be of benefit for me.

Right now I weigh my kegs when they go in, and I have a book on the keezer where I log pours. Whenever a new keg goes in, I pull all of them out to re-weigh them while I clean the lines. This works pretty well on a day-to-day basis, not as well when we have a party and the guests track their pours. I've always had my eye out for a better solution!
 

Latest posts

Back
Top