PIR sensor wiring (HC-SR501)
Pin map (typical)
| PIR pin | Connect to Pi |
|---|---|
| VCC | 5V (pin 2 or 4) or 3.3V if module is 3.3V-safe — check your board |
| GND | GND (pin 6) |
| OUT | GPIO input (example GPIO17, physical pin 11) |
⚠️ Warning: Many HC-SR501 boards output 3.3V logic on OUT when powered at 5V, but not all. Verify with a multimeter or datasheet — never feed 5V into a 3.3V-only GPIO.
Adjustments (on-board pots)
- Sensitivity — lower to reduce false triggers from HVAC / pets.
- Time delay — how long OUT stays HIGH after motion; tune so screen does not flicker.
Software binding
- Note BCM GPIO number (example
17). - In M2C2 open Settings → Sensors → PIR and enter the BCM pin.
- Map motion → wake display and no motion timeout → screensaver.
ASCII diagram
HC-SR501 Raspberry Pi 40-pin header (simplified)
+---------+
| VCC o |------------ 5V (Pin 2 or 4)
| OUT o |------------ GPIO17 (Pin 11)
| GND o |------------ GND (Pin 6)
+---------+Troubleshooting
Always HIGH
Bad jumper (retrigger mode); loose ground; sensor facing heat source.
No response
Wrong GPIO in software; Wi‑Fi USB dongle RF interference — move sensor cable away from transmitter.
Last updated on
Was this helpful?