1. Introduction
This manual provides detailed instructions for the setup, configuration, and operation of the DIYmall HC-SR501 PIR IR Motion Sensor and the 1 Channel 5V Relay Module. These components are designed for use in various electronic projects, particularly with microcontrollers like Arduino, to detect motion and control external devices.
2. Product Overview
The package includes multiple HC-SR501 PIR motion sensors and 1-channel 5V relay modules. The HC-SR501 is a passive infrared sensor that detects changes in infrared radiation, typically caused by the movement of warm bodies. The 1-channel 5V relay module allows a low-voltage microcontroller to switch higher voltage or current loads, acting as an electrical switch.

Figure 2.1: Four HC-SR501 PIR Motion Sensors. Each sensor features a white dome lens, a green PCB, and adjustment potentiometers.

Figure 2.2: Three 1 Channel 5V Relay Modules. Each module consists of a blue relay component mounted on a black PCB with screw terminals for connections.
3. Specifications
3.1 HC-SR501 PIR Motion Sensor
- Operating Voltage: DC 4.5V - 20V
- Static Current: <50uA
- Output Voltage: High 3.3V / Low 0V
- Trigger Mode: L (Non-repeatable Trigger) / H (Repeatable Trigger)
- Delay Time: Adjustable (0.5s to 200s, default 5s)
- Detection Angle: <120° cone angle
- Detection Distance: Adjustable (3m to 7m, default 3m)
- Operating Temperature: -20°C to +80°C
3.2 1 Channel 5V Relay Module
- Operating Voltage: DC 5V
- Control Signal: TTL logic (High level trigger)
- Max Load: 10A 250VAC / 10A 30VDC
- Isolation: Optocoupler isolation
- Indicator: Power LED, Status LED
4. Setup and Configuration
4.1 HC-SR501 PIR Sensor Pinout
The HC-SR501 sensor has three pins for connection:
- VCC: Power supply (DC 4.5V - 20V)
- OUT: Digital output (3.3V high when motion detected, 0V low when no motion)
- GND: Ground
4.2 1 Channel 5V Relay Module Pinout
The relay module has input pins for control and output terminals for the load:
- Input Pins:
- VCC: Power supply (DC 5V)
- GND: Ground
- IN: Control signal input (connect to microcontroller digital output)
- Output Terminals (Screw Terminals):
- NO (Normally Open): Connected to COM when relay is active.
- NC (Normally Closed): Connected to COM when relay is inactive.
- COM (Common): Connect to one side of the load's power source.

Figure 4.1: Top view of the 1 Channel 5V Relay Module, indicating the VCC, GND, IN pins and the NO, NC, COM screw terminals.
4.3 Adjusting Sensitivity and Delay Time (HC-SR501)
The HC-SR501 sensor has two potentiometers for adjustment:
- Sensitivity Potentiometer: Adjusts the detection distance.
- Turning clockwise (right) decreases sensitivity and reduces the detection range (approx. 3 meters).
- Turning counter-clockwise (left) increases sensitivity and extends the detection range (approx. 7 meters).
- Delay Time Potentiometer: Adjusts how long the output remains HIGH after motion is detected.
- Turning clockwise (right) increases the delay (up to approx. 5 minutes).
- Turning counter-clockwise (left) decreases the delay (down to approx. 3 seconds).

Figure 4.2: HC-SR501 potentiometers for adjusting sensitivity and output timing (delay).

Figure 4.3: Visual guide for adjusting sensitivity and delay on the HC-SR501 sensor.
4.4 Trigger Mode Selection (HC-SR501)
The HC-SR501 has a jumper cap to select between two trigger modes:
- H (Repeatable Trigger Mode): When motion is detected, the output goes HIGH and stays HIGH as long as motion is continuously detected within the delay period. The delay timer resets with each new detection. This is suitable for applications where continuous detection is required, such as automatic lighting.
- L (Single Trigger Mode): When motion is detected, the output goes HIGH for the set delay time and then goes LOW, regardless of whether motion is still present. It will not re-trigger until the delay time has fully elapsed and motion is detected again. This is suitable for applications where a single event trigger is needed.

Figure 4.4: Explanation of Single Trigger Mode (L) and Repeatable Trigger Mode (H) via jumper setting.
4.5 Wiring Examples
4.5.1 Connecting HC-SR501 to Arduino
Connect the HC-SR501 sensor to your Arduino board as follows:
- HC-SR501 VCC to Arduino 5V
- HC-SR501 GND to Arduino GND
- HC-SR501 OUT to Arduino Digital Pin (e.g., Pin 2)
4.5.2 Connecting 1 Channel 5V Relay Module to Arduino
Connect the relay module to your Arduino board as follows:
- Relay Module VCC to Arduino 5V
- Relay Module GND to Arduino GND
- Relay Module IN to Arduino Digital Pin (e.g., Pin 3)

