Pressure sensor

I wanted to make a prototype of a smart water cooler that shows the level in the bottle to the manager of the building, which could be time to change the bottle and improve the service.

I used a pressure sensor, and my simple compact device.

One can see how much water in the bottle, there is someone in the office, room temperature.

Off the water cooler at night, and the inclusion of the morning, it saves energy.


Cool project.

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.


1 Like

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…

~ Andrew

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.

2x sets of twin tracks are UNDER the PCB. This set up also can give a slider action as you progressively slide metal / finger up the insulated side of the twin tracks. Just re write the code etc…

The variable input from this type of thing I am hoping to get connected to Cayenne once generic variables get to being allowed to be passed into the system via the pi and some python variables.

~ Andrew

1 Like

The keg is already metal though, would the twin wire on the outside of the metal still work?

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.

This is what it looks like…

Back pressure method = possibly more hygienic ?
Ignore the ‘wood-o-meter’ dampness detector :slight_smile:

Simple picaxe readadc 1, b1 etc ratiometric read of the OP voltage into an ADC chip of your choice.

~ Andrew

1 Like

Keg is pressurized.

I think the only method that will actually work is weight or a liquid flow meter, but the flow meter cannot restrict flow in any way or it kicks gas out of suspension.

Okay !
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.

Back to the Capacitive idea I myself would probably make a spring / mechanical load cell that can sense compression of spring and convert into 2x plates so the spacing changes in proportion to load.

Then I would make it into a cicadacom project that chirrups out the data from just an 08M2 chip + 433MHz ASK RF module AA battery pack for a few years to a Pi with an ASK RF Rx module.

Chuck in remote sensing off a DS18B20 to make sure beer is right temperature too :slight_smile:

I am just waiting for Cayenne to open up to passing Pi Generic Variable into Cayenne variables so I read off ttyAMA0 (GPIO Com Port)

A bit like this but with Cayenne added as the GUI:
~ Andrew

1 Like

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.



Depends how fast the beer gets drunk I guess…
So move up to a higher quality strain gauge ?
I would put smarts into the transmitter that reset when load is suddenly re-increased / refill.
~ Andrew

This is a really cool project!

Hi! How is it possible to connect with you? Russian TV channel Life

1 Like

it could be great to really be complete to add a water quality sensors + en sensor that perimt you to give an alter on the level of reamining glasses!!!

it could be great to really be complete to add a
water quality sensors + en sensor that permit you to give an idea on
the level of reamining glasses!!!