This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Attaching a PIR sensor

Hello, I am trying to attach a PIR sensor to my SmartRF05 V 1.8.1 board, And I have looked over the schematics and I am still confused as to where the switch would be connected to allow the board to read the value. Am I just being blind and not seeing it? Also, what would be the best starting example code for a light switch controlled by said PIR?

Thanks

  • Assuming the passive Infra-Red device you have has a simple logic output it can be tied to a general purpose I/O (GPIO) pin. Pick any unused pin on the “USB Jumper” header or “IO Jumper” headers that will attach the PIRs logic output to a GPIO pin. The GPIO will have to be configured as a input by setting the correct registers. The PIR should be supplied power from the SRF05 3.3V line to avoid the possibility of damaging the SRF05. This assume the PIR will operate from 3.3V, many will.

    If the PIR requires a different voltage like +5V then you will need to use a level translator or comparator or op amp to isolate the +5V from the SRF05s +3.3V devices.

    Ti has many sample programs that would be easy to modify. Find a program that transmits when a button is pushed and replace the code that monitors the buttons 0 or 1 state with the 0 or 1 state of the PIR.

    Once you get this to work you can modify the code to use a timer to generate a interrupt to check the PIR.

    Find the code you want to modify and we can help.