You are on page 1of 43

AUTOMATIC DOOR CONTROL SYSTEM

USING MICROCONTROLLER
B-Tech Final project
By

GEBRELUA GEREMEW ID No. RDEG/261/08

WONDIMAGEGN SAHILU ID No. RDEG/850/08

WORKINEH BURKA ID No. EDEG/154/06


AT

DEFENCE UNIVERSITY, COLLEGE OF ENGINEERING

Department of Electrical Power Engineering

(Control and Automation)

BISHOFTU, ETHIOPIA
AUGUST, 2020
AUTOMATIC DOOR CONTROL SYSTEM
USING MICROCONTROLLER
B-Tech Final project
Submitted in partial fulfillment of the requirements for the award of Degree
of Bachelor of Technology in Electrical Power Engineering

By
GEBRELUA GEREMEW ID No. RDEG/261/08

WONDIMAGEGN SAHILU ID No. RDEG/850/08

WORKINEH BURKA ID No. EDEG/154/06

Under the Guidance of: - GOITOM TADESSE (M/TECH)

AT

DEFENCE UNIVERSITY,
COLLEGE OF ENGINEERING

Department of Electrical Power Engineering

(Control and Automation)

BISHOFTU, ETHIOPIA
AUGUST, 2020
DECLARATION

We hereby declare that the project entitled “Automatic door control system using
microcontroller” submitted for the Bachelor Degree is our original work and the project has
not formed the basis for the award of any degree, associateship, fellowship or any other
similar titles.

1. Gebrelua Geremew ID No: RDEG/261/08 _____________


2. Wondimagegn Sahilu ID No: RDEG/850/08 _____________
3. Workineh Burka ID No: EDEG/154/06 _____________

Place: Bishoftu

i
CERTIFICATE

This is to certify that the project entitled “Automatic door control system using
microcontroller” is the work carried out by Gebrelua Geremew, Wondimagegn Sahilu and
Workineh Burka students of B. Tech, Defense University, College of Engineering, Bishoftu,
during the year 2019/20. on partial fulfillment of the requirement for the award of the Degree
of Bachelor of Electrical Power Engineering focus area of Control and Automation and
that the project has not formed the basis for the award previously of any degree, diploma,
associateship, fellowship or any other similar rule.

Signature of the advisor____________________

Place: - Bishoftu

Date_______________

Approval by members of BoE

Name Signature

1. Examiner 1: ____________________ ____________________

2. Examiner 2: _____________________ ____________________

3. Chairperson/HOD: _____________________ ____________________

4. Advisor:_______________________ ____________________

ii
TABLE OF CONTENTS

Contents page
DECLARATION.................................................................................................................................i

CERTIFICATE...................................................................................................................................ii

TABLE OF CONTENTS...................................................................................................................iii

LIST OF FIGURE...............................................................................................................................v

LIST OF ACRONYMS......................................................................................................................vi

ACKNOWLEDGEMENT.................................................................................................................vii

ABSTRACT.....................................................................................................................................viii

CHAPTER ONE.................................................................................................................................1

INTRODUCTION..............................................................................................................................1

1.1 Background......................................................................................................................1

1.2 Statement of the Problem.................................................................................................2

1.3 Objectives of the Project..................................................................................................2

1.3.1 General Objective..........................................................................................................2

1.3.2 Specific Objectives........................................................................................................3

1.4 Significates of the Project................................................................................................3

1.5 Scope of the Project..........................................................................................................3

1.6 Limitation of the project...................................................................................................3

1.7 Methodology....................................................................................................................3

1.8 Organization of the Project..............................................................................................4

CHAPTER TWO................................................................................................................................5

LITERATURE REVIEW.......................................................................................................5

2.1 Introduction......................................................................................................................5

2.2 Summary of Literature Review........................................................................................8

iii
CHAPTER THREE................................................................................................................9

THEORY OF THE SYSTEM................................................................................................9

3.1 Block diagram of the system............................................................................................9

3.2 Description of the system.................................................................................................9

3.3 Flow chart of overall operation......................................................................................10

3.4 Components of system design........................................................................................12

3.5 Regulated power supply.................................................................................................18

3.7 Software Development Tools.........................................................................................19

3.8 Circuit diagram of Automatic door control system........................................................19

CHAPTER FOUR.............................................................................................................................22

SIMULATION RESULTS AND DISCUSSION..............................................................................22

4.1 Introduction....................................................................................................................22

CHAPTER FIVE..............................................................................................................................25

CONCLUSION, RECOMMENDATION AND FUTURE WORK..................................................25

5.1 Conclusion......................................................................................................................25

5.2 Recommendations..........................................................................................................25

5.3 Future work....................................................................................................................25

REFERENCES.................................................................................................................................26

APPENDIX.......................................................................................................................................28

iv
LIST OF FIGURE

Figure 3. 1: - Block diagram of the system............................................................................9

Figure 3. 2:- Flow chart of overall operation.........................................................................11

Figure 3. 3: - Components used to design the system............................................................12

Figure 3. 4: - Functional pin diagram of Arduino UNO........................................................13

Figure 3. 5: - Internal part of stepper motor...........................................................................14

Figure 3. 6: - PIR sensor........................................................................................................16

Figure 3. 7: - Pin diagram of L293D motor driver ICs..........................................................17

Figure 3. 8: - Pin diagram of LCD.........................................................................................17

Figure 3. 9: - Limit switch.....................................................................................................18

Figure 3. 10: - Block diagram for the regulated power supply unit.......................................18

Figure 3. 11: - Circuit diagram of Automatic door control system.......................................20

Figure 3. 12: - Circuit diagram of Interfacing the component...............................................21

Figure 4. : - Initialization of Automatic door opener.............................................................22

Figure 4. : - Door opening operation in automatic door opener............................................23

Figure 4. : - Door opening operation in automatic door opener............................................23

Figure 4.4: - Door closing operation in automatic door opener.............................................24

Figure 4.5: - Door closed operation in automatic control system..........................................24

v
LIST OF ACRONYMS

AC Alternating Current

CCW Counter Clockwise

CW Clockwise

DC Direct Current

DTMF Dual Tone Multi Frequency

EN Enable

IC Integrated Circuit

