Chapter One

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 39

Chapter one

1. Introduction

Automatic doors have become a standard feature on many different types of buildings and
they are becoming increasingly popular every day with respect to developing an effective
electronic devices geared towards providing sensor.

The purpose of automatic sliding door is to the opening, passing through and closing door and
is now made easier without the need of touching the doors directly with use of sensors. In the
previous years many other types of doors have also been invented and achieved commercially,
they includes:-automatic sliding door, automatic swinging doors, automatic folding doors and
automatic revolve doors.

Automatic sliding door is an automated barrier installed in the entry of a room or building to
restrict access or provide visual privacy. It works with the use of motion sensors. This type of
door is made for commercial use but now days there are residential homes who also install this
type of sliding door for convenience purpose. As a result of enhanced or increase civilization and
modernization, the human nature demands more comfort to their life. The human beings seek
ways to do things easily and which saves time.so thus the automatic gates are one of the
examples that human nature invent to bring comfort and ease in its daily life.

The benefits of automatic sliding door are for handicapped people who have the difficulty with
doors, it provides easy and safety especially for disable persons.

-1-
2. Statement of the problem

In the past years before automatic sliding door is becoming in use there is manually controlled
doors which are not applicable for disabled persons, and since it is not automatic it takes more
time, manually as a result in order to overcome these problems and other like problems we use
automatic sliding door.

3. Objective

3.1 General objective

The main objective of our project is to design small automatic sliding door for handicapped
people, disable person and for convenience purpose.

3.2 Specific objective

The sub objective of automatic sliding door is:-

 To know or understand the function of this door well.


 To decrease time consumption with in short period of time.
 To follow modern or civilization life
 To understand activities involved in this project such as how automatic sliding
door works, sketching a detailed circuit of the gates, programming and design of
circuit diagram.
Many other types of doors have also been patented and achieved commercially,
these include: -
 Automatic sliding door,
 Automatic swinging doors,
 Automatic folding doors and
 Automatic revolving door

-2-
4. Methodology

The development of automatic sliding door is divided into the following parts:-

1. Circuit design:-we are going to design our circuit by using both block diagram and
circuit diagram.
2. Microcontroller program of the developed circuit, by using keil compiler to check the
output.
3. Testing the program results.
4. After the program results we are going to implement the hardware and software
development.
 Hardware development parts:-are all the necessary parts which is designed and
analyzed practically.
 Software developments parts:-are developing the software which loaded to the
microcontroller control using proteus.

5. Paper lay out

This report consists of 6 chapters. Brief descriptions of each chapter are given below.

Chapter 1 – Introduction

This chapter gives an overview of the entire project including project methodology, project
objective, project Statement of the problem and project introduction

Chapter 2 – Literature Review

This chapter reviews the development of automatic sliding door,

The historical records of doors

As heron invented the first automatic door,

Alexandria, Egypt - about 2000 years ago also been discussed.

-3-
Chapter 3 – design and modeling

The detail on how the block diagram, mechanism of the door, motor selection and circuit
diagram is designed their working principle and what materials and components are selected to
implement automatic sliding door is discussed

Chapter 4 – Software Development

The software design automatic sliding door of the final design‘s program flow is written and
explained and also H –bridge development will be discussed in detail in this chapter.

Chapter 5– Result and Discussion

The result of automatic sliding door shows ON (OFF) result and by using switches the motors
are rotated ones clockwise and the other anti-clock wise. The Problems encountered during the
implementation of the project will be covered.

Chapter 6 – Conclusion & discussion

Lastly, we will summarize the overall achievement of our project and provides some findings
about the automatic sliding door.

-4-
Chapter two
Literature review

2.1. History of Automatic Doors heron invents first Automatic door


Alexandria, Egypt - About 2000 years ago Heron of Alexandria a.k.a. Hero was a great
mathematician and mechanics inventor that was born around 10 AD. Some historians say earlier
and some say later. Although it seems no one can agree exactly when Heron was born, the
scientific community recognizes the important contributions this man has made to civilization or
could have made if discovered sooner.

Heron describes in detail and through drawings many mechanical devices operated by air, water
or steam pressure. Most of these devices he actually constructed. These include a steam turbine
engine he called an aeolipile (Greek for wind ball), a toy jet propelled vehicle, automated
dancing puppets, a steam powered fire engine, a water clock, heavy lifting machines, a coin
operated vending machine, a pipe organ and a machine to automatically change scenery in the
cities theatre. One of Heron's designs for a steam engine was discovered in 1668. Heron's
designs may have served as inspiration to Thomas Savery who invented a steam engine in 1698
to pump water from mine shafts. Later Thomas Watt invented the modern piston driven steam
engine in 1765.

