There was a workshop at SIGGRAPH 2018 titled LEDs as Sensors, and I was tipped to it via the hackaday post from 2018-08-21, “A LED you can blow out” (with no added sensor it said, which is technically true if you stick to the meaning of “added” in the title).
Basically, the gist of it is to just feed an LED some DC current and watch its forward voltage drop: it varies with temperature, so if after you let it warm up a bit you blow quickly on it, you should notice a sudden change in voltage. Connect that to an analog input on your micro-controller of choice, do some averaging to smooth-out noise, and that sudden change can be used as a trigger to “blow out” the LED.
Note that for any quick voltage change to be observed, there must be minimal thermal inertia around the LED junction. This means that “normal” LEDs with big plastic casings don’t work for this purpose. The article suggests a tiny pre-wired SMD LED. Since I wanted to test this out without ordering (and waiting) an LED, I’ve decided to search around the junk drawer; the best candidate I could find was a scrap of LED light strip which had exposed SMD LEDs soldered to the tape and an SMD resistor thrown in for every 3 LEDs. That’s what I tested with, and I’m happy to report that it (sort of) worked.
Some references and links to more info / materials
- The list of workshops from SIGGRAPH 2018
- Hackaday post from Aug/2018 that tipped me to this idea
- Instructables post from the original author with full details and code
- Full source code from Paul Dietz on Github (this project is #07)
Figuring out the wiring on an LED strip segment
First things first, I needed to figure out how the LED light strip I had lying around is wired-up. This is not always easy to see by just looking at, as paint makes the conductive tracks barely discernible and a bit hard to identify:
However, shining a strong light underneath the strip did the trick of exposing the copper traces, and the wiring becomes evident:
It turns out that each segment is wired with three LEDs and one 150-ohm resistor in series, and each of the strip segments is connected in parallel to all others.
Isolating on LED and measuring it out
I’ve decided to use one of the LEDs on the strip segment and the series resistor for this test. This would require me to just solder the three leads – ground, VCC from a digital output and the voltage sensing for the ADC. Here’s my beautiful sketch of a plan:
Determining the LED voltage drop and dimensioning the series resistor
With the leads soldered, I’ve measured the forward voltage drop in the resistor, 2.6v.
Since the series resistor on the strip is 150-ohm, a quick calculation shows that if powered from 5v, the current I=V/R over the LED would be: (5v – 2.6v) / 150R = 16mA. This is ok from the standpoint of running this from a digital output pin on an Arduino, but a bit more than the 12mA in the original circuit; I’ve figured it would work.
And it did! I do need to blow hard and quick in order to trigger the action in the software (and I had to tweak the parameters in the code a bit, but in the end I did manage to consistently turn off this LED with a quick hard blow.