How can I make PIR motion sensor faster?

8.2k views Asked by At

I'm working with a raspberry pi and two PIR motion sensors, HC-SR501 specifically.

I'm trying to cut down the time delay on each sensor - the amount of time before motion can detected again, but I can't seem to do better than ~5 seconds, which is way too long for my purposes.

I've found conflicting info about these sensors too - some places say they have adjustable time delays ranging for ~4 sec - (http://www.mpja.com/download/31227sc.pdf) and others saying .5 - 200 sec: (http://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Delectronics&field-keywords=pir+motion+sensor)

Which is it? If I'm truly limited hardware wise by ~5 seconds, is there some other way to get around that time delay? Are there faster PIR motion sensors out there?

EDIT: As requested below, I'm using Python to program the devices on my Raspberry PI. I currently attach an event_detect to the PIR pin and make a callback. Perhaps there's a better way, maybe with polling to reduce delay times?

1

There are 1 answers

2
Veljac On

It is not the issue but regular feature. You are using HC-SR501 sensor which is intended to put signal on for 5s-300s. It has PIR sensor, but also a logic to process input signal from PIR and to treat it for the typical purpose of turnight the light on. For this purpose it is normal that after detection light will be on for 5-300s.

Since your case is totaly different, you cannot use this sensor without modification. It is not problem with your program but the way sensor logic works.

At the moment I got the same problem - how to modify sensor to lower the time to some 1 sec or so.

Also after this 5 seconds there is additional problem that next 3 seconds are intentionlly in "no motion efect" mode, meaning that any motion in this period is ignored!