Every time I have friends over for some homebrew, it never fails. I get one or two good glasses out before the keg is tapped and I am left with a few disappointed faces. The problem is never knowing how much beer is left in the keg. I could just pick it up and guess, but that isn't very accurate and now I've shaken up the beer. Well I'm done with the guessing! This project helps me know exactly how many beers are left without lifting the keg or even going out to the kegerator.
I took an everyday bathroom scale and took it apart, removing the load cells from the internal circuit. Each load cell has three wires. Using a voltmeter to figure out the positive and negative strain, I was able to connect the center tap wires to an analog-digital converter, forming two full bridges.
With the center taps connected to the ADC, in pairs by left and right side of the scale, I then connected the positive wires to the 3.3V output from the Particle Photon and the negative wires to the ADC ground. I attached the ADC to the Photon with an I2C wire using a Photon Shield.
ADC connected to Photon via I2C
I found code to read a differential measurement for each pair of load cells, and added the values for a total count. Then I placed a keg on the scale empty and full, and took count readings. I subtracted the empty reading from the full reading to calibrate the scale values, compensating for the keg weight itself. I divided the full keg count by 53.3, which is the approximate number of 12oz. beers in a 5 gallon cornelius keg, in order to find the count for a single beer. I took the given voltage reading and divided it by the single beer count to tell me how many beers were in the keg. I included a simple filter in the code to give a more stable reading. Lastly, I published the variable to the Particle cloud.
The variable is published and read by two programs. I have the variable published as an event on the mobicle.io website and on Atomiot.com as a variable to track over time.
The variable fluctuates slightly over time, but by less than 0.2 beers. As the keg is emptied, the graph will reflect a broader range of values. I am planning on adding a temperature sensor to reflect the kegerator temp. and will post an alert if the temperature goes out of range, along with a cheap tablet to attach to the front of the kegerator as a display.