Build a Simple Water Level Control





Introduction: 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. ***

Step 1: Proposed Control Slide Show

The slide show included in this instructable shows the basic operating theory behind this control. It assumes that the pump is a small plug-in pump. This control has a small 12V coil relay whose contacts are rated at 10A 120V. You can select any relay to suit your water pump's power source.

Step 2: Suggested Circuits for Bigger Pumps.

120Vac Pumps

The first schematic shows how to adapt the water level control to bigger pumps still rated at 120Vac. You would have to get a Power Relay part number AD-PR40-1C-120A from Automation Direct dot com. This is a SPDT (Single Pole Double Throw) relay, which means it has only two sets of contacts and three terminals for one line only. One set of contacts is NO (Normally Open) and the other one is NC (Normally Closed) with one terminal common to both. The circuit shows the Normally Open contact.

Click here to get AD-PR40-1C-120A.

This Power Relay coil is rated at 120Vac so our controller will be able to switch it on/off safely. The contacts of this Power relay are rated at 40A 300Vac. This is more than enough for pumps up to 1HP at this voltage.

240V Pumps

To switch on 240Vac pumps, you would need a relay with two sets of contacts such as Automation Direct Part Number AD-PR40-2A-120A. This relay’s coil is also rated at 120Vac so our water level control can switch it on/off at rated voltage. The second schematic shows how a pump up to 2HP can be wired for proper operation.

Click here to get AD-PR40-2A-120A.

These relays should be placed in an enclosure for safety.

Step 3: The Schematic

This schematic was originally drawn using CadSoft EAGLE software for PCB design. As it seemed hard to read it has been modified for clarity. A small step-down 120Vac:12Vac transformer rated at 250mA feeds the on-board power supply through terminals X1-1 and X1-2. The transformer provides the low voltage required for the control plus galvanic isolation between control circuitry and the mains. In order to keep parts number at a minimum, a CMOS CD4001 circuit was used so only one supply voltage is needed for both, control circuitry and relay.

In addition to what was shown in the slide show, this control circuit includes two LEDs, one green LED to show when pump is running and a red LED to show when control is in pump protect mode. The green LED comes on every time the relay comes on. This LED –and its current limiter resistor- is in parallel with the coil of the relay. If red LED is on, pump and green LED will stay off even if pump is required to come on. Once red LED goes out then pump and green LED may come on if needed.

The circuit formed by transistors Q1 and Q2 is designed to turn on the red LED (Pump Protect) whenever there is no water between pump protect electrode and ground electrode at pump reservoir. Q1 comes on as soon as water level drops below pump protect. Q1 base current is too small, less than 1 micro Amp. Q1 and Q2 are wired as a Darlington pair so Q2 can turn on the red LED when required. Once there is water between pump protect and ground electrodes, Q1 turns off causing red LED to go out.

IC1-B gate works sort of an AND gate. This means, whenever main tank needs to be filled up and pump protect is false, this gate turns on transistor Q3 which will turn on the water pump.

Step 4: The Printed Circuit Board

I like designing electronic gadgets as a hobby. However, any time I had to build one, I did it with general purpose prototyping boards using the point-to-point soldering technique.

I had never done any PCB before, so, I had to learn how to make my own. I learned from this instructable:

Eagle files for this controller are included in this step. By the way, the PCB shown in this instructable is the first PCB I ever made.

When etching time came, I chose what looked to me as an environmentally friendly method, see:!--A-better-etc/

If building your own PCB or doing point to point soldering on prototyping boards is not your thing, you can click on the following link to buy this water level control as a kit from Jameco which includes everything you need except the transformer:

Step 5: Parts List



3x - 2.2M ohm 1/4W (R1, R2, R3)

1x - 4.7K ohm 1/4W (R4)

1x - 120K ohm 1/4W (R5)

2x - 470 ohm 1/2W (R6, R7)

1x - 15K ohm 1/4W (R8)



1x - 330uF 63V (C1)

1x - 220uF 25V (C2)

1x - 1uF 63V (C3)



