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
- Wait a minute without moving after switching on.
- Turn the time knob to its shortest.
- Turn the sensitivity knob down and point it away from windows, fans and heaters.
- 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.
Related errors
Tutorials where it can happen
- PIR Motion Sensor Alarm with Arduino (HC-SR501 and Buzzer)
- Building a Motion Detection System Using ESP32 and ESP-NOW
- Building an Intruder Detection System with LCD and Alarm using Arduino
- ESP32 PIR Motion Sensor with Interrupts and Timers
- Home Security Alarm with Arduino and PIR Sensor
- Home Security System with Motion Detection and LCD Feedback
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.

