Summarize the following text in less than 50 words. Let's think step by step: leds are a wonderful technology. you put in a little bit of power, and you get out a wonderful amount of light. they're efficient, cheap, and plentiful. we use them for so much! what you might not have known is that these humble components have a secret feature, one largely undocumented in the datasheets. you can use an led as a light source, sure, but did you know you can use one as a sensor? dual-use devices the concept of using an led as a sensor is much like using a speaker as a microphone. flip things around, and instead of emitting light, the led senses it instead. you can see the effect quite simply by using a multimeter. hook up the leads of a multimeter to your led, and set it to measure current. point the led towards the sun, and you'll likely pick up a reading. while the led is sensitive to light, it's usually on quite a small range of wavelength, unlike traditional photodiodes. but how to use this effect? well, you can go multiple routes. if you're of the analog tilt, you can hook the led up to the inputs of an op-amp, using the device to amplify the output if you so desire. just about any garden-variety op-amp can be used in such a way that it produces a higher output voltage the more light falls on the led. however, you can go so much further, as the bright minds at mitsubishi electric research laboratories (merl) determined back in 2003. following their example, you might like to hook the led up to a microcontroller. setting it up in a "reverse biased" mode allows it to act as a sensor when attached to an io pin, instead of acting as a light emitter. to do this, simply attach the led's anode to ground, while connecting the cathode to an i/o pin in a high state. this achieves the "reverse bias," and charges the inherent capacitance of the led. the capacitance is small, so this only takes a fraction of a second. then, the io pin can be switched to an input, and the capacitance of the led will discharge into the microcontroller pin. the more light, the more current induced in the led, and the faster the led's capacitance will discharge. measure how long it takes for the voltage to drop below the io pin's digital logic level, and you can sense light levels with a simple io pin. in fact, the team at merl realized that you could go even further. the humble led could become a "last centimeter" communications device, used as both light transmitter and receiver. to achieve this, one simply had to insert the led between two tristate io pins on a microcontroller. with the anode driven high and the cathode driven low, the led would light. flipped the other way, and the led would be reverse biased. then, one of the tristate pins could be set to input mode to read the led as a sensor. as suggested by the team at mers, leds can be used as sensors in all kinds of innovative applications. you could use a tv's power led to detect light levels, and thus adjust screen brightness appropriately. you can even do simple proximity sensing, using an array of leds to act as emitters and sensors in turn. you could even use status leds on small devices to do bidirectional communication if you were so inclined. and yet! we almost never use leds for any of these things. realistically, while leds are sensors, they're not excellent sensors. we have far better phototransistors, photodiodes, and other sensors available these days. this technique could be useful to you, if you're trying to design a device with the bare minimum part count or as cheaply as possible. or, if you want to put surprise functionality into a device that has just an led on board. but in the real world, this technique doesn't get a whole lot of use. futzing around with nifty led tricks takes more engineering time than just speccing a proper sensor, after all. still, the technique has found some real applications. leds used in this way do have the benefit of being quite selective as to wavelength, and can be quite stable over time. the legendary forrest mims took advantage of this, putting led sensors to use in a variety of scientific apparatus. indeed, his ozone measurement device relied on this technique, and was so reliable it proved there was a drift error in nasa's own nimbus-7 satellite. there's also hope in the rapidly-advancing field of perovskite technology. perovskite leds, or perleds, could use advanced semiconductor materials to create devices that act as both good light sources and capable photodetectors. the hope is that they might be good enough to create touchable displays that need no additional sensor for touch. instead, the perled array would act as both display and sensor. however, for now, the research is at an early stage, and the instability of perovskites means any practical applications are a long way off. it's also worth noting that this technique doesn't work on a lot of modern leds. namely, addressable leds, self-flashing leds, and anything of that ilk. that's because this technique relies on hooking up a microcontroller directly to the led die itself. many modern "smart" leds don't break out the pins themselves, only providing pins for the controller chip inside. thus, don't expect to use this technique with your neopixels, ws2812bs, or anything like that. ultimately, using leds as a sensor is a fun technique. it's also highly useful if you're doing specific things with certain wavelengths of light. barring that, though, it's a great party trick to keep in your toolbox, because you never know when it'll come in handy. 3 thoughts on "you can use leds as sensors, too" do remember here that this is an unspecified and untested property of led's. some do work quite well as light sensors, while others do not work at all as light sensors, even when they are just a bare die without extra electronics. fun for experiments, but not good for a real design, as there may also big variances between different batches of the same manufacturer and model, etc. i knew of this effect and tested this at home. then a few months later i wanted to demonstrate this, and with that led it did not work at all. also, a story of a design problem. with a old battery powered design, battery life was important, and thus low power design. with the particular microcontroller used, power could be reduced by switching the pins for the led's to inputs when the led's were of, and this worked nicely in the lab. once a bunch of these things were sold, they started coming back from the field with premature empty batteries. it turned out that the voltage generated by the led's put the input stages into their linear region with enough ambient light, and thus a high current consumption. interesting! thanks! i wonder if the leds are restricted in their "bandwidth" by the color of the plastic/epoxy that forms their lens. i recall an article years ago by mims describing his legal entanglement with a company regarding the idea of using an led for both transmission & reception. i don't recall if he was defending his patent, contesting someone else trying to patent his prior art, or something else please be kind and respectful to help make the comments section excellent. (comment policy)