Lift Controller: Proff. Manish K. Patel

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 26

A PROJECT REPORT ON

LIFT CONTROLLER

DEPARTMENT OF ELECTRONICS AND COMMUNICATION,


DHARAMSINH DESAI UNIVERSITY, NADIAD.

BY:

KEYUR MEHTA (EC - 62)

MAYUR MARU (EC-59)

HARDIK DAVE (EC-21)

GUIDED BY:

Proff. MANISH K. PATEL


CERTIFICATE

This is to certify that the project titled “LIFT CONTROLLER” by Keyur C. Mehta (081043) is
a bona fide work carried out by them during the VI semester of their under graduate course in the
Electronics & Communication Engineering under my guidance and supervision.

Proff. M. K. Patel Dr. N. J. Kothari


Project Supervisor, Head,
Department of Electronics & Communication, Department of Electronics & Communication,
D. D. University, D. D. University,
Nadiad. Nadiad.
CERTIFICATE

This is to certify that the project titled “LIFT CONTROLLER” by Mayur S. Maru (081041) is
a bona fide work carried out by them during the VI semester of their under graduate course in the
Electronics & Communication Engineering under my guidance and supervision.

Proff. M. K. Patel Dr. N. J. Kothari


Project Supervisor, Head,
Department of Electronics & Communication, Department of Electronics & Communication,
D. D. University, D. D. University,
Nadiad. Nadiad.
CERTIFICATE

This is to certify that the project titled “LIFT CONTROLLER” by Hardik P. Dave (081017) is
a bona fide work carried out by them during the VI semester of their under graduate course in the
Electronics & Communication Engineering under my guidance and supervision.

Proff. M. K. Patel Dr. N. J. Kothari


Project Supervisor, Head,
Department of Electronics & Communication, Department of Electronics & Communication,
D. D. University, D. D. University,
Nadiad. Nadiad.
ACKNOWLEDGEMENT

First of all we would like to thank Mr. MANISH K.PATEL for giving us the
valuable guidance throughout the project work and making it a successful one. We are also
thankful to our contemporaries and peers who helped us to get through our difficulties.

We are obliged to our university (DDU) and EC department for giving us valuable
support and providing us fully equipped laboratories, so that we could perform our project
successfully.

With sincere regards,

KEYUR MEHTA (EC - 62)

MAYUR MARU (EC-59)

HARDIK DAVE (EC-21)


CONTENTS:
1. Abstract
2. List of figures
3. Block diagram
4. Description of block diagram
5. Circuit diagram
6. Program code
7. Working
8. PCB layout
9. Troubleshoot
10. Applications
11. Future extension
12. Appendix
13. References
Abstract:

Ours is a project which is a simple lift controller, which has many practical
applications and is useful in buildings, apartments, etc...Particularly in case of this lift controller,
the user has an option to choose between four floors. As the user gives the input the
microcontroller processes it accordingly and with the help of sensors and motors the lift reaches
its desired destination.
List of figures:
1. Microcontroller (89c51)
2. Motor driver (IC L293D)
3. Voltage regulator (IC 7805)
4. Seven segment display
5. Push button switches
6. DC Motors (30rpm & 100rpm)
7. Crystal oscillator (12MHz)

1. Microntroller (89c51)

The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer


with 4K bytes of Flash programmable and erasable read only memory (PEROM). The AT89C51
provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two
16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, on-
chip oscillator and clock circuitry. It is used to control all the task according to programming
done in it.
2. Motor driver (IC L293D)

L293D ic is 16 pin ic. It is used to drive dc motor. It needs two v cc supplies. One
is for drive dc motor which is 12V and other is for ic itself which is of 5V. It can drive two
motors. According to our input it can rotate motor in forward or backward direction or stop
the motor. In lift controller we have connected lift motor and door motor to this motor driver
ic.

3. Voltage regulator (IC 7805)

A voltage regulator is an electrical regulator designed to automatically maintain a


constant voltage level. IC 7805 is used here. It is a 5V regulator. It regulates the 9V battery
voltage to 5V. This 5V is supplied to the whole circuit. Here we have used because
microcontroller and other ics work on 5V DC supply.
4. Seven segment display

