Motion sensor is not sensing motion!

Thread Starter

Sadikshya Poudel

Joined Aug 30, 2017
2
hello all,
I an new to arduino and pir sensor. I tried to make motion sensor using arduino and pir. When power is given, the buzzer goes on and the beep sound goes on continuously at a certain interval. Actually it is not responding to motion. Can you please help me with it!!
 

be80be

Joined Jul 5, 2008
2,395
What pir are you using do you have a link
This code will test the pir
you hook it up with the output of the pir to pin 6 put the buzzer on pin of your picking
I used pin 7 it will also output serially to monitor
Code:
void setup()  {
  Serial.begin(9600);
  pinMode(6,INPUT);
  pinMode(7,OUTPUT);
  digitalWrite(6,LOW);
}
void loop()  {
    if(digitalRead(6)==HIGH)  {
      Serial.println("Somebody is here.");
      digitalWrite(7,HIGH);
    }
    else  {
      Serial.println("Nobody.");
      digitalWrite(7,LOW);
    }
    delay(1000);
}
 
Last edited:

LesJones

Joined Jan 8, 2017
4,511
First verify that the PIR sensor is working. To do this connect the 5 volts power supply to the power connectors on the PIR and connect your multimeter between the power negative and the Dout pin on the PIR you should see the voltage reading change from zero to about 5 volts when you move in front of the PIR. If this does not happen then the PIR is faulty.

Les.
 

ericgibbs

Joined Jan 29, 2010
21,436
hi,
On this type of PIR module, the Vout maximum is approx 3V, when activated, output impedance ~2K, so low output current drive capability.

When powered up, for the first minute or so, the PIR will be unstable, switching on/off.

Adjust the 'S' pot for sensitivity and the 'T' for activated On period, both pots are very coarse
 
Top