A water level indicator detects and indicates the level of water in an overhead tank and relays the information back to a control panel to indicate whether the tank has a high or low water level. In this tutorial, I am going to use the ULN2003 IC to create a simple, inexpensive water level indicator. Using this circuit you can easily control the wastage of water and electricity. Watch this video, for detailed step by step instructions on how to build this circuit and to know how this circuit works. Towards the end of the video I will also discuss whether its really worth building this circuit.

 Components Required

For this tutorial we need:

About The ULN2003 IC

The notch on the top indicates the starting and stopping points of the numberings of the chip. Starting from left to right going counterclockwise this is the Pin number 1 of the IC.

The UNL2003 IC contains 7 High Voltage, High Current NPN Darlington Transistor Arrays each rated at 50V, 500mA in a 16-pin DIP package. You can connect the IC directly to a digital logic (like Arduino or Raspberry Pi, TTL or 5V CMOS device) without an external dropping resistor. The ULN2003 is known for its high current and high voltage capacity. The Darlington pairs can be "paralleled" for higher current Output. To know more about this IC, please check out my "Tutorial No. 51: All About ULN2003 IC", the link is in the description below.

Circuit Diagram

The circuit is very simple.

I have connected 7 LEDs to the 7 OUT Pins of the IC via 1K Resistors. On my left, are the 7 digital inputs which are connected to a ribbon cable. The other end of the ribbon is submerged in the water tank with exposed terminals at various heights to detect the water levels. Along with the 7 wires, there is an eighth wire that stays at the bottom of the tank and is connected to the +ve terminal.
As the tank starts filling up, the water level rises and a conductive path is created between the positive terminal and the base of Darlington Transistor inside the IC. Hence a logic HIGH is sent to the Input Pin of the IC which leads to the corresponding OUT Pin to go LOW lighting up the LEDs one by one starting from the bottom Red to the top Green. The bottom Red LED indicates lack of water and the top Green LED indicates that the tank is 100% full.
You can also add a buzzer to the circuit to get an audio indication when the tank is full.
If you want to be super funky, you can also add a relay module which can turn on and off the water pump.

Breadboard Demo

Before assembling the components on a PCB, lets do a quick test on a breadboard to make sure our logic works as expected.
For this demo, I am going to fill up a coffee mug with normal tap water.

As you can see, the LED indicators go up from bottom Red to the top Green as I keep filling the mug. The buzzer starts buzzing when the mug is 100% full. Hence, our setup is working as expected.

The Board

So, this is how my board looks like in 2D and 3D.
If you want to learn how to design a PCB, please check out my "Tutorial No. 45: Transformers PCB BADGE", the link is in the description below.

Component Assembly

Now, lets solder the components to the board.
Lets first solder all the resistances to the board.
Then, lets solder all the LEDs to the board. I am using a 3mm Green LED as the power indicator.
Next, I am soldering the IC base to the board. Since I care a lot about my ICs and micro-controllers, I never solder them directly to the board. In case of an ICs, I always try to use an IC bases or if a base is not available I use female pin headers. After soldering the IC base, I am soldering the Buzzer to the board.
Now to conclude the setup, I am soldering the Ribbon Cable to the board. For my setup, I am only using half a meter long cable. But in a real-world scenario, you will definitely need a cable longer than this.

Final Demo

So, this is how the final setup looks like.

As the water level rises, a conductive path is created between the positive terminal and the base of Darlington Transistors inside the IC. This triggers a logic HIGH at the Input Pins of the IC and the corresponding OUT Pins goes LOW lighting up the LEDs one by one starting from the bottom Red to the top Green. When the mug is 100% full the top green LED lights up and we also hear a noises of the buzzer.

Usability

To be very frank, I see more disadvantages than advantages of using this IC in building a liquid level indicator.
You may have a different opinion, but my opinion is based on the below facts:

Replacing the contact points with something "non-corrosive" may help but I will not put my bet on that. Another option is to have "large electrodes" which will have a low impedance even when covered with impurities. To conclude I would like to say that the ULN2003 is not the best device to use for this application. You might be better using a "CMOS buffer" or inverter which needs less water conductivity to operate and also gives a more sudden output change as the input voltage rises and falls, along with "non-corrosive large electrodes".

Thanks

Thanks again for checking my post. I hope it helps you.

If you want to support me subscribe to my YouTube Channel: https://www.youtube.com/user/tarantula3 

References

Support My Work

Thanks, ca gain in my next tutorial.