5x - 1N4004 (D1, D2, D3, D4, D5)

1x - CD4001 (IC1)

1x - 7812T (IC2)

1x - Green LED (LED1)

1x - Red LED (LED2)

2x - 2N3904 (Q1, Q3)

1x - 2N3906 (Q2)




1x - 12V coil Relay (RLY1)                                         Jameco P/N: 144186

4x - 2 Terminal connector (X1, X2, X3, X4)           Jameco P/N: 2094485*

1x - Printed Circuit Board                                        Eagle files included in step 3

1x - 14pin IC Socket
1x - 120V/12V @ 250mA transformer  or AC-to-AC wall adapter, Jameco P/N:2076543

*This P/N was replaced to match PCB pin spacing. Old P/N was 2094506


Step 6: Assembly

Solder in passive components first, this includes resistors and electrolytic capacitors paying attention to polarity marks. Next, solder in power supply components such as diodes and voltage regulator paying special attention to polarity as well. Use a clip-on heat sink between solder joint and the body of semiconductor as shown in pictures.

Install the 14-pin IC socket and solder it in place. Use just enough solder for each pin to keep adjacent pins from shorting together with excess solder. Note the position of the notch on one side.

Using an external +15V DC Power Supply (or two +9V batteries in series) and a couple of alligator clips, connect the (+) output of this power supply to the anode of D1 and the GND output of the power supply to the cathode of D4. Measure voltage between pins 14 (Vdd) and 7 (gnd) of the IC socket which should be +12V +/- 2%.


If this voltage test proves successful, proceed to next step.

Step 7: Finish Assembly

Install 2N3904 NPN transistors into Q1 and Q3 positions making sure all terminals go into their corresponding holes. Attach the clip-on heat sink before soldering each lead with the right amount of solder and wait at least 20 to 30 seconds before moving to next lead of same device. Do the same with 2N3906 PNP transistor on Q2 position. Install the green LED into the LED1 position. The shorter lead is the cathode and should go where the cathode lead is marked on the PCB. If LEDs are reversed they won't turn on. Attach clip-on heat sink to the lead you will solder first, wait 20 to 30 seconds before soldering the anode. Do the same with the red LED into the LED2 position.

The remaining terminal connectors come with two terminals each. Install one connector each into X1 and X4 positions and solder in place with the terminals facing to the edge of the PCB. The terminal connectors used come with a sliding lip on one side and a groove on the other. Take the remaining two connectors and put them together by sliding one connector's lip into the other connector's groove so they stay attached and insert them into X2 and X3 positions and solder in place with terminals also facing to the edge of the PCB.


Install the relay into RLY1 position and solder it in place. This completes the assembly of the controller board. In order to have the controller ready for testing, insert CD4001 into IC socket.


Step 8: Final Testing

Place your assembled controller board on an insulated surface such as a file folder or notebook on your workbench to avoid shorting the solder joints with any lingering conductive material still sitting on your work surface. Get a couple of one foot 24AWG segments of wire and strip the ends. Insert one wire's end into the terminal marked as "Ground", then insert the another wire into the terminal marked as "Pump level protection" leaving the other ends loose without touching one another.


This is a test with the same DC power supply used in step 6. Connect it the same way to power up the circuit. At this point, the CD4001 should already be inserted into its socket. Once power is applied to the board and assuming everything was properly assembled, the red LED should come on. If you put together the two stripped ends of the wires previously attached, the red LED should go out and the green LED should come on and one click should be heard coming from the relay. Separating the wires' ends should turn off the green LED and the red LED on while hearing another click from the relay as it de-energizes. This proves the circuit is working.


Get yourself a small shallow container and fill it up with water. With the circuit still energized, the red LED on and the two wires not touching to each other, dip both stripped ends into the container with water. The red LED should turn off and the green LED should turn on with one click heard from the relay. Remove the wires from the water and the green LED should go out, the red LED should turn on with a click heard from the relay. If this goes as outlined, then it is working properly.


AC transformer test:


