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:

from gpiozero import MotionSensor

from picamera import PiCamera

from datetime import datetime

camera = PiCamera()

pir = MotionSensor(11)

while True:


    print ('Motion Detected')


    print ('No Motion Detected')

Thanks for any help! Chuck

  • 1
    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, 2017 at 8:55
  • Me too. I covered the thing with a rice bowl, the error rate drops to 0.00%. I set the Rpi aside and just used just a multi-meter to test. Perhaps you should try AM312: penzu.com/p/580167ef. Good luck. Cheers.
    – tlfong01
    Jul 6, 2020 at 13:48

2 Answers 2


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. ;-)


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, 2017 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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