IDE Integrated Development Environment

IOT Internet of Things

I/O Input Output

LCD Liquid Crystal Display

LED Light Emitted Diode

PBC Printed Circuit Board

PIR Passive Infrared Sensor

PWM Pulse Width Modulation

TX/RX Transmitter/Receiver

vi
ACKNOWLEDGEMENT

First, we would like to thanks our GOD who gave us life, strength and also for giving us his
tremendous passion to complete this project within the given period. We would like to
sincerely express our gratitude to our advisor, M/tech. Goitom Tadesse for his abundantly
helpful and offered invaluable assistance, support and guidance. Also we want to thank
Yidnekachew Wondmyhunegn for his willingness, guidance and assistance in preparing body
part of the project.

We are forever grateful to our parents for their love, caring and scarifies they made for
educating and preparing us for our future and for facilitating financial support. Finally, our
deepest gratitude goes to our friends and department teachers’ for their support during the
time of work of this project.

vii
ABSTRACT

Automated doors have acquired and have become part of day to day life from residence to
office and to shopping complex as well as large industries. Automated doors are quite
common and a vast field of research now days. Many attempts are made to decrease the
manufacturing cost and achieve an efficient and inexpensive output. This project proposed an
implementation of automatic controller of door. The designed project is used for domestic
and industrial application. First the characteristics of the selected equipment (like PIR sensor,
Arduino, stepper motor, etc.) is investigated. Then the overall system is use a block diagram.
And also the desired program which is capable of controlling the designed system is
programmed through Arduino Uno IDE programming platform. The system is then
continuously tested. The Arduino Uno microcontroller is continuously monitored and
controlled the door position and movement according the sensed input from PIR sensor. The
designed system is made of PIR sensor that detect human presence, a dynamic display (LCD)
that displays different message at a specific time, the motor driver ICs that drives the stepper
motor attached to the door. The simulation outputs show the designed automatic door control
system is satisfactorily controlled the door. Finally, the hardware prototype results confirmed
that the simulation outputs are effectively implemented.

Key Words: - Arduino Uno microcontroller, LCD, PIR sensor and Stepper Motor.

viii
CHAPTER ONE

INTRODUCTION

1.1 Background

Security is the bigger concern for an individual or a firm. Recognizing the need of security is
a key element in securing critical infrastructure such as airports, ports, transportation hubs
and military infrastructures. Work schedule in modern time required fast and efficient
movement of personnel, goods, services and machineries. The door opening and closing is
placed between these schedules and plays a vital role in making the work environment
conductive. Doors are generally used to separate interior spaces (rooms, closets, etc.) for
provision, convenience, security, and other reasons. Doors have different design and style of
construction. Based on working operation, door can be sliding doors, revolving doors, swing
doors and rolling steel doors. Opening and closing of the doors have been always a tedious
job, especially in place where a person is always required to open the door for visitors. Here
is a solution to open and close the door i.e., movement sensed automatic door opening and
closing system [1, 9].

The automatic door was popularized by the supermarkets. This was started in the United
State as a result of the search to ameliorate the hardship experienced by shoppers. The
shoppers are explained by Halper included; pushing the door, pulling the door, and parking
the rolling basket carrier. This activity had one thing in common; they frustrated shopper at
least momentarily. He went further to add that a shopper approaches the exit door had no
choice but, to bring the shopping cart through with other. This action forced every shopper
behind him or her to come to a momentary but complete halt. When the store was busy, this
sequence of movements resulted in a long line of customer waiting for a chance to use the
exit door [4].

Automatic door opening and closing system is a simple automated system, where the door is
automatically detecting a person and automatically closes after some time. It is an automated
movable barrier installed in the entry of a room or building; provide ease of opening and
closing a door or provide visual privacy. The door are open by itself when any object comes
close to specific area opposite the door. In this case, no need to open the door manually with
a door handling. The hardware and software requirements mainly PIR sensor, Arduino Uno

1
microcontroller, motor driver circuits, stepper motor with sliding door, Proteus & Arduino
IDE software and other additional components are introduced [1].

2
Automatic door opening systems can be implemented using different sensors like infrared,
pressure, ultrasonic, laser etc.. It is based on sensing any body movement present nearby the
sensor. This is achieved with the help of a PIR sensor. PIR or passive infra-red sensor, as the
name indicates, does not emit infrared rays but only detects them. Generally, The PIR sensor
which continuously detects the object/motion by measuring changes in the infrared level
emitted by surrounding objects. All humans emit infrared radiations in the form of body heat.
A PIR sensor will capture the difference between the room temperature and body temperature
in the form of change in infrared radiation. This change in infrared pattern is converted to
voltage. The voltage from the data output of the PIR sensor can be given to connect to the
Arduino Uno, then converts the analog input to digital for processing within the written code.
When the body approaches within the operating range of the sensor, Arduino Uno sends a
logic command to open the door and the status of the door is shown in the LCD display.

Finally, by implementing this project to hardware, it regulates the opening and closing door,
speed and the direction of door travel depending up on a pre-programmed sequence of
Arduino Uno microcontrollers. In other words, microcontroller acts as a communication
medium for all the modules involved in the project.

1.2 Statement of the Problem

With the advancement and breakthroughs in technology over the years, the lives of people
have become more complicated and thus they have become busier than before. With the
adoption of our system, we can gain efficiency by use of manpower efficiency the man power
that was used for operating the door and posting them where they are much needed.

Most doors are controlled manually, especially by security personal that employed by the
organization, through the use of handles and locks with key to operate the locks. Opening and
closing of the doors have been always a tedious job, especially in place where a person is
always required to open the door for visitors. This project focused on designing a completely
automatic door access system. It’s making an efficient and precise door control for assisting
personnel on their day to day activity.

1.3 Objectives of the Project

1.3.1 General Objective

The main objective of this project is to design and control an automatic door opening and

3
closing system using microcontroller.

1.3.2 Specific Objectives

 To design and analyze of system.


 To develop a microcontroller program and implement.
 To simulate and analyze with the specified software.
 To develop a prototype.

1.4 Significates of the Project

 To reduce man power required.


 To make people life easier.
 To save wastage of time.
 To have easy access.

1.5 Scope of the Project

