PCB design is a must tool to learn to be Industry ready for every electronics engineer. Learn PCB design online in just 20 days and boost your career. Work as freelancer and earn a high amount daily by spending only 2 hours a day part time.

Full width home advertisement

Electronics

PCB Design

Post Page Advertisement [Top]

 Fully automatic water level controller using 89c51 Microcontroller


Fully automatic water level controlling using microcontroller 89c51 is always been a little challenging project to be done by the engineering students.

The prods to be mounted at both the tanks and cleaver programming was needed to make the whole water level controlling operation automatic.

The circuit i am presenting here  for you is basically called the automatic water level controller but in real it only watch the level of the upper tank and does not look at the water level of the lower tank.

Three "PRODS"  are inserted at the upper tank and they essentially to be the copper roads for the proper functioning of the water level controlling system.

the prod at  the top level keeps check on the full level of the tank and when ever water touches the prods, the system gets the message that the upper tank is full not and it will activate one relay to shut the motor down.

The prod at the middle works in conjunction with the lower prod and its necessary to use that prod as even its not directly used in any function but indirectly it helps for the proper function of the circuit.

The prod at the bottom detects the empty tank and the system gives the command to an another relay to switch on the motor. ( in fact there should be only one relay (SPDT ) in which there are separate contacts for the operation but using only one pole and one coil.

The status messages are displayed on the LCD  display. and the user  can get aware of the status of the tank that way. the middle prod  does not initiate any command from controller , but it simply gives the message on the display when the tank is half. 

Here is the circuit diagram of the automatic water level controller using 89c51 microcontroller.



The Power supply of the circuit is made up of  7812 and 7805 voltage regulator Ic's . around 15 v dc. is given as input and 12v and 5v is taken  out as outputs. 

12v is used to operate the 12v relay and 5v is used for microcontroller operation.

Such regulated power supply is very essential for the proper functioning of microcontroller based circuits.

The LCD  display used in the project is a 16x1 Line display and it provides the inforamtion about the status of the water tank.

The Assembly Program is as follows.

org 0000h

ljmp sun

one: jnb p2.6,two
jnb p2.5,two
jnb p2.4,two
acall tue
clr a
mov r5,a
mov r7,a
acall brn
mov r3,#0ffh
mov r2,#1
mov r1,#33h
acall fotn
acall etnn
clr p2.2
setb p2.3
two: jb p2.6,three
jb p2.5,three
jnb p2.4,three
acall tue
clr a
mov r5,a
mov r7,a
acall brn
mov r3,#0ffh
mov r2,#1
mov r1,#39h
acall fotn
acall etnn
three: jb p2.6,four
jb p2.5,four
jb p2.4,four
acall tue
clr a
mov r5,a
mov r7,a
acall brn
mov r3,#0ffh
mov r2,#1
mov r1,#3eh
acall fotn
acall etnn
setb p2.2
setb p2.3
four: ret
;
five: clr p2.0
mov p1,#38h
six: mov r7,#0ffh
mov r6,#0
svn: setb p2.1
clr a
mov r5,a
eght: mov a,r5
clr c
subb a,r7
mov a,r6
xrl a,#80h
mov r0,a
mov a,#80h
subb a,r0
jnc nin
inc r5
sjmp eght
;
nin: clr p2.1
clr a
mov r5,a
ten: mov a,r5
clr c
subb a,r7
mov a,r6
xrl a,#80h
mov r0,a
mov a,#80h
subb a,r0
jnc levn
inc r5
sjmp ten
;
levn: ret
;
mov r4,sat
mov r3,tom
clr p2.0
mov p1,#2
acall six
mov a,r3
mov b,#28h
mul ab
add a,r4
mov r3,a
clr a
mov r4,a
twl: mov a,r4
clr c
subb a,r3
jnc thtn
mov p1,#14h
mov r7,#2dh
mov r6,#0
acall svn
inc r4
sjmp twl
;
thtn: setb p2.0
ret
;
fotn: mov smith,r3
mov hry,r2
mov rbca,r1
fftn: mov r3,smith
mov r2,hry
mov r1,rbca
acall blk
jz sntn
inc rbca
mov a,rbca
jnz sxtn
inc hry
sxtn: dec a
mov r1,a
acall blk
mov p1,a
mov r7,#2dh
mov r6,#0
acall svn
sjmp fftn
;
sntn: ret
;
etnn: clr a
mov r7,a
mov r6,a
nintn: clr a
mov r5,a
mov r4,a
twnt: inc r5
cjne r5,#0,red
inc r4
red: mov a,r5
xrl a,#64h
orl a,r4
jnz twnt
inc r7
cjne r7,#0,ylo
inc r6
ylo: clr c
mov a,r7
subb a,#0e8h
mov a,r6
xrl a,#80h
subb a,#83h
jc nintn
ret
;
blu: lcall five
mov p1,#38h
acall svn
mov p1,#38h
acall svn
mov p1,#1
acall svn
mov p1,#0dh
acall svn
mov p1,#6
acall svn
setb p2.0
ret
;
blk: cjne r3,#1,orng
mov dpl,r1
mov dph,r2
movx a,@dptr
ret
;
orng: jnc pink
mov a,@r1
ret

pink: cjne r3,#0feh,vio
movx a,@r1
ret

vio: mov dpl,r1
mov dph,r2
clr a
movc a,@a+dptr
ret

xrl a,6dh
jnz crow
mov r1,#0
xrl a,r0
ajmp prt

xrl a,@r0
nop
xrl a,@r0
mov 6ch,#6ch
nop
brn: clr p2.0
mov a,r7
mov dptr,#fri
movc a,@a+dptr
add a,r5
mov p1,a
acall six
setb p2.0
ret
;
sun: mov r0,#7fh
clr a
mon: mov @r0,a
djnz r0,mon
mov sp,#0ah
ljmp wed

tue: clr p2.0
mov p1,#1
acall six
setb p2.0
ret

wed: acall blu
acall tue
thrs: acall one
sjmp thrs

mov p1,r7
mov r7,#2dh
mov r6,#0
ajmp svn

lcall five
setb p2.0
ret

fri: sjmp owl

subb a,#0d4h


sat equ 5
tom equ 7
smith equ 8
hry equ 9
rbca equ 0ah


owl equ 140h
crow equ 1abh
prt equ 36ch

end

====================================================================

The Bill of materials is here 

Item Number Quantity Part Number Part Reference Value
1 1 C1 33 PF
2 1 C1 100/25
3 1 C2 100/25
4 1 C2 33 PF
5 1 D1 LED
6 1 D2 LED
7 1 J1 CON2
8 1 J3 LCD DISPLAY
9 1 K1 RELAY 
10 1 K2 RELAY 
11 1 Q10 BC556
12 1 Q10 BC556
13 1 R1 180E
14 1 R2 180E
15 1 R22 10K
16 1 R22 10K
17 1 R23 180E
18 1 R24 180E
19 1 SW1 SW PUSHBUTTON
20 1 SW1 SW PUSHBUTTON
21 1 SW2 SW PUSHBUTTON
22 1 SW3 SW PUSHBUTTON
23 1 U1 AT89C51
24 1 U2 C78L05/TO92
25 1 U3 C78L12/TO92
26 1 Y1 11.0592

=====================================================================

hope and wish you will make this project for your final year project or even the minor project

for your university of diploma course.

if you need any help, or if you need the PCB  of this project, please contact me at

learnpcbdesign.online(at)gmail.com

If you want to learn PCB  design from scratch in just 20 days online and Live training from any part of the world, you can contact me on whatsapp no. +917990850788


























































No comments:

Post a Comment

Bottom Ad [Post Page]

| Designed by Colorlib