Now it's time to test that the controller will work with 12VAC coming from the 120V/12V 250mA transformer. Connect the transformer's 12VAC leads into the connector marked as 12VAC IN. Plug the  transformer's primary through an extension cord into a wall outlet and the board should perform the same as with the DC power supply. If this is the case, then it's time for next test.


Water Pump test simulation:


Get another pair of wires of about the same length as the wires already connected to the controller board, strip their ends and insert one in the "Low level" terminal and the other in the "High level" terminal. With the pump protection and ground wires already dipped into the water container, the green LED should be on. Dip the "low level" wire end into same water and the green LED should still be on, then dip the "High level" wire also into same water container and the green LED should go out with a click heard from the relay. This simulates that the pump filled up the water tank. To simulating water consumption as water level goes down, remove the "High level" wire from the water container and nothing should happen. Then, remove the "low level" wire from the water container and the green LED should turn on and the relay should energize the water pump and the cycle will repeat.

If tests were successful, the controller can now be used in the real world. Before doing it, get yourself a suitable enclosure so no hot voltages are exposed. The electrodes in the water tank can be placed vertically from the top of the tank down into the water. To avoid corrosion, it is recommended to use stainless steel electrodes for longer life. If electrodes go through the wall of the tank, seal properly to avoid leaks.





10 People Made This Project!


  • Clocks Contest

    Clocks Contest
  • Make it Move Contest

    Make it Move Contest
  • Planter Challenge

    Planter Challenge

We have a be nice policy.
Please be positive and constructive.




hello sir i want to make sure that this circuit is efficient or not because putting wires in water tank is very dangerous act because it may be possible that diode gets short and there is a reverse current in the circuit and anyone who is taking bath may get electric shock and also putting wires in tank can make the water conatminated with electrons...if we use ultrasonic sensor with microcontroller it will be better ....what is your thought about my point?

sir i need the pcb file of the circuit.plz

I am not 100% sure on just what to change to make the operation opposite from what it is. I want the pump to start when the water level is high and shut off when it is low. Like a sump pump.

2 replies


Sorry for not coming back to you sooner. I have said that I would write something about it to be part of the instructable. Unfortunately, I have gotten busy on work.

If you are in a hurry, go read the comments, you'll find somewhere down the modification to the circuit to do just what you have requested.

Thanks for your comments, sir.


Yes, I found where there was information on the trace cuts and jumper and it works great. Nice project.

Dear rlarios,thank you so much for your help and support.I can't seem to appreciate it in any better way.Thank you! The circuit is working as smooth as it ever could.As always,there is a "but" haha!.. and its that i modified the circuit.I gave ground to the IC2 from pin-5,pin-6 and pin-7 and its working really really good.I don't know the theory behind it as i did lots of hit and trial.It'd be really good to hear "how" from you.We'll keep in touch,rlarios.Btw i'm a lady. good night!

3 replies

hi, can you please send me your modified circuit of this one?

Hi renzd5,

Is this a request for Lado115 or myself?



Please review slide show on step 1 of this instructable.

It explains all the basic theory behind CD4001 and how to wire it as an S-R flip flop.

You're welcome, and keep up the good work.



It sounds like Lado may not be using the pump level feature. The pump level circuit provides the pathway from pin 6 to ground. From the circuit diagram it looks like, if the pump level feature is not being used, pin 6 needs to be taken directly to ground, which is what Lado eventually did.

I did exactly as you said,checked all the connections and everything was fine. I gave the ground on pin-7 of IC2 from primary circuit. And it worked but the relay switch was making some weird sound.It isnt working smoothly. where do i give ground to IC2?


1 reply


All circuits use the same ground as reference. The relay needs more current than the other circuits, therefore, you need to make sure your power supply can deliver the power needed for the whole circuit.

Wire the circuit first using an LED to simulate the operation of the relay. Once you verify that the logic works, I'll help you with the relay to turn on the pump.

By the way, post a picture of your circuit. I may be able to see what's wrong and help you fix it.

