Skip to Content
Hardware GuidesPIR sensor wiring

PIR sensor wiring (HC-SR501)

Pin map (typical)

PIR pinConnect to Pi
VCC5V (pin 2 or 4) or 3.3V if module is 3.3V-safe — check your board
GNDGND (pin 6)
OUTGPIO 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)

  1. Sensitivity — lower to reduce false triggers from HVAC / pets.
  2. Time delay — how long OUT stays HIGH after motion; tune so screen does not flicker.

Software binding

  1. Note BCM GPIO number (example 17).
  2. In M2C2 open Settings → Sensors → PIR and enter the BCM pin.
  3. Map motionwake display and no motion timeoutscreensaver.

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?