Arduino With PIR Motion Sensor

by rameshbseminaryr in Circuits > Arduino

348 Views, 3 Favorites, 0 Comments

Arduino With PIR Motion Sensor

_qd2IrPw9NK.jpeg

Hello friends, This video about PIR Motion Sensor and Arduino. With this video, you will learn how to connect PIR sensor with Arduino and program the Arduino to detect any moment in the room or around the motion sensor.

PIR = (Passive Infrared Sensors)

Click on the video

Link my page on Facebook : https://www.facebook.com/Bihari-Lifehacker-108437...

Subscribe: https://www.youtube.com/channel/UC88UigBH18Zn1UrtWgp2DPA

Supplies

Arduino Uno

PIR Motion Sensor

Breadboard

Jumper wire

Led

PIR Sensor

image_iPKTEwP0Fh.jpg
image_ZutRrfoEwg.jpg
image_cRLsWuSFyK.jpg

PIR SENSOR

PIR sensor detects a human being moving around within approximately 10m from the sensor. This is an average value, as the actual detection range is between 5m and 12m.PIR are fundamentally made of a pyro electric sensor, which can detect levels of infrared radiation. For numerous essential projects or items that need to discover when an individual has left or entered the area. PIR sensors are incredible, they are flat control and minimal effort, have a wide lens range, and are simple to interface with.

Most PIR sensors have a 3-pin connection at the side or bottom. One pin will be ground, another will be signal and the last pin will be power. Power is usually up to 5V. Sometimes bigger modules don’t have direct output and instead just operate a relay which case there is ground, power and the two switch associations. Interfacing PIR with microcontroller is very easy and simple. The PIR acts as a digital output so all you need to do is listening for the pin to flip high or low. The motion can be detected by checking for a high signal on a single I/O pin. Once the sensor warms up the output will remain low until there is motion, at which time the output will swing high for a couple of seconds, then return low. If motion continues the output will cycle in this manner until the sensors line of sight of still again. The PIR sensor needs a warm-up time with a specific end goal to capacity fittingly. This is because of the settling time included in studying nature’s domain. This could be anyplace from 10-60 seconds.

Arduino Uno

image_aEkbRrdyaX.jpg

ARDUINO UNO

Arduino 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 into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing. Over the years Arduino has been the brain of thousands of projects, from everyday objects to complex scientific instruments. A worldwide community of makers - students, hobbyists, artists, programmers, and professionals - has gathered around this open-source platform, their contributions have added up to an incredible amount of accessible knowledge that can be of great help to novices and experts alike.

Daigram

motion_qegdcmfm0u_dzlLmuKjsR.png

Arduino Code

int led = 13;

int sensor = 2;

int state = LOW;

int val = 0;

void setup() {
pinMode(led, OUTPUT);

pinMode(sensor, INPUT);

Serial.begin(9600);

void loop(){
val = digitalRead(sensor);

if (val == HIGH)

{

digitalWrite(led, HIGH);

delay(500);

if (state == LOW)

{

Serial.println("Motion detected!");

state = HIGH;

}

}

else {

digitalWrite(led, LOW);

delay(500);

if (state == HIGH)

{

Serial.println("Motion stopped!");

state = LOW;

}

}

}