How to bias opamp out of cutoff

Thread Starter

spitsnsparkin

Joined Jun 19, 2011
29
Hi All,

In history, I used 1/2 of an LM358 to create a constant current source for an LED. The circuit was powered by +12V. The opamp was configured as a voltage follower, driving the base of a 2N6386 darlington transistor with a 5 ohm resistor in the emitter to ground and connect as feedback to the minus input of the op-amp. The LED was connect between +12V and the collector. The positive input was a 0-5V signal which would control the 0-1 amp current through the LED.
The circuit worked fine until you set the input to zero. The LED would remain barely lit. With an oscilloscope, the output of the op-amp was oscillating around the 1.4V Vbe cutoff of the darlington transistor. Even though there are internal resistors across the base-emitter junctions of the transistor, the op-amp’s output would go low enough to bias the darlington in cutoff, but then increase until current would appear in the feedback and then dive back into cutoff.
I solved the problem by adding a pull-up/pull-down resistor somewhere in the circuit, but forgot where. I seemed to remember that it was adding a weak feedback signal when the transistor is in cutoff and the feedback from the 5 ohm resistor is absent. Probably not the right solution, but I did have a real world problem.
What is the right solution when adding a power element to the output of an op-amp circuit? When more than one output voltage from the op-amp satisfies the feedback requirements (such as saturation or cutoff of the pass power element). It there a resource that reveals practical biasing of op-amp control circuits for situations like this?
Thanks in advance for your help and guidance.
 

crutschow

Joined Mar 14, 2008
34,459
The positive input was a 0-5V signal which would control the 0-1 amp current
You do realize that this will dissipate 5W in the 5Ω resistor?
Better to use a smaller sense resistor, and lower the control voltage (with an input attenuator if necessary)
What is the right solution
One way to make sure the op amp stays off is to provide a small positive bias to the negative input.
That will keep the op amp output at 0V when the (+) op amp input is at 0V.
For example, to generate a 50mV positive bias, connect a 1kΩ resistor in series between the (-) opamp input and the 5Ω sense resistor, and a 240kΩ resistor from +12V to the (-) op amp input.
 

Thread Starter

spitsnsparkin

Joined Jun 19, 2011
29
Hi crutschow!
As an opamp output between 0V and Vbe will produce the satisfactory (0V) feedback voltage, is it typical to keep the output just below Vbe (so the pass element is ready to turn on and the op-amp’s output isn’t floored to ground, trying to reach -50mV). Or is it always the safer bet to bias the input of the op-amp greater than the maximum input offset (50mV in this case) to be sure that the pass element is truly off and not “just about to leak current”?
I worked with a senior analog engineer (now retired) that claimed the cheap LM324 and LM358 had a “rail sticking” problem in that when the positive or negative output stage of the op-amp is driven hard, it required more differential input than normal to “un-stick” the output from the rail. He stressed to always give an op-amp feedback/bias to keep it closed-looped, but not have the output stage saturated. This came from a time when I purpose 1/4 of an LM324 as a comparator with an AC signal on one input and a reference on the other. Ended up using a resistor with back-to-back diodes to clip the input and adding bias resistors and feedback to gain the input to the full-scale swing of the output (+V - 1.5V) and GND.
About the 5 ohms: it was constructed from two 10 ohm 10 watt resistors (the kind potted in a brass heat sink) in parallel that I had salvage from other R&D projects. The circuit was quick and dirty for another colleague who fancied driving a high powered LED removed from a DVD burner!
On a similar note, as a new engineer from college, I was tired of carrying wal-wart power supplies to drive EEPROM/MCU programmers, which connected serially to the PC. Therefore I made an adjustable power supply using an LM358 and a P-channel mosfet in a “voltage follower” configuration (input to the - and feedback to the +) to regulate the PC’s internal +12V (from a floppy disk/hard drive power connector) down to +9V. The output had only the voltage-divider feedback and an 0.1uF cap (which I added just because I always saw it on the output of 78xx regulators). Surprisingly it worked well and didn’t appear to have horrible oscillations as the programmer drew dis-continuous current from it. Looking back now, it’s stability may be due to the capacitance of the gate of the mosfet as typically too much output capacitance would cause oscillations?
 

