PIR Motion sensor with Arduino Uno Led indication circuit with code

PIR Motion sensor with Arduino Uno Led Indication

CIRCUIT DIAGRAM



ABOUT ARDUINO UNO

Each Arduino board has its own microcontroller (ATmega328). You can accept it as the cerebrum of your board. The principle IC on the Arduino is somewhat not quite the same as board to board. The microcontrollers are more often than not of the ATMEL Company. You should comprehend what IC your block has before stacking another program from the Arduino IDE. This data is accessible on the highest point of the IC. Link



ABOUT PIR MOTION SENSOR

Description:-

The Passive Infrared device (PIR) device module is employed for motion detection. It's typically mentioned used "PIR", "Pyroelectric", "Passive Infrared" and "IR Motion" device. The module has associate degree on-board electrical phenomenon device, acquisition electronic equipment and a dome formed lens, it's accustomed sense movement of individuals, animals, or alternative objects. they're normally employed in stealer alarms and automatically-activated lighting systems.Link


Motion detection of  objects using PIR sensor with Arduino uno.


REQUIREMENT

  1. ARDUINO UNO
  2. PIR MOTION SENSOR
  3. LED
  4. JUMPER WIRES


Connect pins as per the circuit shown']

LED= + PIN 13
           - GND

PIR SENSOR
VCC  - 5V
OUTPUT - PIN 7
GND - GND PIN



CODE FOR THE CIRCUIT

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
int LED = 13;            
int SENSOR_OUTPUT_PIN = 7;

void setup() {
  pinMode(SENSOR_OUTPUT_PIN, INPUT);  // sensor output pin to PlN 7 of arduino
  pinMode(LED, OUTPUT);           //Led output PlN 13 of arduino
  Serial.begin(9600);
}

void loop() {
  int sensorvalue = digitalRead(SENSOR_OUTPUT_PIN);
  Serial.println(sensorvalue);
  
  if (sensorvalue== HIGH) {
    digitalWrite(LED, HIGH);
    delay(1000);
  }
  else {
    digitalWrite(LED, LOW);
   
  }
}


YOU TUBE VIDEO





If you still have any questions related to this article, then you can message me on my social media accounts.

!!THANKS FOR VISITING!!
!!HAPPY LEARNING!!
!!HAVE A GREAT DAY!!