DIYmall HC-SR501

DIYmall HC-SR501 PIR Motion IR Sensor Module Instruction Manual

Model: HC-SR501

1. Introduction

The DIYmall HC-SR501 PIR (Passive Infrared) Motion Sensor Module is designed to detect infrared radiation emitted by moving objects, typically human bodies. This module is commonly used in security systems, automated lighting, and various DIY electronics projects, especially with microcontrollers like Arduino. It offers adjustable sensitivity and delay time, making it versatile for different applications.

Five HC-SR501 PIR motion sensor modules

Image 1: A pack of five HC-SR501 PIR motion sensor modules.

2. Features

  • Adjustable output timing from 0.5 seconds to 200 seconds using Potentiometer 105.
  • Adjustable sensitivity for varied detection ranges.
  • Supports both single trigger and repeatable trigger modes.
  • Designed for integration into security products, human body sensor toys, industrial automation, and control systems.
  • Equipped with an infrared sensor cell to detect human body infrared radiation.

3. Specifications

ParameterValue
Product TypeHC-SR501 Body Sensor Module
Operating Voltage RangeDC 4.5-20V
Quiescent Current<50uA
Trigger ModeL: Non-repeatable trigger / H: Repeatable trigger (Default: Repeatable)
Delay Time5-18 seconds (adjustable, range 0.xx seconds to tens of seconds)
Block Time2.5 seconds (default, can be adjusted)
Board Dimensions32mm x 24mm
Sensor Angle<100° cone angle
Lens Size (Sensor Diameter)23mm (Default)
Maximum Range15 Feet (approximately 4.5 meters)
Item Weight1.58 Ounces

4. Setup

4.1 Pin Definition

The HC-SR501 module typically has three pins for connection:

  • VCC: Power input (DC 4.5-20V).
  • OUT: Digital signal output (High when motion detected, Low when no motion).
  • GND: Ground connection.
Diagram showing pin definitions and example wiring for DC and AC loads

Image 2: Pin definitions and example wiring diagrams for DC and AC loads.

4.2 Basic Connection (e.g., with Arduino)

To connect the HC-SR501 to a microcontroller like Arduino, follow these steps:

  1. Connect the VCC pin of the HC-SR501 to the 5V pin on your Arduino.
  2. Connect the GND pin of the HC-SR501 to the GND pin on your Arduino.
  3. Connect the OUT pin of the HC-SR501 to a digital input pin on your Arduino (e.g., Digital Pin 2).
Diagram showing HC-SR501 connected to an Arduino board

Image 3: Example connection of the HC-SR501 to an Arduino board.

4.3 Initial Power-Up

Upon initial power-up, the sensor typically undergoes a calibration period of approximately 30-60 seconds. During this time, it may trigger randomly. Avoid movement in front of the sensor during this period to ensure proper calibration.

Video 1: Overview of the DIYmall HC-SR501 PIR Motion Sensor Module and its basic functionality.

5. Operating the Module

The HC-SR501 module features two potentiometers and a jumper for configuration.

5.1 Sensitivity Adjustment

The potentiometer labeled 'Sensitivity' (often marked 'Sx' or 'S') controls the detection range of the sensor.

  • Turning the potentiometer clockwise (right) decreases sensitivity, reducing the detection range (e.g., to approximately 3 meters).
  • Turning the potentiometer counter-clockwise (left) increases sensitivity, extending the detection range (e.g., to approximately 7 meters).
Close-up of the HC-SR501 module showing the sensitivity and delay potentiometers

Image 4: The potentiometers on the HC-SR501 module for sensitivity and delay time adjustment.

5.2 Delay Time Adjustment

The potentiometer labeled 'Delay Time' (often marked 'Tx' or 'T') controls how long the output signal remains HIGH after motion is detected.

  • Turning the potentiometer clockwise (right) increases the delay time (e.g., up to approximately 5 minutes).
  • Turning the potentiometer counter-clockwise (left) decreases the delay time (e.g., down to approximately 3 seconds).

5.3 Trigger Mode Selection

A solder jumper on the module allows selection between two trigger modes:

  • H (Repeatable Trigger): In this mode, if motion is detected again during the delay time, the delay timer is reset, and the output remains HIGH. This is the default setting.
  • 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.