Thread Starter

spitsnsparkin

Joined Jun 19, 2011
29
Hi crutschow!
About your solution: I believe that is where I must have placed the resistor. To match input impedance and compensate for the input current of the op-amp, I had a 5K resistor from the 5 ohm feedback to the (-) input (no voltage divider, just additional series resistance). The (+) input was a 10K pot across +5V (hopefully an average of 5K input impedance).
 

crutschow

Joined Mar 14, 2008
34,459
As an opamp output between 0V and Vbe will produce the satisfactory (0V) feedback voltage, is it typical to keep the output just below Vbe (so the pass element is ready to turn on and the op-amp’s output isn’t floored to ground, trying to reach -50mV). Or is it always the safer bet to bias the input of the op-amp greater than the maximum input offset (50mV in this case) to be sure that the pass element is truly off and not “just about to leak current”?
If you are concerned about how fast the current will start once the input goes above zero, then you might want to bias it a small current with a very small input voltage.
If you don't want that current going through the LED then put a resistor in parallel with the LED that can bypass the current while keeping the voltage below the LED turn-on voltage.
If not, then I would bias it at 0V out with a small positive input voltage as I described.
I worked with a senior analog engineer (now retired) that claimed the cheap LM324 and LM358 had a “rail sticking” problem in that when the positive or negative output stage of the op-amp is driven hard, it required more differential input than normal to “un-stick” the output from the rail.
Don't see what mechanism in the IC that could cause that.
There can be a delay coming out of saturation due to the internal compensation capacitor likely saturating at one of its limits, but that's common to many op amps.
The (+) input was a 10K pot across +5V (hopefully an average of 5K input impedance).
Hopefully doesn't quite cut it. ;)
The pot's maximum equivalent resistance is 2.5kΩ at the middle position of the pot wiper (parallel resistance of two 5kΩ resistance values to each end of the pot), but goes to zero with the wiper at either end.
If you want to more closely balance the input impedances, add about a 9kΩ resistance in series with the pot wiper to the op amp (+) input.
 

Thread Starter

spitsnsparkin

Joined Jun 19, 2011
29
Hi crutschow!
I’m in awe of your application knowledge and experience! Thanks for all of the answers and comments.
Best regards,
Spitsnsparkin.
 

RPLaJeunesse

Joined Jul 29, 2018
254
Balancing input resistances is good for precision use, but LED current control isn't one of them, so don't worry about that. (The LM358 is almost a floor sweeping, never was a precision part, but always a great workhorse!) What is happening is the op-amp goes open-loop when the darlington approaches cutoff, and the LM358 oscillates because it is out of control. The solution is to keep the op-amp in control for higher frequencies while the existing feedback path works at DC. Simply add a series resistor to isolate the minus (-) input from that 5 ohm sense resistor, and add a capacitor from op-amp output directly to the minus (-) input. Not sure how fast you are trying to change the LED brightness, be aware any LM358 scheme is not good for fast changes. I would use an R-C product about 10% of the period of the signal adjusting the current. If speed doesn't matter use 10nF and 4.7K ohms and see how it works.
 

Thread Starter

spitsnsparkin

Joined Jun 19, 2011
29
Hi RPLaJeunesse,
I thought that the instability issue extends from the fact that the op amp IS out of control at DC. When the input (+) is set to 0V (off) and the darlington is in cutoff (Vbe <= 1.4V) the system is non-linear as more than one output voltage from the op amp (0-1.4V) returns the desired 0V from the feedback resistor.
From my understanding, crutschow solution is to give up +50mV of input to hysteretically force the output of the op amp to zero to stop the oscillations.
I would like to keep everything under control. I can add the feedback capacitor and see how it goes.
I agree with you about the use of the LM358! I love the single supply application and Vcm down to VSS.
Thanks,
Spitsnsparkin.
 

crutschow

Joined Mar 14, 2008
34,459
Since the problem is that the op amp losses feedback when operating the transistor dead-zone, I expect a capacitor may affect the oscillation frequency, but not eliminate it.
 
Top