Picture of Build a simple water level control

About 20 years ago, a friend of mine came to me saying that he had to repair a customer’s  water level control made out of electromechanical relays which was falling apart.  He understood that the original control relied on conductivity of water. The customer didn’t want any type of float switch so he had to stick to the way it was meant to work.

He could start the pump whenever water fell below the “low” level electrode and pump would stop once it reached the “high” level electrode but, as water was consumed and its level barely dropped just below “high”, his circuit would re-start the pump just to stop it as soon as “high” electrode was touched by water again. This process kept going on and on until he switched power off. His circuit was oscillating which was not good for a 5 HP water pump or any pump at all.

He needed help. At this point I asked him that instead of working with relays, wouldn’t it be nice if the control were electronic which would probably be less expensive, more reliable and have a longer life?

 I intended to build a kit for Club Jameco out of how I remembered this control worked and this is what this instructable is all about. 

*** Disclaimer: This kit is meant to operate with equipment such as line operated water pumps or motor starter relays and/or contactors at lower control voltages. Line voltage is dangerous and if mishandled can cause injury or death. If you are not familiar or have not worked with line operated equipment, have a licensed electrician do the power wiring for you. This kit is meant to be educational in nature and can be used with line operated equipment if National Electric Code guidelines are followed. ***

Remove these adsRemove these ads by Signing Up
1-40 of 96Next »
zohaib_972 months ago

Hi ! I am new to the world of electronics and wish to make a similar circuit with some more requirements. Could u please help in suggesting a simple, cheapest, durable and an automated solution (with maximum safety) for prototyping the circuit below? Thank You !

I have two AC motors, one for storing water in underground tank and the other for filling up overhead tank.

I start storing water in the underground tank once it comes during designated timings on alternate days only and it takes 8-10 hrs for tank to fill completely.

Sometimes it even happens that pump for underground tank is left running (not knowingly) and the water supply from utility during the designated timings is over while filling up the tank. In this scenario, the motor uselessly runs, until someone physically see the the flow of water and then switches it off.

After I see that there is substantial amount of water present in the sump, then only i switch on the other motor to fill up overhead tank or it would burn down the motor. The tank fills up in 90mins, if it's completely empty. In this scenario too, one has to be there in time to switch off the motor once it has filled up completely to prevent overflow.

For this circuit, I would like to know the level of water using 5 LED indicators (EMPTY, 1/4, 1/2, 3/4, FULL) for both of my tanks.

More importantly, a manual switch in the circuit would be its plus point. So that if the circuit is malfunctioning, I would be able to connect the motors directly to mains.

Both are 2 HP motors and operate in 220V AC

rlarios (author)  zohaib_972 months ago
Hi there zohaib_97,

Unless I missed something, the only pump you need automated is the underground pump. This means that the overhead tank can be controlled with the circuit shown here in this instructable.

The underground pump can be controlled by a circuit similar to the "pump protect" portion. As this pump needs to come on only when water is available from the utility every other day at designated times, whenever water is unavailable, this pump won't come on.

You can always place a switch in parallel with relay contacts to turn pumps on and off in case of control circuit malfunction.

For water level monitoring you can place electrodes at your required levels and each electrode will be the input to a CMOS gate of some sort (like the ones in the CD4001 IC) which in turn could drive a transistor to turn on an LED.

Let me know if you are in agreement with this unless corrections are needed so either I help you designing it or you do it yourself.


zohaib_97 rlarios2 months ago

Hi rlarios

Thank you so much for showing support, really appreciate your efforts.

I agree with you, whatever u said above. Although, this instructable covers the requirement of automating overhead pump, but for the underground pump, can you please help me in designing the the circuit?

rlarios (author)  zohaib_972 months ago
Sure, I have one question, though. Where does underground pump get water from? A pipe, another reservoir?

I'm thinking that the underground pump can be controlled the same way the overhead pump would. After all, you would like underground pump to run until underground tank is full or until utility water runs out, wouldn't you? Being this the case, your only problem would be where to place sensors.

zohaib_97 rlarios2 months ago

Hi rlarios, thank you for your support.

The pump for storing the water underground (in our reservoir/sump) gets water from utility company though their underground running main pipe.

I would like to implement both of the conditions for underground pump. This is because, may be underground tank gets full first but utility water is still coming in its timings. Or it may also be possible that utility water runs out first but the tank is still not filled up completely.

rlarios (author)  zohaib_972 months ago
Do you have access to place a sensor on your underground pump's succion port? That would be necessary in order for the control to turn off this pump when you run out of utility water
zohaib_97 rlarios2 months ago

Hi rlarios,

Yes, i do have access there. The images are attached below.



