Automatic Door Operating System Using PIR
Sensor
A project report submitted for the End Semester Examination of 6th Semester, 3rd year, Dept. of
Electrical Engineering
Submitted by-
Names Enrolment Number Registration Number
Anupam Das 12020002011005 201040101610017 of 2020-21
Sumana Roy 12020002011007 201040101610003 of 2020-21
Bitan Ghosh 12020002011017 201040101010010 of 2020-21
Deepjeet Roy 12020002011023 201040101610011 of 2020-21
Anushree Ray 12020002011043 201040101610030 of 2020-21
Department of Electrical Engineering
Institute of Engineering & Management
Y-12, Salt Lake, Sector-V, Kolkata-700091
Affiliated To:
Maulana Abul Kalam Azad University of Technology
BF-142, Salt Lake, Sector I, Kolkata -700064
Under the Guidance of
Dr. Mandakinee Bandhyopadhyay
Assistant Professor, Dept. of Electrical Engineering, IEM, Kolkata
CERTIFICATE
TO WHOM IT MAY CONCERN
This is to certify that the project report entitled Automatic Door Operating System
Using PIR Sensor is submitted by
1. Anupam Das Reg. No.: 201040101610017 of 2020-21
2. Sumana Roy Reg. No.: 201040101610003 of 2020-21
3. Bitan Ghosh Reg. No.: 201040101010010 of 2020-21
4. Deepjeet Roy Reg. No.: 201040101610011 of 2020-21
5. Anushree Ray Reg. No.: 201040101610030 of 2020-21
Students of INSTITUTE OF ENGINEERING & MANAGEMENT, in partial fulfilment of
requirements for the award of the degree of Bachelor of Technology in Electrical Engineering, is a bona
fide work carried out under the supervision and guidance of Dr. Mandakinee Bandhyopadhyay during
the pre-final year of the academic session of [Link] content of this report has not been submitted
to any other University or Institute for the award of any other degree.
It is further certified that work is entirely original and its performance has been found to be quite
satisfactory.
___________________________________ ___________________________________
Prof. Mandakinee Bandyopadhyay Prof. Subhajit Kar
Assistant Professor, H.O.D
Dept. of Electrical Engineering Dept. of Electrical Engineering
Institute of Engineering and Management Institute of Engineering and Management
ACKNOWLEDGEMENT
We should like to take this opportunity to extend our gratitude to the following revered persons
without whose immense support, completion of this project wouldn’t have been possible. We
are sincerely grateful to our advisor and guide Dr. Mandakinee Bandhyopadhyay of the
Electrical Engineering department, IEM Kolkata, for his/her constant support, significant
insights and for generating in us a profound interest for this subject that kept us motivated during
the entire duration of this project. We would also like to express our sincere gratitude to Prof.
Dr. Satyajit Chakrabarti (Director, IEM), Prof. Dr. Arun Kumar Bar (Principal, IEM) and Prof.
Subhajit Kar, HOD of Electrical Engineering Department and other faculties of Institute of
Engineering & Management, for their assistance and encouragement. Last but not the least, we
would like to extend our warm regards to our families and peers who have kept supporting us
and always had faith in our work.
Anupam Das Sumana Roy Bitan Ghosh
Deepjeet Roy Anushree Ray
ABSTRACT
We have designed this project entitled " Automatic Door Operating System Using PIR Sensor”
with a simple design. The main motto of this project is to utilization of sensor with combination
of embedded equipment for the door opening systems.
Here we describe the design and implementation of automatic controller for the door. There are
various kinds of sensors are available in the market to make such types of systems such as
Radar sensors, PIR sensors, Infrared sensors and Laser sensors, etc. This project uses a PIR
sensor. 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, in turns gives
interrupt signal to a programmable microcontroller, the output signal form the microcontroller
is fed to the Servo motor which is used to open the door and close the door, which 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 condition
The automatic door opening systems are used in commercial buildings, shopping malls,
theatres, etc. which senses the infrared energy produced by the human body.
Key Words: Automatic Door, PIR Sensor, Infrared Sensor, Laser Sensor, Microcontroller, Servo
Motor
CONTENTS
Chapter 1: Introduction
Chapter 2: Overview of project
2.1. List of Components
2.2. Circuit Diagram
2.3. Block Diagram
2.4. Flow Chart
Chapter 3: Details of components and software used
3.1. Arduino UNO R3
3.2. Servo motor mg996R
3.3. PIR sensor
3.4. Led
3.5. Jumper cable
3.6. Software
Chapter 4: Hardware Implementation and Result
Chapter 5: Applications
Chapter 6: Discussion
Chapter 7: Future Developments
Chapter 8: Conclusion
Chapter 9: Reference
Chapter 1
INTRODUCTION
Opening and closing of doors have been always a boring job, especially in places where a
person always required to open the door for visitors such as hotels, shopping malls and theatres.
Here is a solution to open and close the door i.e., movement sensed automatic door opening
and dosing system. This project is based on sensing any body movement present nearby the
sensor This is achieved with the help of a passive infrared sensor. Generally, a human body
emits infrared energy which is detected by the PIR sensor from a particular distance. This signal
which is detected by the sensor is fed to a controller to function a door motor through motor
driver IC. When a body reaches the operating range of the PIR sensor, it sends a signal to the
microcontroller to open and close the door.
A microprocessor controlled automatic door opener including means for detecting the velocity
and direction of travel of the door. The micro-controller evaluates detected changes in either
the velocity or direction of travel to determine the cause, and either reverses door travel
direction or ores the detection. The settings of the door are stored in the memory of the
microprocessor The microcontroller will regulate the opening and closing speed and the
direction of door travel depending upon a pre-programmed sequence. The door control
mechanism is able to differentiate between these internal factors and external obstructions.
Chapter 2
Overview of Project
List of components:
1. Arduino Uno R3
2. Servo motor mg996R
3. PIR sensor
4. Led
5. Jumper cable
6. Cardboard box (for display of prototype)
7. Miscellaneous (Paint, Cover paper, etc)
Circuit Diagram:
Fig.1 Circuit Diagram of Automatic Door Operating System using PIR Sensor
Block Diagram:
Fig.2 Block Diagram of Automatic Door Operating System using PIR Sensor
Flowchart:
Fig.3 Flowchart of Automatic Door Operating System using PIR Sensor
Chapter 3
Details of components and software used
3.1. Arduino Uno R3
Arduino UNO is a microcontroller board based on the ATmega328P. 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; simply connect it to a computer with a USB
cable or power it with a AC-to-DC adapter or battery to get started. You can tinker with your
UNO without worrying too much about doing something wrong, worst-case scenario you can
replace the chip for a few dollars and start over again.
Table 1: Specifications of Arduino UNO
Name Arduino UNO R3
Board
SKU A000066
Microcontroller ATmega328P
USB connector USB-B
Built-in LED Pin 13
Digital I/O Pins 14
Pins
Analog input pins 6
PWM pins 6
UART Yes
Communication I2C Yes
SPI Yes
Power I/O Voltage 5V
Input voltage (nominal) 7-12V
DC Current per I/O Pin 20 mA
Power Supply Connector Barrel Plug
Main Processor ATmega328P 16 MHz
Clock speed
USB-Serial Processor ATmega16U2 16 MHz
2KB SRAM, 32KB
Memory ATmega328P
FLASH, 1KB EEPROM
Weight 25 g
Dimensions Width 53.4 mm
Length 68.6 mm
Fig. 4 Pin diagram of Arduino Uno
3.2. Servo motor mg996R
A servo motor is a closed-loop system that uses position feedback to control its motion and
final position. There are many types of servo motors and their main feature is the ability to
precisely control the position of their shaft. In industrial type servo motors the position
feedback sensor is usually a high precision encoder, while in the smaller RC or hobby servos
the position sensor is usually a simple potentiometer. The actual position captured by these
devices is fed back to the error detector where
it is compared to the target position. Then
according to the error, the controller corrects
the actual position of the motor to match with
the target position.
There are four main components inside of a
hobby servo, a DC motor, a gearbox, a
potentiometer and a control circuit. The DC
motor is high speed and low torque but the
gearbox reduces the speed to around 60 RPM Fig.5 Working of Servo Motor
and at the same time increases the torque. The potentiometer is attached on the final gear or
the output shaft, so as the motor rotates the potentiometer rotates as well, thus producing a
voltage that is related to the absolute angle of the output shaft. In the control circuit, this
potentiometer voltage is compared to the voltage coming from the signal line. If needed, the
controller activates an integrated H-Bridge which enables the motor to rotate in either
direction until the two signals reach a difference of zero.
A servo motor is controlled by sending a series of pulses through the signal line. The
frequency of the control signal should be 50Hz or a pulse should occur every 20ms. The
width of pulse determines angular position of the servo and these types of servos can usually
rotate 180 degrees (they have a physical limits of travel).
Generally, pulses with 1ms duration correspond to 0 degrees position, 1.5ms duration to 90
degrees and 2ms to 180 degrees. Though the minimum and maximum duration of the pulses
can sometimes vary with different brands and they can be 0.5ms for 0 degrees and 2.5ms for
180 degrees position.
Table 2: Specifications of Servo Motor
3.3. PIR sensor
HC-SR501 PIR sensors allow you to sense motion. They are used to detect whether a human
has moved in or out of the sensor’s range. They are commonly found in appliances and gadgets
used at home or for businesses. They are often referred to as PIR, "Passive Infrared",
"Pyroelectric", or "IR motion" sensors. the term “passive” means that sensor is not using any
energy for detecting purposes, it just works by detecting the energy given off by the other
objects.
Following are the advantages of PIR Sensors −
• Small in size
• Wide lens range
• Easy to interface
• Inexpensive
• Low-power
• Easy to use
• Do not wear out Fig.6 PIR sensor
Fig.7 PIR sensor components
PIRs are made of pyroelectric sensors, a round metal can with a rectangular crystal in the
center, which can detect levels of infrared radiation. A special lens called a fresnel lens which
Focuses the infrared signals on the pyroelectric sensor.
Everything emits low-level radiation, and the hotter something is, the more radiation is emitted.
The sensor in a motion detector is split in two halves. This is to detect motion (change) and not
average IR levels. The two halves are connected so that they cancel out each other. If one-half
sees more or less IR radiation than the other, the output will swing high or low.
PIRs have adjustable settings and have a header installed in the 3-pin ground/out/power pads.
Fig.8 Operation of PIR Sensor
For many basic projects or products that need to detect when a person has left or entered the
area, PIR sensors are great.
Table 3: Specification of PIR Sensors
Operating Voltage 4.5 – 20V (typically 5V)
Maximum Current Draw < 2mA
Time Delay ~ 1 sec to 3 min
Detection Distance 3 – 7 meters (9 – 21 feet)
Detection Angle 120 degrees (typically)
3.4. LED
A light-emitting diode (LED) is a semiconductor light source. LEDs are used as in Light-
emitting diodes are used in applications as diverse as aviation lighting, digital microscopes,
automotive lighting, advertising, general lighting, and traffic signals. LEDs have allowed new
text, video displays, and sensors to be developed, while their high switching rates are also
useful in advanced communications technology. Infrared LEDs are also used in the remote-
control units of many commercial products including televisions, DVD players and other
domestic appliances LEDS are also used in seven-segment display detector lamps in many
devices and are increasingly used for other lighting.
3.5. Jumper Cable
A wire is a single, usually cylindrical, flexible strand or rod of metal. Wires are used to bear
mechanical loads and to carry electricity and telecommunications signals. Wire is commonly
formed by drawing the metal through a hole in a die or draw plate. Standard sizes are
determined by various wire gauges. The term wire is also used more loosely to refer to a bundle
of such strands, as in 'multi stranded wire", which is more correctly termed a wire rope in
mechanics, or a cable in electricity
Although usually circular in cross-section, wire can be made in square, hexagonal, flattened
rectangular or other cross sections, either for decorative purposes, or for technical purposes
such as high efficiency voice coils in loudspeakers. Edge wound coil springs, such as the slinky
toy, are made of special flattened wire.
3.6. Software
Arduino 1.8.1 windows: we used this software for Arduino programming
Chapter 4
Hardware Implementation and Result
The components used in this circuit are PIR sensor, LED and Servo Motor. Vcc pin of PIR
sensor and servo is connected to the positive terminal of the power supply with 3.3V and 5V
respectively, ground pins are connected to the ground of Arduino, the output pin of PIR sensor
is connected to digital port 2 and output pin of Servo is connected to digital pin 9 of Arduino.
So, when there is any motion in the range of PIR, LED will start to glow.
Fig.9.1 Fig. 9.2 Fig. 9.3
Fig. 9.4 Fig. 9.5
Fig 1-5: (1) When no operation is taking place, i.e. no motion is detected, door is closed.
(2) When motion is detected, led lights up and the door opens
(3) Door opens to the maximum angle set
(4) When no further motion is detected, door closes
(5) Door closes completely
Figure 1-5, depicts the operation of Automatic Door, where when the PIR sensor detects heat
radiation in its proximity it sends signal to the microcontroller. The microcontroller operates
the servo motor to open the door. During this operation the led stays switched on. If further
motion is not detected then the door is closed
Code
#include<Servo.h>
Servo Door;
int pirPin = 2;
int val = 0;
int servoPin = 9;
int ledPin = 13; // choose the pin for the LED
void setup()
{pinMode(ledPin, OUTPUT); // declare LED as output
pinMode(pirPin, INPUT);
[Link](9600);
[Link](servoPin);}
void loop(){
val = digitalRead(pirPin);
if(val== HIGH)
{
[Link](180);
digitalWrite(ledPin, HIGH); // turn LED ON
[Link]("Motion detected!");
delay(4000);
}
// else
// { [Link](0);
// }
[Link](30);
//delay(400);
digitalWrite(ledPin, LOW); // turn LED OFF
[Link]("Motion ended!");
}
CHAPTER-5
APPLICATIONS:
• This architecture can be implemented in various places like shopping malls, toilets and
theatres where a person is always required to open the door for visitors.
• It is also helpful for the disability person so that he could easily come in and out without
opening the door.
• It can be used in hospitals for the patients.
CHAPTER-6
DISCUSSION
The automatic gates do not need any physical effort to open or close. They durable, strong and
can be available in customized sizes. It is very convenient to enter and leave through the
automatic gates. They are economical and easy to use consumes less power but power failure
causes inconvenience and thus cannot used for security purposes.
CHAPTER-7
FUTURE DEVELOPMENT:
• There can be a display unit for showing number of persons entered in a particular room.
A better sensor is recommended to achieve new functionality, for instance, a suitable
• Sensor as radar sensor that could detect contraband good any vehicle.
• Can be further used in security systems by implementing finger print on it.
• Fans air conditioner, curtains, control can be added along with automatic door.
CHAPTER-8
CONCLUSION:
This project is a simple design of automatic door opening system where PIR sensor serves the
main input function and here Arduino uno is a microcontroller board based on the
ATmega328p.
We have considered two feedbacks to this architecture that when we implement an effective
system then there can be a display unit for showing number of persons entered in a particular
room along with this system we can use face-detection through camera for automated
attendance system.
Thus, we can conclude that this is a simple and low-cost architecture of automatic door opening
system but having lots of benefits such as we can conserve energy, reduces human efforts,
saves time etc.
Chapter 9
Reference
1. [Link]
2. [Link]
3. [Link]
4. [Link]
5. [Link]
tomatic%20Door%20Opening%20Closing%20System%20using%20PIR
%[Link]