Measuring Water level in a Rainwater tank

gmoulds

New Member
Hi all,

I am trying to measure the water level in my water tanks using a Picaxe40x, I'm using the chip as an interface to a Home Automation system.

I have toyed with the idea of floats(ADC) and capacitance(PulseIn) but both methods have issues. I like the idea of using a pressure sensor(ADC).
I have sourced a Honeywell 26PC 0-5psi sensor, but here is my problem the sensor puts out a voltage of around 50mV accros a resistive bridge.
Has anyone tried using a similar sensor and have a simple opamp design to interface to the Picaxe.

If anyone has a better idea, I'm open for suggestions

Grahame
 

Michael 2727

Senior Member
There was a recent post regarding this subject.
Do a google search on instrumentation OP Amps.
Seems the best way to amplify the output,
then feed that to an ADC.

Try the INA112 OP Amp and Strain Guages also use the same input config.
 

rolsen

Member
I've bench tested using a shallow jar with rubberised diaphram. Glue a magnet to centre of diaphram and a magnetic sensor to the base. Connect 3 wire lead to the sensor. Jar needs to be airtight. Drop assembly to bottom of tank. Sense the output of the sensor via the adc input of the picaxe. The water pressure will push the magnet closer to the sensor. Let me know how it goes.

Cheers, rolsen
 

tomohawk

Senior Member
Hi, What about savlaging a water pressure sensor from a washing machine.. worked a treat for my uni project!!

 
 

thelabwiz

Senior Member
Do you want a quantity-of-water (200 gallons/liters/whatevers) reading or an approximate fill (1/3 full) readout?

What size and shape are the tanks?

A vertical cylinder would be a good candidate for a pressure sensor because the pressure is directly proportional to the height of the water column and the readout could be easily by calibrated in liters/gallons.

A pressure sensor in a horizontal cylinder (think: tanker truck) would require a lookup table of some type as the pressure is probably not linear because over the load-bearing surface is curved and the size of area supporting the water changes as the volume of water changes. If you put 10% of the tank's capacity into a horizontal cylinder that's 10% filled, the amount of load-bearing area changes noticeably. If you add 10% of the tank's capacity into a horizontal cylinder that's 50% filled, the amount of load-bearing area doesn't change (at half-full, the lower half of the cylinder is covered - there is no more load-bearing area; adding more water raises the level of the water and the load on the bottom half of the tank).

For horizontal tanks (whether cylinder or some other shape), a float-driven sensor may be easier to calibrate for the 1/4, 1/2 type measurement.

An idea I haven't tried is to have a float that moves a calibrated rod up and down inside a piece of plastic pipe large enough for some electronics. The calibration could be black/white squares on the rod with a light source and photosensor for counting up/down pulses (good accuracy, but requiring some initial setup) or a series of color stripes on the rod and a light source plus an RGB detector to determine which color is currently being sensed (requires creating a lookup table during installation).

John
 

SD2100

New Member
I have a few water tanks that I want to monitor the level of.
I was thinking of using a 10 turn 10k pot, on the pot shaft I was going
to mount a small drum type pulley, the diameter of this pulley for one
of the tanks was going to be 63mm, i worked this size out on the height
of the tank so would give me 10 turns from empty to full. I was going to
use some very thin stainless steel wire to connect the float, the wire
would be fixed to the pulley at one end and the float at the other,
a large clock type spring would be attached to the pulley which would turn
the pot and rewind the wire as the float raised. The pot was going to be
connected to an 08M and then to a PC via RS232 and would send the value read
by the ADC when requested by the PC. I haven't made this yet but it could be
made at very low cost.


Edited by - Phil75 on 04/10/2006 19:43:25
 

premelec

Senior Member
Whereas the 10T pot sounds good in practice they wear out and have wiper contact problems after a while leading to headaches... A pressure transducer or sonic or even capacitance device [metal tube inside plastic tube with capacity between metal tube and water/other conductive fluid] could work better. Also floating magnet around pipe with reed switches for volume levels etc... so many ways...

You might stick with your rotating drum and float idea and use a rotary encoder with optical or other non-mechanical sense and avoid wear problems associated with a 10T pot. In part it depends on what sort of environment the device has to live in - wet/dusty/indoor/outdoor... under water :)
 

Innes

Member
Everyday Practical Electronics had a water gauge project in its September issue. I have a copy, so if you are interested I can give you a brief rundown of how it works, but if you want the complete article, you'll need to buy the back issue:

http://www.epemag.wimborne.co.uk/projects.html

It does not appear to be possible to purchase a single article for download, which is a shame. Perhaps if you ask nicely, I could email the relevant information!
 

