50% OFF! Hot items selling fast—Grab them before they're gone!
The HC-SR501 PIR motion sensor module detects human and animal movement by sensing changes in infrared radiation. It is a practical trigger module for security alarms, automatic lighting, occupancy detection, camera wake-up circuits, and low-cost smart-home prototypes.
The module is widely used with Arduino-compatible boards such as the ELAB Nano V3, quick wiring setups based on the MB 102 Breadboard Kit, and status indicators such as the RGB Full Color LED Module. Onboard sensitivity and delay adjustments make it easier to tune behavior after mounting.
Use the digital output for event detection rather than distance measurement. For best reliability, keep the PIR lens clear, avoid pointing it at heaters or direct sunlight, and allow a short warm-up period after power-up.
| Parameter | Value |
|---|---|
| SKU | TB-HC-SR501 |
| Sensor Type | PIR passive infrared motion detector |
| Output | Digital HIGH/LOW motion signal |
| Typical Operating Voltage | 5V module supply, commonly used from 5V microcontroller systems |
| Detection Method | Infrared change detection through Fresnel lens |
| Adjustments | Sensitivity and delay potentiometers |
| Trigger Modes | Common HC-SR501 modules support retrigger / non-retrigger jumper modes |
| Typical Applications | Lighting control, alarms, occupancy sensing, robots |
| Host Interface | GPIO input |
| Warm-Up | Allow stabilization after power-up |
Turn on an LED when motion is detected.
const int pirPin = 2;const int ledPin = 13;void setup() { pinMode(pirPin, INPUT); pinMode(ledPin, OUTPUT);}void loop() { digitalWrite(ledPin, digitalRead(pirPin));}
Print motion events to the serial monitor.
const int pirPin = 27;void setup() { Serial.begin(115200); pinMode(pirPin, INPUT);}void loop() { if (digitalRead(pirPin) == HIGH) { Serial.println(“motion”); delay(1000); }}
Read PIR output from a Pico-style board.
from machine import Pinimport timepir = Pin(15, Pin.IN)while True: if pir.value(): print(“motion detected”) time.sleep(1) time.sleep(0.05)
Q: What does this module detect?
A: It detects motion from warm bodies by sensing changes in infrared radiation.
Q: Does it measure distance?
A: No. It provides a motion/no-motion digital output.
Q: Why does it trigger at power-up?
A: PIR modules need a short stabilization period after power is applied.
Q: Can I adjust sensitivity?
A: Yes, common HC-SR501 modules include a sensitivity potentiometer.
Q: Can I adjust output time?
A: Yes, the delay potentiometer adjusts active output duration.
Q: Can it work behind glass?
A: PIR detection is usually poor behind glass or acrylic barriers.
Q: What causes false triggers?
A: Sunlight, heaters, airflow, vibration, and unstable power can cause false events.
Q: Can I use it with Arduino?
A: Yes, connect OUT to a digital input and share ground.