10M+ Electronic Components In Stock
ISO Certified
Warranty Included
Fast Delivery
Hard-to-Find Parts?
We Source Them.
Request a Quote

HC-SR501 PIR Motion Sensor: Pinout, Features, and Applications

груд. 22 2025
Source: DiGi-Electronics
Browse: 1030

The HC-SR501 PIR sensor is one of the most popular motion-detection modules used in electronics and automation projects. Its ability to reliably detect human movement with minimal power consumption makes it ideal for security, lighting control, and smart systems. This article explains how the HC-SR501 works, its internal design, features, limitations, and best practices for achieving accurate and stable motion detection.

Figure 1. HC-SR501 PIR Sensor

What Is the HC-SR501 PIR Sensor?

The HC-SR501 PIR sensor is a passive infrared motion detection module that detects movement by sensing changes in infrared radiation emitted by warm objects such as humans and animals. It does not emit signals; instead, it reacts to heat variation within its detection area. Because of its low cost, adjustable sensitivity, and simple digital output, it is widely used in security systems, automatic lighting, and embedded automation projects.

Working Principle of HC-SR501 PIR Motion Sensor

Figure 2. PIR Motion Sensor Operating Principle

The HC-SR501 operates with an input voltage range of 4.5 V to 12 V, though 5 V is most commonly used. After power-up, the sensor requires a calibration period of about 1–2 minutes, during which it stabilizes to ambient infrared levels. During this time, motion readings may be unreliable.

The sensor provides a digital output on the DOUT pin, which changes state when motion is detected. The module supports two operating modes: Repeatable (H) and Non-Repeatable (L). Repeatable mode is enabled by default.

Repeatable (H) Mode

In Repeatable (H) mode, the output pin goes HIGH (3.3 V) when motion is detected. If motion continues, the delay timer resets repeatedly, keeping the output HIGH. The output only goes LOW after motion stops and the set delay time expires. Sensitivity is controlled using the sensitivity potentiometer.

Non-Repeatable (L) Mode

Figure 3. HC-SR501 Sensing Elements

In Non-Repeatable (L) mode, the output pin goes HIGH (3.3 V) when motion is detected and remains HIGH for the preset delay time, regardless of continued movement. After the delay expires, the output goes LOW even if motion is still present. Sensitivity is adjustable using the same potentiometer.

The motion detection capability of the HC-SR501 is based on its internal sensing structure. The module uses a pyroelectric sensor to detect changes in infrared radiation emitted by moving objects, such as the human body. A Fresnel lens mounted on top of the sensor divides the detection area into multiple zones and focuses infrared energy onto the sensing element, which increases the detection range and widens the sensing angle. The white dome visible on the module is the Fresnel lens itself, while the pyroelectric sensor is located underneath inside a metal protective package.

HC-SR501 PIR Sensor Module Pinout

Figure 4. PIR Sensor Module Pinout

Pin NumberPin NameDescription
1VCCPower input; typically, +5 V (range: 4.5 V–12 V)
2DOUTDigital output; HIGH (3.3 V) when motion is detected, LOW (0 V) when idle
3GNDGround connection

HC-SR501PIR Sensor Features

FeatureDescription
Input Voltage RangeOperates from 4.5 V to 12 V, with 5 V recommended for stable and noise-free performance in microcontroller-based circuits.
Output Signal TypeProvides a digital TTL output (~3.3 V HIGH) when motion is detected, allowing direct interfacing with most microcontrollers.
Motion Detection MethodDetects movement by sensing changes in infrared radiation emitted by warm objects such as humans and animals.
Trigger ModesSupports Repeatable (H) mode for continuous triggering while motion persists, and Non-Repeatable (L) mode for single-pulse detection.
Detection AngleWide field of view of approximately 120°, suitable for room monitoring and corridor coverage.
Detection RangeCan detect motion at distances of up to 7 meters, adjustable via onboard sensitivity controls.
Power ConsumptionVery low current draw (~65 µA), making it ideal for battery-powered and low-power embedded applications.
Operating Temperature RangeReliable operation from –20 °C to +80 °C, supporting both indoor and outdoor (protected) installations.

HC-SR501 Internal Architecture

Figure 5. HC-SR501 Internal Architecture & Components

