You are on page 1of 23

University Of GOndar

institUtes Of technOlOGy
departments Of electrical and

cOmpUter enGineerinG
4�ℎ year industrial control
Smart Elevator Control Documentation
Group Name ID
1. Bahiru Melese…………………………………..00366/10
2. Dagnachew Ayele………………………………00976/10
3. Desalegn Amsalu………………………………..01163/10
4. Tesfa Tadesse…………………………………….00628/10

Submitted Mr.Amsalu F
Submission date 06/07/2014 E.C
Dedication
A teacher is a person who surrounds her students with inspiration
to learn again every day. Thank you, Mr. Amsalu F!

I
Contents
Abstract………………………………………………………..III
CHAPTER ONE……………………………………………..1
1.1 introduction………………………………………………………. 1
1.2 Elevator and history…………………………………………………1
1.3 Objective …………………………………………………………….3
1.4 methdology…………………………………………..………4
CHAPTER TWO……………………………………………..5
2.1 Material used …………………………………………………5
2.2 Simulation of design…………………………………………..7
CHAPTER THREE………………………………………….8
3.1 Result…………………………………………………….8
3.2 conclusion……………………………………………………….10
CHAPTER FOUR…………………………………………..11
Source code…………………………………………………….11
Reference……………………………………………………..19

II
Abstract:
An elevator is platform that can move up and down in vertical direction by a
mechanical means .In the past elevator drive mechanism were powered by stream and
water hydraulic piston. In today’s world, there are intricate governors and switching
schemes to carefully control cab needs in any situation, buttons have been giving way
to keypads. In our project, the atmega8 microcontroller based lift system is
constructed to simulate as an actual lift in the human life. The elevator control system
is one of the important aspects in electronics control module in automotive
application. Here elevator control system is designed with different levels. First the
elevator control system is implemented for multi-storage buildings. The project
addresses a microcontroller based unipolar stepper motor drive used for an elevator
system. The elevator system developed can move up and down, along with the feature
of floor display indicator incorporated in it. The move up and move down of elevator
are indicated with red and yellow LED’s respectively. The elevator system is operated
using micro switches, the control program is developed in C language and Kiel
compiler is used to converts this control program into executable file or say in a HEX
code

III
CHAPTER ONE
INTRODUCTION

elevator, also called lift, car that moves in a vertical shaft to carry passengers or
freight between the levels of a multistory building. Most modern elevators are
propelled by electric motors, with the aid of a counterweight, through a system of
cables and sheaves (pulleys). By opening the way to higher buildings, the elevator
played a decisive role in creating the characteristic urban geography of many modern
cities, especially in the United States, and promises to fill an indispensable role in
future city development.

An elevator is a platform ,either open and closed ,used for moving people or freight
vertically ,from one floor to another within a building.
Elevator are a standard part of any tall commercial or residential building ,these days
elevator are often a legal requirement in new building with multiple floors.
 one that raises or lifts something up: such as
 an endless belt or chain conveyor with cleats, scoops, or buckets for raising
material
 a cage or platform and its hoisting machinery for conveying people or things to
different levels.
In the elevator system are hardware componets work
 Each floor will have either one or two buttons representing whether the
elevator goes up or down.
 A seven segment LED will display what floor the elevator is currently on
 The elevator will have inside buttons for the user to select the floor they are
traveling to
 Each floor will have IR sensors to detect whether the elevator is at that floor.
 Interrupts were chosen to allow for a faster user response time.
1.2 Elevator and its history
Elevators are especially important in tall structures like skyscrapers, where climbing
stairs to get to top floors would be very difficult. The car of an elevator, in which
people ride, is attached to guard rails inside a tall, empty space called a shaft.
Elevator designs There are two types of elevators in common use today.
• Hydraulic type elevators
• Roped (cable type) elevators

Page 1
Since the dawn of time, humans sought the way for more efficient vertical
transportation of freight and passengers to different levels. These devices for transport
goods up and down represent first elevators.

