Description
What it is
The HC-SR505 module is a passive infrared (PIR) motion detector designed for use with Arduino and other microcontrollers. This device detects the presence of movements in its field of view, making it suitable for various DIY applications such as home alarms or people counters.
Features
- Infrared PIR motion detector
- Great for automation and security projects
What it is for
The HC-SR505 module is ideal for creating home alarm systems that activate a siren or other actions when motion is detected. It can also be used to automatically control the light in response to movements in the rooms. It is compatible with Arduino and other microcontrollers.
Tutorial: How to use HC-SR505 Motion Detector Module
The HC-SR505 module is a passive infrared (PIR) sensor that detects the presence of motion. It is ideal for DIY projects such as home alarms, people counters, or automatic light activation.
What you need
- Arduino
- jumper connectors
- 5V DC power supply
Steps
- Connect the VCC connector of the module to +5V of the Arduino
- Connect GND of the module to the GND pin of Arduino
- Connect OUT of the module to a digital switch (e.g., D2) on Arduino
- Install the provided Sketch in the Arduino IDE software
- Compile and upload the code to the Arduino
- Check the connection with the Arduino LED or an external display
- Adjust the sensitivity of the module if necessary (check the datasheet)
- Test the device under motion conditions
Example code
const int pirPin = 2;
int statoAttuale = LOW;
void setup() {
pinMode(pirPin, INPUT);
Serial.begin(9600);
}
void loop() {
statoAttuale = digitalRead(pirPin);
if (statoAttuale == HIGH) Serial.println("Movimento rilevato");
}
Mini project
Create a home alarm system that activates a siren when motion is detected
Common mistakes
- Do not connect the module to adequate voltage
- Ignore the sensitivity of the device
- Do not test before implementing in complex projects
Recommended accessories
- Arduino Alarm Siren SKU: ARD012345
- 16×2 LCD Display for Arduino SKU: ARD098765
- PCB Frame Soldering Prototype Kit SKU: ARD045678
Frequently asked questions
How to adjust sensitivity?
Check the module HC-SR505 datasheet
Can it be used outdoors?
Yes, but make sure the device is protected from extreme conditions







Reviews
There are no reviews yet.