Heron describes not one, but two different automatic door applications. The first application
used heat from a fire light by the city's temple priest. After, a few hours atmospheric pressure
built up in a brass vessel causing it to pump water into adjacent holding containers. These
holding containers acted as weights that through a series of ropes and pulleys would open the
temple's doors, at just about the time people were to arrive for prayer. Heron used a similar
application to open the gates to the city.

The historical records of doors include King Solomon's temple doors. These were made of Olive
wood, as were many doors of the past. In India, there were ancient stone doors found. These had
pivots on each end, which then fit into sockets. These doors swung open and shut, similar to
saloon doors of the old west, but not as quickly.

-5-
The Doors of today can be made of just from any material found on Earth; wood, metal, plastic,
glass, paper, and even fabric. They usually serve the purpose of keeping something in or out.
There are interior and exterior doors; automatic and manual doors, plus real and false doors.

Automatic and Manual -There are usually manual doors found in houses. These are the ones that
need to have a lever lifted or knob turned, then pulled or pushed by hand in order to open.
Automatic doors are a feature that has only been around since 1954, but wasn't first installed
until 1960. These were doors for buildings and a mat on the ground which activated the opening.
Today, most automatic doors have sensors which trigger the opening. Electric garage door
openers were first sold in the year of 1926, today, these also have sensors. Some revolving doors
of today are even automatic, instead of the traditional manual style.

Although it seems no one can agree exactly when Heron was born, the scientific community
recognizes the important contributions this man has made to civilization or could have made if
discovered sooner. Heron authored two books known as the Pneumatic. His work was lost for some
centuries, but when found it described his theories and his experiments and constructive works in
pneumatics, steam and water pressure. One can only wonder if human civilization would have
mechanized sooner if his works were not lost.

Heron describes in detail and through drawings many mechanical devices operated by air, water
or steam pressure. Most of these devices he actually constructed. These include a steam turbine
engine he called an aeolipile (Greek for wind ball), a toy jet propelled vehicle, automated
dancing puppets, a steam powered fire engine, a water clock, heavy lifting machines, a coin
operated vending machine, a pipe organ and a machine to automatically change scenery in the
cities theatre. One of Heron's designs for a steam engine was discovered in 1668. Heron's
designs may have served as inspiration to Thomas Savery who invented a steam engine in 1698
to pump water from mine shafts.

-6-
Beside on the above historical background we modify different limitations of ASD by adding
different devices such as:-

 They use weights to open and close the door but we use a sensor to open and close the
door automatically.
 They are designed manually controlled door which is time consuming and need external
force but we designed automatic sliding door which is suitable for conformance and time
saving.
 We model and design an automatic sliding door provide the mentioned needs. This was
achieved by considering some factors such as economy, availability of components
and research materials, efficiency, Compatibility and portability and also durability in
the design process.
 The performance of the system after test met design specifications. This system works on
the principle of breaking an infrared beam of light, sensed by an ultrasonic sensor. It
consists of two transmitting infrared diodes and two receiving photodiodes. The first one
is for someone coming in and the second one is for someone going out of the room. The
photodiodes are connected to comparators, which give a lower output when the beam is
broken and high output when transmitting normally. The general operation of the work
and performance is dependent on the presence of an intruder entering through the door
and how close he/she is in closer to the door. The door is meant to open automatically but
in a case where there is no power supply trying to force the door open would damage
the mechanical control system of the unit.

-7-
CHAPTER THREE
System design
Here is the blocks diagram of the sliding door .The block diagram shows what will
happen the door is open the doors 1 and door2 are doors while they are open .In
addition it shows connection of the motor to the doors and the ultrasonic sensor.

Fig 3.1 BLOCKS DIAGRAM OF AUTOMATIC SLIDING DOOR

Working mechanism of an automatic sliding door

The first basic component of the circuit is the door sensing unit. It comprises of transmitter and
receiver. As soon as some one enters the range of detection the Ultrasonic Wave sent by
transmitter are reflected by the object and the signal is not sent to the receiver. This whole
sensing unit is connected with the control unit. Along with the control unit are attached to
the limit switches to control the rotation or movement of motor.

Control unit sends the signal to the driving unit after which the driving unit switches on and off
the motor. For how long the motor is to be driven and kept shut down is done using limit
switches. Two limit switches are attached at the Centre where doors meet upon closure and are
used to specify the extent to which the motors should move in the reverse direction to close the
door. When the door is closed completely the switches are in ground position and signal is send

