Skip to product information
1 of 4

Blue PCB Electronics

1E40004 HC-SR501 Motion Sensor Detector Module IR Pyroelectric Infrared PIR

1E40004 HC-SR501 Motion Sensor Detector Module IR Pyroelectric Infrared PIR

Regular price Dhs. 20.00
Regular price Dhs. 25.00 Sale price Dhs. 20.00
Sale Sold out
View full details

Description

The HC-SR501 is a passive infrared (PIR) motion sensor module used to detect human or animal motion in a specified area. It operates at 5V DC and uses an infrared sensor to detect changes in the amount of infrared radiation in the environment. The module has a detection range of up to 7 meters and an adjustable delay time and sensitivity level. It outputs a digital signal that indicates whether motion has been detected or not. The HC-SR501 is commonly used in security systems, lighting control, and home automation applications.

Datasheet

Package Includes:

  • 1 x HC-SR501 PIR Sensor


Features:

  • Wide operating voltage range from 4.8V to 20V, making it compatible with a variety of power sources.
  • Low power consumption in idle mode is only 50uA, which makes it an energy-efficient solution for battery-powered projects. In fully active mode, the power consumption is 65mA.
  • High reliability due to the use of the BISS0001 PIR processing chip.
  • Adjustable sensitivity or detection distance allows you to customize the module to fit the specific needs of your project.
  • Adjustable output time delay lets you control how long the output signal remains high after detecting motion.
  • Can be used separately without any additional microcontroller or platform like Arduino or Raspberry Pi, but it can also be interfaced with these platforms to enhance your project.
  • The low cost makes it an affordable choice for hobbyists and DIY projects.
  • 120-degree detection angle ensures a wide coverage area for detecting motion.
  • A detection range of 3 to 7 meters or more makes it suitable for a variety of applications.
  • Easy to communicate with any platform like Arduino or Raspberry Pi and all microcontrollers, making it a versatile component for your project.


Description:

The HC-SR501 PIR motion sensor module is a widely used electronic component that can detect human or animal motion within a specified range. The module consists of a pyroelectric infrared sensor, which detects changes in the amount of infrared radiation in the environment caused by the motion of a warm object such as a person or animal. The module operates at 5V DC and is compatible with Arduino and other microcontrollers. The detection range of the HC-SR501 module can be adjusted by rotating the onboard potentiometer. The maximum detection range is up to 7 meters, and the detection angle is 120 degrees.  The HC-SR501 outputs a digital signal that indicates whether motion has been detected or not. The output signal is high (3.3V) when motion is detected, and low (0V) when there is no motion. The module also has an onboard jumper that can be used to set the output signal to either a high or low state. The HC-SR501 motion sensor module is commonly used in security systems, lighting control, and home automation applications. For example, it can be used to turn on a light when someone enters a room, or to trigger an alarm when an intruder is detected. The module can be easily integrated with Arduino and other microcontrollers using digital input/output pins.


Principle of Work:

The HC-SR501 motion sensor module uses passive infrared (PIR) technology to detect movement. The module has a built-in pyroelectric sensor that senses the infrared radiation levels produced by the movement of an object in its field of view. When the module detects motion, it sends a signal to the control circuit that triggers the output pin. The output pin changes from low to high, indicating that motion has been detected. The duration of the high signal is controlled by an onboard potentiometer and can be adjusted to a desired length of time. After the set time period has elapsed, the output pin returns to its initial low state. The module has three pins, including VCC, GND, and OUT. The VCC pin is connected to a power supply within the range of 5-20V, and the GND pin is connected to the ground. The OUT pin is connected to a digital input pin on a microcontroller or other circuit. When motion is detected, the output pin changes from low to high and remains high for a specified duration, as set by the potentiometer. The duration of the high signal can be adjusted as per the user's requirements.

Sensitivity (range) adjustment

The maximum sensing distance (detection range) of the HC-SR501 is 7 meters. The detecting distance may be adjusted by rotating the sensitivity potentiometer CW or CCW. The detecting distance is increased to a maximum of 7 meters by rotating the potentiometer clockwise. Counterclockwise rotation reduces the detecting distance to a minimum of 3 meters.

Time-delay adjustment (Tx)

This potentiometer may control how long the output remains HIGH after motion is detected. The delay is 3 seconds at the most and 300 seconds or 5 minutes at the most. Increase the delay by turning the potentiometer clockwise, and decrease the delay by turning it counterclockwise.

Trigger selection jumper

