CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIR sensor interface with PIC

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
delifadzli



Joined: 12 Apr 2010
Posts: 27

View user's profile Send private message

PIR sensor interface with PIC
PostPosted: Thu Sep 23, 2010 11:01 am     Reply with quote

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: 19504

View user's profile Send private message

PostPosted: Thu Sep 23, 2010 2:53 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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