8
\$\begingroup\$

I am working on an adjustable current source. In a thread awhile back, various circuits were discussed:

simple adjustable current source for LED string

... but as I have settled on one option, and it's not working correctly, I'm starting a new thread to focus on my conundrum.

Here is the circuit:

enter image description here

The resistor divider (30K resistor and potentiometer) provide a reference voltage on 'set' (the DC sweep of v1 just rotates the pot shaft). The opamp should servo 'gate' so that 'sense' equals 'set', and thus the current (in milliamps) pulled through the load 'Rload' equals the voltage of 'set' (in millivolts). Simple as that.

The 12v supply which powers the 'set' circuit and the opamp is a 7812 powered off the 24v supply. And the mosfet is actually a FQP10N20C (a fairly vanilla power nfet).

I've simulated with LTspice and it behaves as I'd expect. But on the breadboard, as 'set' is increased from 0 to about 400mV, 'sense' tracks 'set' less and less well. At one point I'm seeing 257mV on 'set' but only 226mV on 'sense'; so only 226mA is flowing through Rload and R1. 'Gate' is at 3.53V and 'down' is at 11.7V. If one just examines the opamp in isolation, it seems that 'gate' should be driven higher (until, presumably, at some point enough current flows that 'sense' equals 257mV).

The opamp is meant to be used with a single-ended supply, and should easily be able to drive its output above 3.53V (with a 12V supply voltage). The gate of the FET should not be sinking any current (verified with meter).

I'm stumped.

Datasheet for the opamp (LT1006)

\$\endgroup\$
11
  • \$\begingroup\$ Do you have a scope plot (or an ac measurement at the opamp inputs or FET gate)? It is possible there are low level oscillations due to gate capacitance. \$\endgroup\$ Commented Jun 16, 2016 at 7:01
  • \$\begingroup\$ As a safety measure against those oscillations mentioned by @PeterSmith try inserting a resistor in series with the gate. Try values between 100Ohm-1kOhm. \$\endgroup\$ Commented Jun 16, 2016 at 7:09
  • \$\begingroup\$ By the way, I checked the FDP18N50 datasheet: its Vgs threshold voltage is between 3V and 5V, moreover the LT1006 is not a rail-to-rail-output opamp, so its output cannot reach the positive rail, which is 6V (its datasheet claims about 4.4V max when powered at 5V), so you could expect max about 5.5V at the output, maybe not enough to drive the mosfet hard enough if you have a specimen with Vgs(th) near 5V. Try to increase the opamp supply and see if it gets better, or try with a mosfet with lower maximum Vgs(th). \$\endgroup\$ Commented Jun 16, 2016 at 7:16
  • \$\begingroup\$ Looking at the LT1006's schematic in the datasheet (I'm an IC designer, I like these schematics :-) )I think it prefers to have a resistive load to ground at the output. I suggest to connect a 1 kohm resistor between the opamp's output and ground, that might help to keep the output at the right voltage. Probably the simulation model does not incorporate this effect so there the resistor is not needed. \$\endgroup\$ Commented Jun 16, 2016 at 7:42
  • 1
    \$\begingroup\$ From the comment by @FakeMoustache, LT simulation models (as are all manufacturers) are compromises, but LT has documented just what the compromises are: linear.com/docs/4139 \$\endgroup\$ Commented Jun 16, 2016 at 7:52

3 Answers 3

3
\$\begingroup\$

The problem is evidently that there is some sort of oscillation on the output of the opamp. Putting a 10uF capacitor on the 'gate' node more or less fixed the problem, but putting a 1K resistor between the opamp output and the fet gate doesn't help much. I'm now seeing no more than about 7mv discrepancy between 'sense' and 'set', over the whole current adjustment range (now 0 to 300ma) and a voltage (required to drive that current through the load) between about 3 and 23v.

\$\endgroup\$
1
  • \$\begingroup\$ By adding a big (!) 10uF on the output of the opamp you've increased the phase margin which stopped the oscillation. \$\endgroup\$
    – le_top
    Commented Mar 26, 2017 at 13:49
2
\$\begingroup\$

I only saw this question just now, and your answer that the opamp was oscillating. That was my first guess from the schematic and the symptoms.