-8-
to the microcontroller which stops the motors. Similarly, two limit switches are present at the
two extremes specifying the extent to which door could open. When the door reaches the
maximum limit of opening, these two switches at extreme become ground and signal is sent to
the microcontroller which stops the motors. A power supply is attached to the door sensing unit,
control unit, drive unit and the motor.

Driving unit of a motor Using Transistor

If you want to rotate your motor in only one direction, then this is the easiest way to do so. Here
power transistor is used as a switch to turn a motor on or off depending upon the applied voltage
at base. Its circuit is shown below. The same motor driver circuit is used in making a simple line
follower robot.

CONTROL UNIT

Convertor triggering unit for field oriented control, brushless dc control is used.

Ultrasonic sensor

An ultrasonic sensor utilizes a transducer that produces an electrical output in response to


received ultrasonic energy. An ultrasonic sensor is used as an obstacle detection sensor for
detecting obstacle by transmitting and receiving an ultrasonic wave. A typical ultrasonic sensor
is designed to emit an ultrasonic pulse toward an object to be detected to receive a reflected
wave, which is reflected on the object, to measure a period of time from the ultrasonic pulse
emitting time to the reflected wave receiving time to detect the object. An ultrasonic sensor
comprises at least one ultrasonic transducer which transforms electrical energy into sound and, in
reverse, sound into electrical energy, a housing enclosing the ultrasonic transducer or
transducers, an electrical connection and, and an electronic circuit for signal processing also
enclosed in the housing. The ultrasonic sensor has a piezoelectric vibrator. The piezoelectric
vibrator vibrates to transmit an ultrasonic wave and receives a reflected wave from an obstacle,
so that an obstacle can be detected. Ultrasonic sensors use sound waves rather than light, making
them ideal for stable detection of uneven surfaces, liquids, clear objects, and objects in dirty
environments. These sensors work well for applications that require precise measurement

-9-
between stationary and moving objects.

Fig 3.2

Ultrasonic sensors provide excellent repeatability and linearity in detecting the precise position
of objects. The sensors provide high precision performance on any material of any color,
irrespective of external light levels.
They produce accurate results even when used with highly transparent objects such as film or
glass surfaces and are completely unaffected by normal levels of soiling on the sensor surface.
The sensors are also characterized by high sound intensity that makes it possible to detect even
the smallest of objects with extremely high reliability.
This ability to maintain outstanding performance and reliability, even with the presence of
suspended Particles or water vapor means that ultrasonic sensors are in daily use all over the
World in a diverse range of demanding industrial applications.

Limit switch
It is a type of mechanical sensor that requires physical contact to detect the presence or absence
of an object. Limit switches are the first type of sensor to be used. Switches are commonly

- 10 -
employed as input devices to indicate the presence or absence of a particular condition in a
system or process that is being monitored and/or controlled. In motorized electromechanical
systems, limit switches provide the function of making and breaking electrical contacts and
consequently electrical circuits. A limit switch is configured to detect when a system's element
has moved to a certain position. A system operation is triggered when a limit switch is tripped.

Motor selection

An electric motor for a given drive application is that it meet the power level and performance
required by the load during steady-state and dynamic operation.

DC motor

Dc motor is used for the application of high starting torque, low-speed, Gear ratio less than one
(gear ratio<1).It‘s a motor that will do some work if we feed it some dc voltage. Reversing the dc
supply voltage polarity will make it run in a reverse direction

Fig 3.3.dc motor

- 11 -
Format of sliding door

Because the width and the weight of the door has an impact on the opening and closing speed of
the door we need to calculate the torque, we have decided the width of the door to be as follows.

Fig 3.4 DOOR WIDTH SELECTION

- 12 -
Specifications on weight and width of door to be used

Table 3.1 door weight specification

- 13 -
From block diagram below we can calculate load torque and motor torque by applying
force on the doors.

Fig 3.5 block diagram to calculate torque

N1/N2=D1/D2=a (gear ratio)

F=ma where m=mass=200kg

a= acceleration

a=v/t t=1min

v=0.6m/sec

So F=mv/t= (200kg*0.6m/sec)/60sec=2N

- 14 -
Force is direct proportional with torque

Torque is rotational form using radius of gear

T=Fr=mar but r=v/w; w=2π/f=2π/50=0.126rad/sec

r= (0.6m/sec)/0.126rad/sec=4.76m

Tl=2N*4.76m=9.52Nm (LOAD TORQUE)

To find motor torque we multiply the load torque by gear ratio

N1/N2=D2/D1=a=0.1 since both door1 and door2 have not equal turns or not the same diameter
i.e n1=1 and n2=10;

