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 + Raspi

    Scheduled Pinned Locked Moved Hardware
    13 Posts 4 Posters 8.7k Views 4 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.
    • P Offline
      pepemujica @PtrBld
      last edited by

      @PtrBld Hi! I am trying yo use the PIR-Sensor module, but I have no result, the screen never goes black.
      I have connected the cables as the picture you post. Any idea why is not working?

      M 1 Reply Last reply Reply Quote 0
      • P Offline
        PtrBld Module Developer
        last edited by

        @pepemujica said in PIR Sensor + Raspi:

        Any idea why is not working?

        Maybe you should calibrate your PIR sensor tuning. There are two little orange knobs where you can adjust the sensitivity of the sensor.
        alt text

        1 Reply Last reply Reply Quote 1
        • M Offline
          McSorley @pepemujica
          last edited by McSorley

          @pepemujica Good way to make sure you have it connected correctly and that the PIR is operating is to try out the python code in the link I sent.

          from gpiozero import MotionSensor
          
          pir = MotionSensor(4)
          while True:
              if pir.motion_detected:
                  print("Motion detected!")
          

          Keeping in mind for both this code and the module that you have the correct pin number.

          P 2 Replies Last reply Reply Quote 0
          • P Offline
            pepemujica @McSorley
            last edited by

            @McSorley said in PIR Sensor + Raspi:

            Keeping in mind for both this code and the module that you have the correct pin number.

            How do I know in what pin are the 3 cables connected?

            M 1 Reply Last reply Reply Quote 0
            • M Offline
              McSorley @pepemujica
              last edited by McSorley

              @pepemujica www.raspberrypi.org/documentation/usage/gpio-plus-and-raspi2/

              You have 5v, Ground, then GPIO.

              P 1 Reply Last reply Reply Quote 0
              • P Offline
                pepemujica @McSorley
                last edited by

                @McSorley so, the (4) you’ve put in the example before, wich of the 3 cables is?
                Sorry, I’m pretty new in this, and I can’t get it easyly

                1 Reply Last reply Reply Quote 0
                • P Offline
                  pepemujica @McSorley
                  last edited by

                  @McSorley Hi I have tested, and always says motion detected, never ends, even when there is no motion

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    McSorley
                    last edited by

                    Try again what PtrBld suggested with calibrating the PIR Sensor Tuning by turning the knobs so see if you get different results.

                    Otherwise, this image show you which pins you have connected. If oyou have it set up the way PtrBld suggested, you change the code to 24.

                    alt text

                    H 1 Reply Last reply Reply Quote 0
                    • H Offline
                      hans2012 @McSorley
                      last edited by yawns

                      i have the same problem, my magic mirror installation is fine, but when it comes to pir motion sensor installation , i have not able to set it up it correctly, my pir will sense it when there is a movement but my magic mirror has no reaction, it will just stays on.any suggestion…i have rasp pi 3, pir motion sens conn to gpio 18. no error message. …

                      {
                      module: 'MMM-PIR-Sensor',
                          config: {
                              sensorPIN: '18',
                              powerSaving: 'true'
                          }
                      },
                      

                      (my module config)

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      • First post
                        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