The PIR sensors are used to acquire data from the stepper motor and transfer the data they
acquire to Arduino microcontroller board. Finally, we give highest emphasis to the software
and implementation in order to develop a suitable algorithm that will promptly interact with
the microcontroller and the sensor. This contributes to develop an automated door control
system with user friendly access & no manual operations.

1.6 Limitation of the project

There is some limitation of the project are as follows: -


 There is no test bench to verify the correctness or model.
 Fluctuating of electric power and lack of internet access.
 The other is the global issues “COVID-19” that limited the relation between the group
members and also our advisor.
1.7 Methodology

The methodology of the project includes a different number works that are done to achieve
the goal of the system. There are few stages that will be involved in order to work out the
aimed objectives. There are:-

 Collect the theoretical information about Automatic door control system.

 Identify the required materials for the implementation of the project.

4
 Study about the properties and parameter of the identified device such as Arduino
microcontroller, PIR sensor, stepper motor, motor driver ICs and others.

 The system is designed using a block diagram and converted to Portus graphical
environment software.

 To develop the program using the selected Arduino IDE programming platform.

1.8 Organization of the Project

The project is organized into five chapters; the contents of these chapters are summarized as:
- Chapter 1: - Presents the background information of the system, and statement of the
problem, also describes the objectives of the project, Scope, Importance, Limitation and
Methodology of the project are also discussed. Chapter 2: - Focuses revision of related
literatures to this system. Chapter 3: - Theory of system & controller design of the overall
project. Chapter 4: - Explain briefly about simulation results and discussion. Chapter 5: -
Discuss about conclusion and recommendation for future work.

5
CHAPTER TWO

LITERATURE REVIEW

2.1 Introduction

A lot of literatures have been published in the field of automatic door opening & closing
system using different mechanisms. Their analyses initiated us to focus on automatic door
opening and closing techniques. They gave us also the basic guidelines and knowledge about
Arduino Uno microcontrollers, PIR sensor, stepper motor, motor driver ICs and other
available components

in this project. Here are some related literatures reviewed in order to succeed the proposed
project.

S. Lakshmi (2016) studied an intelligent door system and compared with conventional
automatic doors. In his investigation, he analyzed an intelligent door system that observes
people near a door so that the door opens at the proper time and only for people who have the
intention of passing through it. His experimental result showed that the controller integrating
with the sensor can control a door according to the speed of people within the required
specification and that it correctly identifies people passing by the door. Therefore, the
advantages are high precision, safely and reliable, but it is high cost has made it less popular
[1].

P. Narzary, et al. (2017) described the design and implementation of automatic controller for
the door. In their analysis, the door opens when any human movement is detected near the
door it detects with help of a PIR sensor detects the movement and sends a signal to the
transistor. They have also defined programmable microcontroller of PIC, the output signal
form the microcontroller is fed to the DC motor which is used to the open the door and close
the door. This is driven by a motor driver IC. The interrupt signals can be used to stop power
to the motor in the event of locked rotor motion [2].

L. Gautama, et al. (2013) derived model and design an automatic sliding door with a room
light control system. It improves some factors such as economy, availability of components
and research materials, efficiency, compatibility and portability and also durability in the
design process. The system works on the principle of breaking an infrared beam of light,
sensed by a photodiode. They have also consisted of transmitting infrared diodes and
6
receiving photo-diodes. The system is to detect whether someone is coming in or not. 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. They have also
defined microcontroller is pre-programmed to turn on the motors or supply required current
and voltage to motors only if the condition is fulfilled. Finally, they conclude the project gave
an insight into designing of an automated door just by using IR sensors. This helped in
reducing the cost spent in construction of automated doors [3].

D. Chomo, et al. (2018) described that the development of automatic door system and the
door was designed, developed and tested from materials selected and fabricated locally. It is
recommended the aluminum specifically designed for automatic door should be researched
into, designed and marketed by aluminum product manufacturer. They concluded low speed;
high torque electric motors designed and specifically for automatic door should also be
encouraged and long range motion sensor are not readily available the market. Therefore, the
design and manufacture of this component is an imperative [4].

A. Murtala (2015) studied a digital automatic swing door with a room light control system.
In his investigation, Microcontroller check when the output of sensor is high it turns the
motor on as the path between receiver and transmitter is broken due to some obstacle
between them. The microcontroller feeds the output to the motor driver. After providing the
output to run motor it must also give some delay that can be the time for the person to pass
through the door and after the body goes away it should also run motor anticlockwise to close
the door. Automatic door is an automated movable barrier installed in the entry of a room or
building to restrict access, provide ease of opening a door or provide visual privacy. Finally,
this is being achieved by various detection circuits available in the market. These detection
circuits vary from basic sensors like IR sensor, force sensors to complex and expensive vision
circuitry. The overall works was implemented with a constructed work, tested working and
perfectly function [5].

J. Chen et.al (2013) described an intelligent automated door control system based on a Smart
Camera. In their analysis paper presents an innovative access control system based on human
detection and path analysis, to reduce false automatic door system action while increasing the
added value of security application. The proposed system can be first identifying a person
from the scene, and track his trajectory to predict his intention for accessing the entrance, and
finally activates the door accordingly. The experiment result shows that the proposed system
7
has the advantage of high precision, safety, reliability, and can be responsive to demands,
while preserving the benefits of being low cost and high added values.

The passive approach detects the infrared signals radiated by people and is the most widely
used for being simple, effective, and low cost. This analyzes the returned signals for door
access control [6].

Shahera S.Petel (2015) derived the design and implement of stepper motor system based on
Internet of Things (IoT) due to the development of digital system. It presents the stepper
motor position control using DTMF (Dual Tone Multi Frequency) technology. IC MT8870 is
used which decodes the received technology. The PIC 16F628A microcontroller is used to
implement and process the control algorithm, when DTMF tone is received. The driver used
here for stepper motor is A3982SL. They have to perform high precision positioning
operations without any feedback sensor [7].

N. Bandagale et.al (2016) described automatic door locking system. In their analysis paper
gives ideas of how to control door security for smart home, especially for door key locks. It
also provides a security and easy for Android phone users. This project based on Android
platform which is free open source software. So the implementation rate is inexpensive & it is
reasonable by a common person. With the wireless Bluetooth connectors in microcontroller
permits the system installation is more easy ways [8].

