Notifications
Clear all

10/18/2023 Map Stopped Working?
Visit this post for the fix

Light sensor mounting

4 Posts
3 Users
0 Reactions
958 Views
(@zeroengineland)
Trusted Member
Joined: 4 years ago
Posts: 52
Topic starter  

Since my build is slow, I figured I'd share something cool that I figured out with light pipes.  I'm using a deep frame, and I wanted the ambient light sensor to be as unobtrusive as possible.  I wound up using this product ( https://www.amazon.com/gp/product/B01M7ZFV01/), which has a couple of cool features.  It's a light pipe, and it has a molded Fresnel lens at the top, so it transmits off axis really well.  Even a light from the side is directed down the pipe.  The other thing that's neat is that the lens at the top acts as a slight flange, so it can be inserted into a hole but won't go all the way through.  It's less than $3 for a pack of 10.

lightpipe

I drilled a hole in the top of the frame, and the light pipe is not very visible at all.  Here's what it looks like if you can see the top of the frame:

top oblique

But more likely, you'll be looking at the frame edge on, and you can see that it barely sticks up above the frame.

top edge

I used the 1" length light pipe, which just barely sticks out through my thick frame.  The trick was to mount the light sensor to a board so that the light sensor is up against the light pipe.  I did this by mounting the light pipe about halfway deep in the frame, and then using a pair of angle brackets to hold a piece of hardboard with the light sensor at exactly the right spot.  In this photo, you can see the light from above being sent down the light pipe.  The input to the light sensor is well enough controlled that it only detects light from the top of the frame.  The board shields it from any light from the LEDs on the map, and the deep frame casts enough of a shadow that the only light that reaches the sensor is through the pipe.

This particular light sensor ($7 for 3 off Amazon, I think) has a small screw hole, so a #4 screw holds the sensor to the hardboard.  The sensor has two lights.  The right light is for power, and will always be lit as long as you supply voltage.  The left one is the digital out reading.  If the sensor detects light, the left LED will be lit.  If it doesn't, the LED will be dark.

As you can see, I built a JST connector.  On the Raspberry Pi end, there's a 3 position connector that supplies 3.3V (yellow), ground (black), and the digital out signal (green).  I crimped a 4-position connector on this end, and as long as I remember that I'm not using analog out, I know which pin should be left unconnected.  This lets me disconnect the light sensor easily should I ever need to do so, and of course the other end is also crimped so it's easy to pull off from the Raspberry Pi/breadboard when I need to do troubleshooting.

light sensor

 


   
Quote
Mark Harris
(@markyharris)
Member Admin Registered
Joined: 5 years ago
Posts: 559
 

Great write up and thanks for the tip on the light pipes. I'll have to check them out. - Mark


   
ReplyQuote
(@captain_ron)
Estimable Member
Joined: 5 years ago
Posts: 162
 

Thanks for the tip, I just order the light pipe.

Where di you get the frame from?


   
ReplyQuote
(@zeroengineland)
Trusted Member
Joined: 4 years ago
Posts: 52
Topic starter  

@captain_ron This is super late - I ordered the frame from pictureframes.com.  Comes fully assembled.  It was a tip from one of the many sites on the Internet of people who built live maps in quarantine.

Here's the link! https://www.pictureframes.com/black-custom-frame-sp8

I paid $85 for my LA sectional (32x17.5) and $100 for my NorCal map (30x30)


   
ReplyQuote
Share: