PIR sensor is a widespread sensor that can detect the motion of a human or any animal that releases heat. Using a PIR Motion sensor makes it easy to make security systems for any facility. This sensor can work indoors or outdoors with or without light. Modern security systems use PIR Motion Sensors to trigger automatic alarms, security lights, and many more devices. Let's make a motion sensor-based security system using a PIR sensor and Arduino.
How Do PIR Motion Sensors Work?
A passive infrared (PIR) sensor, also known as a Motion sensor, can detect heat energy around it using two pyroelectric sensors. The sensors generate signals and compare them. If the signal from one sensor differs from others, the sensor engages. This engagement can be switching lights and relays, sending a message, or sending a signal to a microcontroller.
HC-SR505 Mini PIR Motion Sensor |
HC-SR505 Mini PIR Motion Sensor specification
Unlike HC-SR501, the HC-SR505 mini-PIR sensor has limited features with a small body but high sensitivity, high reliability, and low operating voltage mode. The HC-SR505 PIR Motion Sensor comes with the following technical parameters:
- Operating voltage: DC 4.5v - 20v
- Signal Output level: High 3.3v - Low 0v
- Trigger Mode: Repeatable trigger (Default)
- Angle range: < 100-degree cone angle
- Distance range: 3 meters
- working temperature" -20 - + 80 degrees
- Body dimensions: 10X23mm
HC-SR505 PIR Sensor Pinout
HC-SR501 PIR Sensor has 3 pins to interface with different circuits or microcontrollers. The pins are VCC Outputand GND.
HC-SE505 PIR Sensor Pinout |
VCC of PIR is the power input. We will connect the power pin with Arduino 5volt.
Output is the HC-SR505 PIR Motion Sensor signal, which we will connect with Arduino digital pin D2.
GND is the negative pin of the PIR sensor, which we will connect with the Arduino GND pin.
We will connect a red LED, which will turn on during the HC-SR505 PIR sensor trigger. This will indicate if there is any movement. The LED positive pin will go to Arduino digital pin D5, and the GND pin will go to Arduino GND pin.
Interfacing HC-SR505 Mini PIR Sensor with Arduino
Is straightforward to read HC-SR505 Mini PIR Motion Sensor data using Arduino. The circuit diagram shows how to connect the HC-sr505 PIR sensor with Arduino UNO.
HC-SR505 PIR Sensor wiring with Arduino UNO |
Video demonstration of the wiring between Arduino and HC-SR505
The video shows the circuit design of the project. Watch the video to understand the connections between the Arduino UNO and HC-SR505 Mini PIR Motion Sensor.
Arduino Code for Interfacing HC-SR505 Mini PIR Motion Sensor
The coding is simple and easy to understand. We will check if there is any signal coming from the PIR sensor. If there is any movement, the PIR sensor will trigger, and then the RED led will turn on.
Summary
Many automation and security systems PIR motion sensors are being used widely. PIR sensor interface with any circuit and microcontroller such as Arduino, ESP, raspberry pi, and other similar microcontroller-based IoT devices is straightforward. HC-SR505 Mini PIR Motion Sensor is cheap, easy to use, reliable, and works in almost any environment.
Post a Comment