Use a PIR sensor

Pir sensor

Pir sensor

This is a PIR ( Infra Red ) sensor ; this device is detecting movement of people by sending a signal on its output. This sensor is generating a +3.3V signal on output when a movement is detected. The duration and the sensitivity can be parametrized.

As you can see on this photo, you have 3 things you can configure on this device that will impact its behavior. The purpose of this post is to describe the use of each.


First of all, let’s see how to connect the PIR sensor :

PIR Sensor Connector

PIR Sensor Connector

On the top, you can see a 3 pin header, from left to right, you have Ground, SigOUT, VCC.

Apparently, a such sensor have a warm-up time from 20 sec to 2 minute where the SigOUT signal may change L to H in a loop.  So you have to ignore the output a certain time.



Then we have two variable resistors as shown on this picture :

PIR Sensor detail

PIR Sensor detail

The first variable resistor on the left is indicating the duration of the signal High (3V), if you turn it on the anti-clockwise you reduce the duration of the signal, the minimal time is 5 second ; the maximum time is … really long ! When the signal goes down (L), you have a 5 second period during which the sensor does not detect anything.

The second variable resistor on the right side is indicating the sensitivity of the detection,

The last thing is the jumper on the right. This allow to select a re-triggered mode vs a non-re-triggered mode. In the non re-triggered mode (default one) the signal is set H when a movement is detected, for a specified duration. If some new movement are detected during this period, the signal duration will not change. By opposition, is a re-triggered mode, is a new movement is detected, the signal duration restart from 0 and you get a High value until no movement is detected for the duration time (this mode is useful if you use it to switch a light on and what to keep it on until you get no movement). In both mode, you have a certain time after the signal is going down where to movement is detected. The duration is about 5 second with this device.

You have also to note that with a such device the stability of the power supply is really important otherwise the sensor will not stabilize and will blink in a loop.


Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.