Keg Cop: Keg Monitoring and Control

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.
So I'm not familiar with GitHub and how it works...that's the 2nd 'issue' raised due to my fumbling around. Is that just like a notepad to remind you of the problem?
It gives me a list, but most importantly it allows me to attribute code changes and releases to the issues in which they were raised. For larger projects, I can set up boards, etc.
 
This is an electrical engineering question, not beer question, but I noticed that you have both 1uF and 0.1uF decoupling capacitors between 5V and ground. How is the noise with just 0.1uF? I usually only use the lower value based on this post (and a 100nF on its own generally working):

https://www.baldengineer.com/a-1uf-decoupling-capacitor-is-too-much.html
If the answer is "it depends, buy a scope" then, damnit, you've given me a great excuse to buy a scope... :yes:
 
Nice, the excuse I was looking for!

I was looking at the Siglent Technologies SDS1102CML which has two channels and 100 MHz camping for under $300, although the 200 MHz SDS SDS1202X-E is only $50 more and has great reviews. Let me know what you got.
 
This is the one I have. I like it, seems to work well.

E882C369-7FE8-4C59-AF2C-75AA074438A8.jpeg
 
[...]maybe @day_trippr can tell us why that combo is magic.

It's a fairly generic approach that's been around since the TTL and through-hole package days. The two values broaden the frequency coverage of either alone, and as decoupling capacitors historically were only slightly more expensive than tap water the only hold-backs were board space. Even then, given 0201 and even 1005 SMT package sizes, that still wasn't a problem even when I retired last year :)

Cheers!
 
Thanks, I figured the combination of the two resonances would give a broader frequency range for the filtering, I was curious how much was needed. At < 10c for a cap, more is probably better. Lee has forced me to buy an oscilloscope*, so I’ll run some tests on the 5V line and see how much noise there is with one and two caps when switching the digital lines.

* that’s my story and I’m sticking to it when my wife asks.
 
I also misread that blog post that I posted above... I thought they were looking at adding 1uF to a circuit that already has a 100nF decoupling capacitor, but they were looking at either 1uF or 100nF and... duh, the 100nF is better at suppressing higher frequency noise because the pole is at a higher frequency.

Well, scope ordered. Be nice to finally own a digital one as my last one was an analogue CRT scope that my dad brought me for Christmas from the local army surplus store many years ago...
 
Lee has forced me to buy an oscilloscope […] that’s my story and I’m sticking to it when my wife asks.
Your wife won’t be the first one to be pissed at me. Hell, I’ve got a few of my own.

Share the scope captures when you get them, I never actually tested that. Dave told me he “sprinkles [decoupling caps] around like candy” so ever since then I do the same. I know I’m off on the skinny branches when he tells me “vaya con dios” so I pretty much do what he says.
 
I hereby declare that the John Guest PM450813E fitting to be The Correct Fitting™ for Swiss Flow to 8mm EVABarrier tubing.

There is still a "cone" (maybe better called an internal collar to locate the washer) and I just don't care enough to figure out why this is better than the DMfit one. "It just is."

This is simply awesome. I heard your podcast on Homebrewing DIY and I'm starting to look for parts. Has anyone found a source from a reputable website for John Guest PM450813E besides Amazon? They are currently unavailable...
 
Looking for recommendations on placement of the inline flow meter to best control turbulence and foaming. Beginning? Middle? End of the beer line?
 
This may be a stupid question - and knowing it's coming from me, those are pretty good chances.

I ferment in a plastic conical my garage for now. I have a DIY glycol for cooling and heat tape for when I brew in the winter. I was using CraftbeerPi3 to control my heating/cooling of fermentation, but wanted to go with the better stability of Fermentrack. And for a long time CraftbeerPi3 was not being developed, so I built a Fermentrack controller that I used on my last brew.

My kegerator is in the basement of the house. I still have CraftbeerPi3 controlling my Kegerator, which it's doing a pretty good job of doing. Every now and then there's a glitch. And after weeks of running, the graphs don't display because they're too big for the Pi Zero W to process.

