Shop OBEX P1 Docs P2 Docs Learn Events
PIR Motion Sensor with PIC microcontroller — Parallax Forums

PIR Motion Sensor with PIC microcontroller

ICANSEEYOU7687ICANSEEYOU7687 Posts: 1
edited 2012-04-12 02:11 in Accessories
I am trying to get my PIC24H to read in the REV B motion sensor.

I have the Motion Sensor hooked up to 5V and using a 5V tolerant pin on the microcontroller, I Have it set as an input, but I cannot get the microcontroller to read the pin when it goes high! Is there anything special I need to do? Or do I need to have any pull up or pull down resistors? thanks!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-04-11 18:59
    No, there's nothing special that you need to do. The motion sensor will operate from 3 to 6V supply voltage and puts out a signal that goes essentially to the supply voltage when motion is detected and remains near zero otherwise. Remember that there's an initial delay (about 40 seconds) after power is applied before it can detect motion. You don't need any sort of pull up or pull down resistors. If it's not working, then there's probably something wrong with your PIC24H program. You can use a voltmeter to read the state of the PIR output signal.
  • LeonLeon Posts: 7,620
    edited 2012-04-12 02:11
    Post the PIC program.
Sign In or Register to comment.