gmoulds

New Member
Guy's Thanks for advice, The main problems I can see with this is the environment, humidity would eventual cause a pot to fail, I thought of trying the ultrasonic sensor from the Picaxe robot, but the same issue.Using enough Reed switches to give granularity will cost more than the sensor.
That why I suspected the pressure sensor was the way to go as it can be completely isolated from the environment. (Innes I would appreciated any tips from the article.)
The pressure sensor would be similar to the float idea as the pressure is directly proportional to the height of the water 1cm high = 0.1 kpa, Standard Rainwater tank simple pressure times area, horizontal tank requires a more complex calutaion.

Again thanks for the feedback
 

SD2100

New Member
The pot would be housed inside a weather proof box with the only opening being for the float wire which runs through a close fitting seal so it's pretty well protected from the elements. The amount of turning the pot would do is very small as the tank level
changes. The pot I have is a Bourns 3541 with a shaft turning life of 5,000,000 turns, my tank level might fluctuate from empty to full a couple of times a year so it should see me out if all goes well.
 

moxhamj

New Member
I tried building the float/pot idea but it ended up too complicated. Need better bearings than a pot has for a start. The pressure sensor is the simplest, especially for someone who already has a honeywell sensor. 50mv would be correct - it just needs to be amplified. Use a quad op amp - eg 324. Take each of the two outputs and run each through a voltage follower (uses two of the op amps) Run each of these into a differential volgate amplifier with a gain of about 30 (50mv=> 1.5V) (can up this if needed) using 2 10k and 2 330k resistors. The differential amp needs to be biased at 1/3Vcc - use the 4th op amp as a voltage follower biased at 1/3 of the supply (22k/10k). I can draw up the circuit if this is too unclear - this circuit works well for a range of pressure sensors.
 

SD2100

New Member
well looks like i'll have to make a test rig and drive the pot from end to end with a stepper and a have 200g float attached to give the bearing some axial load, I'll record the pot output via an ADC and save it on an old PC and see how long it takes to crack up.
 

Dippy

Moderator
Give it a go Phil.
I assume you're not going to rely on the pot housing as the full bearing load?
 

Jeremy Leach

Senior Member
This is just an (untested) idea, but perhaps you could use a CMOS parallel input shift register chip to advantage. Maybe could have, say, eight input lines to the chip at different levels in the fluid. As CMOS is very high input impedence then the presence (or not) of fluid on each line could possibly be made to be 1 or 0. Do a parallel load of the chip, then serially read into the PICAXE.
 

moxhamj

New Member
I have built Jeremy's idea above and it does work. Use CMOS and pull each input high with a 10M (best not to leave floating) then the water conductivity pulls each input low by conducting to ground. Run this into a picaxe. I used solid core copper mains house wire of various lengths. There was some corrosion after 6 months (bore water). Aluminium would be better. Having built this conductivity system, a system using a float/10 turn pot and 6 systems using pressure transducers, I much prefer the latter. The cost is a bit higher using transducers, but the reliability and ease of building more than compensate for the extra $20.
 

hax

New Member
OK another idea, which someone mentioned ages ago. Not sure who to give the credit to, I don't think it was this forum anyway:

Drop one end of a garden hose or similar into the tank. Weigh the end down with a brick so that it sinks right to the bottom.
Attach the other end of the hose to a sealed box with a pressure sensor inside it. The pressure sensor is now nice and dry, outside the tank. No chance of it getting wet. Now attach an aquarium pump to the sealed box. The air will flow from the pump, inside the box, down the garden hose, and will start to bubble from the bottom of the tank.

The pressure measurement that you get from the pressure sensor, sealed in the air tight box, is the same pressure that you would measure deep down in the tank. This will change depending on how full the tank is.

Hope this helps.
 

moxhamj

New Member
I think I may now be coming across as the crazy nutter building every tank level system ever invented, because yes Haxby, I have built that one too. Had 500 metres of 13mm pipe to the tank, and bubbled air in to the bottom and yes, it is possible to measure the pressure with about a 5% error. Issues - 1) need a simple vacuum valve in a loop of pipe above the tank to prevent a syphon starting 2) Aquarium pump couldn't quite handle 2 metres of head when the tank was full but it could do 1.5 metres, 3) using an air compressor intermittently does work but it is very wasteful of energy and 4), still need a pressure transducer anyway, and it was simpler to use the transducer to measure the water pressure directly. Nevertheless, this air system ran well for 3 months until cows decided they liked chewing the air pipe.
 

Michael 2727

