Shop OBEX P1 Docs P2 Docs Learn Events
PIR (outdoor) false triggering — Parallax Forums

PIR (outdoor) false triggering

dblainedblaine Posts: 6
edited 2011-02-04 22:59 in Accessories
Does anyone have experience using Parallax PIR sensors outside, especially at night? Are there known incompatibilities with using these sensors outdoors?

I'm trying to develop a sensor to detect someone approaching my car in the driveway.

To test out sensor placements, I have a Parallax PIR powered with 5V from a LDO regulator supplied by a 9V battery (supply is as quiet as you can get). The output connects to the gate of an NFET driving an LED+resistor directly from the 9v battery (the PIR's load is as light as you can get, and the switched current is from the unregulated side of the LDO).

Indoors, day or dark, it detects motion reliably. But outside, day or night, it false triggers every several seconds. The PIR's is typically looking at places like a shaded garden or wall, with no obvious IR radiation sources or air convection, although the night sky and the city beyond is sometimes in the field of view.

Any advice would be appreciated.

Comments

  • ElectricAyeElectricAye Posts: 4,561
    edited 2011-02-01 17:23
    dblaine wrote: »
    ....

    Indoors, day or dark, it detects motion reliably. But outside, day or night, it false triggers every several seconds. The PIR's is typically looking at places like a shaded garden or wall.....

    Generally speaking, these types of sensors are watching for relatively rapid changes in infrared light. Sometimes those changes can be caused by light being "blinked" on and off by the wind moving leaves or tree branches, etc back and forth across a warm source. They can also be triggered by sunlight, campfires, or distant IR light sources, etc. playing off of ripples on water. So look for things in the environment that might be moving and periodically blocking possible IR sources, even distant sources. Also note that walls, etc. can reflect infrared fairly well or might even store heat during the day and behave like IR emitters at night. If there are ponds or other water sources in the PIR's field of view, try to move the PIR so it's not going to see reflections from those ponds, etc.
  • kwinnkwinn Posts: 8,697
    edited 2011-02-01 20:07
    dblaine, you should try one of the sensors from a motion activated outdoor light. False triggering of my driveway light is almost non existent.
  • BeanBean Posts: 8,129
    edited 2011-02-02 04:55
  • dblainedblaine Posts: 6
    edited 2011-02-02 15:29
    Thank you, Bean. The Parallax PIR datasheet didn't provide some basic information I would ordinarily use to evaluate a part, but the datasheet for the X-Band detector is better and suggests this part may work. I will try it out. If Parallax (or anyone else) has any information on how the published electrical characteristics vary over temperatures from zero to 100F that would be helpful. I can't really evaluate the device in an oven and I need to finalize the design before July. Thanks again for the suggestion.

    Thank you kwinn. I am in the process of hacking one of those. My only concern is modifying the circuit for battery power. These 120V based detectors are not designed for current efficiency. Still, your idea is showing a lot of promise, especially if I can modify it to use low current amps and larger resistors, and to implement sleeping.

    Thank your ElectricAye. I really appreciate your thoughtful response. I had tried to mitigate the variables you mentioned before posting my question, but hadn't considered the water reflection effect. There may have been a few puddles in the field of view on some placements. I did test on a windless day, though.
  • LeonLeon Posts: 7,620
    edited 2011-02-02 15:51
    Do you have a radio amateur in the vicinity? When we transmitted on VHF at a radio club I used to belong to, we turned on the security lights at a house about 50 yards away because the PIRs that had been installed had very poor RF immunity. The owner of the house kept complaining about it, but wouldn't change the PIR units. Our transmissions were clean, of course.
  • dblainedblaine Posts: 6
    edited 2011-02-02 17:17
    Thanks for the suggestion Leon. I hadn't thought of EMI but will definitely check it out.

    There is an impressive group of beams and arrays about 1/2 KM away (2 meter, vhf, uhf, maybe a 20 meter dipole). But the false triggering only happens outdoors, so the culprit may be something very local, maybe the cell phone in my pocket, my car's RFID or one of the other gadgets I have around. I'll check that out and post the findings.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2011-02-02 17:33
    dblaine wrote: »
    ...so the culprit may be something very local....

    Got squirrels?

    I once used non-parallax PIRs for bear detection around a campsite and I noticed that squirrels would set if off if they got within about 8 feet or so, but those PIRs were mounted only about 2 feet off the ground. Of course, deer also set it off. And so did distant campfires whose light flickered off the surface of a nearby lake.

    I've often wondered if a person could reduce false alarms by using two or more PIRs aiming in from two or more locations so the lines of sight are nearly perpendicular, then write the alarming logic to require that signals from at least two PIRs had to be detected simultaneously. I've never tried it, but it's a thought.
  • dblainedblaine Posts: 6
    edited 2011-02-02 17:59
    Interesting idea ElectricAye. One could use 2 or 3 sensors, all with the non-persistence jumper setting to make the signals short. Logically ANDing them would reduce false alarms. And you could add a little intelligence to set a BIT based on sequences and timings. This would really be a fun project, but it triples the sensor cost including an XBee module. I was hoping to make do with a single sensor, but if it comes to a compromise, this is going happen first.

    No squirrels.
  • dblainedblaine Posts: 6
    edited 2011-02-02 21:33
    The output of the PIR drives an NFET gate and nothing else. So to see if the false alarms might be caused by the output of the PIR floating a little, I put a 5k pull down on the output and tried it indoors. It worked fine as always. But when tried in 15 degree temperatures outdoors, the PIR's output stage can't supply 1 mA. The datasheet has no published spec on output drive capability, but that much temperature sensitivity couldn't be normal operation. I suspect this PIR may be defective. I've got more PIRs coming and will see how they do.

    Does anyone know the Parallax PIR output drive spec with supplies at 5v and at 3.3v?
  • bsnutbsnut Posts: 521
    edited 2011-02-03 06:50
    Make sure that your controller is doing some sort of debouncing on the PIR input otherwise you may get a lot of false starts. Your PIR also needs time to warm-up and the code below provides debouncing and warm-up example for the Basic Stamp 1. Note: This code is can be easily changed to a Basic Stamp 2.
    '   File.......
    '   Purpose....
    '   Author.....W. Stefan
    '   E-mail.....
    '   Started....
    '   Updated....
    ' {$STAMP BS1}
    ' {$PBASIC 1.0}
    'INPUTS
    '--------------------------------------------------------------------
    SYMBOL  PIR             = PIN6
    
    'OUTPUTS
    '--------------------------------------------------------------------
    
    
    'RC-4/AP-8 SERIAL I/O
    '--------------------------------------------------------------------
    
    'CONSTANTS
    '--------------------------------------------------------------------
    
    
    'VARIABLES
    '--------------------------------------------------------------------
    SYMBOL  timer           = B2
    
    'EEPROM DATA
    '--------------------------------------------------------------------
    
    'INITIALIZATION
    '--------------------------------------------------------------------
    Reset:
      PAUSE 5000                                    ' let PIR warmup
      PINS = %00000000                              ' clear all outputs
      DIRS = %00111111                              ' make P0-P5 outputs
    
    'PROGRAM CODE
    '--------------------------------------------------------------------
    Main:
      timer = 0                                     ' reset timer
      DEBUG "Waiting for PIR...", CR
    
    Check_Trigger:
      PAUSE 5                                       ' loop pad
      timer = timer + 5 * PIR                       ' update timer
      IF timer < 100 THEN Check_Trigger             ' wait for 0.1 sec input
    
      DEBUG "Triggered!", CR, CR
    
  • dblainedblaine Posts: 6
    edited 2011-02-04 22:59
    It seems to have been a temperature effect.

    The unusually cold air has move east and I finally tested the PIR outdoors at night in 25F to 40F temperatures. As soon as the temps got above freezing, the false triggering stopped. Although the humidity was never above 70% and I didn't see any condensation when the weather was cold, condensation may also have played into it.

    Mystery solved. A possible solution for use below freezing may be to use multiple sensors followed by combinatorial logic before transmitting from a single RF node, as mentioned earlier in the thread. We will see.

    Thank you all for your help and advice.
Sign In or Register to comment.