Seven segment display is used to display any number. Here we have used
common anode seven segment display. In this vcc is common for all the pins when any of pin is
grounded then corresponding led will glow and we can see the number.

5. Push button switches

Push button switch is used to connect or disconnect the path passing through it.
Here we have used it to give inputs to the microcontroller.

6. DC Motors (30rpm & 100rpm)

Here we have used two DC motors. One is for up and down of lift and the other is
for opening and closing of door. Lift motor specification: 30 rpm , 12V DC & 100N*cm
torque. Door motor specification : 100 rpm , 12V DC & 60N*cm torque.
Other Specifications:
 Diameter: 25mm
 Length [excluding shaft]: 54mm
 Shaft length: 15mm
 Shaft diameter: 3mm
 Weight: 200g

7. Crystal oscillator (12MHz)

Crystal oscillator is used to generate high frequency signal. Here we have used 12
MHz frequency oscillator for generating input frequency of microcontroller. Cristal
oscillator is used at this frequency because it is stable at this high frequency.
Block Diagram :
Description of Block Diagram:
USER INPUT:-
The lift controller starts with this block in which the user gives the desired input
with the help of various available input switches. These switches are connected with
microcontroller.
MICROCONTROLLER:-
The next block after input switches is the microcontroller which takes the input
from switches and sensors , processes according to the code written in it and gives the output to
motor driver ic. Here microcontroller is also connected with seven segment display to display
current floor on which lift is appeared.

LIFT SENSOR:-
It senses the floor on which the lift is present. When lift is moving then at time
when it crosses the sensor it gives an interrupt to the controller so that microcontroller works
according to program and gives desired outputs to the motor driver ic .

MOTOR DRIVER:-
It takes input from microcontroller and according to input it gives output to DC
motors and motors rotate. As name suggests it is simply used to drive the motors.

MOTORS:-
Here two DC motors are used. One motor is used to control the lift movement and
the other is used to control the opening and closing of the lift door.

DISPLAY:-
It’s the block that displays the current status of lift position with the help of seven
segment display.
Program Code:
.ORG 0000H
LJMP MAIN
; INTERUPT LIFT PROGRAMING….
.ORG 0013H
PUSH 0E0H;
PUSH 0D0H;
LCALL IPT;
POP 0D0H;
POP 0E0H;
LCALL DELAY3;
RETI;
IPT:
JB P0.0,BIPT;
; FORWARD INTERUPT....
MOV A,R3;
RL A;
MOV R3,A;
INC R2;
MOV A,R2;
LCALL DISPLAY;
MOV A,R3;
CJNE A,04,FIPT1;
CLR P0.1;
LCALL TIMER;
CJNE R5,#00H,FIPT2;
MOV R4,#00H;
RET;
FIPT2:
MOV R4,05;
MOV R5,06;
MOV R6,#00H;
SETB P0.1;
RET;
FIPT1:
RET;
; DISPLAY PROGRAMMING..................................
DISPLAY:
CJNE A,#01H,SECOND
MOV P1,#0F9H
RET
SECOND:
CJNE A,#02H,THIRD
MOV P1,#0A4H
RET
THIRD:
CJNE A,#03H,FORTH
MOV P1,#0B0H
RET
FORTH:
CJNE A,#04H,FIFTH
MOV P1,#99H
FIFTH:
RET
; DISPLAY PROGRAMMING END.................................
; BACKWORD INTERUPT...
BIPT:
MOV A,R3;
RR A
MOV R3,A;
DEC R2;
MOV A,R2;
LCALL DISPLAY
MOV A,R3;
CJNE A,04,BIPT1;
CLR P0.0;

LCALL TIMER;
CJNE R5,#00H,BIPT2;
MOV R4,#00H;
RET;

BIPT2:
MOV R4,05;
MOV R5,06;
MOV R6,#00H;
SETB P0.0;
RET;
BIPT1:
RET;
; END LIFT INTERUPT..

; START MAIN PROGRAMMING...


