Go Down

Topic: PIR sensor issue (Read 1 time) previous topic - next topic



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:


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?



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
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


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.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131