PIR Motion Sensor Programming

Using the digitalRead function, I'm trying to detect the state of the PIR motion sensor connected to digital port 3 of my Arduino Uno. It seems to always be delivering a TRUE state, even when there is no motion, which seems to be the root of my code not working. I know there are several other posts about this over the past few years but none seem to provide a solution. This is the source of the test code I (and it seems many others) have used. PIR Motion Sensor with Arduino - Circuit Magic

Thank you!

Is every tiny bit of your project identical to what was used in the link you provided?

PIR sensors are VERY sensitive to all kind of influences - I haven't been able to get mine to work on a long cable (2-3m) while the same sensor worked beautifully on a short cable (10 cm or so).

They're also sensitive to all kinds of movement - i.e. changes in the IR image they see. Shield the sensor with an opaque cover to make sure it doesn't see anything to test it not seeing any movement.

Make sure you have set the pots to short delay times, it can go down to a few seconds, otherwise you may have to wait 5-10 mins before the signal goes low.

1 Like

Yes, I copied it over exactly. Any advice?

Then both have some mistake, somewhere.

Make sure you turn the "time" pot fully anticlockwise, so the code is the only thing that controls 'on' time. Leave the "sensitivity" pot in the middle.
Leo..

Connect your multimeter to the output of the PIR sensor. Does the signal go down after some time without movement (shield it)?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.