MAIN:
MOV IE,#84H;
MOV P2,#0FFH;
CLR A;
MOV P1,#00H
MOV P0,#00H
MOV R2,#01H
MOV R3,#02H;
MOV P1,#0f9H;
CLR A;
MAINCHECK:
MOV R5,#00H;
MOV R6,#00H;
MOV A,P2;
CPL A;
ANL A,#3EH;
CJNE A,#00H,START;
SJMP MAINCHECK;
START:
CJNE A,03,LOOP ;
LCALL TIMER;
SJMP MAINCHECK ; LIFT IS AT REST POSITION
LOOP:
MOV R4,A
JC LOOP1
CLR P0.0; LIFT GOING UP
SETB P0.1;
SJMP FLOOP;
LOOP1:
SETB P0.0;
CLR P0.1;
SJMP BLOOP;

; FORWARD LOOPING............
FLOOP:
CJNE R4,#00H,FLOOOP
SJMP MAINCHECK
FLOOOP:
MOV A,P2;
CPL A;
ANL A,#3EH;
CJNE A,#20H,FLOOP1;
MOV A,R3;
RL A;
MOV R4,A;
MOV R5,#00H;
MOV R6,#00H;
SJMP FSTOP;
FSTOP:
JB P0.1,FSTOP;
LJMP MAINCHECK;
FLOOP1:
CJNE A,03,FDIFFFLOOR;
SJMP FLOOP;
FDIFFFLOOR:
JC FLOOP;
CJNE A,04,FDIFFDEST;
SJMP FCHECKLOOP;
FDIFFDEST:
JC FLOWDEST;
CJNE R5,#00H,FHDEST3;
MOV R5,A;
SJMP FCHECKLOOP;
FHDEST3:
CJNE A,05,FHDEST;
SJMP FCHECKLOOP;
FHDEST:
JC FHDEST2;
MOV R6,A;
SJMP FCHECKLOOP;
FHDEST2:
MOV R6,05;
MOV R5,A;
SJMP FCHECKLOOP;
FLOWDEST:
CJNE R5,#00H,FLDEST3;
MOV R5,04;
MOV R4,A;
SJMP FCHECKLOOP;
FLDEST3:
MOV R6,05;
MOV R5,04;
MOV R4,A;
SJMP FCHECKLOOP;
FCHECKLOOP:
CJNE R4,#00H,FLOOP;
LJMP MAINCHECK;
; END FORWARD LOOPING.....

; BACKWORD LOOPING..........
BLOOP:
CJNE R4,#00H,BLOOOP
SJMP MAINCHECK
BLOOOP:
MOV A,P2;
CPL A;
ANL A,#3EH;
CJNE A,#20H,BLOOP1;
MOV A,R3;
RR A
MOV R4,A;
MOV R5,#00H;
MOV R6,#00H;
SJMP BSTOP;
BSTOP:
JB P0.0,BSTOP;
LJMP MAINCHECK;
BLOOP1:
CJNE A,03,BDIFFFLOOR;
SJMP BLOOP;
BDIFFFLOOR:
JNC BLOOP;
CJNE A,04,BDIFFDEST;
SJMP BCHECKLOOP;
BDIFFDEST:
JNC BLOWDEST;
CJNE R5,#00H,BHDEST3;
MOV R5,A;
SJMP BCHECKLOOP;
BHDEST3:
CJNE A,05,BHDEST;
SJMP BCHECKLOOP;
BHDEST:
JNC BHDEST2;
MOV R6,A;
SJMP BCHECKLOOP;
BHDEST2:
MOV R6,05;
MOV R5,A;
SJMP BCHECKLOOP;
BLOWDEST:
CJNE R5,#00H,BLDEST3;
MOV R5,04;
MOV R4,A;
SJMP BCHECKLOOP;
BLDEST3:
MOV R6,05;
MOV R5,04;
MOV R4,A;
SJMP BCHECKLOOP;
BCHECKLOOP:
CJNE R4,#00H,BLOOP;
LJMP MAINCHECK;
; END BACKWORD LOOPING
TIMER:
CLR P0.6
SETB P0.5
MOV R7,#2EH
REPEAT10:
MOV TMOD,#01H
MOV TL0,#00H
MOV TH0,#00H
SETB TR0
CLR TF0

