PIR sensor triggers all the time, or not at all

  • PIR HC-SR501

Why it happens

  • It needs 30 to 60 seconds to settle after power-on.
  • The time knob holds the output on for seconds or minutes.
  • It sees warm air, sunlight or a fan.

How to fix it

  1. Wait a minute without moving after switching on.
  2. Turn the time knob to its shortest.
  3. Turn the sensitivity knob down and point it away from windows, fans and heaters.
  4. Check OUT goes to the pin in the code and VCC to 5V.

It worked if: Stand still for 10 seconds: it goes LOW. Wave: it goes HIGH.

From how the part works. Explained from how the part works; not tried on a real circuit for this page.

Didn't help? Search another error or ask us.