# PIR sensor always gives HIGH

This is my first time to use PIR (HC-SR501 ) . It's in repeat trigger model. But when I test the output of the PIR , it gives always HIGH .

I rotate sensitivity adjustment and time delay adjustment randomly to see any changes occur. I even cover the sensor with cloth so that It get's no infrared . still it gives high. I changed my sensor and bought a new one. This shows the same problem too. arduino code :

int PIC_IN = 10;
int LED = 13;

void setup()
{
Serial.begin(9600);
pinMode(PIC_IN, INPUT);

digitalWrite(LED, LOW);
}

void loop()
{
if (val == HIGH)
{
Serial.println("Moton detected");
digitalWrite(LED, HIGH);
}
else
{
Serial.println("...........");
digitalWrite(LED, LOW);
}
}


here is the link for PIR Datasheet.

What I am doing wrong ? I have no clue why it's not working.

• What is your code? And what voltage are you using? – Passerby Mar 3 '16 at 20:17
• What happens when you set it to single-trigger mode? – brhans Mar 3 '16 at 20:19
• I use 5V (from arduino) – Anklon Mar 3 '16 at 20:39
• Please include link to datasheet (so that all of us don't have to search for it). Did you check the voltage out of the PIR? This will help you determine whether the PIR is working or not and if it is it will point to a connection or code error. Please use the schematic editor button to add a diagram. Place all the information in your original question and not in the comments. – Transistor Mar 3 '16 at 20:45
• Output voltage of PIR is 3.9 V – Anklon Mar 3 '16 at 21:07

I finally found a solution to this problem First you should adjust the delay knob to the left as min delay time.After connecting the power to the sensor, you should wait 1 min for the sensor to warm up, Now the sensor is ready to use and before this time its performance won't be stable. Also remember when you the sensor signal moves from high to low, it take around 5 seconds out of service, after than you can trigger it again.

After make sure it work properly you can increase the delay a little bit to increase the on time ^_^...

You need to check if the voltage on the PIR output switches. Use a multimeter to measure the voltage between OUT and GND.

If you don't see any change in level then you may need to add a "pull-up" resistor. If you have a 10 k resistor to hand then connect that between OUT and the 5 V supply. If this works then you need to enable the internal pull-up resitor on the Arduino. See the documentation for that.

If that still doesn't work then measure the voltage between the PIR sensor pin 2 and GND while someone fires an infra-red remote control beam at it. You should see a change in voltage.

Report back and we'll try and help.

• PIR sensors typically shouldn't respond to a IR remote led... – Passerby Mar 3 '16 at 21:55
• And just tested it, definitely won't trigger. – Passerby Mar 4 '16 at 2:15
• Thanks for that. I hadn't tested. An incandescent bulb would be the next suggestion. Wouldn't it :-? – Transistor Mar 4 '16 at 9:28

If Vcc accidentally is only 3.3V, the HC-SR501 continuously retriggers independent of motion or the sensitivity setting (about 1s break between triggers, trigger length defined by right potentiometer).

Even though the output is rated at 3.3V, the input is expected to be 5-20V.

It can probably see through the cloth. When it first starts up, you need to not move for up to 60s while it calibrates.

• I sit still more then 60s for it to calibrate . – Anklon Mar 3 '16 at 20:34
• From the specs: Sensor module is powered up after a minute, in this initialization time intervals during this module will output 0-3 times, a minute later enters the standby state. – angelcervera Dec 11 '16 at 8:50

mine was having +ve and -ve contrariwise and giving 5v at output pin always. Reversing the input made output of ~3v to only when it triggered.