Maker Pro
Maker Pro

Water tank refilling circut

Justinwiz

May 26, 2012
6
Joined
May 26, 2012
Messages
6
I need help on a tank refilling circuit, I'm able to detect water levels near the bottom and at the top of the tank with sensors and the refilling circuit is controlled by a relay.

I'd like to detect when the water falls below the bottom sensor and have it fill to the top sensor, then allow it to drop below the bottom sensor again, and fill up again.

I've tried several methods, but I can't find a way to allow it to fall below the bottom sensor before refilling.

I'd rather not use a microcontroller (Picaxe, Arduino, atmega), transistors are fine (of course).

I have a pack of 1000 NPN transistors.

Any ideas?
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
Keep it simple and keep in mechanical using a simple toilet tank system? You get not only an adjustable float to set high and low water levels, you also get the on/off value, just hook up the water and adjust... All in a single package at the local hardware store...

There are also livestock watering float system that operate on the same principle, or you can go with one of the many mechanical floats used on sump pumps... The easiest being a float hooked to a vertical shaft with two adjustable stops on said shaft that toggle a limit switches...

If not all mechanical I would likely still keep the level sensor mechanical as it simply works... Even a float switch with aka a 'mercury' type switch again like those used in sump pumps, as the water level changes so does the degree of the float that will change it's state...
 
Last edited:

Justinwiz

May 26, 2012
6
Joined
May 26, 2012
Messages
6
Keep it simple and keep in mechanical using a simple toilet tank system? You get not only an adjustable float to set high and low water levels, you also get the on/off value, just hook up the water and adjust... All in a single package at the local hardware store...

There are also livestock watering float system that operate on the same principle, or you can go with one of the many mechanical floats used on sump pumps... The easiest being a float hooked to a vertical shaft with two adjustable stops on said shaft that toggle a limit switches...

If not all mechanical I would likely still keep the level sensor mechanical as it simply works... Even a float switch with aka a 'mercury' type switch again like those used in sump pumps, as the water level changes so does the degree of the float that will change it's state...

I'd love to use that setup, but I've been provided the sensor based system in my original post.
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
I'd love to use that setup, but I've been provided the sensor based system in my original post.

I have no idea what you have been provided, nor the type of sensor, nor design perimeters or anything else... Is using what you have been provided a requirement?

Mechanical floats work and they work WELL that is why they are still the go to method to control fluid levels...
 

Justinwiz

May 26, 2012
6
Joined
May 26, 2012
Messages
6
I have no idea what you have been provided, nor the type of sensor, nor design perimeters or anything else... Is using what you have been provided a requirement?

Mechanical floats work and they work WELL that is why they are still the go to method to control fluid levels...

I'll look into modifying my current setup to use floats then, thanks!
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
What you need is a bistable -- you can make that from a couple of transistors.

A bistable has 2 states (often it has 2 transistors in opposite states, but not always). Lets call these states "ON" and "OFF".

This state information (it may be the voltage on the collector of a transistor) can be used to do something. Let's say we take it and use it to switch a relay on and off via another transistor.

Lets assume that the relay follows the states we've determined. So when the bistable is "ON" the relay is also on. When the bistable is "OFF" the relay is off.

The thing about bistables is that you have 2 inputs. One will turn the bistable to the "ON" state, and while it's in the "ON" state that input will do nothing further. The other input will turn the bistable "OFF" and while it is off, the inut will do nothing further.

Going back to our problem, we want to turn the pump on when the lower sensor reads no water, and off when the upper sensor detects water.

Can the bistable help?

Lets assume that the pump is off. The bistable must be off (because the pump is off) This means that the water level in the tank will fall. Thus we need to do something when the bottom sensor is exposed.

Clearly when the bottom sensor is exposed, we need to send a signal to the bistable to turn it "ON"

With the bistable turned ON, and therefore the pump turned on, the level in the tank will rise. At this point we don't care what the bottom sensor does (and we know the bistable will ignore it) Great! But now we need to wait until the top sensor detects water.

When the top sensor detects water it also needs to send a signal to the bistable. In this case it needs to send a signal to the input which turns the bistable (and the pump) off. And we haven't used that input yet (surprise? I guess not).

We know that if we use the top sensor to signal the bistable to turn off that it will ignore the top sensor until the pump is turned on again. That's great, we want to allow the level in the tank to drop...

And now we're back where we started. This cycle will repeat forever (which is presumably what we want).

The only thing we need to do is to ensure that the signals we get from the sensors are correct.

We need to ensure that whatever signal is required to change the state of the bistable (it is usually the same for both inputs), it needs to be generated when the bottom sensor is exposed, and the top sensor is covered.

If they are similar sensors, they might (for example) generate a voltage when they detect water. This may be fine for the top sensor (if that voltage will trigger the bistable to change state), but it is exactly wrong for the bottom sensor. You would need to use another transistor to invert the signal from the bottom sensor.

So with 1000 transistors, I estimate you'll have around 996 left over after you've made this :)
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
The same principle applies with a float. I've seen floats on a tube with magnets that trigger magnetic switches.

Generally you have some hysteresis in systems such as this (the concept of the pump turning on at a lower level than where it turns off). This means that the pump isn't being turn on and off as waves ripple the surface of the water -- that's not good for the pump.