Okomba et.al (2015) worked on the design and prototype implementation of an Arduino
microcontroller based liquid crystal display (LCD) system that uses a light dependent
resistor. The Arduino microcontroller was connected to the pins of an LCD programmed to
display a list of names continuously but one at a time. The developed system was tested and
found to meet the required specification [13].

Joan et al (2003) described a radio frequency communication for controlling stepper motor
through a PIC microcontroller. For remote communication, DTMF (Dual tone multi
frequency) signal can be replaced RF signal for the advantage of simplicity and audibility.
Stepper motor due to their positional accuracies &fast response, are now finding application
in computer peripherals, process control, machine tools and robotics. Stepper motors
especially being used in robotics and process control like silicon processing IC bonding and
laser trimming application where it is necessary to control the stepper motor from a remote
place [19].

8
Mazidi et al (2006) worked on the design that will assist in door operation management. This
approach is based on the application of motion detecting sensor and 8051 microcontrollers to
create an automatic door opening and closing control system in assisting shopping malls and
other commercial building. The system uses infrared detector to detect image based on the
temperature variants of the object. However, they cannot detect difference in the objects
which how a very similar temperature range which can lead to high inaccuracy [20].

A. David & M. Chinaze (2017) worked on the design and implementation of door locking
system using Android application. They present on a smart home controller that uses the
Bluetooth in an Android device to control the operation of an automatic security door system.
The system can be used in various situation where access to an enclosure need to be secured
[21].

2.2 Summary of Literature Review

Some of the Literatures have used an intelligent automatic door control system and they have
developed a laser scanner, smart camera but too high cost. Some of them used photo diode
and infra-red (IR), even if few of them used PIR and Dc motor.

However, this project use Arduino Uno microcontroller, PIR sensor, motor driver ICs &
stepper motor with sliding door opening and closing mechanism. It deals with an interesting
manner of automating process of opening and closing the door by detecting the presence of
human. So that it is a simple and low cost of automatic door opening system and also it has
lots of benefits such as conserve energy, reduces human efforts, and saves time.

9
CHAPTER THREE

THEORY OF THE SYSTEM

3.1 Block diagram of the system

The block diagram represents the overall of the project. The overall functioning of the project
is represented in a single block diagram as shown in figure 3.1.

LCD
Display

ARDUINO MOTOR MOTOR/


PIR
UNO DRIVER IC DOOR
SENSOR

LIMIT
SWITCH

Figure 3. 1: - Block diagram of the system


3.2 Description of the system

The hardware and software components mainly PIR sensor, Arduino Uno microcontroller,
motor driver circuits, stepper motor with sliding door other additional components and
switches are discussed.

Automatic door opening systems can be implemented using different sensors like infrared,
pressure, ultrasonic, laser etc. This project deals an interesting manner of automating the
process of opening and closing the door by presenting the presence of a human. It is based on
sensing any body movement present nearby the sensor. This is achieved with the help of a

10
PIR sensor. PIR or passive infra-red sensor, as the name indicates, does not emit infrared rays
but only detects them.

Generally, The PIR sensor which continuously detects the object/motion by measuring
changes in the infrared level emitted by surrounding objects. All humans emit infrared
radiations in the form of body heat. A PIR sensor will capture the difference between the
room temperature and body temperature in the form of change in infrared radiation. This
change in infrared pattern is converted to voltage. The voltage from the data output of the
PIR sensor can be given to connect to the Arduino Uno, then Arduino Uno converts the
analog input in to digital for processing within the written code. When the body approaches
within the operating range of the sensor, Arduino Uno sends a logic command to open the
door and the status of the door is shown in the LCD display.

Motor driver IC can allow the stepper motor to drive on any direction, both forward and
reverse direction. It is fed to Arduino Uno to operate a door motor through motor driver IC. If
the stepper motor rotates when a particular phase is energized and which taken digital signal,
then converts digital pulse in to mechanical rotation. So we can say that speed of rotation is
directly proportional to the frequency of pulse given by Arduino Uno. If there is no further
movement within the PIR operating range, interrupt signals are used through limit switch to
avoid locked rotor condition of the motor. When the object comes in to contact with the
actuator, the device operates to make or break an electric connection.

Finally, when a body reaches the operating range of the PIR sensor, it sends a signal to the
Arduino Uno to open and close the door. It will regulate the opening and closing door, speed
and the direction of door travel depending up on a pre-programmed sequence of Arduino Uno
microcontrollers.

3.3 Flow chart of overall operation

When a person approaches the door through the doorway, the system must detect the person
and open the door automatically. The door should stay open as long as the doorway is not
clear i.e. as long as the system detects a person.

The flowchart shows that which is step by step approach that was followed in the written
code of automatic door opening and closing control system program, which enables the
execution of command from the Arduino Uno microcontroller.

11
Start

No Detect
motion?
 
Yes
Opening the door

Display - “open”

Door fully No
open?

Yes
Display “close after
10 – sec”

Visitor still Yes


on sensor?

No
Close door

Display - “close”

End 12
Figure 3. 2:- Flow chart of overall operation

13
3.4 Components of system design

The following components are to be considered to implement and design the system. In this
section some components will be discussed in detail.

PIR Sensor ARDUINO Stepper Motor


UNO

Limit switches Motor driver IC

LCD display
Power Supply

.
Figure 3. 3: - Components used to design the system

Arduino UNO

Arduino is a microcontroller board based on the microchip ATmega328. It has 14 digital


input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz
ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button. It
contains everything needed to support the microcontroller. We can connect it to a computer
with a USB cable or power it with an AC-to-DC adapter or battery to get started. It is an open
source electronics platform based on easy to use hardware and software. Arduino boards are
able to read inputs-light on a sensor, a finger on a button, or a twitter message and turn it an
output-activating a motor turning on LED. Arduino is an open source programmable circuit
board that can be integrated in to wide variety of maker space projects both simple and
complex. This board contains a microcontroller which is to able to be programmed to sense
and control objects in the physical world. Arduino simplifies the process of working with
microcontrollers, but it offers some advantages:

Inexpensive: - Arduino boards are relatively inexpensive compared to other microcontroller


