I want to do something similar for my keezer to tell how much beer is left in each keg…
That type of sensor hasn’t proven to be very repeatable, but how is it relatively?
If I could detect and zero at the change event, then graph the calibrated data relatively, this might work.
@bestes, this is why I’d like to be able to process data, before displaying it. For temperature modules, it makes sense to add formulas for converting from C to F or K, but lets say my temperature is coming from an ADC with a thermistor. The thermistor has a polynomial or linear approximation, to convert the voltage to a temperature. Would be nice to be able to enter this scaling formula within the widget instead of writing a driver.
…or in my case, have a trigger that runs a zeroing script, and a display widget that grabs the sanitized data from a file vs the raw ADC… something that you are going to want as all Arduinos have ADC inputs.
Got a Pi 3 now, going to see what trouble I can get into this weekend now all the wildfires are slowing down.
A ‘dry’ technique could use proportional capacitive sensing available in some PIC / Micro systems. The presence of water can be detected though say the side of the bottle and changes in quite a nice linear way with level. A tidy insulated metalic sensing wire / electrode (wire) could be set up or even dangled down the side of the bottle.
For picaxe which has cap sensing built into the firmware this would = 4 parts: Battery + chip and an RF Tx module and the wire. This would be a tidy IoT project that would wirelessly connect to a Pi over a slow 433MHz serial link (cicadacom) for over a year or two off 3xAA alkaline battery. Still working on getting Cayenne opened up to Rx Tx Generic variables and you would have it on a plate so to speak…
I did a nice liquid level control system for an ozone treatment system I designed. It was basically an AC ohmeter usign a discrete astable multivibrator triggering a relay to gas off the accumulated ozone at the top of the tank as it accumulated and pushed down the level of the liquid being treated. Once the level rose again, the relay turned off again, closing the valve.
It ran on 24VAC and used screws drilled into the side of the tank. Being AC, there was no electrolysis to build up sediment on the electrodes.
Capacitance is a good idea. I’ve used it before (with PICS) for other measurements and the kegs are metal. I don’t know how consistent or sensitive it will be though. Also, I’d think there would be some variability due to the conductivity of the liquid?
Capacitive can be ‘fussy’ but I have been working on a few systems recently and find the ‘all in chip’ option with PIC12(L)F1840 wrapped up in the highly friendly and easy to use and tweak picaxe08m2 from rev ed a lot of fun.
Main thing is to use a twin wire capacitor (wires or copper tape very nice and easy to use) on the outside of the tank with say a cm / 1/2" gap. One conductor is ground / -ve and other is active. When water is anywhere near the two conductors you get a very stable linear response. We managed mmH20 water gauge easily. The twin conductor = no stray effects.
Here is an animated gif of another touch switch to show you how little you need.
Sorry no, missed that I was assuming that it was a plastic / glass ‘water cooler’ type thing.
Next best thing however is an INSULATED conductor / rod inside the keg OR a pair of wires on either side of a ‘sight glass’ tube that follows the liquid level inside the keg. The metal outside would connect to common / -ve / ground etc
A pair of wires either side of a glass / plastic tube would follow a linear capacitance change very well.
In other ideas… I have taken the liquid level sensor that is a great little ratiometric potential signal from 5 volt supply from an old fisher and paykel nz (or many clones) washing machine ‘mother board’ This is a DIL package that has about 40" of water gauge pressure drives a piezo-resistive element full scale 0 to supply volts. You could monitor back pressure in a blind tube or just monitor static head pressure with this.
Got the picture.
Yes I would recommend say a three legged load cell and read load off one point since liquid / load is pretty predictable… Get one of those piezo resistive pads that has a pretty easy to use linear R/Strain Youngs modulus (rather than OTT load cell) and just measure that output.
I’ve used those flexiforce sensors before in a medical product design. Although they are fairly linear, they are not absolute. You need to zero them each time really. Which can be done, but it is sub optimal.
These days, a nordic semi transceiver ahd the SPI interface is the way to go. You fill up a buffer until it’s full, then trigger the burst at 1 or 2 MBit/s. The other side does a crc check in chip, and you get a ready trigger or a crc error flag. Same the other way. Also used these in a med product, but using raw mode because the data needs to be encrypted.