8 ms·
How to use LEDs to detect light
- jacquesm 8y agoOld diodes were painted black for that reason. If you scraped off the paint you had a pretty good photodetector. Old transistors ditto (OC71 for instance), the housings were made of glass so already transparent. The Germanium ones were more susceptible to this than the Silicon ones.
- aequitas 8y agoI remember old books with circuit 'recipies' where you had to sand off the top of a metal casing transistor to turn it into a detector.
- gioscarab 8y agoCiao, I have played with this characteristic of LEDs since young, those are some of the results: - This is a reflectometer: https://github.com/gioblu/PJON/tree/master/devices/sensors/LEDAR https://github.com/gioblu/PJON/tree/master/devices/sensors/L... - This is a bidirectional wireless data-link: https://github.com/gioblu/PJON/tree/master/src/strategies/AnalogSampling https://github.com/gioblu/PJON/tree/master/src/strategies/An...
- Afrotechmods 8y agoI used this phenomenon to build a laser tachometer a while back. https://www.youtube.com/watch?v=RfitqGLPCUY https://www.youtube.com/watch?v=RfitqGLPCUY
- mark-r 8y agoI first heard about this in the 1970's. I tried to build a two-way communicator on this principle in high school, but never got the circuit to work.
- phendrenad2 8y agoTL;DR: LEDs make pretty decent photodiodes. But you should read it. ;)
- Avery3R 8y agoContent? Nah that's overrated let's cover it up with a gigantic sticky header and footer
- Qwertystop 8y agoThis seems like it ought to be much bigger than it is. Two-way single-cable fiber-optics, with cheaper components than photoresistors? What's the catch?
- std_throwaway 8y agoLEDs usually are not very good photodiodes. You optimize them differently for each usage. In abstract theory the perfect photodiode and the perfect LED would be the same but in reality there are more tradeoffs and you end up with different devices.
- tlb 8y agoDetectors for fiber optic data transmission need a very fast response time. For gigabit data, you need sub-nanosecond response. LEDs are much slower. They're also less sensitive, which means you need a higher-power transmitting LED to get the same range.
- monochromatic 8y agoWhat drives the response time, internal capacitance or something?
- tlb 8y agoYes, capacitance of the junction.
- DoctorOetker 8y agoThat's a rather vague statement, it is the textbook answer directed at the users of discretes: given a fixed discrete photodiode part and a fixed load resistor one can change the capacitance by reverse biasing and thus improve the bandwidth of the resultant RC filter. But this is not a full truth from the perspective of the photodiode designer: he can trivially increase or decrease the capacitance by designing a photodiode with a larger or smaller area. Suppose ratio of the incoming light power over photodiode area is unaffected by doubling the original photodiode area. If he doubles the area and hence capacitance, then he also doubles the injected photocurrent! Hence he can halve the load resistor, hence the bandwidth is unaffected by doubliing capacitance! Consider the source illumination, what is the smallest area you can concentrate the light in? If it is smaller than your photodiode's active area, it pays off to select a smaller photodiode since the unused area is contributing dead weight capacitance. But if decreasing the area does not increase the optical power / photodiode area ratio, you need better optics or illumination. EDIT: fixed poorly phrased sentence
- ChuckMcM 8y agoThere are a couple of really cool things you can do with LEDs as detectors. One is as a wireless link, modulate a red laser pen pointer by putting a microphone in the battery supply line and then point it at an LED that is reverse biased on a transistor that is halfway between the on and off state. Most cheap LED pointer internal power supplies have no filtering for "high frequency" (greater than about 100hz) noise on the supply line which comes out as a change in brightness in the pen pointer which the LED can pick up and drive a transistor amplifier. The other is a simple "firefly" program where the LED is connected to the ADC input of a microprocessor, and when it detects LED light it turns around and flashes the LED some random time in the future. If you have a bunch of these you can bounce a light around for quite a while. Chris Kuethe did a great example of this but I cannot seem to find his code anywhere.
- barbegal 8y agoFireflies: https://hackaday.com/2009/06/25/64-synchronizing-fireflies/ https://hackaday.com/2009/06/25/64-synchronizing-fireflies/
- L_226 8y agoYeah! I made something similar when I was a kid. Audio transmission via laser pointer using an inline microphone to modulate supply voltage, then an opamp on a photodiode to receive. Quality was horrible, but hey, it was pretty cool!
- toomanybeersies 8y agoI made a "laser aux cable" a few years back. I used a laser pointer (an actual laser one too, I think) and I can't remember exactly what I used as the receiver, I think I may have used an LDR with a transistor, I don't think I would've had any photodiodes floating around. Interesting to see it can be done with an LED as the receiver.
- jamesadevine 8y agoOn the microbit [1] we run the display's LEDs in reverse to turn most of the display into a light sensor [2]. It can then be used in code [3]. [1] https://microbit.org https://microbit.org [2] https://lancaster-university.github.io/microbit-docs/extras/light-sensing/ https://lancaster-university.github.io/microbit-docs/extras/... [3] https://makecode.microbit.org/_Lgy9F04ar9Tm https://makecode.microbit.org/_Lgy9F04ar9Tm
- tossandturn 8y agoI started reading it, and I thought "this style seems very familiar". When I got to the first schematic, it clicked and I checked the header for the author's name; sure enough, Forrest Mims!
- Squonk42 8y agoYou can communicate using bidirectional LEDs: http://www.merl.com/publications/TR2003-35 http://www.merl.com/publications/TR2003-35
- rawicki 8y agoMy favourite application of this idea is concealing a tamper protection switch in a debug LED.
- zunzun 8y agoYou can use this to make a cheap "toilet-paper-ometer" by sending a 1KHz square wave to one LED and using a second LED's "detector" output narrowband filtered for 1KHz. The 1KHz signale makes the "meter" insensitive to ambient light, and the device is easily calibrated by measuring "detector" amplitude with different layers and curve fitting the amplitude vs. sheet count. Nice science fair project for a Raspberry Pi.
- barbegal 8y agoHow do you implement the 1kHz filter? A 1kHz square wave is easily generated in software but surely you have to implement the filter using an op-amp and some passives?
- wallacoloo 8y agoGiven it's a raspberry pi, you could easily implement the 1 kHz bandpass filter in software, by sampling at a higher frequency and then implementing a discrete-time filter. Just about any microcontroller with an ADC could do that, actually (edit: actually, the raspberry pi doesn't have an ADC - I guess the author is doing that with a discrete ADC?).
- barbegal 8y agoThe problem is that most micro-controller ADCs use sample and hold with a capacitor so they require some time to stabilise. From the source code of other projects this seems to be on the order of 1 to 5ms which effectively turns it into a low pass filter.
- jotux 8y agoI designed motion detectors for a couple years and once spent a few weeks researching the use of LEDs as light detectors. What I found was the wavelength each LED could detect and the sensitivity was inconsistent from LED-to-LED and inconsistent across LED batches. We were producing 50k-1M units per year so those findings made using the LED as a sensor a deal breaker and we eventually just added a $0.12 photo-sensor to the boards to detect light. All of that said, I designed a few demos (using the LED on the motion detector as a light sensor) that were pretty cool: - I connected the amplified LED input on a motion detector to the microcontroller and sampled the LED in between PWM cycles (we PWMed the LED to save power). Even when the LED was on you could shine a flashlight at the motion detector light-pipe and trigger events or a test mode. - On a motion detector that had a bi-color LED (red/green) in the same SMT package I connected the amplified LED input from one LED to the microcontroller and pulsed the other LED at a non-visible rate. If you placed your finger on the light pipe it would reflect the light from the pulsing LED to the other LED and you could detect when someone touched the light-pipe. - A motion detector that could receive serial data over the LED to configure parameters.
- pokoleo 8y agoHow expensive were LEDs in comparison? Could you have added e.g 6 of them to the board as sensors?
- jotux 8y agoLEDs were pennies but the biggest problem was some LEDs were super sensitive and some had no reaction at all -- so even with a bunch of LEDs you might just get all non-responsive sensors. Ultimately we wanted to detect the brightness of light reliably and a photo-sensor was reliable.
- sofon 8y agowow that's neat! sampling between PWM cycles is a cool idea. I'd guess the issue is that the required parameters are not well controlled in the fabrication of most LEDs. Possibly LEDs not used as indicators, with a tighter wavelength output... most likely this would remove any cost advantage however. Fascinating stuff!
- Robotbeat 8y agoI've used LEDs as light detectors in a pinch when I wanted to measure the rotational speed of something and didn't have any other sensors handy. Neat trick.
- askvictor 8y agoThis is neat; I just recently came across a project using an LED as a candle you could blow out - using just an LED and microcontroller (no other sensors). The resistance (hence voltage) change due to the change in heat can be measured by an ADC. So, what other hidden talents do LEDs have?
- borgel 8y agoCovered here [1] I think? (disclaimer, I write for HaD) https://hackaday.com/2018/08/21/an-led-you-can-blow-out-with-no-added-sensor/ https://hackaday.com/2018/08/21/an-led-you-can-blow-out-with...
- DataJunkie 8y agoThis is actually how modern Optical Mark Readers ("Scantron") works. The older models from the 1960s used electrical current passed through the paper somehow.
- Johnny555 8y agoScantron readers use LED's as light sensors? I assumed they used regular photo sensors. The older form readers used metal brushes that detected the conductivity of the graphite in pencil lead.
- DataJunkie 8y agoIt's possible that the "newest" ones use photo sensors as they now also double as standard desktop scanners, but I'm not sure they would be marketed as OMR. I suspect Scantron and Pearson NCS won't be around much longer as standard scanners are much cheaper, can accomplish the same goals (minus printing results on the form, without a special attachment on expensive scanners), and embedded processing continues to grow.
- nvahalik 8y agoThe author of this article is Forest Mims. Forest Mims wrote RadioShack's Getting Started in Electronics[0] as well as a number of "mini notebooks"[1]. He is an amazing writer and has a real knack for explaining things in "layman's" terms. [0]: https://www.radioshack.com/products/getting-started-in-electronics-book https://www.radioshack.com/products/getting-started-in-elect... [1]: http://www.forrestmims.com/engineers_mini_notebook.html http://www.forrestmims.com/engineers_mini_notebook.html
- RachelF 8y agoHe also wrote the manual for the MITS Altair 8800, the microcomputer Bill Gates and Paul Allen developed BASIC for.
- londons_explore 8y agoI instantly recognised the hand drawn LED in the article as something from my childhood.
- Haitischmock 8y agoIs it possible to do this across an entire monitor ? Could the NSA (or anyone else) be filming us through our screens ? "We see all through the black mirror"
- ajuc 8y agoEach pixel receives light from each point in the room, so almost all of them have the same value. You need a pinhole to block vast majority of that light, so that each pixel on screen receives light from a different point on the other side of the pinhole.
- qmr 8y agoMaybe, but why do that when you can compromise webcams and display cables?
- m1573rp34130dy 8y agodisplay cables can be shielded, webcams can be covered over removed or banned from office use...the whole tempest hacking thing was intended to be applied noninvasively from a suspicious icecream truck parked outside for the last 3 days...
- m1573rp34130dy 8y ago...if you work it for a while, you can image things in a radar like fashion. there was even a device that could be purchased that was a working television/camera, now obsolete...what you are suggesting requires physical compromise beforehand...
- londons_explore 8y agoI tried this on an oled display (by removing the controller and accessing row and column lines directly). Light certainly had some effect, but I didn't get to be able to have the display show something and act as a sensor at the same time (possibly because the capacitance of the row and column lines is too high)
- 8y ago
- DoctorOetker 8y agoFasten your seatbelts: Using LEDs as SPADs (Single-Photon Avalanche Photodiodes) http://nebula.wsimg.com/0b846f1e91ab9c7442a61c8c35680a51?AccessKeyId=027C3581808C75E81679&disposition=0&alloworigin=1 http://nebula.wsimg.com/0b846f1e91ab9c7442a61c8c35680a51?Acc... Not sure if that link is shareable, otherwise it's the May 2013 issue "What's a SPAD?" at http://www.teachspin.com/services.html http://www.teachspin.com/services.html
- CamperBob2 8y agoVery cool. I always enjoy George's posts on sci.electronics.design, and now I'm going to have to spend some time I don't actually have at the workbench, trying that.
- Johnythree 8y agoThe Optical Communications hobbyists have been using this idea since LEDs first arrived nearly 50 years ago. It sure makes things easier to use the same optical system (lens, etc) for TX and RX. The only problem is that LEDs make a fairly poor Optical sensor.
- cordite 8y agoI haven't personally used this feature of PJON, but they have an apparent way of communicating bidirectionally with a single LED on each side. The one wire software bit bang method worked for me though. https://www.pjon.org/AnalogSampling.php https://www.pjon.org/AnalogSampling.php
- oh5nxo 8y agoAre there any other accidentally light sensitive devices?
- convolvatron 8y agoi distinctly recall articles much like this one about decapping dram parts in ceramic packages and focussing an images onto them with a lens. once you mapped the address lines to the physical structure, and tuned the aperture and ambient light levels of the chip you could get out a one bit image.
- detaro 8y agoChips can be, if their case isn't opaque enough. Famous example would be the "camera shy" Raspberry Pi 2, which crashed when exposed to strong light like a camera flash: https://www.raspberrypi.org/blog/xenon-death-flash-a-free-physics-lesson/ https://www.raspberrypi.org/blog/xenon-death-flash-a-free-ph... Other semi-conductors can be too, e.g. classical diodes in glas casing.
- oh5nxo 8y agoThanks. I grabbed a multimeter and checked the first part I could find. 1mV DC covered, 10mV DC uncovered (it's a bleak cloudy day). Magnifying glass reveals it's a 6v2 zener :)