Water Tank Level Meter - Reinventing the Wheel???

darb1972

Senior Member
Hi All

I would like to design and build a Water Tank Level Meter for my home.

I have found in the past (on this forum) several projects surrounding the reading/monitoring of water tank levels. One was of particular interest, and it used an ultrasonic sensor, but (from vague memory) I think it might have been somewhat of a challenge to use and/or calibrate. I can't remember the exact details.

Anyway, more recently I found this article http://www.siliconchip.com.au/Issue/2018/February. It is part of a magazine that I subscribe to on a monthly basis. I can't reproduce the article here (for reasons of copy-write) but I believe that non-subscribers can read the first page or so from my supplied link. Hopefully that gives you an idea on what I want to do.

The project uses a submersible sensor that works on the water pressure of the tank (http://www.siliconchip.com.au/Shop/7/4283?default_options=). I believe the sensor is purpose made for this exact application. The project also links to a network via WiFi. It uses a Cloud based website for data storage and reporting. It also does humidity and temperature, but I'm not concerned either way whether I have these features in my project. I do have nearby mains power for the project, but it might be nice to operate the system off solar (like the magazine project). I can purchase the item/s I need from the magazine or online (like the sensor for example).

The designer based the whole thing around an Arduino platform, complete with shield PCBs. Frankly I don't really want to use another platform (and learn yet another language. I still haven't mastered the PICaxe environment) and I would much prefer to stick with PICaxe. What do others think??? Am I trying to "reinvent the wheel" or would a PICaxe based system (maybe like a 28X2 on a shield - AXE401) handle such a project???

Thanks all.

Regards
Brad
 
Last edited:

premelec

Senior Member
Pressure transducer works well for water sensing - if you need very accurate reading temperature compensate for water density with temperature reading... READADC will give you a good reading - either in flex material submerged or on outlet pressure line.... there are good sensors for less than $25 on Ebay or better ones for more... likely the unit may have offset voltage at 0 pressure so compensation for that value required. Newplumber had a go around with this a bunch of months ago and settled on costly unit I think. How high is the tank? Transducers come in different range sensitivities.
 

darb1972

Senior Member
Hello premelec

Thanks for the reply. I haven't measured the exact height of the tank, but it is around the 3m mark. I know it's a 3000lt capacity tank. Not only is it connected to the toilet systems (a new requirement of Aussie homes these days) but is also connected to several taps (marked accordingly) for watering the gardens. I am keen to know the level, particularly when it is getting low. If I know decent rain is coming, I would plan to use up the water for plants that don't get any/much rainfall, and then see how many mm's of rain it takes to fill it again. Hard to know at the present moment. It also has a submersible pump in the tank, so I would need to ensure I keep the sensor away from it's intake.

I will have a look around the web, but honestly my strength is with hardware design, so if I was to buy another sensor I would (possibly) struggle to program/interface with it via software. I know that the forum would help, but don't want to become too much of a burden.
 

cravenhaven

Senior Member
I've built a couple of ultrasonic units for measuring tank levels and they are very easy (and cheap) to create with the picaxe system. There is heaps of information on this site for using them and the code requirements are very small (ie a dozen or so lines of code). The harder part is getting the data out to where you can read it, ie bluetooth or wifi etc. Accuracy can be quite good, and certainly well able to give you the information you're after.

eg:http://www.picaxeforum.co.uk/showthread.php?27677-Help-with-HY-SRF05-ultrasonic-distance-sensor&highlight=srf05
There is even the complete code in post 9 of this thread.
 
Last edited:

AllyCat

Senior Member
Hi,

It depends how many of those features you actually want. If you need most of them, then you might as well build (and pay for) the whole SC project and save a lot of development time. That submerged sensor, solar power, a WiFi interface and data logging, etc., will add a lot of complexity to a custom PICaxe project. Incidentally, I'm surprised that the specified solar panels are sufficient to power an Arduino and WiFi interface, etc., (perhaps in Australia, but not in the UK :( ). However, there seems to be a lot of necessary detail "missing" from only the first page and the parts list.

You may not want a "Weather Station", but you will need a barometric sensor with that submerged sensor. My back-of-envelope calculation suggests that as atmospheric pressure can change by up to 10% (maybe a little less in Australia) and supports a 10 metre head of water, then the uncompensated water level measurement could change by almost a metre or 3 feet. Also the 24 volts supply for the 4 - 20 mA interface seems a needless complication.

