Automation of 3 Water Pumping Inductio
Automation of 3 Water Pumping Inductio
Objective:
Subjecting to the situation when the water tank is unfilled and water supply to the users is cut
off, we proposed an automatic system for the water pumping motor. Our main objective is the
automatic switching of the water pumping motor for complete filling of water tank.
Components used:
Microcontroller (Atmel AT89C51) 1 Pcs.
Float Sensor 1 Pcs.
ULN 2803 1 Pcs.
Crystal Oscillator (12 MHz) 1 Pcs.
Resistor (100 kΩ) 1 Pcs.
Capacitor (10µF/25V) 1 Pcs.
Jumper Wires As per requirement
Page | 1
Power Electronics (EE-410)
Page | 2
Power Electronics (EE-410)
Port 3 also receives some control signals for Flash programming and verification.
RST: Reset input. A high on this pin for two machine cycles while the oscillator is
running resets the device.
ALE/PROG: Address Latch Enable output pulse for latching the low byte of the
address during accesses to external memory. This pin is also the program pulse input (PROG)
during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the
oscillator frequency, and may be used for external timing or clocking purposes. Note,
however, that one ALE pulse is skipped during each access to external Data Memory. If
desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set,
ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly
pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external
execution mode.
PSEN: Program Store Enable is the read strobe to external program memory. When
the AT89C51 is executing code from external program memory, PSEN is activated twice
each machine cycle, except that two PSEN activations are skipped during each access to
external data memory.
EA/VPP: External Access Enable. EA must be strapped to GND in order to enable the
device to fetch code from external program memory locations starting at 0000H up to
FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on
reset. EA should be strapped to VCC for internal program executions. This pin also receives
the 12-volt programming enable voltage (VPP) during Flash programming, for parts that
require 12-volt VPP.
XTAL1: Input to the inverting oscillator amplifier and input to the internal clock
operating circuit.
XTAL2: Output from the inverting oscillator amplifier.
Page | 3
Power Electronics (EE-410)
9 is grounded (for the low level signal reference). Pin 10 is the common on the high side and would
generally be connected to the positive of the voltage. Pins 11-18 are the outputs (Pin 1 drives Pin 18,
Pin 2 drives 17, etc.).
Input Characteristics:
Page | 4
Power Electronics (EE-410)
Output Characteristics:
Circuit Diagram:
Page | 5
Power Electronics (EE-410)
switch on the motor when water in the tank reaches a certain level and then to turn it off when the
tank is full of water.
A float sensor is used to sense the water level in the tank. It is calibrated in such a way that
when the water in the tank remains one third of the total water level in the tank, it sends a signal to
the microcontroller. The microcontroller opt ULN2803 relay driver to operate the relay connected to
“ON” switch to turn on the motor.
When water in the tank reaches its maximum level, the float sensor again sends a signal to
microcontroller to operate the relay connected to “OFF” switch to turn off motor. In this way, the
motor is automatically controlled to fill the water tank.
Program Coding:
#include <reg51.h>
sbit t1=P1^0;
sbit t2=P1^1;
sbit t3=P1^2;
void delay()
{
TH1=0xEC;
TL1=78;
TR1=1;
while(TF1==0);
TR1=0;
TF1=0;
}
void main( )
{
int i;
t1=1;t2=0;t3=0;
TMOD=0x10;
lab: if(t1==0)
{
t2=1;for(i=0;i<60;i++)delay();t2=0;
while(1)
if(t1==1) {t3=1; for (i=0; i<60; i++) delay(); t3=0; goto lab;}
}
goto lab;
}
Page | 6