Elevator history begins several hundred years before Christ. The earliest elevators
were called hoists. They were powered by human and animal power, or
sometimes water-driven mechanisms. They were in use as early as the 3rd century
BC.Modern elevators were developed during the 1800s. These crude elevators slowly
evolved from steam driven to hydraulic power. The first hydraulic elevators were
designed using water pressure as the source of power.They were used for conveying
materials in factories, warehouses and mines. Hydraulic elevators were often used in
European factories.In 1852, Elisha Graves Otis introduced the first safety contrivance
for elevators.Otis established a company for manufacturing elevators and went on to
dominate the elevator industry. Today the Otis Elevator Factory is the world's largest
manufacturer of vertical transport systems.Revolution in elevator technology began
with the invention of hydraulic and electricity. Motor technology and control methods
evolved rapidly and electricity quickly became the accepted source of power. The
safety and speed of these elevators were significantly enhanced.

The first electric elevator was built by the German inventor Wener Von Siemens in
1880.

In 1889, the first commercially successful electric elevator was installed.

In 1887, an electric elevator with automatic doors that would close off the elevator
shaft was patented. This invention made elevators safer.

Many changes in elevator design and installation was made by the great advances in
electronic systems during World War II.

Space elevators use the same concept of classic elevator. They will be used to
transport people to space station. This concept theoretically can considerably reduce
the cost for putting a person into space

Page 2
1.3 Objective:

This elevator system is used to transports goods and human. With the help of this
elevator user can go any desired floor in less time. This is very smooth process and
simply controlled. This elevator system is easily can be establish in many stories
buildings, shopping mall, hospital .Microcontroller based elevator system is easily
controlled and interfacing is simple
 the main aims of the elevator control system are:
 To bring the lift car to the correct floor.
 To minimize travel time.

 To develop codes, debug, and simulate the codes using software


 To interpret the software modeling diagrams
 To maximize passenger comfort by providing a smooth ride.
 To accelerate, decelerate and travel within safe speed limits.
By using at89c51 microcontroller of embedded system

Page 3
1.4 Methodology
This is a simple project on how to Control Elevator Lift using 89c51 Microcontroller?
Tutorial is simple no interrupts of microcontroller are utilized for emergency
situations or changing the floor during elevator movement. Once the floor is selected
you cannot change or deselect it. 8051 microcontroller general purpose input output
pins are used to select the floor and display the status of elevator on 16×2Lcd. An led
bar array depicts the presence of lift on particular floor. Project is best suited for
electrical/ electronic students to take it as final subject clearance project.

 First the user enter the floor number from keypad phone ,then the LCD display to
show the floor number and the elevator start to go to its destination and the motor
rotates clock wise direction in this time,and also red led light to indicate the
elevator to go upward direction
 If there is interrupt occur in the floor the button back to the elevator ground floor.

Page 4
CHAPTER TWO
2.1 Material used:
AT89C51 MICROCONTROLLER:
After considering the size of the code and the internal architecture requirements, an
AT89C51 microcontroller has been chosen. AT89C51 is an 8-bit microcontroller and
belongs to 8051 family. It can be erased and program to a maximum of 1000
times. In 40 pin AT89C51, there are four ports designated as P1, P2, P3 and P0. All
these ports are 8-bit bi-directional ports which mean that they can be used as both
input and
output ports. Except P0 which needs external pull-ups, rest of the ports have internal
pull-ups. When 1s are written to these port pins, they are pulled high by the internal
pull-upsand can be used as inputs. These ports are also bit addressable and so their
bits can also be accessed individually.
Port P0 and P2 are also used to provide low byte and high byte addresses, respectively,
when connected to an external memory. Port 3 has multiplexed pins for special
functions like serial communication, hardware interrupts, timer inputs and read/write
operationfrom external memory. AT89C51 has an inbuilt UART for serial
communication. It can be programmed to operate at different baud rates. Including
two timers &hardware interrupts, it has a total of six interrupts.
Some of the features that have made the AT89C51 popular are:
 8KB on chip program memory
 128 bytes on chip data memory (RAM)
 4 register banks
 128 user defined software flags
 16 bit timers (usually 2, but may have more, or less)
 Bit as well as byte addressable RAM area of 16 bytes
16-bit program counter and data pointer
 Two Led-red(up,down):

