EEVblog Electronics Community Forum
Electronics => Projects, Designs, and Technical Stuff => Topic started by: peter-h on December 05, 2024, 07:26:54 am
-
Is anyone doing this?
I've never tried it but it should be possible, and would avoid a separate light sensor.
One hassle is having to switch one of the segments into a reverse voltage mode. Most 7-segment displays are common cathode or common anode. The latter is less common because very few driver chips support common anode (I use the STLED316). So you would disconnect one segment from the driver circuit and reverse-bias it.
Photodiode mode is very fast so you need to do it for just microseconds.
It is also an obvious patenting candidate.
-
One does not really need a reverse voltage. If one does not need very high speed one can also use a photodiode / LED with essentially zero forward voltage. The longer part of the response time would be from the amplifer to recover anyway.
A small photodiode / phototransistor is not expensive - it really is the question what is cheaper: the extra sensor or the extra circuit to isolate the sensor from the drive part. The current to look at is likely in the nA range and one would need a resonable low leakage driver. The normal drivers may work, but usually not guaranteed. The main advantage of using a LED is not needing extra front panel space, not the part saved.
-
P. C. D. Hobbs, author of "Building electro-optical sysstems, making it all work" has done it to get a large and cheap array of photodetectors.
see link, slides 53-55
https://de.scribd.com/document/47030066/klugesandhacks6c
-
P. C. D. Hobbs, author of "Building electro-optical sysstems, making it all work" has done it to get a large and cheap array of photodetectors.
see link, slides 53-55
Or get a pdf here: https://electrooptical.net/static/oldsite/www/canceller/klugesandhacks6c.pdf
-
One does not really need a reverse voltage. If one does not need very high speed one can also use a photodiode / LED with essentially zero forward voltage. The longer part of the response time would be from the amplifer to recover anyway.
A small photodiode / phototransistor is not expensive - it really is the question what is cheaper: the extra sensor or the extra circuit to isolate the sensor from the drive part. The current to look at is likely in the nA range and one would need a resonable low leakage driver. The normal drivers may work, but usually not guaranteed. The main advantage of using a LED is not needing extra front panel space, not the part saved.
Doing anything in the nA DC range consistently enough to not need expensive analogue parts and /or per-device calibration is going to be tricky, unlikely to be worth the trouble. Maybe if all you care about is indoor vs. outdoor it might be doable but there's probably a reason this isn't commonly done.
-
One does not really need a reverse voltage
Indeed that is very true; a photodiode can work in a virtual earth. I used to make RS232/4XX modems over multimode fibre which did that.
The main advantage of using a LED is not needing extra front panel space, not the part saved.
Yes; exactly. You need a bigger aperture (a hole in the front panel) for the light sensor.
-
Try the LED's in a photo-voltaic mode, I have some that generate 1.5V in bright light. But watch the viewing angle.
I found phototransistors T-1 (3mm) did not work well for ambient light sensing. It's a pretty narrow angle looking straight out at only the surface it sees.
Room light was not seen, unless I held something reflective up. My next attempt is a diffuser lens and aiming up at a white ceiling.
Another sensorless trick is to just dim based on real time, say 10pm-6am dim it.
-
The other thing to deal with is that typically the LED array is driven from an LED driver chip (and you just upload ASCII data to it, via e.g. SPI) and you have to sample the lines to see when it is scanning the display. And is is probably scanning nonstop, so there is no obvious point for you to jump in and use an LED segment to measure the ambient light. One might have to blank the display (usually there is an explicit function, as well as a brightness control one) for a brief time. However if you disconnect the one segment, the other scanning won't matter...
A PIN diode does produce little current from ambient light, but I've done it. Historically people used LDRs which give you tons of "output", as well as having a very slow response which can be handy.
But another consideration is that the light sensor will be picking up some of the display light, so you want to read the sensor only during display blanking. That is why I used a PIN diode; it's very fast.
-
What part number for the photodiode you like?
TBH the only thing that works great (sensing ambient light) for me is CdS photocells - they have a very wide viewing angle and spectral response is broad, close to the human eye's, they are too slow to worry about flicker from LED/fluorescent light bulbs.
Obsolete Panasonic NaPiCa sensors like AMS302 (https://api.pim.na.industrial.panasonic.com/file_stream/main/fileversion/1927) spectral matches the human eye but with unknown angle.
Compared to the spike at near IR that photodiodes have. Why not use a phototransistor, much less hassle no preamp needed.
-
I experimented with a photodiode and it worked but in the end I ended up using an LDR (CdS sensor) NSL-19M51.
-
I did several tests with LED and FPGA. If you switch output pin to z-state, instead of zero, LED voltage will drop smoothly, and time of the falling edge will depend on ambient lightness.
-
There must be something else involved there.
The LED will have a capacitance, and the LED will be generating a current from the photons arriving at it. You must have a pulldown resistor somewhere, otherwise the whole thing will be poorly defined.
-
Optical leakage between the segments will require the entire display to be blanked during the measurement.
I my experience LEDs do not make very good photodiodes, so the measurement current will be small requiring the leakage from the driver to be isolated, which is just as well because the capacitance also needs to be isolated for a fast measurement time at such low currents.
A separate photodiode or other sensor would be a lot simpler.
-
Yeah.
The driver leakage current will swamp the photo currents.
-
For what it's worth, I dug out a Kingbright CC56-21SRWA, which is a 4-digit common cathode display, and connected my scope across pins 11 and 12 with a 1K resistor in series. It produces a noisy zero volts in room light, but about 150mV across the resistor in bright light. That's with nothing else connected to the display. It seems a processor's ADC should be able to pick that up.
-
You can use LEDs in reverse as simple photo sensitive resistors. Just take a segment you would't use. Measure it with a multimeter in resistance mode. The ones I used were super sensitive, hundred kohm to megaohms region.
-
Indeed, use a decimal point, for example.