The HC-SR501 PIR motion sensor module is a passive motion detector that responds to changes in infrared radiation in the environment. The PIR motion sensor works by detecting the temperature difference between objects that emit heat and the environment. The sensor is sensitive to the movement of people or animals, making it ideal for applications in alarm systems, lighting automation, or control of electrical devices. It is widely used in projects with microcontrollers, as well as platforms such as Arduino or Raspberry Pi. It can also be used in conjunction with ESP8266, STM32 and AVR systems.
The HC-SR501 PIR motion sensor has a built-in system that detects infrared radiation using a Fresnel lens that focuses the radiation on the detector. The module is equipped with potentiometers that allow you to adjust the duration of the signal after detecting movement and the sensitivity of the sensor, which allows you to adjust the parameters to specific application conditions. Thanks to its small size and low power consumption, this sensor is perfect for projects where energy efficiency and compactness are key.
A PIR sensor (passive infrared sensor) works by detecting infrared radiation emitted by objects with a higher temperature than the ambient temperature, such as people or animals. When an object moves within the range of the detector, the change in the intensity of the radiation is recorded, which generates an output signal. The module generates a high output (3.3 V) when it detects movement, and a low output (0 V) when it does not detect any change. Using the potentiometers, the user can set the time for which the output signal is maintained after detecting movement (from 5 to 200 seconds), and adjust the sensitivity of the sensor.
The HC-SR501 PIR motion sensor module can be easily connected to platforms such as Arduino, Raspberry Pi, STM32 or ESP8266. The module requires a power supply voltage ranging from 5 V to 12 V, which can be supplied from an external source or from the power pin of the development platform. The module's pins are three: power (VCC), ground (GND) and output (OUT). After connecting, the PIR motion sensor is ready to work - just read the output signal from the OUT pin, which will change its state depending on the detected movement.
To connect the sensor to Arduino, you can use the following connection diagram:
In the Arduino code, you can read the state of the OUT pin and control, for example, lighting, relays or other electrical devices based on it. Similarly, you can connect the module to Raspberry Pi or other platforms, using the appropriate power and data reading pins. In the case of Raspberry Pi, the sensor can be used to automatically run system tasks, such as taking photos or turning on an alarm.
Application examples

ZL2AVR (Bascom) and modHC-SR501
Manufacturer
Responsible person
Cables for evaluation boards, set of 10 pcs., red colour
A set for building a weather station equipped with a rainfall sensor and a wind speed and direction meter. SparkFun SEN-15901
Module with PIR EKMC4607112K motion sensor, power consumption in standby mode up to 170 uA. SparkFun SEN-17372
No product available!
Module with the PIR EKMB1107112 motion sensor, the standby power consumption of up to 1 uA. SparkFun SEN-17373
Module with PIR EKMC4607112K motion sensor, power consumption in standby mode up to 170 uA. The board communicates via I2C and is equipped with a Qwiic connector. SparkFun SEN-17374
No product available!
Module with PIR EKMB1107112 motion sensor, power consumption in standby mode up to 1 uA. The board communicates via I2C and is equipped with a Qwiic connector. SparkFun SEN-17375
Sensor for measuring the horizontal wind direction. It has a built-in Hall sensor and allows you to determine one of 16 directions. DFRobot SEN0482
A sensor for measuring the wind speed. It has a built-in Hall sensor and enables measurements in the range from 0 to 32.4 m/s. DFRobot SEN0483
Module with an optical flow sensor PMW3901. It uses a low resolution camera to detect surface movement. It communicates via the SPI interface. Pimoroni PIM453
No product available!
Air speed sensor module based on the FS3000-1005 chip. The board is equipped with Qwiic connectors. SparkFun SEN-18377
Module with trackball and RGB backlight. It has a built-in button and is perfect for building your own mouse, for example. Pimoroni PIM447
No product available!
The module with a gesture detection sensor PAJ7620U2 designed for M5Stack sets. He can recognize 9 gestures and communicates via the I2C interface. M5Stack U127
Doppler radar module with 24GHz transceiver. It allows for precise distance measurement and motion detection. The board communicates via the UART interface. Seeed Studio 101990883
Module with a PIR motion sensor. It allows you to detect movement at a distance of up to 8 meters with a viewing angle of 60°. DFRobot SEN0522
A module with a motion sensor that uses microwaves to detect moving objects. It is powered with the voltage of 5 V and has a digital output. DFRobot SEN0521
Module with STP201M motion sensor with pedometer function. Built on the basis of an accelerometer and MCU, dedicated to sports bands and smartwatches
Module with PIR sensor HC-SR501. It can detect movement up to 7 meters with a detection angle of 120 degrees
The PIR motion sensor module modHC-SR501 is a universal sensor ideal for detecting the presence of people or animals, compatible with Arduino, Raspberry Pi and home automation systems. modHC-SR501