WLC Cum Motor Protection-8051
WLC Cum Motor Protection-8051
Protector
Many a time we forget to switch off the motor pushing water into the overhead tank (OHT) in
our households. As a result, water keeps overflowing until we notice the overflow and switch the
pump off. As the OHT is usually kept on the topmost floor, it is cumbersome to go up frequently
to check the water level in the OHT. Presented here is a microcontroller based water level
controller cum motor protector to solve this problem.
It controls ‘on’ and ‘off ’ conditions of the motor depending upon the level of water in the tank.
The status is displayed on an LCD module. The circuit also protects the motor from high
voltages, low voltages, fluctuations of mains power and dry running.
Circuit description
The AT89C51 (IC2) is an 8-bit microcontroller with four ports (32 I/O lines), two 16-bit timers/
counters, on-chip oscillator and clock circuitry. Eight pins of port-1 and three pins of port-3 are
interfaced with data and control lines of the LCD module. Pins P3.0, P3.1 and P3.6 are
connected to RS (pin 4), R/W (pin 5) and E (pin 6) of the LCD, respectively. Pin EA (pin 31) is
strapped to Vcc for internal program executions. Switch S2 is used for backlight of the LCD
module.
The LM324 (IC1) is a quad operational amplifier (op-amp). Two of its op-amps are used as
comparators to detect under- and over-voltage. In normal condition, output pin 7 of IC1 is low,
making pin P2.3 of IC2 high. When the voltage at pin 6 of N1 goes below the set reference
voltage at pin 5 (say, 170 volts), output pin 7 of N1 goes high. This high output makes pin P2.3
of IC2 low, which is sensed by the microcontroller and the LCD module shows ‘low voltage.’
In normal condition, pin 1 of N2 is high. When the voltage at pin 2 of N2 goes above the set
voltage at pin 3, output pin 1 of N2 goes low. This low signal is sensed by the microcontroller
and the LCD module shows ‘high voltage.’
Presets VR1 and VR2 are used for calibrating the circuit for under-and over-voltage,
respectively.
The AC mains is stepped down by transformer X1 to deliver a secondary output of 12V at 500
mA. The transformer output is rectified by a full-wave bridge rectifier comprising diodes D5
through D8, filtered by capacitor C2, and used for the under- and over-voltage detection
circuitry.
The transformer output is also rectified by a full-wave bridge rectifier comprising diodes D1
through D4, filtered by capacitor C1 and regulated by IC4 to deliver regulated 5V for the circuit.
When water in the tank rises to come in contact with the sensor, the base of transistor BC548
goes high. This high signal drives transistor BC548 into saturation and its collector goes low.
The low signal is sensed by port pins of microcontroller IC2 to detect empty tank, dry sump and
full tank, respectively.