How to use Mini PIR sensor HC-SR505 with the Arduino -

HC-SR505 small body sensing module is based on infrared technology, automatic control products, high sensitivity, high reliability, ultra-small, ultra-low-voltage operation mode.  Widely used in various auto-sensing of electrical equipment, especially battery-powered automatic control products

Technical parameters
1. Operating Voltage Range:  DC4.5-20V
2. Static current: <60uA
3. Output level:  High 3.3V / Low 0V
4. Trigger:  repeatable trigger (default)
5. Delay time:  Default 8S + -30% (can be customized range of a few tenths - tens of minutes)
6. PCB Dimensions: 10 * 23mm
7. Induction angle:  <100 degree cone angle
8. Induction distance: 3 meters
9. Working temperature: -20 - +80 degrees
10. Sensor Lens Dimensions: Diameter: 10mm (default)
1. Automatic induction:  to enter the sensing range of the output is high, people leave the sensor range automatically delay off high, output low.  Ultra-small size.
2. Repeatable trigger:  the sensor output high, the delay period, if there is human activity in its sensing range, the output will remain high until people leave after the high variable delay (automatically extended sensor module detects the human body after every activity a delay period, and the last time an event is the starting point of the delay time).
3. Wide operating voltage range:  the default operating voltage DC4.5V-20V.
4. Micropower:  quiescent current < 50 microamps, especially for battery-powered automatic control products.
5. Output high signal: easy docking and all kinds of circuits.


- Arduino board
- HC-SR505 → []
-Jumper wires
- Breadboard

HC-SR505 Pinout

schematic diagram

Arduino sketch

#define SIGNAL_PIN 2
#define LED_PIN 13
void setup()
void loop() {
  if(digitalRead(SIGNAL_PIN)==HIGH) {
    Serial.println("Movement detected.");
  } else {
    Serial.println("Did not detect movement.");