It can be done in all sorts of ways. One simple one is to have the pump turn on for a minimum time. That way it always fills some amount past the (single) sensor.

If you wanted this, you could look up "monostable" (if you wanted to build one)
 

Justinwiz

May 26, 2012
6
Joined
May 26, 2012
Messages
6
What you need is a bistable -- you can make that from a couple of transistors.

A bistable has 2 states (often it has 2 transistors in opposite states, but not always). Lets call these states "ON" and "OFF".

This state information (it may be the voltage on the collector of a transistor) can be used to do something. Let's say we take it and use it to switch a relay on and off via another transistor.

Lets assume that the relay follows the states we've determined. So when the bistable is "ON" the relay is also on. When the bistable is "OFF" the relay is off.

The thing about bistables is that you have 2 inputs. One will turn the bistable to the "ON" state, and while it's in the "ON" state that input will do nothing further. The other input will turn the bistable "OFF" and while it is off, the inut will do nothing further.

Going back to our problem, we want to turn the pump on when the lower sensor reads no water, and off when the upper sensor detects water.

Can the bistable help?

Lets assume that the pump is off. The bistable must be off (because the pump is off) This means that the water level in the tank will fall. Thus we need to do something when the bottom sensor is exposed.

Clearly when the bottom sensor is exposed, we need to send a signal to the bistable to turn it "ON"

With the bistable turned ON, and therefore the pump turned on, the level in the tank will rise. At this point we don't care what the bottom sensor does (and we know the bistable will ignore it) Great! But now we need to wait until the top sensor detects water.

When the top sensor detects water it also needs to send a signal to the bistable. In this case it needs to send a signal to the input which turns the bistable (and the pump) off. And we haven't used that input yet (surprise? I guess not).

We know that if we use the top sensor to signal the bistable to turn off that it will ignore the top sensor until the pump is turned on again. That's great, we want to allow the level in the tank to drop...

And now we're back where we started. This cycle will repeat forever (which is presumably what we want).

The only thing we need to do is to ensure that the signals we get from the sensors are correct.

We need to ensure that whatever signal is required to change the state of the bistable (it is usually the same for both inputs), it needs to be generated when the bottom sensor is exposed, and the top sensor is covered.

If they are similar sensors, they might (for example) generate a voltage when they detect water. This may be fine for the top sensor (if that voltage will trigger the bistable to change state), but it is exactly wrong for the bottom sensor. You would need to use another transistor to invert the signal from the bottom sensor.

So with 1000 transistors, I estimate you'll have around 996 left over after you've made this :)

The same principle applies with a float. I've seen floats on a tube with magnets that trigger magnetic switches.

Generally you have some hysteresis in systems such as this (the concept of the pump turning on at a lower level than where it turns off). This means that the pump isn't being turn on and off as waves ripple the surface of the water -- that's not good for the pump.

It can be done in all sorts of ways. One simple one is to have the pump turn on for a minimum time. That way it always fills some amount past the (single) sensor.

If you wanted this, you could look up "monostable" (if you wanted to build one)

Great wording!

Wow! Thank you very much for the detailed explanation, I will look into bistables, as they seem to be the most effective solution for this project.

Thank you again. :D
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
The same principle applies with a float. I've seen floats on a tube with magnets that trigger magnetic switches.

With the float you can do it with just a switch... Two stop points on a a shaft that moves up/down... Lower stop point trips the switch 'up' at max water level (off) the higher stop point trips the switch 'down' at fill level (on)...
 

Attachments

  • low.jpg
    low.jpg
    15.8 KB · Views: 217
  • high.jpg
    high.jpg
    16.7 KB · Views: 139

Justinwiz

May 26, 2012
6
Joined
May 26, 2012
Messages
6
With the float you can do it with just a switch... Two stop points on a a shaft that moves up/down... Lower stop point trips the switch 'up' at max water level (off) the higher stop point trips the switch 'down' at fill level (on)...

This also looks like a very elegant and simple solution, but I currently do not have the items required to make this... I'd have to run down to the store. :p

Edit: The simplicity, and the fact that I have all the tools and components required to create the bistable based refilling circuit, makes me lean more to the electronic version.
 

Justinwiz

May 26, 2012
6
Joined
May 26, 2012
Messages
6
Hm, I'm a bit stumped on how to arrange the sensors and the bistable. Can you help me out?
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Well, maybe first you need to tell us about the sensors you plan on using.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
A latching relay might allow you to avoid the electronics. You would use the type that has two coils, one to latch the relay ON and one to latch it OFF. You'd use the latching relay to control the fill pump, and connect the OFF coil to the top float switch, so when the level reaches the top setpoint the pump will turn OFF. For the ON coil you might need a normally closed relay between the bottom float switch and the latching relay, because presumably the bottom float switch turns ON when the level is ABOVE the lower setpoint, and you need to turn the latching relay ON when the level goes BELOW that setpoint.
 
Last edited:

RaZor

Jan 3, 2013
7
Joined
Jan 3, 2013
Messages
7
I have this on my disc, and uploaded to web, see if this can help?
rgk2.jpg


A,B,C are a sensor.
 
Top