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 63Next »
anshuanshu3333 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)  anshuanshu3333 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)  rlarios3 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.

KUPITO7 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)  KUPITO7 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.

KUPITO rlarios6 months ago

Thanks for the great answer. Ill definitely stick to the CD4001.

This has to be the #1 instructable I have read so far. Since I am a newbie, it is a great learning experience as well.

I have 3 1000 Litres tank and since I am in India, the motors run at 240Volts. I need to get this circuit for all 3 of my 1000L water tanks.

If I have understood correctly, the Q1-1 and Q1-2 are provided to give 12V AC and that is converted into 12V DC using rectifiers. But, why are we trying to do this ? Couldn't we just use 12V DC transformer 120V AC-DC adapter or 240AC-DC Adapter with output of 12V DC ?

Thanks and Regards


rlarios (author)  quicksilverm257 months ago
Hi quicksilverm25,

The AC Voltage input terminals are X1-1 and X1-2. You can omit all AC/DC conversion and voltage regulation circuitry and feed 12Vdc straight to the 12Vdc power rails if you want. That's up to you as a designer.

There's more than one way to skin a cat.

Thanks for your comments.

Thanks. I have now removed the following from the circuit

a) "Ground"

b) 7812 , 2 capacitors connected on either side of 7812 and ofcourse 1N4004s, X1-1 , X1-2.

In short, the connections from the "Ground" wire are all gone. The Ground wire also is gone. I think the "Ground" wire also was meant to be removed since the only external connection it is having is with X1-2, which is, removed.

After making all the connections, I did see motor starting up. For test purposes, I saved myself the relay and instead using DC Motor running on 9V instead. The green LED and Red Led unfortunately are both turning up and putting the other wires IN or OUT of the water is not making any difference.

I have looked at the connections and they seem to be proper. Not sure, what's going on wrong here.

rlarios (author)  quicksilverm257 months ago


Remember that the GND connection is the DC reference for all the components involved in the operation of the control. Your DC power supply's GND (or "-" terminal if you use a battery) should be connected to the control's GND for proper operation.

Looking into the schematic, X3-2 "Ground" should be connected to your DC power source's GND lead. The same applies to CD4001's pin 7, Q1's R5 resistor, LED2's R6 current limiting resistor, and Q3's emitter as well.

Transistors Q1 and Q2 are not essential to the operation of the control, they are there just to light the red LED whenever the pump's suction level is dangerously low. However, X3-1 is important to keep pump from running if so mentioned pump's suction level is low. If you want to operate the control without pump suction level protection, just short together X3-2 and X3-1.

Green LED, its current limiting resistor and reversed biased diode D5 are in parallel with K1 relay and are driven by transistor Q3.

Even though you are getting DC power straight into the circuit, it would be a good idea to include a 0.1uF to 1uF decoupling capacitor across CD4001's pins 14 and 7 to reduce transients

Hope this helps.

sun13lei8 months ago

sir, any idea on the water level alert used in big dams? Can you please suggest any circuit for sensing of water level alerts for big dams?

rlarios (author)  sun13lei8 months ago
Dear sun13lei,

I know nothing about water levels on big dams. However, due to the magnitude of dams and potential threat to life and property, there should be norms and regulations that dictate what kind of equipment should be used for infrastructure as such.

On the other hand, the circuit shown here is meant for water level control using two level and one common ground electrodes. Let's say, if you want to use the circuit shown in this instructable, you should also use the two electrodes to provide some hysteresis. The circuit shown turns on the pump whenever water level goes below "low" level and pump is turned off once level reaches "high" level.

In the case of your dam, -if you want to use same or similar circuit-. There should not be any alert for as long as water level is below a "safe" level, which could be our circuit's "low" level. When dam level reaches "low" level electrode, nothing should happen, it is until water level reaches the "high" level electrode that the "Alert" Light (or any other "Alert" device) should get turned on and stay on for as long as dam level does not go below the "low" level electrode, or our "safe" level. Both levels could be inches apart.

In order to do that with same circuit, you should cut the trace that goes from CD4001 pin 3 to pin 5. Then, solder a wire between CD4001 pin 11 and pin 5. This way, the circuit would turn on the Alert whenever "high" level electrode gets in contact with water and the Alert would stay on until water level goes below "low" or "Safe" level.

If you have something else in mind just let me know.

thetrims rlarios7 months ago

hi. I was trying to adapt the circuit to run a sump pump. When I saw your comments regarding the dam, I thought this was the solution. I made the alterations between pins outlined above, and now all that happens is the pump turns on when the ground and protection probes are submerged. Nothing happens when either the low or high level probes are sub merged. Any ideas???