I think the main issues with ultrasonic water level detection were with (narrow bore) wells rather than large tanks. Or a laser rangefinder module with a (serial) RS232 interface can be obtained for around $50. Another possibility would be to measure the air pressure at the end of an air-filled pipe leading from the bottom of the tank.

Cheers, Alan.
 

techElder

Well-known member
Pressure is always going to be complicated as Alan says. Not insurmountable, but complicated. I will add that the pressure methods will always need to have their readings verified and calibrated as needed ... meaning regularly.

Why not evaluate this module that came up in the last round? It might meet your requirements.

XKC-Y25-NPN Non-Contact Liquid Level Sensor IP67 Waterproof NPN Output Water Level Detector DC 5-24V

Operating Principle: intelligent non-contact liquid level sensor is for detecting whether there is liquid by water induction capacitor.
When there is no liquid to approach the sensor, sensor will generate certain static capacitance because of the capacitor distribution;
when the liquid rises slowly to approach the sensor, the liquid parasitic capacitor will coupling to this static capacitor so that the
terminal capacitance of sensor will increase; the changing capacitance signal will be input to control IC and achieve signal switch,
then transform the changing capacitance value into variation of certain electric signal. Using certain algorithm to detect and judge the
degree of the variation; when the variation has surpassed certain threshold value, then it means the liquid level reaches sensing point.
Features:
1. It is applicable to non-metal outer wall not necessary to directly contact with liquid so that it can avoid liquid corrosion of strong acid or alkali,
or the influence by scale or other impurities.
2. Intelligent liquid level benchmark adjustment and liquid level memory function, liquid level status display way,
it can achieve multi-point serial connection; support NPN output.
3. Accurate and stable detection, it can detect boiling water liquid surface.
4. Pure electronic structure, non-mechanical operation way; and it has stable performance and long life.
5. High stability, high sensitivity, strong anti-interference capacity; it will not be affected by power frequency interference and
common mode interference due to special disposals so as to compatible with 5-24V power adapter.
6. Strong compatibility, and it can penetrate into non-metal tube, such as plastic, glass, ceramic etc. Its sensing tube wall thickness can be up to 12mm;
liquid, powders, particulates all can be detected.
7. Open collector output way, wide range of voltage (5-24V), and it is applicable to connect various circuit and product applications.
 

marks

Senior Member
Hi darb1972,
possibly what premelec has already suggested
https://www.ebay.com.au/p/Cool-Pressure-Transducer-Sender-Stainless-Steel-0-4-5v-for-Oil-Air-Water-5psi/853457276?iid=331875295944&_trkparms=aid=555018&algo=PL.SIM&ao=2&asc=20140106155344&meid=238f8861047b4618be19a81fe3fcfd1a&pid=100005&rk=3&rkt=9&mehot=ag&sd=332141530943&itm=331875295944&_trksid=p2047675.c100005.m1851
sorry for the long link
if you calculate water pressure of 3m height from normal level is about 4.2psi
with a 5psi sender 0-4.5v linear @5v supply you would think it possible to achieve less than 5mm resolution
anything out of the water is a better solution just screw one in with a t fitting at the tap connection
 

Pongo

Senior Member
You may not want a "Weather Station", but you will need a barometric sensor with that submerged sensor. My back-of-envelope calculation suggests that as atmospheric pressure can change by up to 10% (maybe a little less in Australia) and supports a 10 metre head of water, then the uncompensated water level measurement could change by almost a metre or 3 feet.
Cheers, Alan.
Submersible depth sensors like this one use a vented cable so that they measure gauge pressure, i.e. compensated for atmospheric pressure. Without a part number for the one used in that project it's impossible to be sure that it is using gauge pressure but the 4-20mA output and cost suggest that it's a professional part. Similarly the sensor suggested by marks is a gauge pressure sensor and will also be unaffected by atmospheric pressure changes.
 

AllyCat

Senior Member
Hi,

... using gauge pressure but the 4-20mA output and cost suggest that it's a professional part.
Ah yes, that makes a lot of sense; perhaps I interpreted the term "electric cable" too literally.