Tm=Tload*a =9.52*0.1=0.952Nm≈1

Motor torque is less than load torque because to decrease its cost in case of automatic sliding
door. So as the value motor torque decrease cost is decrease and vise versa. Motor torque is
directly proportional with cost.

Type of motor we select

DC MOTOR:-it is high starting torque and low speed.

Its gear ratio is less than one (a<=1) but in our case a=1.

Two types of DC motor:-separately excited and self-excited

We use separately excited DC motor because to control the motor by using


armature voltage.It needs input or external source, so we use sensor and limit switch as external
source.

Characteristics of velocity and position

INPUT OUTPUT
MODEL
Limit switch Fig 3.6 limit switches

- 15 -
Microcontroller
It is a low-power, high-performance 8-bit microcomputer with 8k bytes of programmable and
erasable read only memory (PEROM). The device is manufactured using high-density memory
technology. The on-chip flash allows the program memory to be reprogrammed in-system or by
a conventional memory programmer.
Type of microcontroller that we select
AT89C51 is an 8-bit microcontroller and belongs to Atmel's 8051 family. ATMEL 89C51 has
4KB of Flash programmable and erasable read only memory (PEROM) and 128 bytes of RAM.
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, i.e., 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-ups and 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 operation from 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.

- 16 -
Pin Diagram of the microcontroller AT89C51:

- 17 -
The fig below shows the snapshot of the AT89C51

FIG 3.7 Photo shot taken from AT89C51 chip

Each pin in the microcontroller has a specific function. The microcontroller we have selected has
40 pins so let‘s look the function of each pin.

Pin No Function Name


1 P1.0
2 P1.1
3 P1.2
4 P1.3
8 bit input/output port (P1) pins
5 P1.4
6 P1.5
7 P1.6
8 P1.7
9 Reset pin; Active high Reset
10 Input (receiver) for serial communication RxD 8 bit input/output P3.0
11 Output (transmitter) for serial TxD port (P3) pins P3.1

- 18 -
communication
12 External interrupt 1 Int0 P3.2
13 External interrupt 2 Int1 P3.3
14 Timer1 external input T0 P3.4
15 Timer2 external input T1 P3.5
16 Write to external data memory Write P3.6
17 Read from external data memory Read P3.7
18 Crystal 2
Quartz crystal oscillator (up to 24 MHz)
19 Crystal 1
20 Ground (0V) Ground
21 P2.0/ A8
22 P2.1/ A9
23 8 bit input/output port (P2) pins P2.2/ A10
24 / P2.3/ A11
25 High-order address bits when interfacing with external memory P2.4/ A12
26 P2.5/ A13
27 P2.6/ A14
28 P2.7/ A15
29 Program store enable; Read from external program memory PSEN
Address Latch Enable ALE
30
Program pulse input during Flash programming Prog
External Access Enable; Vcc for internal program executions EA
31
Programming enable voltage; 12V (during Flash programming) Vpp
32 P0.7/ AD7
33 P0.6/ AD6
34 8 bit input/output port (P0) pins P0.5/ AD5
35 P0.4/ AD4
36 Low-order address bits when interfacing with external memory P0.3/ AD3
37 P0.2/ AD2
38 P0.1/ AD1
39 P0.0/ AD0
40 Supply voltage; 5V (up to 6.6V) Vcc

TABLE 3.2 tables showing the pin function of AT89C51

- 19 -
Features
 8051 Central Processing Unit
– 4k × 8 ROM (80C51)
– 8k × 8 ROM (80C52)
– 128 × 8 RAM (80C51)
– 256 × 8 RAM (80C52)
– Three 16-bit counter/timers
– Boolean processor
– Full static operation
– Low voltage (2.7 V to 5.5 V@ 16 MHz) operation
 Memory addressing capability
– 64k ROM and 64k RAM
 Power control modes:
– Clock can be stopped and resumed
– Idle mode
– Power-down mode
 CMOS and TTL compatible
 TWO speed ranges at VCC = 5 V
– 0 to 16 MHz
– 0 to 33 MHz
 Three package styles
 Extended temperature ranges
 Dual Data Pointers
 Security bits:
– ROM (2 bits)
– OTP/EPROM (3 bits)
 Encryption array – 64 bytes
 4 level priority interrupt

- 20 -
 6 interrupt sources
 Four 8-bit I/O ports
 Full–duplex enhanced UART
– Framing error detection
– Automatic address recognition
 Programmable clock out
 Asynchronous port reset
 Low EMI (inhibit ALE and slew rate controlled outputs)

