Boat Alarm again

meridian

Member
Hi All,
A few weeks ago I sought suggestions for an alarm. I have bought a dual PIR/microwave sensor from Jaycar. If both PIR and M/w sensors react, the alarm in ON and the relay opens the NC connection.

If the AND condition is momentary met, the alarm stays on for 2 secs. What I want to detect is a continuous alarm condition for say 10 secs to avoid a combination of false triggers in either sensor. I seem to recall there was some discussion recently on this topic, how to ensure the reading is continuous.

Any ideas please?

paulr
 

hippy

Ex-Staff (retired)
Something like this should do the job ...

For b0 = 1 To 10
If no alarm condition Then Goto FalseAlarm
Pause 1000
Next
Goto PositiveAlarm

This will only get to 'PositiveAlarm' if the condition is met for 10 seconds continuously. If at any time the condition goes away it goes to 'FalseAlarm'. In practice you will want to reduce ( or remove ) the PAUSE and increase the number of FOR-NEXT loops.
 
Top