top of page

PIR Sensor Interfacing with Arduino "A simple Tutorial"


To develop the basic concept of Arduino technology and hardware sensor interfaces, the best way to do this is by creating a primitive device like a PIR motion sensor.

A motion sensor is a device that detects the motion or the presence of any person in the range of the sensor. A PIR Motion sensor is the abbreviation of Passive infra red sensor, the sensor is basically made up of pyroelectric sensors. they detect the presence of thermal infrared radiations released by our body and convert them into electrical signals, these electrical signals are used to pass the current in the circuits which in turn buzzes the siren or the detector alarms.

To develop a PIR Motion sensor we will need:-

(i) an Arduino clone board.

(ii) PIR MOTION SENSOR

(iii) piezo buzzer.

(iv) 9 V battery.

(v) connecting wires.

WORKING

When the PIR motion sensor detects a person, it outputs a 5 V signal to Arduino. Thus, an interrupt on the Arduino is triggered. And we define what the Arduino should do as it detects an intruder. Here, we are creating an alarm sound through a piezo buzzer. Therefore, when the sensor detects an intruder, an alarm sound will get triggered through the buzzer. The piezo buzzer is activated through the Arduino using PWM signals.

CONNECTING THE PIR ARDUINO MOTION SENSOR:-

Connect the Vcc and GND of the sensor to Arduino’s 5 V and GND pins. Next, connect the Output signal pin of the motion sensor to Arduino’s digital pin no 2 (interrupt pin 0). After making the connections we have to connect the buzzer to the Arduino, to do this connect the negative terminal of the buzzer (black wire) to Arduino’s GND pin. And the positive terminal of the buzzer (red wire) to Arduino’s digital pin no 9.

after making the connections we have to upload the program for the Arduino and the buzzer to the Arduino chip.


Now, we have to test the Arduino motion sensor along with the piezo buzzer to see if it works. To do this, download the code for the Arduino motion sensor project from here. Next, open this code in the Arduino IDE. Upload the code to your Arduino. Check if it works by opening the serial monitor (at a baud rate setting of 115200bps).


use this Arduino motion sensor to build burglar alarm systems, home automation systems.










bottom of page