Pir action flowcart for false events

ZOR

Senior Member
Has anyone done a flowchart covering the use of a PIR in an alarm circuit. I will look later at using two devices to check if both triggered same time.

However I am lost knowing when to say that's it, sound the alarm.

I started using a do loop to catch the PIR first being triggered.

Code:
do loop while pinC.2 = 0 ' pinC.2 = 1 if movement
I then did an evaluation part to time the PIR resetting itself.

Code:
for b2=1 to 10
PAUSE 250
IF pinC.2 = 0 THEN goto BB ' PIR cleared
PAUSE 250
Next b2
' If takes longer than this section then PIR seeing constant movement
After this do I fire warning beeps before checking again?

I ended up doing reams of rechecks before commiting to sound alarms.

Has anybody worked out a sensible flowchart in this area?
 

hippy

Technical Support
Staff member
After this do I fire warning beeps before checking again?
The answer to that would seem to be that it depends on what you want to achieve, more a matter of functional requirement than having any particular definitive answer.
 

ZOR

Senior Member
Thanks hippy. It's really a matter of how far one NEEDS to check/recheck for false triggering of a PIR before you say thats it, there is definate movement being sensed. I am just trying to establish as flexible as posible flowchart to give as best result for a PIR without being over the top. I realise if I used 2 sensors at the same time to look for both triggering at the same time pointing in slightly different angles might be more reliable. Just putting finger in the wind on any experiences for single PIR
 

hippy

Technical Support
Staff member
I suppose the question is why you can't take any trigger as a valid trigger; what false triggers are you expecting to have and need to avoid ?

The problem with any false triggering avoidance regime is that it reduces the effectiveness of the system, can potentially allow what it is hoped to prevent. Trying to allow for false triggering while maintaining good intrusion detection can be adding complexity which may not actually be necessary. And the more complex a system the greater chance for hidden weaknesses to exist.
 

ZOR

Senior Member
I totally agree with what you say, it's just trying to find a sensible sequence of monitoring to reduce false triggers caused by odd thermal draughts etc etc.
 

ZOR

Senior Member
Thanks Jim, just bought one to try. That should be a better start, as hippy said wrapping layers of preventitive code to make up for weaknesses is not the way to go. Thanks again both, watch the space.
 

eggdweather

Senior Member
Alarm systems trigger on the first event, so the output pulsing would not normally affect an alarm, so you would need to account for that in your code. PIR sensors work on rate-of-change so that you can have a stable warm body in-front of the unit but it only triggers if it goes warmer or cooler i.e. a + or - rate of change. This allows the unit to work across a wide range of room temperatures. But your unit is making those compensations. If you allowed the unit to stabilise and the target area was stable too, I'd expect the output to stop triggering. Then your code logic is to wait again for triggering and then once triggered, wait for a stable condition to emerge and then begin monitoring for an event again.
 

ZOR

Senior Member
Thanks Jim, thats much easier to read than the paper copy with unit. I have played with links in all places, no animals where it's going, but still goes on and off if constand movement in front. However thanks eggdweather, I will relook at my logic which hopefully will work out fine, so again thanks both, have good weekends
 

hippy

Technical Support
Staff member
I now have the PIR. However i am having difficulty getting a stable output from it when movement is permanently triggering it, it pulses on and off every second or so, as though its continually updating itself. Is it faulty or normal.
That could well be normal behaviour. Most alarms would go off on the first activation and not care if the signal is on while movement is detected or pulses. Because the signalling relay has to be activated when movement occurs, even if the alarm is not armed or active, pulsing every second can be a simple means to preserve battery or power use.
 

ZOR

Senior Member
Thanks both. Yes I am modyfying my logic so it latches on the first instance of being triggered and that's it. I am pleased Jim suggested this PIR, seems very stable and certainly sensitive over the area I am covering. It also works below it's specified voltage of 7.8-16volts, happy at 4.9volts
I see what you mean hippy
 

Circuit

Senior Member
Some PIR intruder detectors have a built-in system to avoid false triggering such as a radiator coming on and so forth. Mine have a selector switch that can be set to trigger instantly upon detection or to count either two or three movements (selectable) in quick succession before triggering the alarm. My particular units are not made any more so there is little purpose in referencing them, but I have seen units recently that offer this function also. I have my units set to count two movements before triggering and, so far, I have not had a false alarm.
 

ZOR

Senior Member
Thanks circuit, thats what I was trying to do originally, however the PIR has a pulse output when something is permanently triggering it, so going off in quick succession, making it difficult to monitor short timed triggers however I am playing around with delays letting the PIR completely reset but then monitoring it as shortly afterwards for further triggers. So thanks for the input
 
Top