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
Schematic:
![]() |
| Water controller using pic16f877a |