ComponentFunction
Pyroelectric sensorDetects changes in infrared radiation emitted by warm objects such as humans or animals, converting heat variation into a small electrical signal.
Fresnel lensFocuses and segments infrared energy onto the sensor, significantly increasing the detection angle and effective sensing range.
BISS0001 ICCore signal-processing chip that amplifies, filters, and analyzes the sensor output, then generates a digital trigger signal based on detected motion.
PotentiometersProvide user adjustment for detection sensitivity and output delay time, allowing the module to be tuned for different environments and applications.
Mode jumperSelects the trigger mode, repeatable (re-triggerable) or non-repeatable, controlling how the output behaves when continuous motion is detected.

HC-SR501 Alternative Motion Sensors

Figure 6. Infrared Proximity Sensors

• Infrared proximity sensors – Actively emit infrared light and detect reflections from nearby objects. They are well suited for short-range presence detection and object counting but are more sensitive to surface reflectivity and ambient light conditions.

Figure 7. Ultrasonic Sensors

• Ultrasonic sensors – Use high-frequency sound waves to measure distance and detect movement based on echo timing. These sensors can work in complete darkness and are effective for obstacle detection, though performance may be affected by soft surfaces or environmental noise.

HC-SR501 PIR Sensor Applications

• Automatic street, garage, warehouse, and garden lighting – Turns lights on only when motion is detected, improving energy efficiency and reducing unnecessary power consumption.

• Burglar and intrusion alarm systems – Detects human movement within secured areas and triggers alarms or notifications for enhanced security.

• Motion-triggered security cameras – Activates video recording only when motion is present, saving storage space and extending system lifespan.

• Industrial and home automation control systems – Enables automated control of devices such as fans, doors, HVAC systems, and appliances based on occupancy or movement.

HC-SR501 PIR Sensor Limitations

• Cannot detect motion through walls or glass – PIR sensors rely on infrared radiation, which does not pass effectively through solid objects or most glass surfaces.

• Can be affected by heat sources – Nearby heaters, direct sunlight, or rapidly changing ambient temperatures may cause false triggers.

• Short blind period after triggering – After detecting motion, the sensor may briefly ignore new movement while it resets, depending on delay and mode settings.

Optimizing HC-SR501 Performance

• Mount at a height of 0.8–1.2 meters to align the detection zones with typical human movement and improve trigger consistency.

• Angle the sensor across walking paths rather than directly toward them, allowing the PIR elements to detect stronger infrared changes.

• Use a clean, stable power supply to prevent noise or voltage fluctuations from causing erratic output behavior.

• Protect the sensor from airflow and vibration, as moving air, fans, or mechanical vibrations can lead to false triggers.

• Test and fine-tune settings in real conditions by adjusting sensitivity and delay after installation to match the actual environment.

Following these practices helps minimize false detections, improves reliability, and ensures consistent long-term performance of the HC-SR501 motion sensor.

Conclusion

The HC-SR501 PIR sensor offers a simple, low-cost, and energy-efficient solution for detecting human motion across a wide range of applications. By understanding its operating modes, internal components, and placement requirements, you can significantly improve detection accuracy and reduce false triggers. With proper tuning and installation, the HC-SR501 remains a dependable choice for both beginner and advanced embedded projects.

Frequently Asked Questions [FAQ]

Can the HC-SR501 PIR sensor work with 3.3 V microcontrollers like ESP8266 or ESP32?

Yes. While the module is commonly powered at 5 V, it can operate from 3.3 V in many cases. The output signal is already ~3.3 V TTL, making it safe for direct connection to ESP8266, ESP32, and other 3.3 V logic devices.

Why does the HC-SR501 sometimes trigger even when no one is moving?

False triggers are usually caused by sudden temperature changes, airflow from fans or air conditioners, or electrical noise from unstable power supplies. Proper placement, shielding from heat sources, and using a regulated power supply greatly reduce this issue.

How long does the HC-SR501 stay HIGH after detecting motion?

The output duration depends on the delay potentiometer setting. It can range from a few seconds to several minutes. In Repeatable (H) mode, the timer resets with continued motion; in Non-Repeatable (L) mode, it does not.

Can the HC-SR501 detect pets reliably without triggering on humans?

Not precisely. The sensor detects infrared changes from warm objects, regardless of size. However, reducing sensitivity, adjusting mounting height, and angling the sensor upward can help minimize pet-triggered detections in indoor environments.

Is the HC-SR501 suitable for outdoor use?

The sensor can be used outdoors only if properly enclosed. It is not weatherproof and must be protected from rain, direct sunlight, wind, and rapid temperature changes to maintain stable and reliable performance.