November 22, 2024, 02:21:07 PM

News:

Be sure to checkout our Vixen interfaces in the Library forum -- if you want PC automation at near zero cost, EFX-TEK and Vixen is a great combination of tools.


PIR output

Started by ron5526, June 03, 2008, 10:17:40 AM

Previous topic - Next topic

ron5526

During the reset part of my prop I have a small safety subroutine that forces the "reset" to begin again if the PIR senses anyone.  Here's my problem/question:  While bench testing my program I waved my hand in front of the PIR and my program did force the reset action.  However, it keep doing it for a few cycles after my hand was removed (even with a 2 second delay) as noted in the DEBUG command.  Does it take a few seconds for PIR to "clear out" after sensing a body (or hand at very close range (inches))?  I'm away from the program now or I would have copied it.   I did find a previos post that mentioned  "debouncing" but I'm not sure that would apply.......maybe because I didn't fully understand it.  Thanks.
Ron

livinlowe

Yes, your are going to have to 'debounce' your PIR sensor. You will get false positives, and all the debounce code does is make sure your getting a good signal before it continues. My PIR sensor does the same thing, but its pretty reliable with the debounce code.
Shawn
Scaring someone with a prop you built -- priceless!