platform.

Cross- platform: - the Arduino software runs on windows, Macintosh and Linux operating
system. Most microcontroller systems are limited to window.

14
Simple and clear programming environment: - the Arduino software/IDE/ is easy to use for
beginner, yet flexible enough for advance users to take advantages of as well.

Pin Conf igurati
Figure 3. 4: - Functional pin diagram of Arduino UNO [22]
on

Reset Button – This will restart any code that is loaded to the Arduino board.

AREF – Stands for “Analog Reference” and is used to set an external reference voltage.

Ground Pin – There are a few ground pins on the Arduino and they all work the same.

Digital Input/output – Pins 0-13 can be used for digital input or output.

PWM – The pins marked with the (~) symbol can simulate analog output.

USB Connection – Used for powering up your Arduino and uploading sketches.

TX/RX – Transmit and receive data indication LEDs.

AT mega Microcontroller – This is the brains and is where the programs are stored.

Power LED Indicator – This LED lights up anytime the board is plugged in a power source.

Voltage Regulator – This controls the amount of voltage going into the Arduino board.

DC Power Barrel Jack – This is used for powering your Arduino with a power supply.

3.3V Pin – This pin supplies 3.3 volts of power to your projects.

5V Pin – This pin supplies 5 volts of power to your projects.

Ground Pins – There are a few ground pins on the Arduino and they all work the same.

Analog Pins – These pins can read the signal from an analog sensor and convert it to digital.

Stepper motor

15
Stepper motor is an electromechanical device whose function is to convert electrical power in
to mechanical energy. Also it is a synchronous electric motor that can divide a full rotation in
to an expansion number of steps. The motor’s position can be controlled accurately and
efficiently without any feedback mechanism, as long as the motor is carefully sized to the
specific application. Stepper motors are similar to earlier motor but has additional
capabilities.

Basics of stepper motor

The stepper motor makes the motor to take shaft turn an accurate distance when the pulse
of electricity is provided. Once power is applied, the motor runs itself at a speed
proportional to the voltage and the load. For the stepper motor there is no commentator.
Instead there are 5/6 wire coming out of the motor. It is brushless DC motor which takes
digital signals. It converts digital pulses into mechanical shaft rotation. Rotation is divided
into steps and a separate pulse is sent for each step.

For each pulse motor rotates a few degrees which are mostly 1.8degree angle. As we
interface it with controller, so when digital pulses increase in frequency, the stepping
movement of motor converts to continuous rotation of motor. So we can say that speed of
rotation is directly proportional to the frequency of pulses given by controller. For more
reason stepper motors are the motor of choice for many precision motor control
applications.

One of the first advantages is effective positioning. For precise positioning of stepper
motor can be determined by specific step and motor rotates to required position without
encode.

Figure 3. 5: - Internal part of stepper motor [10]

16
Feature of stepper motor

 It has no brushes.
 Its performance does not depend on the load.
 Can be controlled in open loop method effectively (the rotation angle of the
motor is proportional to the digital input pulse).
 Excellent response to starting/stopping/reversing methods.
 Its relatively inexpensive and simple construction.

PIR sensor

PIR sensors allow you to sense motion, almost always used to detect whether a human has
moved in or out of the sensors range. They are small, inexpensive, low power, easy to use.
For that reason, they are commonly found in appliances and gadgets used in homes or
businesses. They are often referred to as PIR, "Passive Infrared", "Pyro electric", or “IR
motion" sensors.

Working principle of PIR Sensor

A PIR or Passive Infra-Red Sensor, as the name indicates, doesn’t emit infrared rays but
only detects them, and also detects motion. The object emits infrared radiations in the form
of body heat. A PIR Sensor will capture the difference between the surrounding
temperature and body temperature in the form of change in infrared radiation. This change
in infrared pattern is converted to a voltage. The voltage from the Data Out of the PIR
Sensor can be given to a microcontroller for further processing like controlling the stepper
motor.

PIRs are basically made of a pyro electric sensor, which can detect levels of infrared
radiation. Everything emits some low level radiation, and the hotter something is, the more
radiation is emitted. The sensor in a motion detector is actually split in two halves. The
reason for that is that we are looking to detect motion (change) not average IR levels. PIR
sensor is one example which constitutes detectors of motion. A combination of Fresnel
lens, amplifier circuitry, comparator, and time delayer circuitry forms the basic structure of
PID (Passive Infrared Device), PIR sensor being the critical component. Fresnel lens is a
special filter which focuses infrared signals onto the component. It consists of a number of
concentric grooves that changes the direction of light. The lens is designed to collect
energy, focus and disperse light, and collimation.
17
Figure 3. 6: - PIR sensor [24]

Motor driver circuit

The L293D is popular 16 pin motor driver IC. As the name suggest it is mainly used to
drive motors. A single L293D is capable of running two stepper motors at the same time;
also the direction of these motors can be controlled independently, both forward and
reverse direction. Motor driver ICs are primarily used in autonomous robotics only & most
of microcontrollers operate at low voltage and required a small amount of current to
operate while the motors require a relatively higher voltage and current. Thus, current
cannot be supplied to the motor from the microcontroller.

This is the primary need for the motor driver IC. The L293D IC receives signals from the
microcontroller and transmits the relative signal to the motors. It has two voltage pins, one
of which is used to draw current for the working of the L293D and the other is used to
apply voltage to the motors. The L293D switches it output signal according to the received
from the microcontroller. Motor drivers act as current amplifiers since they take a low
current control signal and provide a higher current signal which drives the motors. It can
drive two motors simultaneously in its common mode, both in forward and reverse
direction. L293D Motor Drive is available in 16-pin Dual in-line Package.

Features: -

 Speed and direction control is possible


 Motor voltage V max: - 4.5 -36v
 Motor current: - 1.2A
 Automatic thermal shutdown is available.

Applications: -

18
 Used to drive high current motors using digital circuits
 Used to drive steeper motors.
 High current LEDs can be driven.

Figure 3. 7: - Pin diagram of L293D motor driver ICs [Wikipedia]


LCD display