The device is a low power static design which offers a wide range of operating frequencies down
to zero. Two software selectable modes of power reduction—idle mode and power-down mode
are available. The idle mode freezes the CPU while allowing the RAM, timers, serial port, and
interrupt system to continue
functioning. The power-down mode saves the RAM contents but freezes the oscillator, causing
all other chip functions to be inoperative. Since the design is static, the clock can be stopped
without loss of user data and then the execution resumed from the point the clock was stopped.

AT89C51 (8051 MICROCONTROLLER)

Features
• Compatible with MCS-51™ Products
• 4K Bytes of In-System Reprogrammable Flash Memory
– Endurance: 1,000 Write/Erase Cycles
• Fully Static Operation: 0 Hz to 24 MHz
• Three-level Program Memory Lock
• 128 x 8-bit Internal RAM
• 32 Programmable I/O Lines
• Two 16-bit Timer/Counters
• Six Interrupt Sources
• Programmable Serial Channel
• Low-power Idle and Power-down Modes

The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of

- 21 -
Flash programmable and erasable read only memory (PEROM). The device is manufactured
using Atmel‘s high-density nonvolatile memory technology and is compatible with the industry-
standard MCS-51 instruction set and pin out. The on-chip Flash allows the program memory to
be reprogrammed in-system or by a conventional nonvolatile memory programmer. By
combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a
powerful microcomputer which provides a highly-flexible and cost-effective solution to many
embedded control applications.

Specification Value

Family AT89C51

Number of Timers 2

Program Memory Size 4KB

Program Memory Type Flash

RAM Size 128Byte

Family Name AT89

Minimum Operating Supply Voltage 4V

Typical Operating Supply Voltage 5V

Maximum Operating Supply Voltage 6V

Minimum Operating Temperature 0°C

Maximum Operating Temperature 70°C

Screening Level - 22 - Commercial

Mounting Through Hole


Specification Value

Device Core 8051

Pin Count 40

Supplier Package PDIP

Product Width 13.97mm(Max)

Product Height 4.83mm(Max) - 0.38mm(Min)

Product Length 52.58mm(Max)

Product Type Microcontroller

Data Bus Width 8Bit

Instruction Set Architecture CISC

Maximum Clock Rate 24MHz

Maximum Speed 24MHz

Number of Programmable 32
I/Os

TABLE 3.3 table showing features of AT89C51

- 23 -
Circuit Description
An automatic door control system, used with a moveable door system where in doors are moved
between closed and opened positions by means of the rotary drive of an electric motor,
comprises of: An ultrasonic sensor to detect the object Two bi-directional multi-speed rotary
drive motor coupled to the each door A microcontroller coupled to the motors Two motor drive
circuits, each coupled to the microcontroller Four transistors in each H-bridge configuration
H-Bridge Working

Fig 3.8 Bridge with diode

H-Bridge is a main unit which controls the motor directly. It is driven by microcontroller. It
would be useful to be able to run a motor in either direction. That's simple with a motor of the
type that's been used in the experiments thus far. Reverse the DC power connections on such
a motor and its shaft will rotate in the opposite direction. This configuration is called an H-
Bridge due to its shape. Turn on switch A and switch C and the motor will run forward. Turn on
switch B and switch D and it will run in reverse.

- 24 -
FIG 3.9 a diagram showing the working of the switches

Circuit Design
Circuit Design includes H-bridge developed by the Transistors of N-Type. Current rating of
transistor is selected according to the load specification. For this case transistor of mA can be
used, for driving the toy motors. Control of the door is heavenly depends upon the customer
requirements. Remote control, motion control, light control etc can be installed at the door.
But for lab demonstration Transmitter & Receiver circuit is being commonly used. It also has an
impact on the cost factor. As an additional part, security system can also be installed, for
example, alarming system, fire detecting system etc, increasing the cost.

The following truth table shows all of the possibilities for the original circuit diagram.
A‗1‘means a transistor is on and a‗0‘ means it's transistor is off.

- 25 -
TABLE 3.4 TABLE SHOWING THE WORKING OF TRANSISTORS

Working details of whole circuit


A feature of this invention is the use of four transistors and the motor in an H-bridge
configuration. This configuration allows the drive transistors to be used. The input to the micro
controller is given through P1.0/T2, Port 1 driver. Input is an activate signal, generated by
an ultrasonic sensor, to signal the automatic door control system to open the door. The output
Port 2 is a control signal to drive motor. It is connected to the motor drive circuit. The main part
of the automatic door control system is a motor drive circuit that includes the eight drive
transistors Q1, Q2, Q3, Q4, Q5, Q6, Q7 & Q8 configured as an H-bridge Circuit. An H-bridge
circuit is a control circuit where four transistors and a load motor are arranged in the form of the

