0

All I am working with a PIR Module and a camera for a project to provide text messaging when motion is detected as well as taking a picture. I am seeing a large number of false positives from the PIR. I've tried dialing down sensitivity to 0 and moving to a different GPIO Pin to no avail. I even replaced the unit with a new one, still see a 4% false positive rate. If I put the device in a box, the error rate drops to 0. Any thoughts on this? I don't think it is the code:

!/usr/bin/Python3
from gpiozero import MotionSensor

from picamera import PiCamera

from datetime import datetime

camera = PiCamera()

pir = MotionSensor(11)

while True:

    pir.wait_for_motion()

    print ('Motion Detected')

    pir.wait_for_no_motion()

    print ('No Motion Detected')

Thanks for any help! Chuck

  • If putting it in a box reduces the error rate, it sounds like you might be experiencing some environmental noise issues. Have you tried experimenting with the setup in other places (further from noise sources such as microwave ovens), or with shorter cables, or with shielded cables? – goobering May 23 '17 at 8:55
0

Are you utilizing a pull-up or pull-down resistor? Explained here: http://www.bit-101.com/blog/?p=3813

  • So, to be clear. I would add a 10kOhm resister to a branch off the signal wire from the PIR module tat went to ground. Then when a true positive came through, it would successfully make it to the GPIO 11 pin. Otherwise, it would signal as low all the time as any extraneous signals below a legitimate high would be channeled to ground. Just trying to make sense of a non-binary situation. – cedombek May 28 '17 at 19:17
0

I had the exact same issue driving me insane for weeks. The false positives would reoccur every minute.

Finally, I figured out that either Bluetooth or WiFi is causing some fluctuations in power. Turned both off and all was ok.

I really hope this is resolving your issue as I can relate to your situation. ;-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.