Re: My home-built DIY gear position indicator - includes plans
What a great project! I like the idea of mounting the LED in the instrument cluster.
I noticed what appears to be a photo cell in this set-up,
https://www.st-owners.com/forums/showpost.php?p=109519&postcount=17
I'm assuming it allows the LED brightness to vary according to ambient light conditions. Is that something that would be manageable?
Hats off to you for your efforts and willingness to share.:bow1:
I bet that's exactly what the photo cell does.
Honestly, I seldom do any night riding, so I never really gave much consideration to the brightness of the LED display at night (duuuuhhhh
: ). My main concern was making it bright enough to see on bright sunny days. But, that super bright LED is sooooo bright that it is likely going to be tooooo bright in night time riding conditions. I mean that thing so bright, it lights up my whole shop if I turn off the shop lights.
So, here's a great new innovation to add to the project.
I can think of a couple ways to do this using a photo cell.
1) Put a photo-cell in series with the common anode leg of the seven segment display.
2) Use one of the MC's unused pins (fortunately there is one available) as an analog input pin, and use the MC's on-board A/D converter to compute the ambient light conditions based on the voltage drop across the photo-cell. The resulting A/D conversion would then be used as an input to the routine that turns on the segments of the seven segment display. The routine that turns on the seven segment display's segments could easily be altered to vary the duty cycle of the "on time" for those segments (right now they are just "always on"), effectively dimming them by only turning them on for a short while every few microseconds. Because of the phenomenon called "Persistence of Vision", the human eye does not see this on/off flickering. It'll just appear to be a little dimmer.
#1 probably won't work. The photo cell would have to dissipate too much power. Maybe some of the EE's in the crowd could chime in here.
I think I'll play around with option #2 this weekend. I'll let you know what I come up with.
Great idea... thanks Hashimoto