Shop OBEX P1 Docs P2 Docs Learn Events
PIR Sensor behavior with ambient lighting changes — Parallax Forums

PIR Sensor behavior with ambient lighting changes

I have the PIR sensor Rev. B 555-28027:

I understand from the information sheet that it takes 40 seconds upon startup to determine a baseline reading on the IR flux into the sensor, then uses that to determine a significant change to indicate motion. I have a few questions:

1. What happens if the ambient lighting condition changes, slowly, or rapidly to a new overall level?
2. Is a new baseline taken if the background level changes, ie. does the sensor somehow adapt to the new ambient conditions?
3. If so how much and how rapidly does it adapt?
4. Does it adapt to the background rate of change of IR or the actual IR level?

Thanks

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    1) Ambient light does not affect the PIR
    2) As conditions change slowly, the sensor balances out with the slow changes. It is sudden changes that trigger it.
    3) You could test this by standing perfectly still in front of the sensor until it adjusts and then seeing what the minimum motion is to cause it to trigger.
    4) It adjusts to the level. The change is what triggers the sensor. The rate is what you're asking in question #3.
  • Do you know about the algorithms and signal processing for the sensor or is this just your opinion?
  • Chris' reply is consistent with my empirical observations with both this PIR and other PIRs. He is a trusted resource on the forum.

    I will add one caveat to #1, though. The product guide cautions against exposure to direct sunlight. The sun is, of course, a huge source of IR energy, which can make it more difficult to discern small changes in IR energy from a person moving.

    In more general terms, some PIRs have a photocell that inhibits the output when ambient light is above a certain threshold. You will see this in security lights, for instance, which are not intended to operate during the daytime. However, this does not apply to the PIR that you mentioned.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    Do you know about the algorithms and signal processing for the sensor or is this just your opinion?

    I understand how the sensor works. It is an analog system, very simple and the way it works is very simple.

    hatallica is correct that you can experience issues in some situations with the sun. It is even possible for the sun to rapidly heat up a surface within the PIR FOV and cause a false trigger. This is not typical though.

  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2016-12-03 00:22
    Perigalacticon, PIR motion detectors, which is what this product is, almost always use a detector with two sensors, connected to a differential amplifier. There is no "settling" or adaptation; false alarms are limited because a wholesale increase/decrease in IR energy is canceled out across the two sensors. The detector is activated by the *change* across the sensor pair. This is precisely what happens when there's motion in front of the detector.

    There are many types of passive infrared sensors, but the ones for motion, rather than actual measurement of IR intensity, work in the above manner.

    https://en.wikipedia.org/wiki/Motion_detector
    https://en.wikipedia.org/wiki/Passive_infrared_sensor (see Differential Detection)

    I believe the datasheet for the sensor is really talking about component temperature stabilization. This would be typical of any circuit with a very high input gain. I can see where it says the sensor is "learning" its environment, but if it uses the common dual-sensor detector, this passage may be merely an oversimplification.

    As noted, the material used on the sensor surface can become swamped, or saturated, if it's in direct sunlight, or placed in front of some other strong IR source, such as a high wattage bulb or heat lamp. It can take seconds, or even minutes, to return to normal operating condition after the IR source is removed. This is due to the sensor material itself, not any function of the detection circuit.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2016-12-03 18:19
    This issue caught my attention when I took a phone call at home at 6:51 on Thursday morning from my alarm company--The alarm in my shop had been triggered by a PIR motion sensor. No door or mechanical window sensor was activated though. I knew from past experience that sometimes the motion detector near an east-facing window would be triggered by the sun suddenly coming out from behind a cloud and heating a wall opposite the sensor. I thought I had corrected that by repositioning the sensor, but decided to tell them to cancel and ignore the alarm.

    Ten minutes later I got another call from the landlord that another office in the complex had been broken into, and probably mine too. To make a long story short, someone had taken a concrete car stop, about 100 pounds, and crashed it through a 2 foot square window in my front door. One of the motion sensors is pointed at the front door, so it must have detected the sudden change in temperature or motion outside. Same with my neighbor's front door. The thief's objective had been to reach in and unlock the door, but that was thwarted by a dead bolt. Now we have to replace the glass, bummer anyway.

    In research projects I've had occasion to analyze these circuits and build them up from scratch. As noted, the frequency response is limited, a band between 0.1 and 10 Hz, and most of these modules use a differential PIR sensor that rejects uniform temperature signals. A lot of the effectiveness of these sensors depends on the IR lens, the facets that set up detection zones.




Sign In or Register to comment.