Hi rlarios,

Good day to you !

I was just thinking that the circuit is uselessly becoming complex by adding time delay circuit, and other conditions that I wished to implement. So to make it an easy one, I will physically switch on the underground pump in alternate days.

Adding the electrode on the suction port will help the system to switch off the pump once the water coming from the utility ends. Secondly when water in the underground tank reaches higher level, the motor would also end to run.

Could you please help me design the circuit so that I incorporate it?

Thanks alot

rlarios (author)  zohaib_972 months ago

This is a block diagram of how these two controls could work.

This way, underground pump would come on only when Utility supply water is available AND underground tank level is below LOW level electrode.

Overhead tank water control would work as usual.

Let me know whether this would work for you and also the reason underground pump is necessary.

Good night.


zohaib_97 rlarios2 months ago

Thank you so much for your support, the way of your explanation in block diagram, the way you asked your friend as if it’s your own work, I don't have words to thank you, & it means alot to me.

The main reason of adding a suction pump is due to the poor distribution & pressure of main utility supply, therefore an added pump helps to fill up the reservoir quickly.

In my scenario, since I don’t have direct access to main utility pipe, the sensor placed on the suction port can only sense the availability of water, after the suction pump is switched on physically in its timings. If I would have direct access to main utility pipe, then adding a sensor there would have solved my issue without physically switching it on. Is it possible that we can add an IC/program to open the pump in between timings programmed? This would make the circuit switch on in the designated timings and placing a sensor on the suction port will help to switch it off, once the water is unavailable.

In the underground tank, a mechanical float valve like in the toilet is already there to stop the flow of water from utility once the tank is almost full. But in order to automatically stop the motor to run, I will have to place HIGH 2 near float valve.

Like in the Overhead Tank Control, I don't want LOW 2 to work similarly for Underground Tank Control, i.e to start the underground pump, once it reaches below LOW 2 level, however I only want it to be used for indication purpose.

Can you please tell what u mean in overhead tank control by "Depending on which gate is faster on S-R Latch circuit, the pump may or may not start when water level is between HIGH and LOW level electrode"?

It may happen that the overhead pump has just started to work after the water level reached to LOW electrode. The pump was only able to run & fill only half level of the tank and there comes power load shedding. In this scenario, if the water level hasn't changed (i.e half level) and the power resumes back, then would the system resume or it will wait till the water level reaches again to LOW electrode?

rlarios (author)  zohaib_972 months ago

Hi there Zohaib_97,

Sorry for not coming back to you sooner. I have been busy working in the field lately.

Well, your message looks rather long, I guess your only concern would be the operation of the S-R latch circuit, right?

If you observe the slide show when both scenarios are explained, it happens that both situations are valid when both inputs are zero. However, I did some testing after I posted the slide show some time ago and noticed that pump practically always starts when water level is between High and Low level electrodes.

I believe this is because the extra gate used to invert High level input delays the operation of the upper gate of the S-R latch. Nevertheless, don't take my word for it. I would suggest that you do your own testing to make sure that the pump will always start when such condition exists. You can build your circuit in a proto board and simulate the conditions with a shallow container with water.

Regarding the "timing" that you believe you require, you can always use a programmable controller such as Arduino Uno if you want. Unfortunately, I do not have all the details (other that your own description) unless you could provide a schematic diagram showing how it is that you are not connected directly to the utility pipe and yet your pump depends on it.

Good luck


Hi rlarios,

Hope you are doing well in your field... & no sorry, infact thankyou so much for your reply.

I have attached a hand drawing describing the distribution of water to our home through main utility pipe. Hope it covers what I wanted to describe.

rlarios (author)  zohaib_9717 days ago

I just got an email today March 31st from instructables saying that you had posted this message. Do you still need help on this?

rlarios (author)  zohaib_972 months ago


I'm at lunch now, however, I couldn't help it but to think about your water system. I asked a friend of mine, -a very experienced mechanical engineer- what would be the use of a pump like the one in your underground tank. He said a pump like that would not be needed as there is no way this pump can draw more water than what the utility can supply.

The pressure from the supply should be enough to fill up your underground tank and the way to stop the flow would be to use a float valve similar to the one in a toilet tank.

I said to my friend there must be a reason you have a pump like that, but as he was in a hurry, he did not elaborate on that. The question is: Why do you use a pump (that costs money to run) and not a float valve?


P.S. I will finish the drawing anyway.

rlarios (author)  zohaib_972 months ago


There is no need of any time delay circuit to the control you want to implement. You practically solved it the way you described it.

Just use one water level control as shown in the instructable to fill up the overhead tank, and another water level control to fill up the underground tank. Each pump protection circuit should take care of its own pump.

