# WATER Level Sensor for tank Algorithm.

Discussion in 'The Projects Forum' started by RRITESH KAKKAR, Nov 22, 2014.

1. ### RRITESH KAKKAR Thread Starter Senior Member

Jun 29, 2010
2,831
89
Hello Sir/Mam,
I am like this forum from my bottom of heart from the first day, you are my Honorable guide/Teachers.
So, i was thinking of my Water tank on my Roof how to avoid overflow n save electricity.
I was building this using Ultrasonic sensor but i think using flow sensor contact will be absolutely fine for this project i have no problem if you want to suggest some good idea you are most welcome.
But what will be the logic if i use 2 sensor at top and bottom to detect with micro controller.

for example lets my logic diagram.
0 for no water
0

0
1 for half or less than it.

1
1 fully filled

Do you think using only two condition will satisfy the whole process.
00 and 11

2. ### KMoffett AAC Fanatic!

Dec 19, 2007
2,584
234
If you had an indication of 01, less than half full, what would do? If "nothing", than you don't need it. You need to think out each step and the action you want to take place by your system and by you. Perhaps 01 would be "almost empty" and 00 is empty. But again,what would you do?

Ken

3. ### RRITESH KAKKAR Thread Starter Senior Member

Jun 29, 2010
2,831
89
Sorry, In which sense i want to do are you explaining??
Actually, I will Connect the Circuit Breaker to close it.

4. ### djsfantasi AAC Fanatic!

Apr 11, 2010
2,899
870
Circuit breaker for what? In which case(s) will you close it, which cases will you open it and perhaps which cases will you do nothing?

5. ### GopherT AAC Fanatic!

Nov 23, 2012
6,297
4,019
You might want four sensors. Two for low and two for high as follows in a tank...

- alarm if the higher of the two high sensors detects water
- Fill until the lower of the high sensors detects water,

- start filling if the higher of the low sensors sees no water
- alarm if the lower of the low sensors sees no water.

Use a flip flop (or software logic) to set the next state - otherwise the lower of the high level sensors will keep triggering the pump to restart every time the water level falls a millimeter below the sensor.

6. ### MikeML AAC Fanatic!

Oct 2, 2009
5,450
1,066
I think you are making this way too overcomplicated.... Click here for the way I would do it...

dougp01 likes this.

Jul 18, 2013
10,826
2,495
8. ### RRITESH KAKKAR Thread Starter Senior Member

Jun 29, 2010
2,831
89
Relay as circuit breaker i use this term. sorry for confusing.

9. ### RRITESH KAKKAR Thread Starter Senior Member

Jun 29, 2010
2,831
89
I am using 2 LINE LCD just for displaying the Name at top "water control"
and at bottom "TANK FILLED/EMPTY 25%/100%" I THINK 2 or 3 float switch will be better.
Actually i want to sale them in market.

Jul 18, 2013
10,826
2,495
11. ### GopherT AAC Fanatic!

Nov 23, 2012
6,297
4,019
You can also put a pressure sensor in the bottom of the tank. That way, there is no fear if the float getting tangled or wedged against the side of the tank.

Jun 29, 2010
2,831
89
Sorry, what?

13. ### djsfantasi AAC Fanatic!

Apr 11, 2010
2,899
870
A pressure sensor to determine the height of the water column in the tank by weight. Something like this

GopherT likes this.
14. ### JLodge New Member

Jun 13, 2014
2
0
If you are looking for a relatively simple yet accurate measuring method, you might want to consider this Water Level Sensor

It works in almost any type of liquid, and seems to be pretty accurate. Not sure if this is what you are looking for, but you might want to look at it.

There are also other types of sensors that work in different ways. In this case, the sensor is capacitively based, but other sensors are based on a float system (such as one you might find in a toilet) or resistively

15. ### sureshparanjape Member

Feb 10, 2012
64
2
I am not an engineer of any kind, just a person fascinated by what what electronics can do.I got a sketch which I think will indicate level of any liquid,provided the 'voltge divider' can be manufactured. A series of small resistances, or as required by the design, is grounded at the bottom and a float in the liquid, which grounds the voltage divider at the level of the liquid, will change the value of V.Is this idea is too naive? It reminds me my adviser's favorite phrase 'the result is too good to be true' ! If what is expected is true, V can be fed to a micro-controller and many app lications can be devised.

sureshparanjape

16. ### Alec_t AAC Fanatic!

Sep 17, 2013
5,956
1,131
You will have problems with corrosion of the resistors (through chemical attack or electrolysis) if they're exposed to the liquid.