The yellow jumper allows you to choose between the two trigger modes. It may be changed to L (single trigger) or H (double trigger) (repeating trigger):

  • Single trigger – When motion is detected, the output becomes HIGH. It will remain HIGH for the duration specified by the potentiometer. Any movement during this time is ignored and does not reset the timer.
  • Repeating trigger – When motion is detected, the delay timer is reset.


Pinout of the Module:

HC-SR501 PIR Motion Sensor Arduino Tutorial (3 Examples)

  • VCC: Power supply pin, connected to a DC voltage source of 4.8V to 20V.
  • GND: Ground pin, connected to the negative terminal of the power supply and the ground of the microcontroller or circuit.
  • OUT: Output pin, connected to a digital input pin of a microcontroller or other circuit. The output pin changes from low to high when motion is detected, and remains high for a set amount of time, after which it returns to low. The duration of the high signal can be adjusted using the onboard potentiometer.
  • Sensitivity adjustment potentiometer: Used to adjust the sensitivity or detection distance of the sensor. Turn clockwise to increase sensitivity, and counterclockwise to decrease it.
  • Time delay adjustment potentiometer: Used to adjust the output time delay of the sensor. Turn clockwise to increase the time delay, and counterclockwise to decrease it.
  • Trigger mode switch: Used to select the trigger mode of the sensor. Set to "H" for non-repeatable trigger mode, and "L" for repeatable trigger mode. In non-repeatable trigger mode, the sensor outputs a high signal when motion is detected, and then stays low until the motion stops and starts detecting again. In repeatable trigger mode, the sensor outputs a high signal when motion is detected, and stays high as long as motion is detected.


 

Applications:

  1. Security systems: The module is commonly used in security systems to detect any movement in a specific area and activate an alarm.
  2. Home automation: The module can be used in home automation systems to turn on lights or other appliances when motion is detected.
  3. Robotics: The module can be used in robotics to detect the presence of people or objects and activate specific movements or actions.
  4. Energy-saving systems: The module can be used in energy-saving systems to turn on lights or other appliances only when motion is detected, thus saving energy.
  5. Industrial automation: The module can be used in industrial automation to detect movement in a specific area and activate specific processes.
  6. Smart cameras: The module can be used in smart cameras to detect the presence of people or objects and activate recording or other actions.
  7. Access control: The module can be used in access control systems to detect the presence of people and activate the opening of doors or gates.
  8. Wildlife monitoring: The module can be used in wildlife monitoring to detect the presence of animals and trigger specific actions such as taking photos or recording videos.



Circuit:

The connection of the HC-SR501 motion sensor module to an Arduino, with an LED connected to pin 13:

Arduino with PIR Motion Sensor - Arduino Project Hub

  • Connect the VCC pin of the module to the 5V pin of the Arduino.
  • Connect the GND pin of the module to the GND pin of the Arduino.
  • Connect the OUT pin of the module to digital pin 2 of the Arduino.
  • Connect the anode (positive leg) of the LED to digital pin 13 of the Arduino.
  • Connect the cathode (negative leg) of the LED to a 220-ohm resistor or without it, and then connect the other end of the resistor to the GND pin of the Arduino.



Library:

The module does not need a Library to function with Arduino


Code:

Code to use the HC-SR501 motion sensor module with an Arduino and turn on an LED connected to pin 13 when motion is detected:

// Set up pins
int motionSensorPin = 2;
int ledPin = 13;

void setup() {
  pinMode(motionSensorPin, INPUT);
  pinMode(ledPin, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  int motionDetected = digitalRead(motionSensorPin);
  if (motionDetected == HIGH) {
    Serial.println("Motion detected!");
    digitalWrite(ledPin, HIGH);
    delay(1000); // Turn on LED for 1 second
  } else {
    digitalWrite(ledPin, LOW);
  }
}  

 In this code, we first set up the motion sensor pin and the LED pin in the setup() function. Then, in the loop() function, we read the motion sensor pin using digitalRead(). If the motion is detected (the pin reads HIGH), we turn on the LED by setting the LED pin to HIGH and delaying for 1 second. If no motion is detected, the LED is turned off by setting the pin to LOW. The Serial.println() function is used to output a message to the serial monitor when motion is detected, for debugging purposes.

Technical Details:

Voltage 4.8 V – 20 V
Current (idle) <50 µA
Logic output 3.3 V / 0 V
Delay time 0.3 s – 200 s, custom up to 10 min
Lock time 2.5 s (default)
Trigger repeat : L = disable , H = enable
Sensing range <120 °, within 7 m
Temperature – 15 ~ +70 °C
Dimension 32 x 24 mm

screw-screw 28 mm, M2

Lens diameter: 23 mm

 Â