Read the statement by Michael Teeuw here.
PIR sensor behind glass?
-
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):
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:
Next, we removed the Fresnel lens from the sensor:

After that, we put the sensor in the bigger hole which perfectly houses the whole cylinder:

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:
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? :DAnyway, 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. -
That is awesome!!! Great job and Thank you for the info!!!
-
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.
-
That’s another great way to do it! :) Where did you get them from?
-
@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.
-
@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:
More details:
http://www.cnx-software.com/2016/04/04/tiny-microwave-radar-module-detects-movements-up-to-9-meters-away-for-2/amp/ -
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. -
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. -
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 :)
-
@dmcinnes Would you mind share some code? :)
-
@Cato just the regular PIR sensor mirror code works fine! The data pin triggers in the same way as a PIR sensor.
-
@Cato said in PIR sensor behind glass?:
@dmcinnes Would you mind share some code? :)
-
hmm… some questions if you would not mind.
Ive just ordered 2 sensors .
I need to know what plugs in to what to feed in to the chips (im guessing the sensors i need? please explain what i am missing… and what connects in to the Raspberry PI.
Also note the second i want to have outside the home and set up to a facial recog module, and comand it to open the door via face and voice confirm if possibl.
And how this connects to the a
-
If you want a very simple solution (independent of MM completely), check out this script. This is what I am using, it is a very simple python script that reads the value of a PIR and then selectively turns on / off the monitor. You will need to change things up a bit as I wrote it for a C.H.I.P. but the GPIO library is the same.
-
@wjdw87 cool! The connection is basicly the same as a PIR sensor. It has three wires, ground, vcc, and data which goes high when it senses motion. I plugged it into the PI’s 3.3v, ground and I believe gpio 22 (whichever is the default for the module).
Since the wire comes out as a three pin JST I split it into individual header connectors because all the pins are not next to one another on the PI.Hope that helps!
-
Can anyone of you please share a picture of how you’ve connected the microwave sensor to the Pi pins?
I know this sounds dumb, but I can’t seem to find out what pin connects to what, as I don’t know what pin is ground and what pins is (data) out…Thanks!
-
@amcolash said in PIR sensor behind glass?:
If you want a very simple solution (independent of MM completely), check out this script. This is what I am using, it is a very simple python script that reads the value of a PIR and then selectively turns on / off the monitor. You will need to change things up a bit as I wrote it for a C.H.I.P. but the GPIO library is the same.
VERY good choice! Mine also works independent… but I really like your idea!
-
@cowboysdude I recently picked up these microwave sensor modules to use in conjunction with the code you posted for PIR Sensor. I’m pretty new to all this, and I can’t get any function out of the sensor. Do you have some advice on how to troubleshoot this? It could be an error on my part in implementing the code, wiring it incorrectly, or something else, but I’m just not sure how to figure out what the issue is.
-
@Nususu I would go online and lookup ‘wiring pir sensor raspberry pi’ there are TONS of things out there. Your issue could be one of any or a combination of things… I did that using a PIR sensor so I have no idea how it would act with microwave sensors… good I’m hoping because I want to get some… BUT let me know if you need anymore help, not that I helped you now but I will do what I can!
-
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