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 behind glass?

    Scheduled Pinned Locked Moved Hardware
    65 Posts 16 Posters 107.7k Views 19 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.
    • cowboysdudeC Offline
      cowboysdude Module Developer
      last edited by

      I just like the camera… it’s a personal choice :) But drilling a hole will work too!! I don’t see a thing wrong with that!

      yo-lessY 1 Reply Last reply Reply Quote 0
      • yo-lessY Offline
        yo-less Module Developer @cowboysdude
        last edited by

        @cowboysdude I’m just not comfortable with the idea of a camera in my bathroom (or any other room, for that matter). Raspbian is a pretty open platform and I don’t want others to take control of any cameras I might have installed in my home. And it’s not like all sorts of people wouldn’t be interested in spying on other people.

        Have started experimenting with the PIR sensor, it’s looking good so far, will let you guys know about my progress.

        1 Reply Last reply Reply Quote 2
        • D Offline
          dmcinnes Module Developer
          last edited by

          Another possibility: I ordered a couple of these $2 microwave radar motion detectors to see if they will work behind my glass. Still waiting to receive them though:

          http://m.ebay.com/itm/1pc-5-8GHZ-Microwave-Radar-Sensor-6-9M-Smart-Switch-for-Home-Control-/131864712562?txnId=1245760396003

          More details:
          http://www.cnx-software.com/2016/04/04/tiny-microwave-radar-module-detects-movements-up-to-9-meters-away-for-2/amp/

          yo-lessY 1 Reply Last reply Reply Quote 1
          • yawnsY Offline
            yawns Moderator
            last edited by

            Wow, the microwave approach sounds good. Will this work behind the mirror?

            D 1 Reply Last reply Reply Quote 0
            • yo-lessY Offline
              yo-less Module Developer
              last edited by

              @dmcinnes Thanks for your link, I’m using a radar module in a Pi-independent LED lighting control unit that a friend of mine put together (So I have no clue how his circuits actually work, but they do and that’s great :D), which is why my first impulse was to use a radar motion detector as well.

              I couldn’t find any that operated within the voltage specifications of the PI’s pins. Your link lists a working voltage range of 5.5 - 18 V DC, but the Pi only offers 5 V DC, doesn’t it?

              So are you planning on using an external power source for your module?

              1 Reply Last reply Reply Quote 0
              • D Offline
                dmcinnes Module Developer
                last edited by

                Hmm I’ve seen othe specs that say working voltage is 3.3-20VDC… hopefully that’s more accurate. In any case I’ll try it with the 5V from the PI and go from there.

                yo-lessY KirAsh4K 2 Replies Last reply Reply Quote 0
                • D Offline
                  dmcinnes Module Developer @yawns
                  last edited by

                  @yawns I’ve read that microwave sensors will work behind glass, but I’m not sure if it will work behind the semi-mirrored surfaces we’re using.

                  1 Reply Last reply Reply Quote 0
                  • yo-lessY Offline
                    yo-less Module Developer @dmcinnes
                    last edited by

                    @dmcinnes It’s great that you’re experimenting with this in any case. Please let us know the outcome once the sensor has arrived.

                    1 Reply Last reply Reply Quote 0
                    • KirAsh4K Offline
                      KirAsh4 Moderator @dmcinnes
                      last edited by

                      To anyone asking: ‘working voltage’ just means it will work with voltages within that range, so from as low as 3v3 up to 20v.

                      A Life? Cool! Where can I download one of those from?

                      1 Reply Last reply Reply Quote 0
                      • yo-lessY Offline
                        yo-less Module Developer
                        last edited by yo-less

                        Alright, everyone. I said I would start experimenting with the PIR sensor and experiment I did.
                        So first of all we started drilling a hole of diameter 8mm into one side of a piece of wood
                        (we went 5mm deep as this corresponds with the height of the cylindrical sensor):

                        0_1472843356492_sensor2.png

                        This is not all we did, as you can see, we also drilled a hole of diameter 3mm on the other side,
                        but this time we made sure it went all the way through:

                        0_1472844079617_sensor4.png

                        Next, we removed the Fresnel lens from the sensor:
                        0_1472844126023_sensor3.png

                        After that, we put the sensor in the bigger hole which perfectly houses the whole cylinder:
                        0_1472844139302_sensor3.5.png

                        Then we waited to see whether the mirror would turn itself on if we moved past the piece of wood.
                        And, hooray, it did!

                        Emboldened by this discovery, we started all over again, but this time with smaller holes on the other side,
                        so we ended up with this setup:

                        0_1472844320166_sensor1.png

                        Simply ignore the rubber band, it’s there to hold the circuit board in place :)

                        Anyway, here’s the good news: The mirror recognizes somebody walking by if the hole is as small as 2 millimeters in diameter.
                        It did not work with a 1mm hole, but hey, are we living in a perfect world? :D

                        Anyway, this solution is good enough for me, we will drill a 2mm hole in the bottom center area of the mirror frame and hide the sensor behind it.
                        I’m thinking we might even be able to make the hole less apparent by choosing a piece of wood similar to the one above
                        with some nice-looking wood grain and / or knots.

                        1 Reply Last reply Reply Quote 7
                        • cowboysdudeC Offline
                          cowboysdude Module Developer
                          last edited by

                          That is awesome!!! Great job and Thank you for the info!!!

                          1 Reply Last reply Reply Quote 0
                          • D Offline
                            dmcinnes Module Developer
                            last edited by

                            I got the microwave radar modules today!

                            They work great, even behind my mirror, although they are very sensitive. It triggered on even small arm movements and didn’t require line of sight. Works for my needs though, I just want it to turn off the monitor when nobody is around.

                            I haven’t tried powering them with my PI, but they worked fine with an external 5v power supply.

                            yo-lessY 1 Reply Last reply Reply Quote 2
                            • cowboysdudeC Offline
                              cowboysdude Module Developer
                              last edited by

                              That’s another great way to do it! :) Where did you get them from?

                              1 Reply Last reply Reply Quote 0
                              • yo-lessY Offline
                                yo-less Module Developer @dmcinnes
                                last edited by

                                @dmcinnes It’s great to hear that they’re working on an external 5v power supply, this means it should be possible to use them on the Pi. It would be really nice if you could try hooking them up to the Pi to see if they’re acting up once attached to the Pi’s pins. I’ll probably try to get one as well if you can confirm they’re working on the Pi as well.

                                1 Reply Last reply Reply Quote 1
                                • yo-lessY Offline
                                  yo-less Module Developer @dmcinnes
                                  last edited by

                                  @cowboysdude: You’re welcome :)

                                  Also, have a look at this post:

                                  dmcinnes said in PIR sensor behind glass?:

                                  Another possibility: I ordered a couple of these $2 microwave radar motion detectors to see if they will work behind my glass. Still waiting to receive them though:

                                  http://m.ebay.com/itm/1pc-5-8GHZ-Microwave-Radar-Sensor-6-9M-Smart-Switch-for-Home-Control-/131864712562?txnId=1245760396003

                                  More details:
                                  http://www.cnx-software.com/2016/04/04/tiny-microwave-radar-module-detects-movements-up-to-9-meters-away-for-2/amp/

                                  1 Reply Last reply Reply Quote 0
                                  • D Offline
                                    dmcinnes Module Developer
                                    last edited by

                                    Finally got around to testing on the PI’s 5v power (I’ve busy being sick) and seems to work fine!
                                    Next I’m going to hook up to the GPIO and see if I can get the whole thing running together.

                                    1 Reply Last reply Reply Quote 0
                                    • D Offline
                                      dmcinnes Module Developer
                                      last edited by

                                      Now that I have time I’ve finally set up the microwave sensor on my mirror. Works like a charm!
                                      The sensor’s data line goes high to 3.3v when it detects motion and stays high for about 30 seconds. It’s set up on one of the 5v outputs. I’ve put some foil around it to help it be a bit more directional since the sensor is so sensitive; I sit under and to the right of my mirror all week and I don’t want it it trigger all the time. It helps somewhat.

                                      CatoC 1 Reply Last reply Reply Quote 0
                                      • A Offline
                                        amcolash
                                        last edited by

                                        I used some cardboard and then made a little housing for my PIR under the bottom of the mirror. It is a little ugly, but hey this whole project for me was to make something cool (not necessarily beautiful)!

                                        I did a few layers of cardboard between the sensor and the front to limit the viewing angles and for my needs it is perfect :)

                                        1 Reply Last reply Reply Quote 0
                                        • CatoC Offline
                                          Cato Module Developer @dmcinnes
                                          last edited by

                                          @dmcinnes Would you mind share some code? :)

                                          D cowboysdudeC 2 Replies Last reply Reply Quote 0
                                          • D Offline
                                            dmcinnes Module Developer @Cato
                                            last edited by

                                            @Cato just the regular PIR sensor mirror code works fine! The data pin triggers in the same way as a PIR sensor.

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 4 / 4
                                            • 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