Note: The retrigger jumper is a solder jumper, requiring soldering to change its setting.

Diagram illustrating sensitivity and delay adjustment directions and jumper settings for trigger modes

Image 5: Visual guide for adjusting sensitivity, delay, and setting the trigger mode jumper.

Video 2: Demonstration on how to adjust the sensitivity and time delay of the HC-SR501 PIR sensor.

6. Maintenance

The HC-SR501 PIR motion sensor module requires minimal maintenance. Keep the sensor lens clean and free from dust or obstructions to ensure optimal performance. Avoid exposing the module to extreme temperatures or moisture.

7. Troubleshooting

  • Erratic Behavior or Inconsistent Output: Ensure the module is powered with a stable DC 5V supply. While the module can operate up to 20V, 5V is a common and reliable voltage for consistent output, especially when interfacing with microcontrollers.
  • False Positives:
    • Ambient Light: The sensor can be sensitive to sudden changes in ambient light. Position the sensor in areas with stable lighting or use it in darker environments.
    • Movement Direction: The sensor's sensitivity can vary based on the direction of movement. If experiencing issues, try rotating the sensor 90 degrees to optimize detection for the intended movement path.
    • Electrical Noise: Shorten signal wires and consider adding a small capacitor (e.g., 0.1uF) between the signal and ground pins if electrical noise is suspected.
  • Sensor Not Triggering:
    • Verify power connections (VCC and GND) and ensure the correct operating voltage.
    • Check the sensitivity adjustment; it might be set too low.
    • Ensure there are no obstructions blocking the sensor's field of view.
    • Allow for the initial calibration period after power-up.

8. Applications

The HC-SR501 PIR sensor module is suitable for a wide range of applications, including:

  • Security Systems: Motion detection for alarms and surveillance.
  • Automated Lighting: Automatically turning lights on/off in hallways, corridors, or rooms.
  • Smart Home Devices: Integration into home automation projects for presence detection.
  • Energy Saving: Controlling fans, washing machines, and other devices based on human presence.
  • Interactive Displays: Triggering events or displays when a person approaches.
Diagram showing a 220V light bulb connected to a motion sensor for automatic control

Image 6: Example application: controlling a 220V light bulb with the motion sensor.

9. Support

For further assistance or to explore other products, please visit the official DIYmall store:

Visit DIYmall Store

Related Documents - HC-SR501

Preview ESP32-3248S035 Display Module: Firmware Flashing Guide with Arduino IDE and Espressif Tool
A comprehensive guide to flashing firmware onto the ESP32-3248S035 TFT capacitive touch display module using both the Arduino IDE and the Espressif Download Tool. Includes step-by-step instructions and configuration details.
Preview DIYmall 4WD Technical Car Chassis Building Kit with IR Remote Control
Discover the DIYmall 4WD Technical Car Chassis Building Kit, designed for enthusiasts and creators. This kit includes essential components such as an IR remote control, M servo motor, and AA battery box, enabling the construction of advanced robotic and vehicle models. Compatible with LEGO-style MOC projects, it offers a versatile platform for technical building.
Preview PIR Audio Trigger: Electrical Wiring Information and Arduino Code
This document provides detailed electrical wiring information, a parts list, and Arduino Nano code for creating an audio trigger system activated by a PIR sensor. Learn how to set up the project for motion-activated audio playback.
Preview ESP32 Basic Starter Kit Guide
Explore the ESP32 Basic Starter Kit with this comprehensive guide. Learn about ESP32 features, development boards, and get hands-on with projects involving digital and analog inputs/outputs, PWM, motion sensors, web servers, and OLED displays.
Preview TACO Zone Control Product Information and Wiring Guide
Comprehensive overview of TACO zone control products, including switching relays, zone valve controls, and add-on power controls, with detailed product information, specifications, and wiring diagrams for HVAC systems.
Preview BDD Bluetooth Car Chassis Kit Assembly Guide
Step-by-step assembly instructions for the CommunicA BDD Bluetooth Car Chassis Kit, including component installation, wiring, and sample code.