I'm working on a sensor similar to an oximeter that measures light attenuation through a medium. I have an LED on one side, and an IC photodiode with on-chip transimpedance amplifier (OPT101) on the other. The photodiode measures the LED output. To make the signal as clean and stable as possible, I run the LED through a current regulator (PSSI2021SAY). Here is a simplified schematic:
The problem I'm encountering is that when I switch on and off the LED, I do not get a square wave signal. When I shut the LED off, the falling edge is a square wave as I would expect - which makes me think the issue is not from the OPTI101 . However when I turn the LED on, the output signal is not square as the signal spikes, and then levels off. This happens on the order of 5 seconds which is not intuitive to me. I thought that LEDs have a much faster response time than this, so id be surprised if this is due to an LED warmup period. The OPTI101 also has a very fast response time (~50ns), and as the falling edge is square, I don't suspect it very much. Ive run may tests where I've removed all capacitors from the circuit to see if that was the issue, but still not getting square waves. (I've even run tests where I power the LED independently using a separate battery and a switch to further reduce capacitance). Ive run this experiment with/without the current regulator as well. Here are some plots of the signals I'm getting:
Turning LED on creates spike: turning LED off produces nice square: Full view:
Does anyone have any idea why I'm not getting square waves? Do LEDs really require a warmup period on this timescale?
EDIT: some updates on more tests I've performed:
- Instead of turning on/off LEDs, I tried dropping the current, then turning it back up. I found that the issue still remains, but what's interesting is that there is a negative dip when it goes down as if the LED output has inertia. I think this too suggests that the issue is warmup related. As the current drops, the temperature drops, and the LED efficiency increases. Thus the initial drop would be from the prior low efficiency state at high current, then as the LED cools down, efficiency increases, and the light output increases. Here is a plot of the data (ignore x axis label):
- I also tried mechanically blocking the light. THIS WORKS! This suggests that the OPTI101 is not to blame here (though I did not suspect it anyhow). So this further points at the LED system as being the culprit. And I still think it is temperature related, which if it is in fact the case, I don't see any solution for electronically...
I must say that I'm still skeptical that it is impossible to get a square wave from an LED, given the fact that other instruments do operate by flashing LEDs, and they presumably don't have this issue... so question still stands!