Many thanks


rlarios (author)  thetrims7 months ago


Did you get the circuit to work the way it was intended originally? I will check the instructions I wrote in the comment above and see what could be wrong.

Better yet, I will modify one of my controllers -per the instructions above- and let you know what the problem could be and what to do to make it work the way you want. I will come back to you tonight.

rlarios (author)  rlarios7 months ago


I just modified one of my controllers making sure that no feedback lines were cut and the controller works the way you need it to. I guess I will write an additional step in this instructable along with pictures to show how to do just that.

Please, let me know whether you fixed yours.

thetrims rlarios7 months ago

hi. Just finished making the changes, and all works perfectly!! Thank you very much for your assistance. All I need to do now is wire in the 240v side from the pump into the enclosure and I will be all up and running. Thanks again for your help. Kind regards Murray

rlarios (author)  thetrims7 months ago

Murray, I haven't had the chance to modify one of my controllers yet, hopefully I'll get it done tonight as I said in my previous message. However, in checking the schematic along with the PCB layout, I realize where my mistake was in the instructions above. The trace that goes from pin 3 to pin 5 goes first to pin 12 before going to pin 5. If you cut the trace right off pin 3 then you break the feedback line that goes between pin 3 and 12. You only need to cut the trace between pin 5 and 12 and run a wire between pins 3 and 12 so the S-R latch operation gets back to normal. Once this is done, you only need to run a wire between pin 11 and pin 5 to make the controller work for a sump pump.

I'll do it tonight as I said, but for the time being, check whether the connection between pins 3 and 12 was broken by yourself when you modified the circuit so you can fix it.

thetrims rlarios7 months ago

hi. Yes mine worked as originally built. Yes I did cut the trace between pins 3 and 12, I had wondered about that. I hadn't appreciated the impact of that. I will do as you have suggested when I get home tomorrow night and let you know how I get on. Thanks for the replies. Murray

gerveruco11 months ago
The project is awesome!!
I am very interested in this project, but the only thing that i miss is the HEX file to load in the PIC. Could you say me what is the PIC that you used?
And how can i get the HEX file?
rlarios (author)  gerveruco8 months ago

I just inserted step 2 where it is shown how to wire a bigger pump (up to 2 HP) with this controller.

I had a little problem with the editor and I could not insert the links to the parts required properly. Please, copy and paste so you can see them.

Hope this helps. I will check the other steps for any possible shifted reference.
gerveruco rlarios8 months ago

I think that was my last doubt, I going to make it on this week and I say you how it works

Thanks again

rlarios (author)  gerveruco11 months ago

Thanks gerveruco,

This project does not rely on any type of micro controller. This project was built around a CMOS CD4001 quad 2 input-NOR gates IC.

When I read the message in my inbox I had thought you referred to my other instructable which was built around an ATMEL ATtiny micro controller whose source code is shown in one of the steps.

If you still have any question, just let me know.

gerveruco rlarios8 months ago

Hey man thanks for the answer. Just one more question, I have a 4 m3 cistern and 1100 L tank, the power of the water pump is 1/2 HP. Do you think the circuit works? Or do you think i have to change any of the components

rlarios (author)  gerveruco8 months ago

Gerveruco, what is your pump's voltage?

gerveruco rlarios8 months ago

The pump's voltage is 120 V.

rshamsi8 months ago


englatolar10 months ago

Thanks. I have assembled this project using same concept with CD4011 and it works pretty fine.........

rlarios (author)  englatolar10 months ago
Congratulations englatolar! Keep up the good work!

ikram00710 months ago

Thank you very much for reply.

I will update the
circuit according to your instructions then later I will discuss with you.

Thanks again!

ikram00710 months ago

very well done its really good job to make a water controller with pump protector.i am very intrusting in this project i will use for this my home overhead water tank and its underground bore water pump 1.5hp 240v ac. i prepared the circuit on breadboard but can't understand some thing is that if,

1- i am not using the reservoir tank then where i place the pump protect probe because the water pump is also underground.

2- How can i replace 12v dc 10A 220v ac relay on this kit according to my pump rating instead of 120v ac relay.i also read your suggestion in comments session about external relay but can you provide the on board solution.

3- Can i use this kit at 220v ac if not please sent to me some helpful changes.

i will be extremely grateful to you for this.


rlarios (author)  ikram00710 months ago
Hi ikram007, I'm glad you liked the instructable. Here I am going to try to answer your questions:

1. I believe you meant that somehow you can't reach the water inside where the pump is. If this is a problem, try shorting together both Pump protect and ground terminals with a jumper wire at the terminal block on the board. Of course, this means there will be no protection for the pump in case water level is too low for suction port.

2. You will need to download Jameco P/N: 144186 datasheet in order to see physical dimensions as well as leads layout of original relay. Then, try to get a similar relay but rated at 10A @ 240V and adapt your breadboard to accommodate this new relay. Another solution would be to remove the original relay and use an external one such as Jameco P/N: 137358. This relay's coil voltage is 12V and contact rating Is 20A @240V. You will need to run two wires from the transistor that energizes its coil with wires and quick connect/disconnect crimp terminals. You will also need to run some quick connect/disconnect terminals from relay's contacts to your pump.

3. Well, I believe you must be in Europe or another country with a 220V-50Hz system. Try to find an AC-to-AC wall adapter suited for 220V at input and 12V output so you can continue using same system without modifying onboard power supply. Unfortunately Jameco does not carry this type of item but you should be able to find one in your country.

I hope this helps. If you still need assistance, don't hesitate to give me a holler so we can get your pump controller together.

Thanks again for your "like".

jburns151 year ago
hey mate, I've created a similar design basing it primarily on this. All is working well, however i've found a tiny problem with corrosion.
I'm using this on a relatively small water tank ~7 L, and have banana sockets ( running through the wall of the tank. After about a week of operation i've noticed the contacts beginning to rust. So obviously they're not stainless.
My question is, if I can replace these with gold banana sockets (, will these still corrode?
I understand gold will not corrode, but i'm not certain if it may be affected by the constant current running through it.
rlarios (author)  jburns151 year ago
Hi jburns15,
You are right about corrosion. That's a problem which can be reduced with proper electrodes, though.

Your proposed binding posts look interesting, if this works for you go for it.

On the other hand, I have found that simple galvanized steel screws work fine as well. You can also choose to have the electrodes come from the top -fastened to the lid, if any- of the water tank so its walls don't need to be drilled through which would also eliminate potential leaks.

This is not a perfect world so I guess that by trial and error we should be able to minimize this problem.

Thanks for your comments and have a great day!
cfran1 year ago
The instructions are well done. I have fooled around with simple circuitry, and have been wanting to learn more. I now know something new - awesome

so how is the circuit modified if a have a 24Vac power source? I currently have a simple float switch operating a 24Vac solenoid and want to install this circuit to control the solenoid.

rlarios (author)  cfran1 year ago

You may do something else if you want to use 24Vac to feed the control board. You may use a capacitor in series with your 24Vac power source, then feed the water level control AC-in connector with this. This capacitor in series with your 24vac source will form a voltage divider with the controller so voltage will be reduced to safer levels.

This capacitor should have a total of 13.6uF. As this is not a commercial value, take two 6.8uF Polyester Film capacitors such as Jameco P/N: 2129852 at about $0.65 each and connect them in parallel to obtain 13.6uF.

This way, you don't have to modify the water level control.

Hope this helps.
rlarios (author)  cfran1 year ago
Cfran, thanks for your comments.

The simplest thing to do is to use the kit the way it is. Get yourself an inexpensive AC to AC wall adapter with 120Vac input and 12Vac output such as Jameco P/N: 2076543 which costs around 6 bucks. Use this adapter to feed the control board. This way, the water control relay contacts would take the place of your float switch which would switch your solenoid on and off the way you intended.

On the other hand, if you feed the power supply section of the control board with 24Vac directly, rectified voltage would be about 32.5Vdc. This voltage may be too high for the 7812 voltage regulator whose maximum input voltage is 35Vdc (per datasheet). This doesn't give you enough wiggle room because you'll rarely get exactly 24Vac from your existing power source so you would be at risk of damaging the 7812 IC in case of slight over voltages. This 7812 voltage regulator is needed for the CD4001 and the onboard relay. You will also need to make sure that input power supply decoupling capacitor is rated for 50Vdc operation.

If you like tinkering with electronic circuits, you may prefer to use a 7824 voltage regulator whose maximum input voltage is 40Vdc and then feed the onboard 7812 voltage regulator with the 24Vdc from this 7824. Now things start to become a bit more complicated than needed, don't you think so?

I still believe that you would be better off using the kit the way it is and use either a 120V:12V transformer or the AC-to-AC wall adapter I mentioned at the beginning of this post.

Just keep this in mind: "Engineers solve problems in the most cost effective way."

Hope this helps.
vanarion1 year ago
hi ,

i am a noob and very interested in doing these stuff.
I would like to install on a half HP motor .. can u please help me the components?.
1-40 of 63Next »