- 26 -
letter H with the load being connected to the middle of the H. When used for DC motor control,
it can control both speed and direction of the motor. Two H-bridge circuits are used. One circuit
is for door1 and other for door 2. Through ports of Port 1 limit switches are connected. When the
object is detected through ultrasonic sensor, signal is sent to transistors through
microcontroller. For door 1, Q2 & Q3 get 1 while Q1 & Q4 are 0. This causes the motor to rotate
in a clockwise direction for opening the door. For door 2, Q6 & Q7 get 1 whileQ5 & Q8 are 0.
The motor will continue rotating until S1 & S3 get ground. Now when the door needs to be
closed, the motor‘s direction is reversed. For door 1, nowQ2 & Q3 get 0 while Q1 & Q4 are
1. This causes the motor to rotate in anticlockwise direction. For door 2, Q6 & Q7 get 0 while Q5
& Q8 are 1. The motor will continue rotating until S2 & S4 get ground and the door gets closed.

- 27 -
Chapter 4

Software development

Compiler
A compiler is a special program that processes statements written in a particular programming
language and turns them into machine language or "code" that a computer‘s processor uses.
Typically, a programmer writes language statements in a language such as Pascal or C one line at
a time using an editor. The file that is created contains what are called the source statements. The
programmer then runs the appropriate language compiler, specifying the name of the file that
contains the source statements.

When executing (running), the compiler first parses (or analyzes) all of the language statements
syntactically one after the other and then, in one or more successive stages or "passes", builds the
output code, making sure that statements that refer to other statements are referred to correctly in
the final code. Traditionally, the output of the compilation has been called object code or
sometimes an object module. (Note that the term "object" here is not related to object-oriented
programming .) The object code is machine that the processor can process or "execute" one
instruction at a time.

More recently, the Java programming language, a language used in object-oriented


programming , has introduced the possibility of compiling output (called byte code ) that can run
on any computer system platform for which a Java virtual machine or byte code interpreter is
provided to convert the byte code into instructions that can be executed by the actual hardware
processor. Using this virtual machine, the byte code can optionally be recompiled at the
execution platform by a just-in-time compiler .

Traditionally in some operating systems, an additional step was required after compilation - that
of resolving the relative location of instructions and data when more than one object module was
to be run at the same time and they cross-referred to each other's instruction sequences or data.
This process was sometimes called linkage editing and the output known as a load module.

- 28 -
A compiler works with what are sometimes called 3GL and higher-level languages. An
assembler works on programs written using a processor's assembler language.

A compiler is a program that translates source code into object code. The compiler derives its
name from the way it works, looking at the entire piece of source code and collecting and
reorganizing the instructions. Thus, a compiler differs from an interpreter, which analyzes
and executes each line of source code in succession, without looking at the entire program. The
advantage of interpreters is that they can execute a program immediately. Compilers require
some time before an executable program emerges. However, programs produced by compilers
run much faster than the same programs executed by an interpreter.
Every high-level programming language (except strictly interpretive languages) comes with a
compiler. In effect, the compiler is the language, because it defines which instructions are
acceptable.
Because compilers translate source code into object code, which is unique for each type
of computer, many compilers are available for the same language. For example, there is
a FORTRAN compiler for PCs and another for Apple Macintosh computers

FIG 4.1 a diagram showing the compiler

- 29 -
Keil Compiler and C Programming

The use of C language to program microcontrollers is becoming too common. And most of the
time it‘s not easy to build an application in assembly instead you can make easily in C. So it is
important that you know C language for microcontroller which is commonly known as
Embedded C .we used keil compiler; to create the source files in a text editor such run the
Compiler on each C source file, specifying a list of controls, run the ―C‖ source file, specifying
another list of controls, run either the Library Manager or Linker (again specifying a list of
controls) and finally running the Object-HEX Converter to convert the Linker output file to an
Hex File. Once that has been completed the Hex File can be downloaded to the target hardware
and debugged. Alternatively KEIL can be used to create source files; automatically compile, link
and covert using options set with an easy to use user interface and finally simulate or perform
debugging on the hardware with access to C variables and memory. KEIL Greatly simplifies the
process of creating and testing an embedded application. We shall set the target options of our
micro Vision project to have:
Device: Generic AT89c51
Target: Xtal 11.0592 MHz; Memory Small; Code ROM Size Small.
Output: Create Hex file,
C51: add the project folder to the include path

Proteus Software