Page 5
 The two red -led indicates the user to goes down and up from the floor.
 Proteus 8:
 used for work overall schematic diagram of the elevator.
 Keil compiler software:
Kiel compiler is a Microsoft window software tool used for changing a high level
program into executable code or say in HEX code. Kiel compiler is used to change
assembly and C code into HEX code. It is one of the easiest software with DS cope
software used to loading HEX code into the microcontroller according to the need of
user.
 Keypad phone:
 Used for the user to enter the floor number.
 7 segment display(common cathode):
 Used for to indicate the elevator count up or down
 Count up -the seven segment counts up(i.e from 1 to 6)
 Count down- the seven segment counts down(i.e from 6 to 1)
 Button:
 Used for indicate (i.e on and off )interrupt of the elevator.
 Motor-bistepper:
 indicate ,if the elevators count up the motor rotate clock wise
direction.
 Indicates ,if the elevator count down the motor rotate anticlock wise
direction.
 Respack-8:
 Used for power source of the port 0 from at89c51 microcontroller.
 LCD 16x2
 Used to show the destination of the floor number

Page 6
2.2 Simulation design
The simulation for this system has been done using Keil uVision4 and Proteus
software.The coding was written and debugged using Keil uVision4 while the
simulation was done using Proteus.Using the Keil uVision4 software, the coding was
converted to .hex file after debugged.This .hex file was then used for the
microcontroller simulation in Proteus.
 First the user enter the floor number from keypad phone ,then the LCD display to
show the floor number and the elevator start to go to its destination and the motor
rotates clock wise direction in this time,and also red led light to indicate the
elevator to go upward direction
 If there is interrupt occur in the floor the button back to the elevator ground floor.

Figure above shows the initial condition of the elevator system. As the keypad button
from the ground floor is pressed the elevator cage moves up to the selected floor
number.

Page 7
CHAPTER THREE

3.1 Result
After the two stages of testing the elevator system which are simulation and
implementation of hardware, it is satisfied to say that the results are at its expected
because they are consistent with each other.
This shows that all procedures are followed correctly during the conduction of this lab.
The connection on the breadboard is also an important thing to highlight.

Figure above shows when the elevator is gone to the above floor. the LCD will
display destination floor number and the led-red indicate the elevator goes to down
direction ,and also the seven segment counts up the floor numbers that the elevator
is reached

Page 8
Figure below shows when the elevator is gone to the down floor. the LCD will display
destination floor number and the led-red indicate the elevator goes to down direction,
the seven segment counts down the floor numbers that the elevator is reached.

Page 9
3.2 Conclusion
from your project try to work a good elevator control system and also it have some
drawbacks.
We use AT89c51 microcontroller and keypad, push button ,led-red,7 segment
display,LCD display module to design the elevator system. Movement of elevator is
done with the help of DC g motor which is controlled by motor driver IC(L293D). We
design the circuit on Proteus and done the simulation by the embedded keil
programming. Keypad module are used to detect the floor for vertical movement of
elevator. In this project we design three floor building model to establish the elevator
system
From your design elevator system the main draw back is does’t compare three or
more users in the some time ,and also an elevator system(from your work) does’t have
open and closed door
For the next we try to update the above drawbacks and do good elevator system.

Page 10
CHAPTER FOUR

Source code
The source code of your project is attached below at this chapter.

#include<reg51.h>
sbit r1=P1^0;
sbit r2=P1^1;
sbit r3=P1^2;
sbit r4=P1^3;
sbit c1=P1^4;
sbit c2=P1^5;
sbit c3=P1^6;

sbit l1=P3^7;
sbit l2=P3^4;
sbit l3=P3^5;
sbit l4=P3^6;

sbit sw=P3^3;

sbit rs=P3^0;
sbit rw=P3^1;
sbit en=P3^2;
sfr lcd=0xa0;

sbit up=P0^7;
sbit dn=P1^7;

int kpad;
void lcdcmd(unsigned char);
void lcdkpad(unsigned char);
void lcdcom();
void stridata(unsigned char);

void delay();

