I recently purchased and configured two motion sensors on a Raspberry Pi 3B model. I am very excited as I am getting a reading but the sensors are very responsive. Is there a way to narrow the infrared beam to the sensors so that they aren't so jumpy?

I am very new to all of this... so apologies if I am off with my words.

Thanks you

Here is a link to the sensor:


  • 3
    Most of the inexpensive PIR modules come with a pot to adjust sensitivity and only output a go/no go level. They are fitted with a Fresnel lens to increase the field of view and sensitivity.
    – Milliways
    Commented Oct 28, 2020 at 7:24
  • @mcroteau, Welcome and nice to meet you. Ah, let me see. As far as I know the old types of hobbyist PIR sensor are too sensitive, so they always stay false positive. It is a bit tricky to adjust the sensitivity. Perhaps you can try the new generation of digital PIRs which are as cheap, but easy to adjust. You can find more details in my Penzu reading and testing log: penzu.com/p/d65553dc. Happy learning. Your sincerely. Cheers.
    – tlfong01
    Commented Oct 28, 2020 at 7:47

1 Answer 1



To "narrow the beam" will likely require replacing the existing lens, or perhaps adding an "overlay" lens. However, if you do replace/augment the lens, it's not clear that will make the sensor less "jumpy". Here are some sources for Fresnel lenses that may help.

Before shopping for optics, you should definitely make time to read this article from Fresnel Technologies Inc.

Re "jumpy":

The sensor you're using doesn't have much useful documentation. Some PIR modules have "sensitivity adjustments", but it's not clear if yours does. You may consider adopting a policy of No documentation - No sale in your buying decisions.

In any event, the output of the sensor is a single bit - it's "ON", or it's "OFF", but a sensitivity adjustment would allow you to experiment with different values. Shame on your vendor if they didn't provide this adjustment. Because devices from different vendors use different components, it's difficult to provide a pat answer to your question. See suggestion #2 below for a potential software solution to "jumpy".

Some suggestions:

  1. You should do some research. This is an informative article; this is another informative article; this is yet another informative article. Take a look at these; edit your question if you wish.

  2. One general technique to address the "jumpy" output is integration over time. You can do this in software on your RPi. You will have to learn to discriminate between "false alarms" and "valid detection" events. Integrating the PIR output over time is a place to start - simply put, count the time the sensor output is asserted during a "detection interval", and make a "valid detection" decision based on that time.

  3. Finally, as one peruses the vast sea of information available on the subject of PIR sensors, one item that caught my eye was the use dual sensors. In some cases, these involved two or more PIR sensors with different fields of view. In other cases, PIR was combined with other technologies (e.g. ultrasonics) in a sensor fusion approach. It seems that between the software and hardware options, there are an almost infinite number of potential solutions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.