PROTEUS VSM allows professional engineers to run interactive simulations of real designs, and
to reap the rewards of this approach to circuit simulation. And then, a range of simulator models
for popular micro-controllers and a set of animated models for related peripheral devices such as
LED and LCD displays, keypads, an RS232 terminal and more. It is possible to simulate
complete micro-controller systems and thus to develop the software for them without access to a
physical prototype. In a world where time to market is becoming more and more important this is
a real advantage. Structurally, Proteus 6 Professional separated into two main components,
which are ISIS 6 Professional and ARES 6 Professional. ISIS 6 Professional mainly involved on
circuit designing and simulation ISIS 7.10 Professional: Circuit designing & simulation
ARES7.10 Professional: PCB prototyping.

- 30 -
Software program
Program description:
In the programs, firstly bits are assigned to the limit switches. Bit P1.4 is assigned to switch 1,
1.5 to switch 2, 1.6 to switch4, 1.7 to switch3.The bit assigned to ultrasonic sensor is 1.0.Three
integers fwd, stop, rev are taken to move the door forward, stop it and to move the door in the
reverse direction with the help of motors. The integer ‗fwd‘ is assigned code0xAA in hexagonal
decimal system. The code in binary system will be 10011001 i.e. to move door in fwd direction
points Q2 and Q3 will be in ON position. The code for one door is 1001 and for both doors is
10011001. The integer ‗stop‘ is assigned code 0 and for reverse direction rotation of motors the
code in hexagonal system is x55. In binary it becomes01100110 i.e. for reverse rotation Q2 and
Q3 will be OFF and Q1 and Q4 will be ON. The while (sw1 && sw3) loop shows that when the
switches sw1 and sw3 remain off the port 2 will move the door in forward direction. When they
become ON the port 2 will stop moving the door in forward direction. This will happen while the
ultrasonic sensor remains ON. In while (sw2 && sw4) loop the port 2 will move door in reverse
direction. When they will be ON the movement in reverse direction will stop. This process will
happen while ultrasonic sensor sends off signal i.e. no person is entering through the door. We
need to know what materials and what structure to make our sliding door with.

The out puts =to be open and close

Decision =to ask if there is someone approaching

Complex part= need a way to let the sensor know if something or one is stuck or trapped in the
door

We have much work to do and i think this project will have many new and exciting sliding
doors.

- 31 -
Flow charts of automatic sliding door

FIG 4.2 the fig showing the flow chart of the


automatic sliding door.

- 32 -
Chapter 5– Result and Discussion
The result of automatic sliding door shows the opening and closing of doors by sensing whether
a person is approaching the door or not. The motors will be provided a dc supply and will rotate
once clockwise and the other anti-clock wise to open and close the door based on the distance of
the person from the door. If the person is in the range of 0-80 cm the sensor will detect that the
person is approaching and sends a message to the microcontroller, the microcontroller will order
transistors Q2, Q3, Q6, Q67 to be on and when these transistors are on the motor will rotate
clockwise and the door will be open, conversely when transistors Q1, Q4, Q5, Q8 are on the
motor revolves anti clockwise and the door will close.
We use four transistors and the motor in an H-bridge configuration. This configuration allows
the drive transistors to be used. The input to the micro controller is given through P1.0/T2, Port 1
driver. Input is an activate signal, generated by an ultrasonic sensor, to signal the automatic door
control system to open the door. The output Port 2 is a control signal to drive motor. It is
connected to the motor drive circuit. The main part of the automatic door control system is a
motor drive circuit that includes the eight drive transistors Q1, Q2, Q3, Q4, Q5, Q6, Q7 & Q8
configured as an H-bridge Circuit. An H-bridge circuit is a control circuit where four transistors
and a load motor are arranged in the form of the letter H with the load being connected to the
middle of the H. When used for DC motor control, it can control both speed and direction of the
motor. Two H-bridge circuits are used. One circuit is for door1 and other for door
2. Through ports of Port 1 limit switches are connected. When the object is detected through
ultrasonic sensor, signal is sent to transistors through microcontroller. For door 1, Q2 & Q3 get 1
while Q1 & Q4 are 0. This causes the motor to rotate in a clockwise direction for opening the
door. For door 2, Q6 & Q7 get 1 whileQ5 & Q8 are 0. The motor will continue rotating until S1
& S3 get ground. Now when the door needs to be closed, the motor‘s direction is reversed. For
door 1, nowQ2 & Q3 get 0 while Q1 & Q4 are 1. This causes the motor to rotate in anticlockwise
direction. For door 2, Q6 & Q7 get 0 while Q5 & Q8 are 1. The motor will continue rotating
until S2 & S4 get ground and the door gets closed.

