5
\$\begingroup\$

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: enter image description here

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: enter image description here turning LED off produces nice square: enter image description here Full view: enter image description here

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:

  1. 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):

enter image description here

  1. 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...

Heres a plot of the result: enter image description here

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!

\$\endgroup\$
15
  • 2
    \$\begingroup\$ If you would replace the LED with a resistor + diode with equivalent values, will you observe the same characteristics? Is the microcontroller not connected to the ground, or is that just the simplified schematic? If you would remove the ADC and simplify the circuit, are there any changes in the characteristics? I would remove components from the software and from the circuitry to make the simplest replicator of the problem (the process could pin point to cause of the culprit) \$\endgroup\$
    – Anton Krug
    Commented Apr 12, 2021 at 22:31
  • \$\begingroup\$ That current regulator says how to switch it on and off (Fig. 6 in the datasheet), which is not what you're doing. Have you tried the recommended method? \$\endgroup\$ Commented Apr 12, 2021 at 22:58
  • \$\begingroup\$ @AntonKrug I have already tried replacing the current source with a resistor and I still observe the same characteristics. This schematic is greatly simplified and the controller is grounded in actuality. \$\endgroup\$
    – Troy C
    Commented Apr 12, 2021 at 23:45
  • \$\begingroup\$ @user1850479 Yes, in reality I am switching on/off the regulator from the current source. But I've tried both switching on/off the regulator like suggested in the data sheet, and using a mosfet on the LED like shown in my schematic. All iterations produce the same characteristic spike/decay \$\endgroup\$
    – Troy C
    Commented Apr 12, 2021 at 23:47
  • 1
    \$\begingroup\$ @brhans I haven't monitored the LED current while it is in operation. It sounds like a good idea though. I may be able to put a shunt resistor in there and make some measurements. \$\endgroup\$
    – Troy C
    Commented Apr 13, 2021 at 1:11

2 Answers 2

2
\$\begingroup\$

The light output of an LED is dependent on the junction temperature, light output decreases as temperature increases. Even at low currents, the junction temperature will rise slightly. The time constant of your curves is consistent with thermal effects.

enter image description here

https://www.lrc.rpi.edu/programs/NLPIP/lightingAnswers/LED/heat.asp

Unfortunately, I can't find the details of the experiments used to create these graphs. I would assume that a constant current source was used.

To confirm the junction temperature theory, you need to change the ambient temperature of the LED without changing any other variable. Heat would be easier since cold can create condensation. Heat your LED with a resistor (~ 1/2 W in a 1 W resistor) or other heat source and see if the output changes. It will still have a similar spike and curve, but the levels at the top of the square wave should change slightly. At ambient temperature, on your first graph, the voltage peaks at about 3.673 V and after 10 seconds is about 3.627 V.

Be careful not to change the temperature of the sensor, its output probably changes over temperature also.

\$\endgroup\$
12
  • \$\begingroup\$ Hi Mattman, I also suspect it may be temperature. I know temperature does greatly effect LED output, and I even compensate for ambient temperature fluctuations in my measurements. However I'm trying to rationalize how the junction temperature warmup period could be so long. I haven't been able to find any information regarding warmup time for an LED. Do you have any insight? I also wonder how oximeters work around this - being a sensitive instrument that measures flashing light. \$\endgroup\$
    – Troy C
    Commented Apr 14, 2021 at 0:49
  • 1
    \$\begingroup\$ @TroyC - the LED junction is small, but there are thermal paths to pull the heat away, the junction is either embedded in resin, or mounted on something. I probably have enough parts to duplicate your setup, what is the part number of the LED so I can pick one close to yours? I have an OPT101 and current sources. \$\endgroup\$
    – Mattman944
    Commented Apr 14, 2021 at 9:03
  • 1
    \$\begingroup\$ @TroyC - I attempted to duplicate your setup. I can only easily put 5 mA through the LED. This isn't enough to change the light output enough to measure with the OPT101. How much current are you putting through your LED? \$\endgroup\$
    – Mattman944
    Commented Apr 14, 2021 at 16:37
  • 1
    \$\begingroup\$ @TroyC - I also taped a 1 W 100 ohm resistor to the LED and put 1/2 W into it. The light output decreases about 5% after it stabilizes. It takes about 2 minutes to stabilize. If the LED is generating the heat, the time constant would be lower. \$\endgroup\$
    – Mattman944
    Commented Apr 14, 2021 at 16:39
  • 1
    \$\begingroup\$ @Mattman944 Wow, thanks for putting in the effort! The LED im using is a AP2012SF4C-P22. It only takes about 3mA to saturate the OPTI101 with internal gain. The peak wavelength of the LED aligns nicely with the OPTI101 peak sensitivity wavelength as well, so that probably helps. My setup is totally enclosed in darkness, and the LED and OPTI are about 1/4" apart. \$\endgroup\$
    – Troy C
    Commented Apr 14, 2021 at 16:57
0
\$\begingroup\$

I would try modifying the circuit so that the current source feeds the LED full-time. Then use your transistor or MOSFET to put a short across the LED.

This allows the current source to remain in its operating range at all times.

Do note this inverts the logic level.

\$\endgroup\$
1
  • \$\begingroup\$ Hi Dwayne, this is an interesting idea, I'll give it a shot. \$\endgroup\$
    – Troy C
    Commented Apr 14, 2021 at 0:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.