Senior Member
Haxby you can buy a commercial unit that
does something similar to the vacuum idea.
They have a VAC guage on a 1 meter tube
which you drill into the ground, you then
read the suction as the soil dries out.
Forgotten what they are called, but commonly
used around here.
 

Dippy

Moderator
Glad to see you're back Jezzer. I thought there had been a world cardboard shortage and you'de given up project building!!
 

Jeremy Leach

Senior Member
Well Dippy my wife actually died 2 weeks ago (complications of kidney failure, aged 45 - I'm 39). It's crazy telling everyone here - but I would just like to say that she loved me to have this hobby and be involved in this 'community': She saw it as so healthy, stimulating, interesting and an example of using the internet in such a positive way - So I'll be getting back into it soon I hope - especially with these wonderful new developments of Rev-Eds that I've been skimming with awe....
 

Dippy

Moderator
Jeremy, I am very sorry to hear that. That is awful. I am sure that everyone will wish to express their sincere condolences.
 

SIRA

Member
Dear Jeremy,
Please accept my sincere condolence on the sad demise of your wife. In keeping with her wish, please continue your interest in this hobby, and share your expertise with us all.
Sira.
 

SIRA

Member
Dear Jeremy,
Please accept my sincere condolence on the sad demise of your wife. In keeping with her wish, please continue your interest in this hobby, and share your expertise with us all.
Sira.
 

hippy

Ex-Staff (retired)
That's terribly sad news Jeremy and I, and I'm sure all here, wish you the best as you deal with such a personal loss.
 

MartinM57

Moderator
Jeremy, I wish you all the best. Remember the good times and take comfort that so many people care and are thinking of you and your family at this time. Martin
 

BeanieBots

Moderator
Very sorry to hear of your sad loss. Our thoughts are with you. We all hope that you will indeed continue with your hobby which has added such vitality to this forum.
 

Jeremy Leach

Senior Member
Thanks everyone - so very kind, and I'm sure some of you will have lost people close to you too.

Like I say, my wife although not knowing much about electonics(!) could understand my enthusiasm and thought it such a great hobby to have. And this particular forum and underlying product has been a real example of how to get genuine enjoyment out of life - so don't worry Dippy, any cardboard shortages won't stop me, and I'm sure I'll be back with a vengeance before too long <img src="wink.gif" width=15 height=15 align=middle>
 

jwhooper

Senior Member
http://www.goldmine-elec-products.com/prodinfo.asp?number=G15473

Not sure if this is anything useful, but I noticed it while looking at surplus parts, very cheap.
 

moxhamj

New Member
Re JWHooper's link, that part looks like an absolute bargain. 300mmHg is 3.9 metres of water pressure = perfect. Add an op amp and a picaxe, and one can be measuring tank levels for under $10!
 
Silicon Chip magazine have done a project relating to this as well. Look at it here, and note how the sensor is made:
http://www.siliconchip.com.au/cms/A_30607/article.html
You can easily use the output from the sensor to display water level with a PICAXE.
 

Jeremy Leach

Senior Member
Was thinking - as usual it depends on the requirements. Is it really to (1) measure water level or is it to (2) switch at a certain level of water?

There's quite a difference and if it's (2) then it could be a very simple switch is all that's required - either on a float or on a diaphram, and no need for clever sensors at all.
 

rjconway

New Member
Dr_Acula

Can you draw up the schematic for the presure transducer...I have a free scale MPX low pressure unit. Although it works I am having trouble getting rid of the offset.

email to rjconway(at)bigpond.com

cheers

rob
 

moxhamj

New Member
Ok, schematic for x33 amplifier with adjustable offset. The ratio of 330k/10K sets the gain. The trimpot sets the offset. Start with it set at midvolts, then apply pressure and see which way the volts go. Swap the inputs if volts go down. I use a quad 324, and these can't swing to vcc or ground. Usable range with a 5V supply is 1.5V to 3.5V. Once you work out the polarity of the transducer, set the offset at about 1.5V. Then adjust the 330K resistors up or down so that you get the right gain.

[still working on the gentle art of drawing in ascii...]

Edited by - Dr_Acula on 18/10/2006 06:15:59
 

moxhamj

New Member
Hmm, wordwrap has completely changed the ascii art. I might need some expert advice on how this ascii art works from Hippy or someone. It was pasted from notepad. If you have an email I'll send it that way. Alternatively, the circuit is essentially the second circuit at http://www.phys.ualberta.ca/~gingrich/phys395/notes/node110.html and then there is a 4th op amp as a voltage follower, with an input pot going from 0 to 5V, and the output goes to the &quot;earth symbol&quot; of the differential amp to bias the output.
 
Top