20.motion Based Automatic Door Opener
20.motion Based Automatic Door Opener
20.motion Based Automatic Door Opener
SYSTEM REPORT
MFD14I013
MPD14I007
MPD14I008
MPD14I012
Introduction:
The project is designed for automatic door opening system using PIR
sensor. Opening and closing of doors is always a tedious job, especially in places
like shopping malls, hotels and theatres where a person is always required to open
the door for visitors.
Details:
Size: Rectangular;
Price: $10;
Output: Digital pulse high (3V) when triggered (motion detected) and digital low when idle.
Sensitivity Range: up to 20 feet (6 meters) 110° x 70° detection range
Power supply: 5V-12V input voltage for most modules (they have a 3.3V regulator),
but 5V is ideal in case the regulator has different specs
BISS0001: Micro Power PIR Motion Detector IC
Features:
Low power CMOS technology (ideal for battery operated PIR devices)
Lenses:
PIR sensors are almost same but they vary in price and sensitivity. The
PIR sensor and circuitry is fixed and costs a few dollars and the lens costs very less and can
change the breadth, range, sensing pattern, very easily. the lens is just a piece of plastic,
but that means that the detection area is just two rectangles. Usually we'd like to have a
detection area that is much larger. To do that, we use a simple lens such as those found in
a camera, they condense a large area (such as a landscape) into a small one (on film or a
CCD sensor). we would like to make the PIR lenses small and thin and moldable from cheap
plastic, even though it may add distortion. For this reason, the sensors are actually Fresnel
lens
The Fresnel lens condenses light, providing a larger range of IR to the sensor. we don’t
want two really big sensing-area rectangles, but rather a scattering of multiple small areas.
So, what we do is split up the lens into multiple section, each section of which is a Fresnel
lens. The different faceting and sub-lenses create a range of detection areas, interleaved
with each other. That’s why the lens centers in the facets above are 'inconsistent' - every
other one points to a different half of the PIR sensing element.
The macro shot shows the different Fresnel lenses in each facet
Connecting to PIR :
Most PIR modules have a 3-pin connection at the side or bottom. One pin will be
ground, another will be signal and the final one will be power. Power is usually 3-
5 V DC input but may be as high as 12v.
The PIR has two knobs on the back for adjusting sensitivity and for changing the
pulse time.
ARDUINO UNO
The Arduino Uno is a microcontroller board based on the 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; simply connect it to a computer with a USB cable or power it
with a AC-to-DC adapter or battery to get started.
Programming code Explanation:
#include <LiquidCrystal.h> //to use liquid crystal library.
LiquidCrystal lcd(13, 12, 11, 10, 9, 8); //Defines which pins of Arduino are to be connected to
which pins of LCD display.
void loop() //loop function continuously executes the codes (i.e. reading inputs and triggering
outputs)
{
if(digitalRead(PIR_sensor)) //reads the value from specified digital pin with result either LOW
or HIGH
{
lcd.setCursor(0,0); //set the cursor to top left corner
lcd.print("Movement Detected"); //display message
lcd.setCursor(0, 1); //set the cursor to bottom left corner
lcd.print(" Gate Opened "); //display message
digitalWrite(m11, HIGH);
digitalWrite(m12, LOW); // gate opening
delay(1000); //pause the program for 1 sec
digitalWrite(m11, LOW);
digitalWrite(m12, LOW); // gate stop for a while(no movement)
delay(1000); //pause the program for 1 sec
lcd.clear(); //clears the LCD screen
lcd.print(" Gate Closed "); //display message
digitalWrite(m11, LOW);
digitalWrite(m12, HIGH); // gate closing
delay(1000); //pause the program for 1 sec
digitalWrite(m11, LOW);
digitalWrite(m12, LOW); // gate closed
delay(1000); //pause the program for 1 sec
}
else
{
lcd.setCursor(0,0); //set the cursor to top left corner
lcd.print(" No Movement "); //display message
lcd.setCursor(0,1); //set the cursor to bottom left corner
lcd.print(" Gate Closed "); //display message
digitalWrite(m11, LOW);
digitalWrite(m12, LOW); //no movement of gate
}
}
In the given diagram, the arrow on the left points to the higher potential side of the
input voltage of the circuit. Now if the switches S1 & S4 are kept in
a closed position while the switches S2 & S3 are kept in an open position meaning
that the circuit gets shorted across the switches S1 & S4. This creates a path for
the current to flow, starting from the V input to switch S1 to the motor, then to
switch S4 and then the exiting from the circuit. This flow of the current would
make the motor turn in one direction. The direction of motion of the motor can be
clockwise or anti-clockwise, this is because the rotation of the motor depends
upon the connection of the terminals of the motor with the switches.
For simplicity, let’s assume that in this condition the motor rotates in a clockwise
direction. Now, when S3 and S2 are closed then and S1 and S4 are kept open then
the current flows from the other direction and the motor will now definitely
rotates in counter-clockwise direction When S1 and S3 are closed
and S2 and S4 are open then the ‘STALL’ condition will occur(The motor will
break).
Stall Condition:
When the motor is applied positive voltage on both sides then the voltage from
both the sides brings the motor shaft to a halt
L293D Logic Table.
Let’s consider a Motor connected on left side output pins (pin 3,6). For rotating
the motor in clockwise direction, the input pins have to be provided with Logic 1
and Logic 0.
In a very similar way the motor can also operate across input pin 15,10 for motor
on the right-hand side.
Voltage Specification:
VCC is the voltage that it needs for its own internal operation 5v; L293D will not
use this voltage for driving the motor. For driving the motors, it has a separate
provision to provide motor supply VSS (V supply). L293d will use this to drive
the motor. It means if you want to operate a motor at 9V then you need to provide
a Supply of 9V across VSS Motor supply. The maximum voltage for VSS motor
supply is 36V. It can supply a max current of 600mA per channel. Since it can
drive motors Up to 36v hence you can drive pretty big motors with this
l293d.VCC pin 16 is the voltage for its own internal Operation. The maximum
voltage ranges from 5v and up to 36v.
Automatic doors can also be useful in warehouses and other facilities where
people frequently have their hands full, contributing to safety and efficiency
by making it easier for people to get around.
Further Improvements:
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.
References:
https://www.robotix.in/
https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor/
http://circuitdigest.com/microcontroller-projects/automatic-door-opener-project-
using-arduino/