Though lately I've been thinking about changing up to ferment in corny kegs instead of my conical system. I brew 10-11 gal at a time to fill 2 cornys full of beer. I understand that I might have to make a little less if I ferment in corny kegs. I don't have a chiller or heat system set up to ferment in corny kegs so I was thinking about using the Kegerator to control temps for fermenting. I'm not sure how well that will work though.

So to the question(s)...
And now there is Keg Cop. It seems to do everything Fermentrack does, but also add flow monitoring to know when the kegs are near empty. I'm wondering if it's worth the switch once again from Fermentrack to build a Keg Cop controller and then use Keg Cop for both Fermenting and Kegerator control while fermenting in corny kegs in the Kegerator and then serving beer from the Kegerator. Or is it different enough that I should really use both controllers? I'm finding with all the new development in brewing that I could be duplicating stuff and wasting money.
 
And now there is Keg Cop. It seems to do everything Fermentrack does, but also add flow monitoring to know when the kegs are near empty.
Almost. The technical explanation is Keg Cop uses a thermostatic control with hysteresis to control the chamber temp, and Fermentrack (and BPR) uses a PID loop to control the fermenter temp.

Longer, plain English answer:

A PID loop sort of anticipates temperature swings and is capable of control within ±0.10°C measured in the fermenter. Since fermentation can generate its own heat, if you are controlling only from the chamber temperature, you could be a few degrees warmer in the fermenter. Even if you are not generating heat and can reasonably assume the fermenter/keg is the same temperature as the chamber, hysteresis is a fancy name for a temperature band. The temp will rise up to whatever the setpoint is, and then cool to a degree or so below that, and so on with a wider temperature band. Basically, it's the same way your wall thermostat works. It's about the same as using an Inkbird controller.
 
Almost. The technical explanation is Keg Cop uses a thermostatic control with hysteresis to control the chamber temp, and Fermentrack (and BPR) uses a PID loop to control the fermenter temp.
Thanks for the response, Lee.
Are you suggesting to use both if I want flow measuring to determine what's left in the keg? Fermentrack for the higher temp precision for fermenting and Keg Cop to control the kegerator and measure beer consumption?
I wonder how well Fermentrack would work to use to ferment in Corny kegs in the Kegerator, controlling the cooling compressor for cooling and a heat tape film for heating. Has anyone used Fermentrack for fermenting in corny kegs in a Kegerator successfully? - a question probably better suited for the Fermentrack thread on Homebrewtalk.
 
Pretty sure @Thorrak has fermented a few in a corny. I would tape the sensor on the outside covered in some closed-cell foam.

You can turn temp control off on Keg Cop and still display it.
 
Simply awesome work @LBussy
Thanks for the timing too as I've just been given wife approval for a kegerator or two...

I'd looked about but couldn't find anything that tickled my fancy so had started thinking about designing something myself. I had assumed load cells would be the way to go so an absolute rather than relative volume is known and I've been playing with a few of these 0.47US $ 30% OFF|4Pcs 50kg Human Scale Load Cell Weight Sensors HX711 AD Module Body Load Cell Weighing Sensor Pressure Sensors Measurement Tools|Sensors| - AliExpress

Whats your thoughts on the 2 approaches and could a choice between flow meters or load cells be possible in KegCops future?
 
When I try to flash a NodeMCU with Brewflasher, I get the following:

Code:
Downloading firmware...
Downloaded successfully!

Command: esptool.py --port COM4 --chip esp32 --baud 921600 --before default_reset --after hard_reset write_flash 0x10000 C:\Users\Roger\AppData\Local\Temp\firmware.bin 0x8000 C:\Users\Roger\AppData\Local\Temp\partitions.bin 0x1000 C:\Users\Roger\AppData\Local\Temp\bootloader.bin 0x290000 C:\Users\Roger\AppData\Local\Temp\spiffs.bin 0xe000 C:\Users\Roger\AppData\Local\Temp\otadata.bin --erase-all