void upward()
{

Page 11
up=1;
dn=0;

l4=1;
l2=0;l3=0;l1=0;
delay();
l3=1;
l1=0;l2=0;l4=0;
delay();
l2=1;
l1=0;l3=0;l4=0;
delay();
l1=1;
l4=0;l2=0;l3=0;
delay();

void downward()
{
dn=1;
up=0;
l1=1;l2=0;l3=0;l4=0;
delay();
l2=1;
l1=0;l3=0;l4=0;
delay();
l3=1;
l1=0;l2=0;l4=0;
delay();
l4=1;
l1=0;l2=0;l3=0;
delay();

void main()
{
char num[]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0xFD,0x07,0xFF,0x6F};

Page 12
int c,k;
k=0;

P2=0x00;
P0=0x00;
lcdcmd(0x38);
lcdcmd(0x01);

lcdcmd(0x06);

lcdcmd(0x0c);

lcdcmd(0x80);

while(1)
{

int c;
r1=0;r2=1; r3=1; r4=1;
if(c1==0)
{
lcdkpad('1');
delay();
kpad=1;

}
if(c2==0)
{
lcdkpad('2');
delay();
kpad=2;

}
if(c3==0)
{
lcdkpad('3');
delay();
kpad=3;

Page 13
}

r1=1;r2=0; r3=1; r4=1;


if(c1==0)
{
lcdkpad('4');
delay();
kpad=4;

}
if(c2==0)
{
lcdkpad('5');
delay();
kpad=5;

}
if(c3==0)
{
lcdkpad('6');
kpad=6;
delay();

r2=1; r3=0;r1=1; r4=1;


if(c1==0)
{
lcdkpad('7');
kpad=7;
delay();

}
if(c2==0)
{
lcdkpad('8');
kpad=8;
delay();

Page 14
if(c3==0)
{
lcdkpad('9');
kpad=9;
delay();

r3=1; r4=0;r2=1; r1=1;


if(c1==0)
{
lcdkpad('*');
delay();

}
if(c2==0)
{
lcdkpad('0');
delay();
kpad=0;

}
if(c3==0)
{
lcdkpad('#');
delay();

}
r4=1;

if(k<kpad){

for(c=k;c<kpad;c++)

P0=num[c];
delay();
upward();

Page 15
if(sw==0){

break;
}
}

if(k>kpad){
k--;

for(c=k;c>kpad;c--)

{
P0=num[c];
delay();
downward();
}
}

lcdcmd(0x0c);

if(sw==0){
k=c;
for(c=k;c>0;c--)

{
P0=num[c];
delay();
downward();
}
stop();}

P0=num[c];

up=0;
dn=0;

P0=num[c];

Page 16
k=c;
lcdcmd(0x01);

}
}
void lcdcmd(unsigned char val)
{
P2=val;
rs=0;
rw=0;
en=1;
delay();
en=0;
}
void lcdkpad(unsigned char kpad)
{
P2=kpad;
rs=1;
rw=0;
en=1;
delay();
en=0;
}
void lcdcom()
{
P2=0x00;
lcdcmd(0x38);
lcdcmd(0x01);
lcdcmd(0x06);
lcdcmd(0x0c);
}

void stridata(unsigned char *p)


{
int x;
for(x=0;p[x]!=0;x++)
{
lcdkpad(p[x]);
}}

Page 17
void delay()
{
unsigned int i,j;
for(i=0;i<100;i++)
for(j=0;j<200;j++);
}

Page 18
Reference
[1] http://www.elevatorhistory.net/#:~:text=The%20first%20electric%20elevator%20was,This%20i
nvention%20made%20elevators%20safer.
[2] www.nex-robotics.com › Products › Motors and Accessories
[3] MaykePredco, Hand book of Microcontroller atmega8(MC GrawHill,co ,USA)1999.
[4] Muhammad Rashid (13 January 2011).
[5] Power Electronics Handbook. Elsevier. pp. 609–. ISBN 978-0-12-382037-2.
[6] Department of Measurement and Information Systems, "Microcontroller based elevator
controlling system", version: FLV-V02.1, 1989 (Project report in Hungarian).
[7] Cheah, Siew Holon (2006) Microcontroller Based Lift Control System. Faculty of Electrical &
Electronic Engineering, University Malaysia Pahang.

Page 19

You might also like