|
|
View previous topic :: View next topic |
Author |
Message |
delifadzli
Joined: 12 Apr 2010 Posts: 27
|
PIR sensor interface with PIC |
Posted: Thu Sep 23, 2010 11:01 am |
|
|
Hi everyone, I want to ask how to adjust the triggering effect of PIR sensor.
I'm using PIR sensor -
http://www.myduino.com/index.php?route=product/product&product_id=58
Based from the datasheet given, this sensor can be directly connect to PIC16f877.
The problem is, detection of PIR is quite a problem. When motion exist, the led on...however if the motion not exist the led still on. Can anyone help? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19537
|
|
Posted: Thu Sep 23, 2010 2:53 pm |
|
|
Not without seeing what you are doing wrong....
Start by testing your code.
Disconnect the sensor. Put a switch to ground in it's place, and a pull up resistor (say 10K) to 5v, to the same pin. Does the LED go off, when the switch is made?.
Once you have this working, re-connect the sensor. Remember that it's ground pin, needs to connect to your PIC circuit's ground, as well as it's output to the PIC's input. Does it then work?.
If not, then can you monitor the output pin (voltmeter, or oscilloscope). Does this change as expected?. What voltage does it actually go up to?.
Remember also that you can force the output 'on', with the override jumper on the unit - this is for circuit testing, or to allow another circuit to drive the system. Override needs to be 'off' for normal operation.
Best Wishes |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|