Discussion about this post

User's avatar
lcamtuf's avatar

Something I was planning to mention, but that didn't make the cut: regular LEDs work as (poor) photodiodes too, with a LED-color-specific spectral response. Experimental results can be found here:

https://learnmaketeachshare.org/sensors%20and%20circuits/2018/10/30/using-leds-to-measure-narrow-spectral-bands.html

As for photodiode response times: they're usually given in the spec, but values between 1 and 100 nanoseconds are common for small devices. Some tiny BGA units will have response times as low as 100 ps; while large, specialty sensors may be as slow as a microsecond or so.

Expand full comment
Nolan Hergert's avatar

Great articles as always. I found this other nice article explaining how to measure small currents with just the ADC and microcontroller pin capacitance and thought you might enjoy it. https://community.silabs.com/s/article/using-adc-to-measure-a-current-source-with-no-external-components?language=en_US

In my own testing it seems to still be very sensitive to noise, but I'm also using 1 inch long through hole LEDs flapping in the breeze. I was able to mostly work around it by using another LED painted black and subtracting the values, but I'm trying to anticipate what will happen when they become tiny SMD components on a PCB and if the floating input will be a problem still. My application requires ~10000x dynamic range, which makes things interesting too and is perfect for the ADC method above.

Expand full comment
2 more comments...

No posts