Page 1 of 1

Alarm System:Motion Detector

PostPosted: Fri Mar 25, 2011 4:41 am
by alexander
if i want to change the PIR sensor with ultrasonic sensor Maxbotic LV-EZ1 and using only the pulse width output from the sensor, what things i suppose to do or change in this DIY Alarm System:Motion Detector project?

Re: Alarm System:Motion Detector

PostPosted: Fri Mar 25, 2011 11:25 pm
by shiyan
You will need to explain a bit on current setup you have. What is the DIY alarm system using to detect the PIR sensor? Which IO pin? Not all of us know all the product from Cytron, as I am not Cytron staff.

PWM output normally can tie to CCP, use the capture mode and measure the rising edge and falling edge of PWM pulses. You can also use interrupt such as interrupt on change or external interrupt to capture the pulses, and calculate the time in ISR. You can also use any of the digital input pin to do that if you can afford to waste the code just to monitor the pulses :)