ROOT20:
SETB P0.5
JNB TF0,ROOT20
CLR TR0
CLR TF0
DJNZ R7,REPEAT10
CLR P0.5
CLR P0.6
MOV R7,#2EH
REPEAT20:
MOV TMOD,#01H
MOV TL0,#00H
MOV TH0,#00H
SETB TR0
CLR TF0
ROOT30:
JNB TF0,ROOT30
CLR TR0
CLR TF0
DJNZ R7,REPEAT20
DELAY1:
MOV R7,#2EH
MOV R1,#00H
REPEAT1:
MOV A,P2
CJNE A,03H,OK
SJMP DELAY2
OK:
MOV TMOD,#01H
MOV TL0,#00H
MOV TH0,#00H
SETB TR0
ROOT1:
SETB P0.6
JNB TF0,ROOT1
CLR TR0
CLR TF0
INC R1
DJNZ R7,REPEAT1
CLR P0.6
RET
DELAY2:
CLR P0.6
SETB P0.5
MOV A,R1
MOV R7,A
REPEAT2:
MOV TMOD,#01H
MOV TL0,#00H
MOV TH0,#00H
SETB TR0
ROOT2:
SETB P0.5
JNB TF0,ROOT2
CLR TR0
CLR TF0
DJNZ R7,REPEAT2
CLR P0.4
CLR P0.5
SJMP DELAY4
DELAY4:
MOV R7,#2EH
REPEAT4:
MOV TMOD,#01H
MOV TL0,#00H
MOV TH0,#00H
SETB TR0
ROOT4:
JNB TF0,ROOT4
CLR TR0
CLR TF0
DJNZ R7,REPEAT4
SJMP DELAY1
DELAY3:
MOV R7,#1EH
REPEAT3:
MOV TMOD,#01H
MOV TL0,#00H
MOV TH0,#00H
SETB TR0
ROOT3:
JNB TF0,ROOT3
CLR TR0
CLR TF0
DJNZ R7,REPEAT3
RET
.END
Working:
Working of lift is started with user input. When user gives any input with the help
of push button switches then it goes to microcontroller port p2. We have used p2 port as input
port. Now microcontroller starts working. According to the code written into it, it will give signal
to port p0. Now p2 port is connected to motor driver IC so command will be passed to motor
driver IC and it will rotate motor in either forward or backward direction. Here p1 port of
microcontroller is connected to seven segment display so it shows current floor. When lift passes
through any floor then sensor gives interrupt to microcontroller and if lift reached to desire floor
then motor stops otherwise it will continuously rotates. Here seven segment display number is
updated by microcontroller when lift passes through any floor.

Now what happens in microcontroller when it detects the input? It first checks the
current status of lift. If pressed button and current status is same then it open and close the door
using motor. If destination and current status is not same then motor rotates and lift goes to
destination. When lift reaches to destination then lift stops and door opens. Door stills open for 3
seconds and then door closes.

For example, now suppose we are on the first floor and two inputs are given
simultaneously, say second and fourth, then the lift will first go to the second floor, stops and
open and close the door for some time and then go to the fourth floor. Similar will be the case,
that if we are on fourth floor and we press first and third floor together, we will first stop on third
and then on the first floor. Hence, the closest floor is given the topmost priority. We have made
logic for 3 inputs at a time, so three different floor inputs can be given at a time. Along with all
these processes microcontroller will also display the status of the floor on which lift has reached
with the help of the seven segment display.
Troubleshoot:

We have found many difficulties in writing code of 89c51. So then we got


edsim51 simulator in which we can connect virtually input switches, display and motors.

First we cannot get output at port p0. Then we studied the datasheet of 89c51 and
connected 10k pull up resistors to get output.

In making of model we have found many difficulties. Firstly we have made model
using thermokol but it could not lift whole the load, so we made model using wood.
Applications:

 Useful in big apartments.


 Useful in multi floor vehicle parking

Future Extension:

 We can increase the number of floors by a small change in code.


 We can also include the weight sensors inside the lift.
 We can increase number of priority by a small change in code.
Appendix:

We have attached all the datasheets here with.


References:

I. Websites:

 www.electronicsforu.com
 www.datasheetcatalog.com

II. Books:

 The 8051 microcontroller by M. A. Mazidi


 Electrical technology by B. L. Theraja

You might also like