LCD (Crystal Liquid Display) is a flat panel display or electronic visual display that uses
the light- modulating properties of liquid crystals. A 16*2 LCD display is very basic
modules and is very commonly used in various device and circuits. These modules are
prepared over seven segments and other multi segments LED’s. The reason being LCD are
economical, easily programmable, has no limitation of displaying special and even custom
characters, animation and so on. A 16*2 LCD display means it can display 16 characters
per line and there are 2 such lines. In this each characters are displaying in 5*7-pixel
matrix. This LCD has two registers namely command and data.

Figure 3. 8: - Pin diagram of LCD

19
Limit Switch

Limit switch is the most commonly used electronic components. It is an electromechanical


device that consists of an actuator mechanically linked to a set of contacts. When the object
comes in to contact with the actuator, the device operates to make or break an electric
connection. It used in a situation where need to define the limits. It can have used as in the
same as the normal pushbuttons.

Figure 3. 9: - Limit switch [Wikipedia]

3.5 Regulated power supply

A regulated power supply converts unregulated AC (Alternating Current) to a constant DC


(Direct Current). It is used to ensure that the output remains constant even if the input
changes. The regulated power supply will accept an AC input and give a constant DC
output. The figure 3.10 shows that the block diagram of a typical regulated DC power
supply.

The Arduino Uno microcontroller, motor driver ICs and PIR sensor are get regulated
power supply to prevent them from damage.

Power supply unit

Sensing unit Control unit Motor unit

Figure 3. 10: - Block diagram for the regulated power supply unit

20
3.6 Controller Design

There are softwares that presented and discussed to show results of the proposed automatic
door control system using microcontroller. The first one is used to show and compare
different results of the system and how the controller makes the output to truck the
reference input. Proteus on the other hand, is used to testify how Arduino microcontroller is
used to control the whole system.

3.7 Software Development Tools

1. Proteus Software

The Proteus software is a circuit making and simulation window bade software. It is
software for microcontroller simulation, schematic capture, and printed circuit board (PCB)
design. Proteus is simulation software which enables us to see if the code that has been
written serves the intended purpose. The Proteus software enables us to draw the circuit of
the particular project including all the passive and active components required to make the
circuit work.

2. Arduino program:

The Arduino Uno 1.8 window is a type of software which is used to program the Arduino.
The HEX code generated by the software is then fed to the microcontroller. The Arduino
IDE (Integrated Development Environment) software it opens into a blank sketch where we
can start programming immediately.

3. Microsoft word for documentation

3.8 Circuit diagram of Automatic door control system

The circuit diagram shows the design of automatic door opening and closing system. The
components used are PIR sensor, Arduino UNO, L293D motor drive IC & stepper motor &
other available components are used

21
LCD1
0 LM016L

ARD1

ON
Reset BTN

VDD
VSS

VEE

RW
www.TheEngineeringProjects.com

RS

D0
D1
D2
D3
D4
D5
D6
D7
E
www.TheEngineeringProjects.com
TestPin
AREF

1
2
3

4
5
6

7
8
9
10
11
12
13
14
13
PB5/SCK
12
RESET PB4/MISO
11
~PB3/MOSI/OC2A
10
VCC ~PB2/SS/OC1B R1
9

GND OUT Vcc


GND ~ PB1/OC1A 8 1k
PB0/ICP1/CLKO

ATMEGA328P-PU
1121
7

ANALOG IN
PD7/AIN1
6 6
A0 ~ PD6/AIN0
PC0/ADC0
~ PD5/T1 5 5
A1
PC1/ADC1 4
A2 PD4/T0/XCK
PC2/ADC2 3
A3 ~ PD3/INT1
A4
PC3/ADC3
PD2/INT0
2
16 8 U1
PIR1 A5
PC4/ADC4/SDA
TX PD1/TXD
1
PIR SENSOR2 PC5/ADC5/SCL 0
RX PD0/RXD 2 3
IN1 VSS VS OUT1
7 6
IN2 OUT2
1
ARDUINO UNO EN1

9
EN2
10 11
IN3 OUT3

GND
15 14 +88.8
IN4 OUT4

L293D

R2
1k

Limit switch when open Limit switch when close


R3
1k

Figure 3. 11: - Circuit diagram of Automatic door control system


3.9 Interfacing of Hardware components

It shows the interfacing of PIR sensor, stepper motor, limit switch, LCD and motor driver
IC with the Arduino Uno microcontroller.

Interfacing PIR Sensors

We have PIR sensor and each have three pins (Vcc, OUT, GND). The OUT pin is
connected to the Arduino Analog inputs. In our case PIR are connected to A0 pins of
Arduino Uno. Then in simulation the test pin of PIR sensor is connected to Logic State
because we need only if the motion is available1 and if it is not we receive 0.

Interfacing of LCD

RS pin of the LCD module is connected to digital pin 13 of the Arduino. R/W pin of the
LCD is grounded. Enable pin of the LCD module is connected to digital pin 12 of the
Arduino. In this project, the LCD module and Arduino are interfaced in the 4-bit mode.
This means only four of the digital input lines (DB4 to DB7) of the LCD are used. This
method is very simple, requires less connections and you can almost utilize the full
potential of the LCD module. Digital lines DB4, DB5, DB6 and DB7 are interfaced to
digital pins 11, 10, 9 and 8 of the Arduino. The 1K potentiometer is used for adjusting the
contrast of the display.

22
Stepper Motor and Motor Driver IC

One steeper motor Driver L293D module is interfaced with Arduino to drive stepper motor.
It is connected to the Arduino Uno 3, 2, 5 and 6 pins and L293D module pins IN1, IN2,
IN3 and IN4 respectively. Then the Stepper Motor also connected to the L293D module
pins OUT1, OUT2, OUT3 and OUT 4 and stepper pins A+, A-, B+ and B- pins
respectively. The ENA and ENB pins of L293D pins are junked to Vcc.

Interfacing Limit switch: - connected with Arduino UNO pin 4 and ground. The other
limit switch is also connected with Arduino Uno pin 7 and ground.

Application areas
LCD1
0 LM016L

 The ARD1
design can
ON
Reset BTN

VDD
VSS

VEE

RW
www.TheEngineeringProjects.com

RS

D0
D1
D2
D3
D4
D5
D6
D7
E
www.TheEngineeringProjects.com
TestPin

