Pages: [1]   Go Down
Author Topic: PIR sensor issue  (Read 744 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi-

I'm not sure if this has been addressed before, but I'm encountering an issue with my PIR sensor setup.

I have my electronic components hooked up exactly like in the video here:



I'm using this sketch:

http://www.arduino.cc/playground/Code/PIRsense

It doesn't really work for some reason... the LED keeps turning on and off at regular intervals... I think it detects my movement, but I'm not entirely sure.

I know it must be obvious, but what am I missing?

Thanks!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26523
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

LED & buzzer need a series resistor, will burn out the pins eventually.

Are you connecting the PIR to pin 2 (video) or to pin 3 (sketch)?

int pirPin = 3;    //the digital pin connected to the PIR sensor's output
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Edmonton, Canada
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a similar issue with the same PIR from Parallax, but I worked my issue down to my UNO being powered by the USB. I used the testing circuit provided by LadyAda in her sensor tutorial http://www.ladyada.net/learn/sensors/pir.html. It is pretty simple and should be fool-proof. I powered it using the 5v and GND pins on the UNO connected to the USB only, but I would get false readings from the sensor. The issue disappeared when I used an other power supply to power the UNO. I could get a constant 4.99vdc from the 5V pin with a 6V dc power supply, but I got a bouncy 4.95-4.97vdc with the USB.
The PIR is designed to work with a 3.3 vdc power supply, so I set up a variable Power supply to 3.4vdc and the sensor picked up normal movement, and it did not send out random signals. I had to use my meter to get the output changes as the OUT signal from the PIR was down to 1.6 v with the reduced input voltage.  Just to be thorough, I checked the voltage on my Vin pins when it was on USB, and I got a voltage closer to 4.6 V and the same false readings occurred.

Is there a trick to cleaning up the power from the USB on the UNO, because I also ran LadyAda's Arduino demo at the bottom of the page and had the same flaky signal.
Logged

Pages: [1]   Go Up
Jump to: