Introduction: PIR Motion Detector With Arduino (simple and Easy Demostration)

Picture of PIR Motion Detector With Arduino (simple and Easy Demostration)

in the following video we are going to see how we can integrate the passive infra red sensor or simply PIR sensor with an arduino uno board and how you can get seral data through it.the pir sensor basically works on the thermal radiation which are being emitted by the body of humans as wellas animals

Step 1: WATCH THE VIDEO

Step 2: THINGS NEEDED (PARTS LIST)

Picture of THINGS NEEDED (PARTS LIST)

The parts needed for this build are given as

1.Arduino uno or clone

2.PIR Sensor

3.breadboard

4.led(any colour)

5.buzzer

so these are the simple parts which we need to gather

Step 3: PIR Sensor Small Information

Picture of PIR Sensor Small Information

Features and Electrical Specification

Compact size (28 x 38 mm)

Supply current: DC5V-20V(can design DC3V-24V)

Current drain :< 50uA (Other choice: DC0.8V-4.5V; Current drain: 1.5mA-0.1mA)

Voltage Output: High/Low level

signal :3.3V (Other choice: Open-Collector Output) TTL output High sensitivity

Delay time:5s-18 minute

Blockade time:0.5s-50s (acquiescently 0 seconds)

Operation Temperature: -15oC -70Oc

Infrared sensor: dual element, low noise, high sensitivity

so these are the technical information about the pir sensor

you can download the datasheet from the following link

https://cdn-learn.adafruit.com/downloads/pdf/pir-p...

Step 4: CIRCUIT DIAGRAM

Picture of CIRCUIT DIAGRAM

After watching the video you can easily create your own pir sensor module . just

follow the simple circuit and you are ready to go to the programming section

the buzzer used in the circuit is can be of normal 5v buzzer which is easily available

in any electronic parts store.

the connections follows as

ARDUINO UNO PIR SENSOR

+5V---------------------------------------+5V(VCC)

GND--------------------------------------GND

5 PIN-------------------------------------OUT

Step 5: PROGRAMMING THE ARDUINO

Picture of PROGRAMMING THE ARDUINO

The coding related to the following circuit is very simple the code follows in this way

At the starting we need to declare the pins which we are going to use

int PIR_output=5; // output of pir sensor

int led=13; // led pin

int buzzer=12;// buzzer pin

After that is done we can move on to the void setup fuction

pinMode(PIR_output, INPUT);// setting pir output as arduino input

pinMode(led, OUTPUT);//setting led as output

pinMode(buzzer, OUTPUT);//setting buzzer as output

Serial.begin(9600);//serial communication between arduino and pc

you can download the full program from above PIR_sensor_by_kj_electronics file

and upload it to the arduino uno by using the arduino ide

Step 6: CHECKING THE OUTPUT

Picture of CHECKING THE OUTPUT

Whenever a thermal body is detected by the PIR sensor it will turn the out pin to its high state

you can adjust the sensitivity of the sensor by adjusting the potentiometer which as shown in the figure above

and you can also change the time delay of the sensor by the potentiometer again.

Step 7: THANKS FOR WATCHING

You can modify the following code and make
something innovative and don't forgot to subscribe to my instructables as well as my youtube channel

in my youtube you can get so many projects in the electronics side as well as so creative videos about the leds and fan dc motors etc..

link to my youtube channel is

https://www.youtube.com/channel/UCZE35bOktFxu8dIad...

thanks for watching

Comments

PradeepB25 (author)2017-04-08

Nicely elaborated. I could complete it with PIR and relay based project. But Relay is switching on and off as per PIR and not getting stabilised in one state for some time.

I was expecting once Motion is detected it will activate Relay and keep relay in same state for 3-5 minutes and then it will make it Low. But I am observing that PIR state is being changed abruptly without any detection.

there are two potentiometers on the PIR sensor itself you could see that in the PIR brief section and there i a clear picture where one potentiometer is responsible for the sensitivity and the other one is for the time delay . you can adjust that in the sensor and the timer inside the sensor is from 0.3 seconds to about 5 minutes.

or if you want to change in the software you could simply include a time delay of 5 minutes or more .

for example

if {

state=0;

if(pir_sensor == HIGH);

{

state=1;

digitalWrite(led,HIGH);

delay(30000);

state=0;

}

About This Instructable

4,955views

50favorites

License:

More by KJ ELECTRONICS:BALLON LAMP!!!AMAZING!!! (simple Awsome Ballon Lamp)!! ESP8266-NODEMCU $3 WiFi Module #1- Getting Started With the WiFiVariable Power Supply Controller to Control My MIDI Device(1.8v TO 12v)
Add instructable to: