![pir sensor fritzing pir sensor fritzing](https://1.bp.blogspot.com/-I3F3pUf_duU/XyZUD8u0ZAI/AAAAAAAACFM/whnw53XWWeE37R58gDeJhiRd5V6v-YIWwCLcBGAsYHQ/s1134/HC-SR501-PIR%2BMOTION%2BArduino_bb.png)
With this potentiometer you can determine set the “range” you have in mind. When doing your first tests, turn it as low as possible … until you notice there is a need for a time delay. The lowest setting, when facing the philips screw of the potentiometer, is all the way to left. When assembling the basic test setup (above) and the LED seems to stay on forever, turn this dial down – the delay might be too long. The “Delay Time”, determines how long the PIR will keep the Output “High” (ON) after detecting motion.įor example, when motion has been detected, you could set this somewhere between a few seconds (mine has an approximately minimum delay time of 2 seconds) up to a few minutes (specifications of mine claim about 200 seconds). At a later time you can tune the timing with the “Delay Time” potentiometer. Once the LED remains OFF, you can move your hand or anything for that matter, in front of the little dome, and see the LED go ON and OFF.ĭepending on what is moving around, the detectable range should be up to 20 feet or about 6 meters.Īlso keep in mind that the sensor will remain “ON” for a little bit after it detects motion. Place your setup in such a way that there will be no motion and wait until the LED remains OFF. When connecting the battery, the sensor will take up to 30 to 60 seconds to stabilize (warm up). We need to understand a few things before we can tweak the settings. In the beginning you might notice some seemingly erratic behavior – this is perfectly normal. When the LED goes on, motion is detected. Now that we have a test setup, time to do some playing. I made this drawing with Fritzing, a great tool to make electronic design! Playing with the “settings” Testing your PIR with a Battery, LED and a Resistor PIR PCBĪ few points on the PCB of the PIR are of importance to us: These tiny lenses help the sensor to look “around” in one swoop, which would have been impossible with just the flat sensor (see figure 2).
![pir sensor fritzing pir sensor fritzing](http://johnny-five.io/img/breadboard/motion.png)
If you look closer, you’ll see that the “dome” is build out of little segments – each being a small plastic Fresnel Lens. PIR Lens “Dome”Īs you can see in the pictures above, the PIR has some funny dome-like bubble, which is a collection of lenses covering the sensor. This is done in a smart way, to avoid false positives caused for example by a brief flash or an increase in room temperature.Ī chip and some discrete electronics handles all this for you. If the difference is too high then it will trigger – it detects “motion”. PIR’s actually only look at the “difference” between two sensor “halves”. It’s purely based on what the sensor can pick up out of the environment, what’s being emitted by objects. PIRs are called “passive” since they are not assisted by any “helpers” that for example would send some form or shape of “radiation” or “light” to help detect.