However, I don't like the way you fixed it. Simply loading the opamp output with a lot of capacitance may work now in this case at this temperature, with this phase of the moon. It may not work with the same model opamp from a different batch or some future batch.

A better solution is to put a little resistance in the feedback path, between the top of the current sense resistor and the negative opamp input. Then add a small compensation capacitor directly from the opamp output to the negative input. The cap provides immediate negative AC feedback to keep the amp stable. The resistor raises the impedance of the signal so that the cap can have some effect without having to be too big for other considerations. Try 1 kΩ and maybe 100 pF. You can use a larger capacitor if response time doesn't need to be fast and you want to err on the side of more stability.

Added

I hadn't looked at the datasheet of the opamp before, and just answered for a ordinary opamp. The LT1006 is optimized for very low offset voltage and low power. That means compromises were made in other areas. One of those is apparently stability. The datasheet does show the amp used as a unity-gain voltage follower, so it is apparently unity-gain stable.

However, look carefully at the typical application schematics on page 11. Note how one has 1 kΩ in series with a 680 nF compensation capacitor, and the other 2 kΩ with 330 nF compensation. This means my guess above of 1 kΩ and 100 pF was way too little. Try a combination more like what they use. Since you've already got 1 kΩ series resistance, try 1 µF directly between the opamp output and the negative input.

The other thing you need to do is actually look at the signal over time, not its average voltage. Put a scope on it already and see what's really going on.

\$\endgroup\$
5
  • \$\begingroup\$ Yes, even 7mv discrepancy tells me something is wrong. I replaced the wire from R1 to the opamp's negative input with a 1 kΩ resistor, and added a 1000pf cap between the output and negative input of the opamp. But, without that capacitor on the opamp's output, I see up to 20mv or so of discrepancy (between the opamp's inputs); with that cap in, the add'l components (1 kΩ and 1000pf) don't reduce the discrepancy (though of course they may make the circuit more robust, as you suggest). \$\endgroup\$ Commented Jun 16, 2016 at 22:33
  • \$\begingroup\$ Some strange observations... If I connect the circuit to its application - a series string of LEDs, instead of the 50Ω pot I've been testing with - the discrepancy between opamp inputs goes to 0. This is with all 3 components (mentioned in the previous comment). But if I remove the cap on the opamp output, things go crazy: the opamp output goes to 5+v, and current goes up to 700-800ma (and thus the negative opamp input to 700mv, even though the positive input is at 200mv or so). Some very unstable behavior I need to get a grip on; one thing's for sure: it's very unhappy without some damping. \$\endgroup\$ Commented Jun 16, 2016 at 23:48
  • \$\begingroup\$ Thanks for the add'l info, @Olin. One of their apps (on that same page) also has a simple RC low-pass filter on the opamp output. I tried that last night and it seemed to work pretty well. \$\endgroup\$ Commented Jun 17, 2016 at 17:44
  • \$\begingroup\$ I need to try to select a more suitable opamp. I was mainly looking for one allowing single-ended supply. \$\endgroup\$ Commented Jun 17, 2016 at 17:45
  • \$\begingroup\$ I wonder if there's a good way to model this instability in LTspice ? I have the actual LT1006 model (not a generic opamp). Maybe capacitively-couple in a noise signal, sweeping its frequency ? \$\endgroup\$ Commented Jun 19, 2016 at 23:01
0
\$\begingroup\$

I recently came back to this project after a hiatus, and continued to have troubles with the stability of the opamp. However, I've discovered there's a simpler solution to the problem, the linear regulator LT3080; it essentially integrates the op-amp and power-transistor of my original circuit, and seems to be very stable in my testing.

http://cds.linear.com/docs/en/datasheet/3080fc.pdf

My new circuit is essentially that shown in the figure titled "Low Dropout Voltage LED Driver" on p.17 of the datasheet. But instead of putting a fixed resistor from the SET pin to GND, I drive a variable voltage into the SET pin (one could also use a variable resistor, but a voltage works better for my application). The voltage signal simply needs to be able to sink the 10ua of the internal current source.

It works like a charm.

\$\endgroup\$

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.