Have a good morning, afternoon or whatever. It's 2:32 am here.



Lado 115,

Please review attached picture. Do some logic analysis for yourself so you understand the circuit.

Make sure you have same common ground on both tanks and that your connections are solid.

One of my readers once thought that both circuits were the same because he saw no difference.

Remember, IC1B pin 5 is wired to both IC1A pin 3 and IC1D pin 12. IC1B pin 6 is wired to both IC2D pin 11 and IC2A pin 2.

Resistors are 2.2M.

Test the circuit on your workbench first before wiring the actual tanks. Make sure that inputs go to a high state when not touching water, and that they go to a low state when they touch water. Ground must be touching water.

Relax, be patient and enjoy the process.



I did exactly as per the diagram you sent but it didn't work at all.There's a small confusion in the diagram which.Is that "22M" or "2.2M"?Nevertheless,i've used 2.2M resistor.Plus i haven't done anything on the primary circuit except for the inter-connection of pin-6 of IC1B and pin-11 of IC2D like you said.If convenient,Can you please work on the circuit or at least,draw the whole diagram of the circuit? I really can't think of any other options cause this looks so plausible.Maybe we need to change the components or their values.Anyway,looking forward to you help as soon as possible.



Thank you so much Rlarios.I really am indebted.I'll keep you informed in each steps.Btw,how long can we keep the length of wires to the sensors? Can we keep it upto 100 feets?

2 replies


You're welcome!

Go ahead, use 18 or 16AWG wire. This way you'll keep wiring resistance low.


I did exactly as per the diagram you sent but it didn't work at all.There's a small confusion in the diagram which.Is that "22M" or "2.2M"?Nevertheless,i've used 2.2M resistor.Plus i haven't done anything on the primary circuit except for the inter-connection of pin-6 of IC1B and pin-11 of IC2D like you said.If convenient,Can you please work on the circuit or at least,draw the whole diagram of the circuit? I really can't think of any other options cause this looks so plausible.Maybe we need to change the components or their values.Anyway,looking forward to you help as soon as possible.



Dear Rlarios,greetings of the day.I'm sorry i couldn't make you understand the problem in the circuit.So to make stuffs more clear,see the illustration at last..As you can see,there are two separate probes(regardless of the ground) in the uppertank which are assigned two different functions namely probe-1 to turn the pump on when the water level drops below it and probe-2 to turn the pump off when the water level stays above it.But here in basetank,there is only one probe(regardless of the ground) to perform both functions which are on and off.So basically,this probe is working like a switch as this probe doesn't work on the basis of level of water but merely by the touch of it.Now let's suppose both of our tanks are empty and we're filling up the basetank from any external source which has very low rate of flow.When the water level touches the probe in basetank,the probe will trigger the circuit on and the pump will start.Once the pump starts,it will suck out all the water in the basetank within few minutes as it has higher rate of flow compared to that of external source.Eventually the pump will stop again as the water level falls below the probe.The pump will keep getting on and off till the uppertank is fully filled and that could cause some serious effects on the pump.So to avoid such complications, i think it'd be better if we kept two seperate probes in the basetank as exactly as in uppertank but with opposite functions. Probe-1 to turn the pump off and probe-2 to turn the pump on.I need to know if there's anything like inverter-IC or any other thing that can invert the functions of the probes in upper tank which later on can be used in basetank.

2 replies

Dear Lado115,

In order for the controller to operate in such a way as to turn pump on when water reaches upper level sensor and turn it off when water is below lower level sensor do the following:

Refer to step 3 of instructable.

1. Cut line that goes from IC1 pin 3 to IC1 pin 5, without cutting feedback line that goes from pin 3 to pin 12. This is very important, pin 3 and pin 12 must remain connected.

2. Run a wire between pin 11 and pin 5. This should make circuit behave the way you want.

Test it and let me know,

Thanks for your comments.


Thanks Rlarios,the circuit worked exactly the way i wanted but i was talking about two different scenarios.For you ease,the diagram is at last. can this circuit be modified to work like this as in the diagram ?