1
2
3

4
5
6

7
8
9
10
11
12
13
14
AREF
13
PB5/SCK
12
RESET PB4/MISO
11
~PB3/MOSI/OC2A
10
VCC ~PB2/SS/OC1B R1
9
GND OUT Vcc

GND ~ PB1/OC1A 8 1k
PB0/ICP1/CLKO
ATMEGA328P-PU
1121

7
ANALOG IN

PD7/AIN1
6 6
A0 ~ PD6/AIN0
PC0/ADC0
~ PD5/T1 5 5
A1
PC1/ADC1 4
A2 PD4/T0/XCK
PC2/ADC2 3
A3
PC3/ADC3 ~ PD3/INT1
A4 PD2/INT0
2
16 8 U1
PIR1 A5
PC4/ADC4/SDA
TX PD1/TXD
1
PIR SENSOR2 PC5/ADC5/SCL 0
RX PD0/RXD 2 3
IN1 VSS VS OUT1
7 6
IN2 OUT2
1
ARDUINO UNO EN1

9
EN2
10 11

be implemented
IN3 OUT3

GND
15 14 0.00
IN4 OUT4

L293D

in various place R2
1k

like shopping malls,


hotels and theaters where a person Limit switch when open Limit switch when close
R3
1k

is always required to open the door for visitors.

Figure 3. 12: - Circuit diagram of Interfacing the component

 It is also helpful for the disability person so that he/she could easily come in &
out without opening the door.
 It can be used in hospitals for the patients.

CHAPTER FOUR

SIMULATION RESULTS AND DISCUSSION

4.1 Introduction

Proteus is very popular software for simulating the circuit in addition it also providing the
flexibility for PCB designing. Proteus can also be very efficiently used for simulating the
circuit with Arduino development board as the microcontroller. Then we will follow the

23
standard approach for simulating circuit. The program for Arduino Uno microcontroller
was written in C language and the compiled in to an executable file using the Arduino IDE.
The executable file was next imported in to the Proteus design suite IDE.

The software design shows which is step by step approach that was followed in written
code of automatic door control system program, which enables the execution of command
from the Arduino Uno microcontroller.

The entire operation of the software section of the project is centered on the Arduino Uno
that has been programmed. Up on power ON the LCD initializes its program by displaying
“Automatic door opener” in figure 4.1

LCD1
LM016L
VDD
VSS

VEE

RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
E
1
2
3

4
5
6

7
8
9
10
11
12
13
14

Figure 4.1: - Initialization of Automatic door opener

When the PIR sensor which continuously detects the object/motion by measuring changes
in the infrared level emitted by surrounding objects. The Arduino Uno cannot provide
enough

current to run the motor and if you connect the motor to the microcontroller directly, you
may damage the microcontroller. To solve this, we should use a motor driver L293D.

Motor drivers is connected to the microcontroller to receive commands and run the motor
with a high current also it is a module for motors that allows to control the working speed
LCD1
and direction of two motors simultaneously depend on the program. With the help of
LM016L

24
VDD
VSS

VEE

RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
E
1
2
3

4
5
6

7
8
9
10
11
12
13
14
L293D motor driver the stepper motor rotates to clock wise direction until the door reach to
limit switch. Finally, the Arduino command to the LCD “Movement detects & Gate
opening” message is displaying as figure 4.2 shown.

Limit switch detect the presence of moving object when the door reaches a desired location
it became close and it break an electrical connection. As the door touches the limit switch,
the motor is controlled by the program. The door detection limit, closing signal output of
the motor, to avoid when the door is fully open, motor movement. This time two limit
switches are in opposite direction. Arduino command to the LCD “Gate close After 10
sec” is shownLCD1
in figure 4.3.
LM016L
VDD
VSS

VEE

RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
E
1
2
3

4
5
6

7
8
9
10
11
12
13
14
Figure 4. 2: - Door opening operation in automatic door opener
When the
door is opened, it is judged by Arduino and remains open until there is no one on

the door. If there is no one on the door or after the LCD counted 10 second, Arduino notify

the motor as a reverse movement, in a short time to automatically closing the door.

“Gate closing” shows in the LCD display in figure 4.4 shown. In the closing process, if
someone close to the probe, Arduino automatically switch to the state of the door this time

both of theLCD1
limit switches are open.
LM016L
VDD
VSS

VEE

RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
E
1
2
3

4
5
6

7
8
9
10
11
12
13
14

Figure 4.4: - Door closing operation in automatic door opener

25
If there is no further movement within the PIR operating range, interrupt signals are used
through limit switch to avoid locked rotor condition of the motor, the two of limit switch is
in opposite direction then Arduino write to displaying “NO movement & Gate closed” in
shown figure 4.5.

Once the setup is done the PIR sensor is ready to detect the human movement within its
range. At this time, the Arduino to display the message on the LCD display. A door opener
message is displayed on the LCD; the door remains open as long as the data out from the
PIR sensor is HIGH. When there is no movement the data out of the PIR sensor becomes
LOW. Once the data out is low, after 10 seconds time delay, the door is automatically
closed and comes back to initial position.

LCD1
LM016L
VDD
VSS

VEE

RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
E
1
2
3

4
5
6

7
8
9
10
11
12
13
14

CHAPTER FIVE

CONCLUSION, RECOMMENDATION AND FUTURE WORK

5.1 Conclusion

This project discussed a simple design and prototype implementation of automatic door
opening and closing system where PIR sensor serves the main input function and here
Arduino microcontroller is the main controllers of the whole system. This system uses
sensors for monitoring the surrounding with a means of detecting incoming traffic so as to
open the door as required, thus the design and operational principles of a microcontroller
based automatic door for the visitors. Advantages of Arduino over the PIC microcontrollers
are easy & use friendly architecture, good for quick for prototyping, no need of external
programmer and vast numbers of libraries are there.
26
Finally, concluded that this is a simple and low cost architecture of automatic door control
where the door is automatically opened up on detecting a person and automatically closes
after some time. It having lots of benefits of such as conserve energy, reduce human
efforts, save times and etc. This contributes to develop an automated door control system
with user no manual operations.

5.2 Recommendations

