• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

PIR Sensor: false positive detections

Scheduled Pinned Locked Moved Hardware
18 Posts 6 Posters 4.3k Views 6 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    MZ-BER
    last edited by MZ-BER Nov 18, 2021, 4:51 PM Nov 18, 2021, 4:39 PM

    Hey folks - Ive added a new gadget to my MagicMirror: HC-SR501 PIR sensor. I was able to set it properly up with MMM-NewPIR. But I noticed that I have a lot of false positive detections (every 4-5 min.). Even if my sensitivity is as low as possible.

    Do you have any recommendations to reduce the false positive rate?

    S F 2 Replies Last reply Nov 19, 2021, 3:58 PM Reply Quote 0
    • S Offline
      Stefan723 @MZ-BER
      last edited by Nov 19, 2021, 3:58 PM

      Hi @mz-ber ,

      That is strange, do you have any movement at all or none?
      I am using a different module (MMM-PIR-Sensor) and mine is working perfectly.
      For starters I’d eliminate magic mirror and just observe the behaviour on the command line, there are python libraries to monitor the sensor and to check that it is working correctly independently of magic mirror.
      Hope this helps at least a bit,
      Stefan

      T 1 Reply Last reply Nov 19, 2021, 6:16 PM Reply Quote 0
      • T Offline
        thgmirror @Stefan723
        last edited by Nov 19, 2021, 6:16 PM

        @stefan723 May be, a so called “Step Down” resp. “Step Up”-resistor is needed. The PI has built-in Step Down/Up functionality.
        The issue may arise due to interferencies from other parts around the sensor and the PI. First follow the idea of @Stefan723 and try to use short cables.
        Use Google to search for “Step Down/Up and Raspberry PI”.

        But I’m a programmer…not an electrician:-)

        1 Reply Last reply Reply Quote 1
        • P Offline
          philmavedzenge
          last edited by Nov 21, 2021, 6:26 AM

          I had the same issue for some time, it turned out to be the time in between detections was too long. the sensor would detect movement and keep that state until the set time and then checks again. Play around with adjusting one of the orange screws on the sensor until the detection time is very low.

          1 Reply Last reply Reply Quote 0
          • F Offline
            Fozi Project Sponsor @MZ-BER
            last edited by Nov 22, 2021, 12:31 PM

            @mz-ber said in PIR Sensor: false positive detections:

            HC-SR501 PIR

            I’m with @Stefan723. I had used MMM-NewPIR in the past but switched back to MMM-PIR-Sensor again for reasons. MMM-PIR-Sensor is simple, robust and does the job reliably. May be you have some intereferences, too, which trigger false positives.
            Due to the proximity of the Vout and GND wires to the WLAN module, unwanted interferences may occur which might prevent the PIR sensor to switch from high (motion detected) to low state (no motion detected). The wires work like an antenna in that case. As a result, the display will stay on. A ferrite bead attached to those wires, e.g. taken from an old VGA cable, reduces the interferences and allows for correct state change.

            Hope that helps.

            HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

            Z 1 Reply Last reply Nov 22, 2021, 1:01 PM Reply Quote 0
            • Z Offline
              Zoltan @Fozi
              last edited by Nov 22, 2021, 1:01 PM

              @fozi I also had false triggers. It turned out that my PIR was too close to my Pi and the WiFi chip induced EMF into the PIR. By moving the PIR further away and introducing a low pass filter i solved my issue. Have a look at my circuit and comments

              https://forum.magicmirror.builders/topic/15458/smartmirror-dashboard

              F M 2 Replies Last reply Nov 22, 2021, 3:12 PM Reply Quote 0
              • F Offline
                Fozi Project Sponsor @Zoltan
                last edited by Nov 22, 2021, 3:12 PM

                @zoltan Really nice build!Congrats!
                Yeah, a low-pass filter can solve the interferences from the WiFi module, too, of course. But due to my lazyness and impatience I sacrificed an old VGA cable and re-used the ferrite bead:beaming_face_with_smiling_eyes:

                HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

                1 Reply Last reply Reply Quote 0
                • M Offline
                  MZ-BER
                  last edited by Nov 22, 2021, 3:17 PM

                  Hey folks - thanks for your answers. I decided to goahed with a RCWL-0516. But have the same issues. I’m testing the sensitivity with a python script. I also covered it in alu foil - no change. Now I ordered a ferrite beat and will add to the cables (around all of the them or only GND, 5v or Output?)

                  I’m also thinking about adding a low pass filter, but I have no experience with that. Where do I have to add that? GND & Output?

                  F 1 Reply Last reply Nov 22, 2021, 3:25 PM Reply Quote 0
                  • F Offline
                    Fozi Project Sponsor @MZ-BER
                    last edited by Nov 22, 2021, 3:25 PM

                    @mz-ber Just put all wires through the bead.
                    With the RCWL-0516 you should note that they can be very sensitive (up to 7m on free sight) and detect motion even through walls. First I went the alu foil route, too, but then modded my RCWL-0516 with a trimmer. Now the mirror is triggered when I approach the mirror less than 1m. Check the link in my signature for details, if you like.

                    HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

                    M 1 Reply Last reply Nov 22, 2021, 4:39 PM Reply Quote 0
                    • M Offline
                      MZ-BER @Fozi
                      last edited by Nov 22, 2021, 4:39 PM

                      @fozi Yes! I followed your instructions in detail - that was very helpful. And yes, I noticed how sensitive it is. In your tutorial you removed the the tiny SMD resistor soldered and replaced that. What if I just remove it and not replace it. Is the range than completely gone and doesent work anymore?

                      F 1 Reply Last reply Nov 22, 2021, 6:00 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        3/18
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy