I bought 5 PIR Sensors to trigger when movement is detected, using an Arduino.

During bench tests, all 5 sensors show many false triggers. I wonder if all 5 sensors have something wrong, or whether there is a way to reduce "noise" on the sensor?

1) code is simple - just print out to serial monitor its digitalRead values.

2) to reduce IR in the room, the window was closed.

3) wiring scheme is very simple, example

Still, detection was notified erratically even when I was not in the room.

Any explanations why? And how to overcome this behaviour?

  • \$\begingroup\$ do you use hysteresis on the MCU input wire? \$\endgroup\$ – analogsystemsrf Nov 15 '19 at 10:08
  • \$\begingroup\$ @analogsystemsrf - can you please explain more. my scheme is as shown in example linked to the question \$\endgroup\$ – Guy . D Nov 15 '19 at 10:10
  • 2
    \$\begingroup\$ I would first try to locate the problem, instead of the Arduino, just connect an LED to a PIR sensor and power that from a battery. Do you still get false triggers? Then the sensor is too sensitive. If triggering is OK now then we know it is not the sensor. Now instead of the battery, use 5 V from the Arduino. Leave the LED as is and only connect 5 V and GND from Arduino to sensor+LED. This will test of the Arduino's supply is OK. See how step-by-step I try to locate the issue. \$\endgroup\$ – Bimpelrekkie Nov 15 '19 at 10:27
  • 1
    \$\begingroup\$ You can also try to reduce false triggering by making sure the sensor's output is high for some time like 1 second. So do the digitalRead, when a 1 is read, wait for 1 second and read again, still high? => Only then it's a real trigger. \$\endgroup\$ – Bimpelrekkie Nov 15 '19 at 10:29
  • \$\begingroup\$ @Bimpelrekkie - Sensor sets a HIGH upon detection for 8 seconds with +/-30% ... so for that amount of time, I think it won't be a solution. \$\endgroup\$ – Guy . D Nov 15 '19 at 19:24

Your Answer

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

Browse other questions tagged or ask your own question.