Pneumatic Water Level Sensor

I am building a pneumatic water level sensor (aka “bubbler”) to remotely measure the water level in a rain water tank. The basic theory is described in the Arduino playground:

Ultimately I intend to use the Seeeduino Stalker, though I am currently prototyping with an Arduino Uno.

1 Like

Right now my next hurdle is how to fix a 1W solar panel to the polycarbonate enclosure. I am considering gluing the panel to the lid, mostly to provide a water-tight seal around the hole for the power cable.

What other options are there for attaching the panel to the enclosure?


I’m interested in this. I have a couple of these MXP5050GP Pressure Sensors I’d like to hook up to test whether the air pump does actually need to be turned off to take a measurement (or whether backpressure from an airstone would be sufficiently stable).

1 Like

You know, terminating the pipe in an airstone is something I haven’t tried yet. I’ve just had a naked end on the pipe, and I’ve been trying to figure out how to weight the end. I’ll grab an air stone tomorrow perhaps.

I found that the air pump does need to be turned off to take a reading. The pump I’m using is a “MAP-1704” by Mitsumi. It’s a 6V triple membrane pump designed for blood pressure monitors (three membrane pumps, 120° out of phase, operated by the single motor). The airflow from a membrane pump is a little bursty: each of the three membranes simply compresses a pocket of air through a one-way valve into the outflow tube.

In a 500ms period, samples taken approximately every 2ms show variation between 1920 and 2006 “counts” or approximately 7.56–9.87±0.8cm based on the transfer function P = (C - 1638) x 351.5 / (14746 - 1638)

(in the samples, the end of the hose was about 7.5cm under water)

Of course if you’re only concerned about “I have a lot” or “I have a little”, that 2cm difference in estimated water height is probably meaningless: “my 4000L water tank is about half full, give or take 20L” :smile:

Do you have a data sheet for your pressure sensor? I couldn’t find it with Google.

I’ve steered myself into a particular style of measurement, in a foolish attempt to optimise for power consumption before I’ve finished building the complete unit.

My water level sensor will pulse the motor (in 50ms pulses) until two contiguous readings are closer to each other than the error margin of the pressure sensor, then take that last reading as The Truth.

I’m being this miserly because I have an energy budget of about 2Wh/day, and the motor consumes 150mA. Thus just for the motor alone I have a maximum run time of approximately 2Wh / (0.150A * 5V) = 3.5h / day. The sensor draws 3.5mA, the XBee draws 70mA while transmitting. The maximum power draw that can be sustained on this budget is 16mA (2Wh / 5V / 24h). I’m probably going to have to resort to supplying the peripherals from a power rail that is switch off using a FET.

The Stalker would be ideal for this job since it has an onboard alarm clock that can wake the micro controller up every hour. I can add one to the Arduino Uno using a breakout board such as the Sparkfun DeadOn RTC Breakout.

So many details. I just want to get this thing out on the water tank giving me measurements!

Here’s the datasheet I have

MPX5050.pdf (386.9 KB)

Here’s an example of the pressure monitored by my Honeywell sensor as the MAP-1704 pump is running. I believe (but don’t know) that the single-peak followed by a double-peak form of the “wave” is due to the motor being run on PWM at 80/255, thus causing the motor to spin between two phases, then pause briefly before the next. On the other hand, this could simply be a mechanical feature of the pump.

I’ll go do another run with the pump running without PWM to see if there’s any difference in pressure patterns.

The main point here being that a running pump produces fluctuation in pressure. In this instance the actual depth of the hose is about 9cm. Again, the error margin is about 3cm, out of the 350cm or so full scale span.

bubble_stream_pressure_plot.pdf (6.1 KB)

Here’s another run with the pump at full speed. The mean of the sample is about 14cm, the hose is at about 9cm.
bubble_stream_pressure_plot_2.pdf (6.2 KB)

Progress so far:

Updated DS3234 & DS3232 modules, built DSRTC on my GitHub.

Updated Honeywell module, now on my GitHub.

Have sensor talking via XBee/ZigBee, currently working on listener. Expecting to convert from ZigBee comms to MQTT, then handling messages from there.

Will post more detail later once I have a chance to document and blog and clean up DSRTC code.