Product Description:
Specifications:
| Specification | Value |
|---|---|
| Sensor Type | Passive Infrared (PIR) |
| Detection Range | Up to 7 meters (23 feet) |
| Detection Angle | 110 degrees |
| Power Supply | 5V DC |
| Output | Digital (high or low) |
| Operating Temperature | -20°C to +80°C |
| Dimensions | Approximately 32mm x 24mm |
| Mounting | Through-hole or surface mount |
Features:
- High Sensitivity: Detects even small movements.
- Adjustable Sensitivity: Can be fine-tuned for specific applications.
- Low Power Consumption: Ideal for battery-powered projects.
- Easy to Use: Simple digital output for easy integration.
- Wide Range of Applications: Perfect for security systems, lighting control, and automation projects.
Using the HC-SR501 Module with Arduino:
Required Components:
- Arduino board (e.g., Uno, Nano)
- HC-SR501 PIR Motion Sensor Module
- Jumper wires
Wiring:
- Power: Connect the VCC pin of the module to the 5V pin of the Arduino.
- Ground: Connect the GND pin of the module to the GND pin of the Arduino.
- Output: Connect the OUT pin of the module to a digital pin on the Arduino (e.g., 2).
Arduino Code:
C++
const int motionSensorPin = 2;
void setup() {
pinMode(motionSensorPin, INPUT);
Serial.begin(9600);
}
void loop() {
int sensorState = digitalRead(motionSensorPin);
if (sensorState == HIGH) {
Serial.println("Motion detected!");
// Add your desired action here, e.g., turn on a LED
} else {
Serial.println("No motion detected.");
// Add your desired action here, e.g., turn off a LED
}
delay(100);
}
Explanation:
- Digital Read: The digitalRead() function reads the digital value from the motion sensor pin.
- Motion Detection: When motion is detected, the sensorState will be HIGH.
- Action Triggering: You can add your desired actions within the if and else blocks, such as turning on/off LEDs, activating motors, or triggering alarms.
Package Includes:
1x HC-SR501 PIR Motion Sensor Module



