Cet 02 Im
Cet 02 Im
Cet 02 Im
TASK: (MARKS 8)
With the advancement of sensor and actuator technologies, our indoor environment, such as buildings,
has been instrumented with various sensors, including temperature, humidity, illumination, CO2 and
occupancy sensor, and, thus, can be aware of changes in the user’s state and surrounding, finally
controlling building utilities to adapt their services and resources to the user’s context, e.g., automatic
lighting control, heating, ventilation and air-conditioning (HVAC) system adjustment, electrical outlet
turn-off, unusual behavior detection and home invasion prevention. Such context-aware systems have
deployed occupant location as the principal form of the user’s context. Accordingly, indoor tracking
and localization is one of the key technologies for providing activity-aware services in a smart
environment.
Pyroelectric infrared (PIR) sensors are well-known occupancy detectors. They have been widely
employed for human tracking systems, due to their low cost and power consumption, small form factor
and unobtrusive and privacy-preserving interaction. However, the analog output signal of PIR sensors
involves more aspects beyond simple people presence, including the distance of the body from the PIR
sensor, the velocity of the movement (i.e., direction and speed), body shape and gait (i.e., a particular
way or manner of walking). Thus, we can leverage discriminative features of the analog output signal
of PIR sensors in order to develop various applications for indoor human tracking and localization.
Design a shopping center automatic door system using PIR sensor and Arduino. It uses a motion-
detecting sensor (PIR sensor) to open or close the door, which detects the infrared energy omitted from
human’s body. When someone comes in front of the door, the infrared energy detected by the sensor
changes and it triggers the sensor to open the door whenever someone approaches the door.
Following is the marks distribution criteria upon successful completion of each step:
1. Interface PIR sensor with Arduino. (2 Marks)
2. Show the Arduino programming. (2 Marks)
3. PIR sensor-based data collection. (3 Marks)
4. Draw complete block diagram and flow chart. (1 Mark)
Humayun Arshad (51088) COMPLEX ENGINEERING TASK # 02
#define PIR_sensor 3
#define m11 5
#define m12 4
void setup()
{
lcd.begin(16, 2);
pinMode(m11, OUTPUT);
pinMode(m12, OUTPUT);
pinMode(PIR_sensor, INPUT);
lcd.print(" Automatic ");
lcd.setCursor(0,1);
lcd.print(" Door Opener ");
delay(3000);
lcd.clear();
lcd.print("Humayun Arshad");
delay(2000);
}
void loop()
{
if(digitalRead(PIR_sensor))
{
lcd.setCursor(0,0);
Humayun Arshad (51088) COMPLEX ENGINEERING TASK # 02
lcd.print("Movement Detected");
lcd.setCursor(0, 1);
lcd.print(" Gate Opened ");
digitalWrite(m11,HIGH); // gate opening
digitalWrite(m12,LOW);
delay(1000);
digitalWrite(m11,LOW); // gate stop for a while
digitalWrite(m12,LOW);
delay(1000);
lcd.clear();
digitalWrite(m11, LOW); // gate closing
digitalWrite(m12, HIGH);
delay(1000);
digitalWrite(m11, LOW); // gate closed
digitalWrite(m12, LOW);
delay(1000);
}
else
{
lcd.setCursor(0,0);
lcd.print(" No Movement ");
lcd.setCursor(0,1);
lcd.print(" Gate Closed ");
digitalWrite(m11, LOW);
digitalWrite(m12, LOW);
}
}
Humayun Arshad (51088) COMPLEX ENGINEERING TASK # 02
Block Diagram
ARDUINO
UNO
L293D DOOR
Humayun Arshad (51088) COMPLEX ENGINEERING TASK # 02
FLOW CHART:
START
IF ANYONE
APPROAH YES
AT THE
DOOR
NO
CONTINUE OPENING
THE DOOR
END
Humayun Arshad (51088) COMPLEX ENGINEERING TASK # 02
METHODOLOGY:
The components used in this circuit are PIR sensor, LED and resistor below 1K ohm. Vcc pin of PIR
sensor is connected to the positive terminal of the power supply with max 5-volt, ground pin is
connected to the negative terminal of the power supply and the output pin of PIR is connected to LED
with a resistor. L293D is a 16 pin IC which is used to control the DC motor.
Pin 3 and 6 is connected to the two terminals of dc motor. Pin 4,5,12,13 is connected to the ground.
Pin 2 and 7 are the input terminals. When Pin 2 is high, and Pin 7 is low then the dc motor rotates
clockwise. When Pin 2 is low, and Pin 7 is high then dc motor rotates anticlockwise.
CONCLUSION:
We design a automatic door system using PIR sensor and Arduino. It uses a motion-detecting sensor
(PIR sensor) to open or close the door, which detects the infrared energy omitted from human’s body.
When someone comes in front of the door, the infrared energy detected by the sensor changes and it
triggers the sensor to open the door whenever someone approaches the door.
Humayun Arshad (51088) COMPLEX ENGINEERING TASK # 02
Needs Total
Category Excellent 8 Good 6 Satisfactory 4
improvement 2 (40)
Clearly describes the Adequately Describes the Cannot describe
objectives of lab. describes the objectives but the objectives of
Understands objectives, but misses some the lab, or what
Objectives and possible sources of cannot discuss details. Cannot was learnt, sources
Results errors and their possible sources discuss possible of errors and their
effects. Suggests of errors and sources of error effects
ways to minimize their effects or their effects
them.
Circuit works Circuit performs Circuit performs Circuit does not
perfectly. All wires most the but output not give any output.
Circuit are attached. / Code functions, gives exactly as Most wires are not
implementatio works perfectly output./ Code expected. Some connected/ code
n/ software gives some connections not not compiled/
coding errors done/ code gives many errors
some correct
output
Can clearly identify Adequately Describe the Cannot describe
the problems and identify the problem but the problem, and
take steps to fix problems and cannot suggest has no effective
Trouble them. Uses an steps taken to fix steps on how to strategy on how to
Shooting effective strategy to them. Uses an solve them. solve them.
solve problems effective strategy Trouble shooting
but misses some is not consistent.
details
Detailed results are Adequate results Some missing Most results are
Measurements shown for each step. are shown. 80% observations. missing. Only 30%
and 100% measurements measurements 70% results are measurements are
Observations are correct are correct correct correct
Thorough Good Limited Shows incorrect
understanding of the understanding of understanding of understanding of
concepts underlying the concepts, the concepts. the concept.
the lab. Can apply it however cannot Cannot apply to Cannot find any
Conclusions in real life situations apply them in real life situations usage of the
real life and suggest any knowledge. Cannot
situations use of the describe what was
knowledge learnt.
Signature: