Kegerator monitor w/ scales, flowmeter, esp8266 web server

I've been building a new kegerator monitor for my beer drinking pleasure. Using an Arduino Pro mini, I have two scales set up for measuring both the keg and the CO2 tank, each using 4 3-wire load cells and HX711 amplifiers. I also have a flow meter setup to monitor usage, along with a DS18B20 sensor to monitor the fridge temp.

I am using a large 4x40 LCD screen to display all the data. I also have an ESP8266 setup using the Easy Web Server sketch, which host a web page I use to enter the name of the beer (and displayed on the LCD), set the size of the keg being used, tare the scales, and adjust the flow meter counts if needed. It also uploads all my data to ThingSpeak, because data.

I have a full write up over at my blog.

My code:

Arduino Sketch: kegerator_monitor by cwhummel

ESP8266 Easy Web Config. Main file is modified to receive data from the arduino and upload to ThingSpeak. Example.h file is the webpage: beerESPserver by cwhummel

The keg is installed and ThingSpeak page is live. The Keg weight scale isnt reading correctly for some reason, but everything else looks good. and the flow meter doesn't seem to be reading.

After pouring over all of my coding, I think I have worked out most of the bugs. The problem with the flowmeter seemed to come down to having it a long instead of a float. The problem with the keg scale was my own stupid math. I had was using the original weight of the keg, rather than the weight of the keg minus the keg shell, as the basis for calculating the percentage. Once I fixed that, things look a lot nicer. It's actually reading a bit higher than the volume percentage based off of the flowmeter, but I'm not too concerned about that right now, for a couple of reasons. For one, the actual flow count is unknown, as the flow meter wasn't working originally, so I made a guess as to how much I poured. And the second reason, is that I'm going off of various weights from the internet to use as the basis for the keg weights and keg shell weights. Once this keg goes empty, I'll get the actual weight of the shell as well as the actual weight of a new keg, and go from there.

Anyway, I think everything works at the moment. I think I might try and adjust all the math in the code to get away from all the float math (yeah, i know its not good for it, but I went the easy route to get it done), but for now, Beer. I also still need to do a better job at running the wires, and still need to put everything in a worthwhile enclosure.

Please check out my ThingSpeak page for all the data on my beer consumption, and my Pro Mini and ESP8266 code over at CodeBender.

Comments/feedback (even criticism) welcome! Thanks.

Regarding the flow meter: It appears to be a turbine flow meter (the folks at adafruit call it a "pinwheel"). I have some experience with them from my time in the oil and gas industry. Even expensive ones tend to be not very accurate. They were nearly always used to get a rough guess of the flow rather than a precise measurement. For what it's worth, I suspect the pulse rate forms a curve when compared to the flow rate. If you can calibrate several points against known flow rates and do some curve fitting you may get good results.

Thank you for documenting your project and posting here!

Yeah, I use them at work a lot and am familiar with how accurate (or inaccurate) they can be. I was considering going through the calibration, but I ran a known amount through it and came up with a pretty close reading, so I just went with it. I'd be more concerned if it was a constant flow, but since it's really only a pint at a time I'm not too concerned about the drift. The actual problem I had with it was my own coding. For some reason awhile back I changed one of the points to a Long instead of Float as the original code was using (as well as all other data points relying on it). Once I found and fixed that everything was fine.

Thanks!