The main motivation for this project was to make the door control as automated as possible
for the purpose of efficiency and we recommend to make it more about security because in
our world security breach are very much concerning for big institutions so that in order to
make it more secure door control system use finger print security system.

5.3 Future work

The better sensor is recommended to achieve new functionally. For instances, a suitable
sensor such as ultrasonic sensor that could detects good in any vehicles. When
implemented an effective system then there can be a display unit for showing number of
persons entered in a particular room along with this system. It can also use face detector
through camera for automatic attendance system.

REFERENCES

[1] Sangeetha Lakshmi. & G.Arun Kumri.G, “Intelligent automatic sliding door robot
control system ’, volume 3 issue4, July-Aug (2016).

[2] P. Hazaika, C.Erahm, B.Narzary. “Design and implement of automatic controlled


door system” vol.3 Issue.5. Sep-Oct. (2013).

[3] Lucky Gautam ,Chinoy Sharma &Akshaj. Arora, P. yadav “Developing infrared
automatic sliding door with a room light control system” (2013).

[4] D.I.G.Chomo, D.S.Yawas, Z.S.Johnson “Development of an automatic door system”


volume-7, issues-5 pp 168-173, (2018).

[5] Adamu Murtala, “A digital automatic sliding door with a room light control system’’
(2015).

[6] Jie-Ci Yang, Chin-Lun Lai, Hsin-TengSheu and Jiann-jone Chen.“An intelligent
automated door control system based on a Smart Camera’’ (2013).

27
[7] Shahera S. Petel, “Stepper motor precise position control system using DTMF
technology’’, international journal on recent and innovation trends in computing &
communication, ISSN: 2321-8169, volume: 3, Issue: 5(2015).

[8] NeelamMajgaoker, RohinaHodekar&proypankBandagale, “Automatic door locking


system”, volume 4, ISSUE 1, ISSN 2321-9939, (2016).

[9] Fernandez, E.B, Ballesteros, “Physical Access control administration using building
information models”, (2012).

[10] Jens - Peter Kaps, “STEPPER MOTOR SPEED AND POSITION CONTROL”.
George Mason University, (2011).

[11] Sri Krishnadevaraya University, Andhra Pradesh, India “IoT Based Stepper Motor
Position Control for Industrial Automation”.Department of Instrumentation, (2017).

[12] Sanner H. Mahmood, Ayad M. Kwad, Safa F. Abass,“a physical security of the
door”(2014).

[13] Okamba N, Adeyanju O, Omodunb BI, & Okwor C ; Prototyping of an Arduino


micro- controlled digital display system; (2015).

[14] L. N. Roshanna and N. R. Konduru. “IoT Based Stepper Motor Position Control for
Industrial Automation”. American Journal of Science, Engineering and Technology.
Vol. 2, No. 4, 2017, pp. 106-111. doi: 10.11648/j.ajset.20170204.12

[15] Sanner H. Mahmood, Ayad M. Kwad, Safa F. Abass,“a physical security of the
door”(2014).

[16] Okamba N, Adeyanju O, Omodunb BI, & Okwor C ; Prototyping of an Arduino


micro- controlled digital display system; (2015).

[17] Y. Xua and Y. W. Zhengzhou “Control System Design of Automatic Door Based on
PLC” University of Industrial Technology(2011)

[18] OladunmoyeM. And Oluwatomi.A.A “Design and construction of an automatic


sliding door using infrared sensor” Lead city University,2014.

[19] Nnamdi S. Okamba :“design of an automatic window using a PIC microcontroller


and stepper motor”, FUOYE engineering and technology, volume 2, issue 2,
September (2014).

[20] Mazidi M.A, J.G, and Mckinlay R.D:“The 8051 microcontroller and embedded

28
system”, Prentice Hall, INDIA, (2006).

[21] Agbo David O., Maduukw chinaza, Odinya & Jotham O; “Design and
implementation of door locking system using Android aplication”, volume 6, ISSUE
08, August (2017).

[22] P. D.maya, “PIR Sensor Based Security System”, June (2013)

[23] Https://www.circuitdigest.com/Microcontroller-proiect/automatic-door-opener'-
Project-Using-Arduino.

[24] Https://www.en.wikipidea,org/wiki/passive-infrared-sensor.

APPENDIX

Appendix A: Arduino Uno programming code

#include <Stepper.h>

#include <LiquidCrystal.h>

LiquidCrystallcd(13, 12, 11, 10, 9, 8);

#define pir A0

#define limit_switch_1 4

#define limit_switch_2 7

int temp=0; int temp2=0;

constintstepsPerRevolution = 20;

Stepper stepper(stepsPerRevolution, 3, 2, 5, 6);

int speed1=30;

intStepper_step=2;
29
void setup() {

// put your setup code here, to run once:

Serial.begin(9600);

lcd.begin(16, 2);

pinMode(pir,INPUT);

pinMode(limit_switch_1,INPUT);

pinMode(limit_switch_2,INPUT);

lcd.setCursor(0,0);

lcd.print(" Automatic ");

lcd.setCursor(0,1);

lcd.print(" Door Opener ");

delay(3000);

void loop() {

if(digitalRead(pir))

lcd.setCursor(0,0);

lcd.print("Movement Detected");

lcd.setCursor(0, 1);

lcd.print(" Gate Opening ");

temp=digitalRead(limit_switch_1);

while (temp==0){

stepper.setSpeed(speed1);

stepper.step(Stepper_step);

temp=digitalRead(limit_switch_1);

30
for(inti=10;i>0;i--){

lcd.clear();

lcd.setCursor(0,0);

lcd.print(" Gate Close ");

lcd.setCursor(0,1);

lcd.print(" After ");

lcd.setCursor(9,1);

lcd.print(i);

lcd.setCursor(12,1);

lcd.print("Sec");

delay(500);

lcd.clear();

lcd.clear();

lcd.print(" Gate Closing ");

temp2=digitalRead(limit_switch_2);

while (temp2==0){

stepper.setSpeed(speed1);

stepper.step(-Stepper_step);

temp2=digitalRead(limit_switch_2); //gate closed

else

lcd.setCursor(0,0);

lcd.print(" No Movement ");

31
lcd.setCursor(0,1);

lcd.print(" Gate Closed ");

}
THE END

32

You might also like