Skip to main content

Motion Dectector (Arduino)

                         

 MOTION DETECTOR

This project is used to detect the movement of Human (living organisms). When there is a movement the RED LED will Turn ON also the Buzzer. If not the Green LED turn ON.
FOR VIDEO : 

THINGS NEEDED

  1. Arduino UNO R3
  2. PIR Sensor
  3. Green & Red LEDS
  4. Buzzer

CIRCUIT DIAGRAM

WIRING

PIR SENSOR TO ARDUINO

  • Connect the VCC to VCC Rail.
  • Connect the GND to GND Rail.
  • Connect the OUTPUT pin to pin 7 of arduino.

LED TO ARDUINO

  • Connect the Green led to pin 5 of arduino.
  • Connect the Red led to pin 4 of arduino.

BUZZER TO ARDUINO

  • Connect the Buzzer to pin 3.

Code

//(PIR)Motion Detector 
//scientist BENIELS LAB 

int PIR_Sensor = 7;
int Led_G = 5;
int Led_R = 4;
int Buzzer = 3;

void setup() {

  Serial.begin(9600);

   Serial.println("Motion Detector");
   Serial.println("PIRSensor");

  pinMode(PIR_Sensor, INPUT);

  pinMode(Led_G, OUTPUT);
  pinMode(Led_R, OUTPUT);
  pinMode(Buzzer, OUTPUT);

}

void loop() {
   
int Motion = digitalRead(PIR_Sensor);
 
  // if motion is detected
  if(Motion){

    Serial.println("Motion detected");

    digitalWrite(Led_R,HIGH);
    digitalWrite(Led_G,LOW);
    digitalWrite(Buzzer,HIGH);
}

// if motion is not detected
  else{
     Serial.println("Nothing is Moving");

     digitalWrite(Led_R,LOW);
    digitalWrite(Led_G,HIGH);
    digitalWrite(Buzzer,LOW);

  }
  delay(500);
  
}
SUBSCRIBE TO "scientist BENIEL'S LAB" IN YOUTUBE FOR MORE ELECTRONIC'S & ROBOTIC'S PROJECTS.
THANK YOU

Comments

Popular posts from this blog

Arduno Clock

  Arduino Clock This is a clock using RTC Tiny with Arduino. Using this we can see time & date.  FOR VIDEO :

MQ-5 GAS LEAK DETECTOR

  MQ-5 GAS LEAK DETECTOR  This project is used to detect the gas leak and alert us that the gas is leaking. You can use it for your science projects. FOR VIDEO :

Blutooth Switch (Arduino)

 BLUTOOTH SWITCH (ARDUINO) Hi, Using this we can control leds using Smart Phone via Blutooth. We can also control home appliances using Relay with it. For Video :  CLICK HERE  .