How to use PIR Motion Sensor
The PIR sensor stands for Passive Infrared sensor. It is a low cost sensor which can detect the presence of Human beings or animals. This sensor has three output pins Vcc, Output and Ground as shown in the pin diagram above. Since the output pin is 3.3V TTL logic it can be used with any platforms like Arduino, Raspberry, PIC, ARM, 8051 etc..
The module can be powered from voltage 4.5V to 20V but, typically 5V is used. Once the module is powered allow the module to calibrate itself for few minutes, 2 minutes is a well settled time. Then observe the output on the output pin. Before we analyse the output we need to know that there are two operating modes in this sensor such as Repeatable(H) and Non- Repeatable(L) and mode. The Repeatable mode is the default mode.
The output of the sensor can be set by shorting any two pins on the left of the module as shown below. You can also notice two orange colour potentiometers that can be used to set the sensitivity and time which will be explained further below.
|Pin Number||Pin Name||Description|
|1||Vcc||Input voltage is +5V for typical applications. Can range from 4.5V- 12V|
|2||High/Low Ouput (Dout)||Digital pulse high (3.3V) when triggered (motion detected) digital low(0V) when idle(no motion detected|
|3||Ground||Connected to ground of circuit|