Figure 4.5: A 1 Channel 5V Relay Module wired to an Arduino board using jumper wires.
4.5.3 Connecting a Load to the Relay Module
To control an external device (load) with the relay module, follow these general steps. Always exercise caution when working with high voltages. If you are unsure, consult a qualified electrician.
- Disconnect power from the load circuit before wiring.
- Identify the power source and the load (e.g., a light bulb).
- Connect one side of the load's power source (e.g., Live/Phase wire) to the COM terminal of the relay.
- Connect the other side of the load (e.g., one terminal of the light bulb) to either the NO (Normally Open) or NC (Normally Closed) terminal, depending on your desired default state.
- Use NO if you want the load to be OFF by default and turn ON when the relay is activated.
- Use NC if you want the load to be ON by default and turn OFF when the relay is activated.
- Connect the other side of the load (e.g., the other terminal of the light bulb) to the neutral wire of the power source.

Figure 4.6: Example wiring diagram for connecting a 220V AC load (light bulb) to a relay module. Note the separate power source for the load.
5. Operating Instructions
Once wired and configured, the HC-SR501 PIR sensor will detect motion and provide a HIGH signal on its OUT pin. This signal can then be read by a microcontroller (like Arduino) to trigger actions, such as activating the relay module.
- Power On: Apply power to both the sensor and the relay module (typically 5V DC from the microcontroller).
- Warm-up Period: The HC-SR501 sensor requires a brief warm-up period (approx. 30-60 seconds) after power-on. During this time, it may trigger randomly. Avoid making adjustments or expecting accurate readings during this phase.
- Motion Detection: When motion is detected within the sensor's range, the OUT pin will go HIGH (approx. 3.3V).
- Relay Activation: If the relay module's IN pin receives a HIGH signal (e.g., from the sensor's OUT pin or an Arduino digital output), the relay will switch its state (NO closes, NC opens). The status LED on the relay module will typically illuminate.
- Adjustments: Fine-tune the sensitivity and delay time using the potentiometers as described in Section 4.3 to suit your application's needs.
- Trigger Mode: Ensure the jumper is set to the desired trigger mode (H for repeatable, L for single) as described in Section 4.4.
6. Maintenance
These modules are generally low-maintenance. To ensure optimal performance and longevity:
- Keep Clean: Ensure the PIR sensor's dome lens is free from dust, dirt, or obstructions, which can affect detection accuracy.
- Avoid Moisture: Protect both modules from water and high humidity.
- Proper Power Supply: Use a stable DC power supply within the specified voltage range.
- Physical Protection: Avoid physical impact or excessive force on the components.
- Environmental Conditions: Operate within the specified temperature range. Extreme temperatures can affect performance.
7. Troubleshooting
- Sensor Not Detecting Motion:
- Check power connections (VCC, GND).
- Ensure the sensor has completed its warm-up period.
- Adjust sensitivity potentiometer clockwise (increase sensitivity).
- Verify the detection angle and distance are appropriate for the environment.
- Ensure no obstructions are blocking the sensor's view.
- Test the sensor in a different environment to rule out environmental interference (e.g., heat sources).
- False Triggers from Sensor:
- Adjust sensitivity potentiometer counter-clockwise (decrease sensitivity).
- Ensure the sensor is not exposed to direct sunlight, strong air currents, or rapid temperature changes.
- Check for nearby heat sources (e.g., heating vents, electronics) that might cause false positives.
- Ensure the sensor is mounted stably and not vibrating.
- Relay Not Switching:
- Check power connections to the relay module (VCC, GND).
- Verify the control signal (IN pin) from the microcontroller or sensor is correctly providing a HIGH signal when expected.
- Ensure the load is correctly wired to the COM and NO/NC terminals.
- Check if the load itself is functional.
- Confirm the relay's operating voltage matches the supply (5V DC).
- Relay Always ON/OFF:
- Double-check the wiring to the NO/NC terminals. You might have used NC instead of NO, or vice-versa, for your desired default state.
- Verify the control signal logic from your microcontroller.
8. Warranty and Support
For warranty information or technical support, please refer to the retailer or manufacturer's official website. Keep your purchase receipt for warranty claims. General support for DIY electronics projects can often be found in online communities and forums dedicated to Arduino and similar platforms.
For more information about DIYmall products, visit the official DIYmall Store on Amazon.