I guess it mainly depends if you want to spend $100 on a submersible sensor, $20 on one that is "plumbed in", or $2 on a SRF-05 (and how you ultimately plan to use the data that's received).

Cheers, Alan.
 

premelec

Senior Member
There are a number of float magnetic with reed switch sense units if you only want a few level readings... I run on a gravity fed system with ca. 70PSI static full tank pressure at point of use - at the use location I have a 100PSI transducer and have scaled and offset its output to read 2 meter tank height. I've seen many instances of condensation droplets top of tank and occasional spider webs which I suspect might affect ultrasonic readings... the pressure transducer cost $20 and has operated for many years... whatever works!
 

slimplynth

Senior Member
I'm currently upgrading my Palm Plant auto-irrigation system from 2L to 15L.. i've used readadc to good effect from 2 stainless steel rods to measure soil humidity.. for the upgrade I want to send accurate(ish) water levels to my webserver.. sending data is no problem, but what i thought would be straightforward is using SRF05's to report water levels.. i've tested it in the reservoir and there's zero change.. i stopped adding individual 1L portions when it got to 50% full and there was no change in the debugged height..I think it will report a lower value when it gets to about 75% full but that's rubbish... should I sack off the SRF05/06's and just get some stainless rods to measure height with Readadc? it would definitely use less power and i suppose it's one less device to go wrong.. think i've answered my own question.. (that said, i am curious about the ultrasonic measurements.. where i used to work, they had ultrasonic tank level monitors to keep an alkaline degreasing bath at a set height.. i figured water would be no problem but the results from today make me think it's far from ideal.. the SRF05 reported the correct distance ±10mm when the marble kitchen top was targeted.. put water on it.. just a thin film of water and the result varies/flickers.. is this normal? any info appreciated, to understand/ overcome.. plastic floating balls/ball bearings .. that might be the answer... note to self: that intake filter might be useful...
 

inglewoodpete

Senior Member
There are two thoughts that come to mind. The first would be easy to test: can you float something with a hard upper surface on the water and then use ultrasonic?

The other is to use a pressure sensor. These are regularly used on larger scale water storage systems. It could be attached to the outlet pipe from your water tank, with nothing inside your tank. I've never tried it, so can't help much beyond that.
 
Last edited:

cravenhaven

Senior Member
What size is your tank. 15L sounds like it might be quite narrow and/or shallow. The ultrasonic sensors have a minimum measurement height of several inches and quite a wide beam.
With my U/S tank sensor I can detect 2cm change reliably and 1cm sometimes but it is a 44000L tank. I do get a lot of odd readings but I think they are frogs and also power supply noise.
 

matchbox

Senior Member
I've used pressure sensors of all different rating for many water level applications, and there work very reliably. They also require a very simple code to show the level on an OLED or LCD display in percentage.

A 5psi sensor would be perfect for a tank water level up to 3.5meters.

From the picture I attached. It has a 6mm barb on the transducer, for a pressure tube to run to the lowest point on the tank.

The pressure tube will be mostly full of air. So the water never makes it to the sensor. The compression of the air is obviously greater, but is in proportion to the water density. So the read out is always correct.

There are a few ways to connect up the pressure tube.

The easiest code wise, is to attach the tube to a barb fitting, tapped into an empty bung on the tank.

The next is to connect it to a tee piece on the tank outlet. (this does mess up the readout a little, when water is flowing)

The next is by placing the tube into the tank and weighting it to the bottom. This method requires pressure/level compensation in the code, if compressible plastic tube is used to connect to the pressure transducer. This is due to slight external compression of the tube, by the water.

And as mentioned earlier in this post. Temperature compensation in the code is also useful if high accuracy is required, and the tank is located in an area that gets below 5degC.
 

Attachments

slimplynth

Senior Member
Thanks for the suggestions and info; the solution was ultimately decided on due to my very patient missus wanting the floating island unit back in the kitchen. For the time being I've used two 50cm lengths of nichrome wire, placed in neoprene tubes (with holes drilled at regular intervals to allow water in/out). Seems to work ok, the debugged value increases by 3 or 4 for every litre added and it's only to give an status indication on a webpage.. will definitely look more into pressure sensors, the next project is a Water Butt control system.
 

newplumber

Senior Member
Thanks for the suggestions and info; the solution was ultimately decided on due to my very patient missus wanting the floating island unit back in the kitchen. For the time being I've used two 50cm lengths of nichrome wire, placed in neoprene tubes (with holes drilled at regular intervals to allow water in/out). Seems to work ok, the debugged value increases by 3 or 4 for every litre added and it's only to give an status indication on a webpage.. will definitely look more into pressure sensors, the next project is a Water Butt control system.
The cheap ebay 5psi pressure transducers i bought from china worked almost like a pressure switch which needed alot of pressure to see change on the output voltage
but after lbenson helped me with the picaxe code ...he also helped me to decide they were absolute junk! of course only after i was able to buy some good quality ones
So it may cost 50$ or more for a quality PT but for me it was way worth it when it was reading very low pressure.
 

Bill.b

Senior Member
Hi All

I used a differential pressure transducer on the outlet pipe of my 4500 lt tank. The transducer was from Jaycar Electronics.
I only used a bar graph to display the level.

tanklevel.jpg

This code is 0ver 8 years old and used a picaxe 18x

Code:
'program  Water Tank Level indication
'picaxe 18x
'7th June 2010   WB.


symbol Pressure  = b0
symbol counter = b1


main:
	readadc 1,pressure
	

	if pressure<52 then  empty 	'tank empty
	if pressure<62 then tenpct	'tank at 10%
	if pressure<72 then twentypct 	'tank at 20%
	if pressure<82 then thirtypct		'tank at 30%
	if pressure<92 then fourtypct		'tank at 40%
	if pressure<102 then fiftypct		'tank at 50%
	if pressure<112 then sixtypct		'tank at 60%
	if pressure<122 then seventypct	'tank at 70%
	if pressure<132 then eightypct	'tank at 80%
	if pressure<142 then nintypct		'tank at 90%
	if pressure<152 then onehpct		'tank at 100%
	if pressure=>152 then full		'tank overflowing
	goto main
	
tenpct:
	for counter=1 to 100
		pins = %00111110
		pins = %01011111
	next counter
	goto main
twentypct:
	for counter=1 to 100
		pins = %00111100
		pins = %01011111
	next counter
	goto main
	
thirtypct:
	for counter=1 to 100
		pins = %00111000
		pins = %01011111
	next counter
	goto main
fourtypct:
	for counter=1 to 100
		pins = %00110000
		pins = %01011111
	next counter
	goto main
	
fiftypct:
	for counter=1 to 100
		pins = %00100000
		pins = %01011111
	next counter
	goto main
sixtypct:
	for counter=1 to 100
		pins = %00100000
		pins = %01011110
	next counter
	goto main
seventypct:
	for counter=1 to 100
		pins = %00100000
		pins = %01011100
	next counter
	goto main
eightypct:
	for counter=1 to 100
		pins = %00100000
		pins = %01011000
	next counter
	goto main
nintypct:
	for counter=1 to 100
		pins = %00100000
		pins = %01010000
	next counter
	goto main
onehpct:
	for counter=1 to 100
		pins = %00100000
		pins = %01000000
	next counter
	goto main
full:
	for b2=1 to 20
		for counter=1 to 100
			pins = %00100000
			pins = %01000000
		next counter
		for counter=1 to 100
			pins = %00111111
			pins = %01011111
		next counter
	next b2
	goto main
empty:
	for counter=1 to 20
	let pins =%10011111
	pause 100
	let pins = %00011111
	pause 100
	next counter
	goto main
Bill
 
Last edited:

newplumber

Senior Member
Hi All

I used a differential pressure transducer on the outlet pipe of my 4500 lt tank. The transducer was from Jaycar Electronics.
I only used a bar graph to display the level.

View attachment 22185

This code is 0ver 8 years old an used an picaxe 18x
Hi Bill thanks for the info
have you ever tested the differential pressure transducer to find out if it has a minimum pressure ?
in example..---> when it reads say 53 about how much liquid (in inches or mm) above the sensor?
 

Bill.b

Senior Member
The transducer seems to be linear in operation. To setup the span and offset I waited till I had a full tank then closed the valve to simulate empty then open it to set span.

This transducer was used in an earlier tank level indicator project in Silicon Chip mag. I will lookup my old issues to find the project.

The pressure transducer is a ZD-1904 . looks like the number has changed from my original one.

The ZD-1904 piezo resistive pressure sensor provides a very accurate and linear voltage output directly proportional to the applied pressure. The sensor housed a single monolithic silicon die with a strain gauge and thin film resistor network on each chip.
Specifications:
* 0°C to 85°C temperature compensation
* 0 to 10kPa (0 to 1.45 psi)
* 25mV full scale span

Bill
 
Last edited:

newplumber

Senior Member
I'm a little late and a dollar short Bill
but thanks I will look into that in the future
all my projects are on pause because i am busy working on mega non picaxe projects
but hope to jump back into them soon

btw I still need to add a few finished projects to the finished projects forum when i get a second
but the rgb clock with sound is getting alot of highlights and again all thanks to yous on this forum
 
Top