Thursday, December 16, 2010

Water Level Controller and motor Protector v2

This is the v2 by using PIC16F877A with minimum components. The most left circuitry is the same as in mains monitor; used to check to variation in ac voltage (operating range is between 200v ac - 240v ac). Five pull-up resistor circuitry is used to measure the water level in the desired water tank. Note that the push buttons are used here is only for illustration purpose, basically they are representing the probes (6 probes made of 28 gauge wire; one is of ground (reference) level). The left most probe indicates 20% of water in tank, next indicates 40% and so on till 100% or full level.

Note that these probes should be inserted in water tank after measuring the tank size; then divide it in five equal levels to correctly measure the water level.

The SPDT switch is used to on/off motor. D0 LED is indicating the position of this switch means if the switch is on it will glow to remind you. Note that if the water level is full and the motor switch is in on state motor will never run unless water level drops from 100%. D LED is indicating that the motor is in running state. 

Also remember; if you switch on the motor and water level is not full the microcontroller first check the voltage if it is fluctuating then D2 LED will fluctuate and 'motor standby' message will appear on lcd. After about 30 sec microcontroller again check the voltage and on motor if it is in safe limit and motor switch in in on state.

Note that their are two files one with voltage monitor and other is without it. If you don't want to check the ac voltage then use that file and remove the extra components from the schematic.

Download: Code Files        

Water controller using pic16f877a


  1. i made this wlc on a breadboard and works fine .the problem i found in the program is that the motor should never start unless the water level reaches 20% and no dry run protection for motor.

  2. Why don't you put code file here?