- 33 -
Fig 5.1 a snapshot of the simulation

- 34 -
Chapter 6 – Conclusion

The design and implementation of a microcomputer system had been achieved in this project.
This design can be easily adapted to any electric gate and any form of control which requires the
use of sensors. To effectively design this kind of system, it is necessary to understand the basic
sensor characteristics, microprocessor input and output interfacing, and assembly language
principles, utilized in the system plan. Sensors serve as a transducer for vehicle detection while
the programming language is fundamental to software design based on the system requirements,
specifications, and planned operation of the system. There is total agreement between the system
designed and the required operation of the system. Every good project has limitations; the
limitation of this design lies in the effectiveness of the sensor. The sensor will work most
effectively if operated under high intensity light. The automatic gate designed in this research
can be employed in organizations, public car parks, residential parking lots, and automobile
termini where no form of security measure is required.

Recommendations
Automatic sliding doors are a great feature to add to our business factory or home.. For an
improved, effective, and security gate system to be implemented and achieved, the following
suggestions should be considered for further work.

1. A form of vehicle identification should be provided for security purposes, For instance where
a vehicle stands still at the focus of the sensors.

2. A better sensor is recommended to achieve new functionality, For instance, a suitable sensor
such as radar sensor that could detect contraband goods in any vehicle.

3. A better motor type for this project is DC motor because high starting torque and low speed
initially.

REFERENCES

[1] Alkar, A. Z., & Buhur, U. (2005), ―An Internet Based Wireless Home Automation
System for Multifunctional Devices‖, IEEE Consumer Electronics, 51(4), pp. 1169-
1174.

- 35 -
[2] Ciubotaru-Petrescu, B., Chiciudean, D., Cioarga, R., & Stanescu, D.(2006), ―Wireless
Solutions for Telemetry in Civil Equipment and InfrastructureMonitoring‖, 3rd
Romanian-Hungarian Joint Symposium on Applied Computational Intelligence (SACI) May

25-26, 2006.

[3] Conte, G., & Scaradozzi, D. (2003), ―Viewing home automation systems as multiple
agents systems‖, RoboCUP2003, Padova, Italy. Retrieved at:
http://www.robosiri.it/ROBOCUP_2003/ROBOCUP- SITOSIRI/articles/pdf/Conte.pdf

[4] Kalpakjian (2008), ―Automation in Manufacturing. Manufacturing processes for


Engineering Materials‖, 5th Ed., Pearson Education,
http://nd.edu/~manufact/MPEM%20pdf_files/Ch14.pdf

[5] Potamitis, I., Georgila, K., Fakotakis, N., & Kokkinakis, G. (2003), ―An integrated system
for smart-home control of appliances based on remote speech interaction‖, EUROSPEECH
2003,8th European Conference on Speech Communication and Technology, Geneva,

Switzerland, Sept. 1-4, 2003, pp. 2197-2200.

[6] Zungeru, A.M. et al., (2012). Design and Implementation of a Low Cost Digital
Bus Passenger Counter. Innovative Systems Design and Engineering,3(4), pp. 29–41.

[7] Zungeru, A.M., Edu, U., & Garba, A. (2012). Design and

Implementation of a Short Message Service Based Remote Controller. Computer


Engineering and Intelligent systems, 3(4),

106–118.

[8] Zungeru, A.M., Kolo, J.G., & Olumide, I. (2012c),―A Simple and Reliable Touch
sensitive security System‖, International Journal of Network Security & Its Applications
(IJNSA), 4(5), 149–165

- 36 -
APPENDICES

#include<reg51.h>

#define ON 1

#define OFF 0

sbit sw1=P1^4 ;

sbit sw2=P1^5 ;

sbit sw3 =P1^6 ;

sbit sw4 =P1^7 ;

sfr usw =P1^0 ;

p1=0xFF;

p2=0x00;

//int x=usw;

int usw=analogRead(p1);

int fwd;

int stop;

int Rev;

void main()

{fwd=0x99;

stop=0x00;

Rev=0x66;

while(1)

- 37 -
{

if(usw==80)

while((sw1==ON)&&(sw3==ON))

p2=fwd;

else{

p2=stop;

if(usw==10)

while(sw2&&sw4==ON)

p2=Rev;

else{

p2=stop;

- 38 -
}

}END;

Key words

sw=limit switch

us=ultra sonic sensor

sb=bit assigned

int=integer

fwd=forward

rev=reverse

1^4=1.4

p=port

- 39 -

You might also like