mediastore93
Posts: 12
Joined: Wed Nov 18, 2015 12:39 am

PIR Sensor works with RPI2 but not with Pi Zero W

Tue May 16, 2017 3:26 pm

I have a PIR sensor which works perfectly with my RPI2 but when I use it with either of my Pi Zero W or Pi Zero it is constantly giving me a high reading. I've changed power sources, jumper cables but am now totally stuck. Please help!

pcmanbob
Posts: 9298
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: PIR Sensor works with RPI2 but not with Pi Zero W

Tue May 16, 2017 5:22 pm

Hi.

Your problem might be related to the wifi on the Pi zero, I have seen several instances of wifi causing a constant high signal on a PIR, not just on a zero but on a Pi3 as well.

you could try longer leads between the zero and the PIR to move the PIR away from the Pi's wifi signal.

link to some other posts about the problem viewtopic.php?f=28&t=183021&hilit=+pir
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

mediastore93
Posts: 12
Joined: Wed Nov 18, 2015 12:39 am

Re: PIR Sensor works with RPI2 but not with Pi Zero W

Wed May 17, 2017 1:00 am

Thank you very much for taking the time to reply!

I will try longer cables and turning the wifi off also and post back if I find the problem.

mediastore93
Posts: 12
Joined: Wed Nov 18, 2015 12:39 am

Re: PIR Sensor works with RPI2 but not with Pi Zero W

Mon May 22, 2017 1:56 pm

Turning the wifi off with ifdown wlan0 unfortunately didn't solve the problem. I'll need to try longer jumper cables maybe. These sensors seem to be very sensitive to interference. The other one that I have gives false positives if it's too close to the TV now.

pcmanbob
Posts: 9298
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: PIR Sensor works with RPI2 but not with Pi Zero W

Mon May 22, 2017 2:25 pm

Hi.

I assume you have a HC-SR501 PIR Motion Detector.
Image
have you tried setting both adjustment pots fully anti clockwise.

you could also try a piece of silver kitchen foil between the sensor and your Pi might block the wireless signal, when I did the experiment I mentioned in the other post I found moving the PIR 6-8 inches away from the Pi was sufficient to remove the interference.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

mattmiller
Posts: 2236
Joined: Thu Feb 05, 2015 11:25 pm

Re: PIR Sensor works with RPI2 but not with Pi Zero W

Mon May 22, 2017 2:37 pm

Those little PIR boards can be quite problematical.

They seem to very susceptible to any variations in Heisenberg uncertainty fields!

User avatar
OrieltonJohn
Posts: 1
Joined: Tue Aug 15, 2017 9:40 am
Location: Orielton, Tasmania
Contact: Website

Re: PIR Sensor works with RPI2 but not with Pi Zero W

Tue Aug 15, 2017 10:12 am

I had a very similar sounding problem - a PIR sensor not working (returning High continually) on a Pi Zero W but working fine on a Pi 3. Then I found that it worked fine on a different Zero W.

After a bit of investigation it would appear that my problem was bad soldering on the headers on the first Pi Zero (my fault). This meant that I was not getting a clean 5 volts from the Zero (which I could see with a multimeter). After desoldering/resoldering the offending pins it worked fine on that Zero as well.

I hope this is useful.

Return to “Beginners”