The only problem I see is how to "sense" water in the underground tank pump suction port. It may be a PVC pipe insert with two electrodes (one ground, one safe level electrode) or maybe a pressure switch that would close when there is water pressure from the utility.

Unless I am mistaken, I don't think you need any special design other than what is already shown in this instructable.

I will post tonight a drawing showing what I mean.


aru20022 months ago

Hi rlarios, thanks for the excellent instructable!

Could you please suggest little modification in the circuit in pump protection part?

I would like to have additional safe water level sensor so that pump protect condition

lasts till the in flow of water reaches certain level.

Here is my problem: Pump runs till protect mode, inlet water flow starts, as soon as

the protect switch closed, the pump starts. Since water in flow is less, within seconds or about a minute pump starts and this repeats! I want it to wait till the

water level reaches certain level so that the pump does not start frequently.


rlarios (author)  aru20022 months ago
I'm working on a drawing for another reader. In the meantime, can you tell me whether your pump would run like a sump pump of sorts?

Which level is higher?

aru2002 rlarios2 months ago

Thanks for the quick response.

Pump protect level is the bottom level. I want another level above that about a foot or two so that the pump in protect mode triggered will wait till the water reaches the upper level(not tank full) and start again. I don't want tank high level in the sump.

pump started>pump protect triggered>pump off>water in flow starts>water level rises above protect level (about a foot>pump starts again>if it reaches protect level then it stops again and wait for the water reach next level.

Is it possible with some modification?

rlarios (author)  aru20022 months ago

Sure! The solution would be to add a second S-R latch to replace the single pump protect input. The output of this latch would go to pin 6 of gate IC1B.

I will be posting a schematic tonight to show you what my idea is.


aru2002 rlarios2 months ago

Thanks for your support. I thought of that but the logic for the bottom tank is little different it seems. I am not good at it, thought to take your help.

rlarios (author)  aru20022 months ago

Well, if what I understood from your description is correct, the attached circuit should do the trick.

Please, review and let me know if this complies with what you expect it to do. In case it doesn't, please be patient as English is not my first language.


aru2002 rlarios2 months ago

Sorry to bother you.

That didn't work.

Please refer the picture.

rlarios (author)  aru20022 months ago


No bother at all. Please refer to your same picture with Boolean Logic of S-R latch included. S-R latch upper output is used for sump-pump control, lower output is used for water level control (overhead tank). If you notice, one output complements the other, in other words, they always show opposite states whenever inputs are valid. Both inputs must never be equal to "1".

Based on the logic shown, the circuit complies with required output for pin 6 per your drawing. I am only showing the gates with no input pull-up resistors so gates could fit in your own drawing next to each scenario.

Please, review and give me your comments.


aru2002 rlarios2 months ago

Thank you very much for your detailed explanation. I didn't notice the small change in SR latch you suggested. I compared the one connected to the upper tank and thought this is similar until you expained both. I will apply this and let you know.

Once again thank you for your patience and time.

rlarios (author)  aru20022 months ago
You're very welcome! I like people questioning things, they are the ones who learn.

Good luck!

aru2002 rlarios1 month ago

Hi rlarios, everything is working as expected. I would like to add 3 level indicators to each tank as low, med and high. Can you suggest the circuit?

No hurry, whenever you have time!


rlarios (author)  aru200217 days ago
I just got like 4 emails from instructables (today March 31st) saying that you posted this request. Let me know whether you already solved this or not.


hii....i connected everything, but while checking the voltage between 7th pin and 14th pin the voltage is not as required voltage 12v..what I have to do?

rlarios (author)  aravindarumanai2 months ago
Did you wire the circuit as shown in the instructable? If this is so, you should have gotten 12V unless your voltage regulator is faulty, severely overloaded, or you definitely used a different voltage regulator.

The 12V source was used because it's a standard rating on most relays and CMOS ICs so only one voltage source would be needed.

In your case you didn't specify what voltage you got between power pins. Check CD4001's and your relay's data sheets. The voltage you got may fall within your devices' tolerances.

SankalpS3 months ago


Would it be possible for you to post the circuit with a 7402 IC. It costs about $0.20. Plus the problem I am facing with the 4001 based circuit is transient voltage is affecting it badly. Whenever a light or microwave oven is switched on or off the circuit stops working. I am a bit confused with the resistor values. 7402 needs different range of voltage for High and Low

rlarios (author)  SankalpS3 months ago
Hi there SankalpS,

I see what you're saying regarding the transients. That shows that your ac power source has a relatively high source impedance. The best way to compensate for that would be to use an RC filter at each water electrode input.

Place a 0.1uF or a 1uF (depending on the severity of the transient) between each input and ground. This would create a time constant of 0.22 seconds (or 2.2 seconds if 1uF) at each input which would let the S-R latch ride-through the transients.

Please let me know how that works. In the meantime, I'll take a look at that 7402 circuit to see why you want to use it.

Thanks for your comments.

SankalpS rlarios3 months ago

Hi Rlarios

Tried it out with 0.1 uF caps connected at all the inputs and a TVS diode across the power supply. The circuit seems to be stable now.

The reason I wanted to use a 7402 because its TTL based and seems to be immune to transients as I had used it earlier in a different project.

Thanks for the super fast response.


rlarios (author)  SankalpS3 months ago


In order to get 7402's minimum (per Fairchild's datasheet) High-level input Voltage (2.4V), pull-up resistor would need to be no higher than 3.3K between +5V and each input. That means that in order to get 7402's maximum Low-level voltage (0.8V), water resistance between each input and ground electrode should be no more than 390 Ohms. You would have to place a ground electrode as close as practical to each input if you want to try it.