esptool.py v2.8
Serial port COM4
Connecting........_____....._____....._____....._____....._____....._____....._____

But I'm flashing in a round-about way. My NodeMCU has a bad 5v regulator, so I'm powering it up with 3v3 (AMS1117) and using a USB/Serial UART thingy. I was able to put WLED firmware on an ESP8266 this way using a different flashing program. But it doesn't appear that it's working using BrewFlasher.

Or I suppose it could be my Node MCU is more fried than I think it is. But I really don't think this is the case since I can see it connected to my UniFi AP (it's currently running Fermentrack firmware).

I did verify that my USB/Serial converter is on COM4.
1633780230269.png


Does BrewFlasher not work with a USB/Serial converter?
 
Wait a sec....
I think I forgot the GPI0 pin to ground when flashing this way.


Nope - I must have a wiring or hardware problem.
COM4 failed to connect: could not open port 'COM4': PermissionError(13, 'A device attached to the system is not functioning.', None, 31)


Edit - I just realized. This project doesn't use an ESP8266. It uses an ESP32. Duh!
 
Last edited:
Whats your thoughts on the 2 approaches and could a choice between flow meters or load cells be possible in KegCops future?
I’m traveling right now, so my communications are limited

Shortly put, it’s in the plans. I have three projects now I would like to accomplish with scales. It should be a fairly simple uplift, but will be a different firmware version because of the space consideration. I think so anyway - but a of of code will be reused if that's how we go.
 
Last edited:
@rkhanso
Stick the temp probe on with some blu tack and then put the insulation on top will make it more stable. Could go brewpiless and then you could plan to autospund your ferments in your corny!
 
Has anyone heard any updates regarding Kegscreen?

That’s a @Thorrak question. :)

That's a little bit of a dig..... 🤣🤣
... 😨


Since I'm being called out, here's a quick update. There are two things that ended up stalling out development work on KegScreen back in June:

1. User Interface Libraries

While KegScreen's UI is pretty great, it's not as easy to maintain as I would like. A new library / UI kit was released earlier this year that looks great - but the initial release was for single-page apps only. They initially promised that they were going to release support for Alpine JS (which would work in KegScreen!) but that release never manifested.

At this point I'm back to square one on this issue, so I'm inclined to just accept that it is something I'll have to work on post-release. If anyone out there is a CSS/JS/UI guru and wants to help, let me know! Those are definitely not my strengths.


2. Bluetooth Support

Getting Bluetooth support inside a Docker container is painful, as I've learned from Fermentrack - and adding any kind of device hacks after the initial containers are created causes no end to headaches. One of my goals is to be able to support the Kegtron in KegScreen - but the Kegtron v1 is Bluetooth only. I've been (slowly) working on a solution to this for the past few months which I should have complete soon - once that's done and tested then this blocker should be resolved.

There is no current ETA, other than to say "after I fix #2". ;)
 
I did get mine at Amazon, but you might contact Freshwater Systems with the part number and see if they can get it.
Lee, Thomas from SwissFlo was kind enough to swap out their regular JG fittings for the 8mm ones when I purchased their flowmeters. If you buy the SF800 flowmeters, just ask if they can swap the fittings out--he said the cost differential was negligible. Thomas was curious about this Keg cop project too so I sent him the Homebrewing DIY podcast link.
 
As close to the keg as possible without kinking the tubing.
Also, be sure to use sufficient line vs ID vs CO2 pressure...

Cheers!
Day_trippr, do you have an image of your keg, to QD, to flowmeter setup? I'd be curious to see it. Does the flowmeter need to be horizontal?
 
Sure - here's a zoomable shot from one end of my keezer showing the plumbed flow meters atop their respective kegs.
Note I have six faucets, so the nearest six kegs are hooked up to meters and faucets while the next pair are on gas only and the last pair (shorties on the hump) are for my glass rinser...

1634481571515.png


Anyway, you can see the connection from keg to meter is pretty short, and the meters are nearly horizontal, though I don't obsess over that.

fwiw, more details shown in my keezer build thread...

Cheers!
 
Back
Top