1. Introducció
The Stemedu HC-SR501 PIR (Passive Infrared) Motion Sensor is a highly sensitive and reliable module designed to detect infrared radiation emitted by moving objects, typically humans or animals. It is widely used in various applications such as home security systems, automated lighting, and Internet of Things (IoT) projects. This manual provides detailed instructions for the proper setup, operation, and maintenance of your HC-SR501 sensor.

Image 1.1: Three HC-SR501 PIR Motion Sensors
2. Configuració i connexió
Proper connection and configuration are crucial for the optimal performance of the HC-SR501 sensor. Follow these steps to set up your sensor.
2.1 Definicions de pins
- VCC: Power supply input (4.8V to 20V DC).
- SORTIDA: Digital output signal (3.3V TTL when motion is detected).
- GND: Connexió a terra.
2.2 Font d'alimentació
The sensor operates on a wide voltage range of 4.8V to 20V DC. Ensure your power source provides stable voltage within this range. It is compatible with common development boards like Arduino, Raspberry Pi, and ESP8266.
2.3 Ajustaments
The HC-SR501 features two potentiometers for fine-tuning its behavior and a jumper for trigger mode selection.
- Delay Time Adjust: Controls how long the output remains HIGH after motion is detected. Adjustable from approximately 0.5 seconds to 200 seconds. Turning clockwise increases the delay, counter-clockwise decreases it.
- Sensitivity/Distance Adjust: Controls the detection range of the sensor. Turning clockwise increases sensitivity and range (up to approximately 7 meters), while counter-clockwise decreases it (down to approximately 3 meters).

Image 2.1: HC-SR501 Pinout and Adjustment Potentiometers

Image 2.2: Delay and Sensitivity Adjustment Guide
2.4 Trigger Mode Selection
The sensor supports two trigger modes, selected via a jumper on the board:
- H (Repeat Trigger): In this mode, if motion is detected again during the delay period, the delay timer will reset and restart. The output remains HIGH as long as continuous motion is detected. This is the default mode.
- L (Single Trigger): In this mode, once motion is detected and the output goes HIGH, it will remain HIGH for the set delay time, regardless of further motion. After the delay, the output goes LOW, and the sensor must re-detect motion to trigger again.

Image 2.3: Jumper Settings for Trigger Modes
Ex. 2.5ample Connection (Arduino)
Below is a typical connection diagram for integrating the HC-SR501 with an Arduino board.

Image 2.4: HC-SR501 to Arduino Connection
3. Funcionament
Once powered and configured, the HC-SR501 sensor operates by detecting changes in infrared levels within its detection area. When a moving heat source (like a person) enters the field of view, the sensor's output pin goes HIGH.
3.1 Detection Characteristics
- Angle de detecció: Approximately 100° cone.
- Interval de detecció: Adjustable from approximately 3 to 7 meters.
- Lent de Fresnel: The white dome on the sensor is a Fresnel lens, which helps to focus infrared light onto the sensor element and segment the detection area for improved accuracy.
3.2 Block Time
The sensor also features an adjustable 'block time' (or re-trigger delay) from approximately 0.5 seconds to 60 seconds. This is a short period after the output goes LOW during which the sensor will not detect new motion, preventing rapid re-triggering. This is distinct from the main delay time.
3.3 Avoiding False Triggers
The sensor is designed to minimize false triggers from pets by focusing on human-sized heat signatures. However, proper placement away from direct heat sources, air currents, and direct sunlight is recommended for optimal performance.

Imatge 3.1: Ex.ample Load Connections
4. Manteniment
The HC-SR501 PIR sensor requires minimal maintenance to ensure long-term reliability.
- Neteja: Periodically clean the white Fresnel lens with a soft, dry cloth to remove dust or smudges that could affect detection. Avoid using abrasive cleaners.
- Medi ambient: Ensure the sensor is installed in a location free from excessive vibration, extreme temperatures, or high humidity. Avoid direct exposure to strong light sources or rapid temperature changes, which can cause false triggers.
- Cablejat: Regularly inspect wiring connections for any signs of wear or corrosion, especially in outdoor or harsh environments.
5. Solució De Problemes
If you encounter issues with your HC-SR501 sensor, refer to the following troubleshooting guide:
| Problema | Causa possible | Solució |
|---|---|---|
| El sensor no detecta moviment | Cablejat incorrecte Potència insuficient Sensibilitat establerta massa baixa Obstruction in detection path | Verify VCC, OUT, and GND connections Ensure power supply is within 4.8-20V DC Adjust sensitivity potentiometer clockwise Clear any objects blocking the sensor's view |
| Sensor triggers constantly or falsely | Sensibilitat establerta massa alta Heat sources or air currents Direct sunlight or strong light changes Repeat Trigger (H) mode with constant motion | Adjust sensitivity potentiometer counter-clockwise Relocate sensor away from vents, heaters, or windows Shield sensor from direct light Consider using Single Trigger (L) mode or adjusting delay |
| Output stays HIGH indefinitely | Continuous motion in detection area Delay time set too long Sensor defectuós | Ensure no constant motion is present Adjust delay time potentiometer counter-clockwise Test with a new sensor if issues persist |
6. Especificacions
| Característica | Especificació |
|---|---|
| Vol. Operatiutage | 4.8 V - 20 V CC |
| Vol. De sortidatage | 3.3V TTL (High/Low) |
| Angle de detecció | Approx. 100° cone |
| Interval de detecció | Approx. 3 - 7 meters (adjustable) |
| Temps de retard | Approx. 0.5s - 200s (adjustable) |
| Temps de bloc | Approx. 0.5s - 60s (adjustable) |
| Modes d'activació | Repeatable (H, default) / Non-repeatable (L) |
| Pes de l'article | Approx. 0.03 kg (1.13 ounces) |
| Número de model | ST |
7. Garantia i Suport
7.1 Informació de la garantia
Specific warranty details for the Stemedu HC-SR501 PIR Motion Sensor are not provided in this manual. Please refer to the product's purchase documentation, the seller's website, or contact Stemedu directly for current warranty terms and conditions.
7.2 Suport tècnic
For additional technical information or support, you may refer to the following resource:
- Usage Reference Link: https://www.mysensors.org/build/motion
If you require further assistance, please contact Stemedu customer support through their official channels.