Water resistivity depends on its mineral contents. According to Wikipedia, sea water has the lowest water resistivity in Ohm-m. Drinking water varies between 20 and 2000 Ohms-m.

You will have to try it to see whether this would work. I remember to have seen higher resistivity values elsewhere. I hope Wikipedia is correct, though.

Best of luck!


anshuanshu3337 months ago

hi i want to control two valves using an SR latch can i do it as shown below, can you also let me know why is pin 8-9 of IC 4001N is shorted why cant you connect the High(X2-2) directly to pin 13, my intention is to control the pump based on the levels of two tanks so i was thinking to reuse the NOR gates if they are not needed, i also do not need pump Protect

rlarios (author)  anshuanshu3337 months ago

Hi ashuanshu333!

Pins 8 and 9 were shorted at that gate's input to make it operate as a logic inverter. A "high" level is needed to stop the pump and that input is "low" when water level touches that electrode. An S-R latch changes state when either input is "high". Both inputs being at a "high" state in an S-R latch is an invalid condition, check out truth table in the slide show.

To stop the pump, we "inverted" X2-2 so the pump could stop. This explains why X2-2 was not connected directly to pin 13. If we had not used this extra gate we would have used something else to invert this signal, though. Go back again through the Theory of Operation slide show and analyze each slide in case you still have any doubt.

X2-1 does not need to be inverted as once water level falls below it, this pin will switch to a "high" state (while X2-2 is "high" as well but thanks to the extra gate wired as an inverter, the S-R latch sees X2-2 as a "low" level signal).

It seems to me that you don't want to use more than 2 ICs. However, you need an additional OR gate to turn on the pump. Why instead of using a 74AHC1G32DBV don't you use the second CD4001's remaining gates to implement an OR function?

For each tank you would use 3 gates, that's a total of 6 gates to implement water level control. As each IC has 4 gates, having two ICs gives you a total of 8 gates which would be enough to include the OR function needed to turn on the pump.

I would use one of the remaining gates wired the way you did the 74xx32 and the last gate to invert its output just the same way it was done to invert X2-2 in the basic water level control. After all, a NOR gate is nothing more than an OR gate followed by an inverter or NOT gate, don't you think so?

Please, let me know whether this works for you or I am still missing something.

Good luck!


rlarios (author)  rlarios7 months ago

I look forward to seeing how your circuit turns out to be.


thanks for your quick response , i think what you suggested is much better than what i thought, your article is great. thanks once again,i will send you the pics when i am done making it.

quicksilverm2510 months ago
KUPITO11 months ago

Great Instructable you have here.

One question about the IC, i was wondering if i could replace the IC you have described for 7402 IC. It seems like theyre exactly the same but i just want to be sure. Here is the diagram of the 7402 IC

rlarios (author)  KUPITO11 months ago

Hi Kupito,

I'm glad you liked it.

You will have to check what this device's input impedance is to make sure whether existing input pull-up resistors can work or not. Besides, this being a TTL device poses a problem due to the onboard +12V supply voltage. TTL devices operate at +5V and typically, any voltage higher than +6V or +7V between Vcc and Gnd could destroy the device. Even CMOS 74HC02 has same absolute maximum.

One CD4001 costs around $0.39 U.S. while one 7402 costs around $1.75 U.S. So, do yourself a favor and stick to the CD4001 so no design changes are necessary and save some money at the same time.

The reason CD4001 was used was because this way only one supply voltage (+12V) for both, the IC and the relay would be necessary. Relays whose coils are rated at 12V can be found almost anywhere, even in remote villages, so nobody would have any problem finding one.

Hope this answers your question.

1-40 of 96Next »