Opamp Constant Current Load - AC Response - Page 1
Forum section: electronics / projects

author: yaters
author_rank: Newbie
timestamp: August 22, 2022, 12:23:34 am
content: Long time reader, first time poster...I've been designing a low-side ignition driver circuit using a MOSFET as the switch.To give some control over the max current that could be pulled through the MOSFET, I've put it into a simple constant current load circuit controlled by an opamp.After some stability issues with the feedback loop in the first prototype, I've set up a simulation in LTSpice to allow some tuning of the component values and the feedback response.The MOSFET being used has a fairly high typical input capacitance of 1920pF.I've tried the circuit with two different opamps, the TLV9352 and TLV9362 from TI.In the datasheets, the TLV9362 isn't rated to drive a capacitive load as large as the typical MOSFET gate capacitance and none of the provided charts show the expected responses of capacitive loads this big.Here's where I get a little lost...I was expecting to see a fairly classic loop gain roll-off across the opamp, something similar to what happens here with the simulation using the TLV9352.When I try a similar circuit using the TLV9362 though, I get this response in the AC analysis.This looks like a high-pass filter to me, where no frequency has a gain greater than one.If I simulate the transient step response of these circuits, the TLV9352 in the first circuit shows a typical RC response for the current through the sense resistor R5 (exponential current build-up, minimal overshoot and then settles to final steady state).The circuit with the TLV9362 is a bit weird though; it ramps up almost linearly, reaches steady state with no overshoot and almost looks critically damped.I'm having trouble reconciling the AC response with the transient response of this second circuit (the one using the TLV9362).Since the AC analysis doesn't show any gain at DC, I think that the transient response wouldn't be able to step to another DC value this well.Also since the AC analysis looks more like a high-pass filter to me than a typical amplifier circuit, I'm questioning whether there might be something wrong with the Spice model supplied by TI...Does this behaviour look normal to other people?Am I missing something in my understanding?Should I expect to be able to use the TLV9362 based on the simulations, even though it isn't rated for this on the datasheet?

author: moffy
author_rank: Super Contributor
timestamp: August 22, 2022, 01:04:38 am
content: The AC response for the TLV9362 does look nonsensical. The levels start so low at -190db it is almost like the op amp is unpowered and you are getting internal capacitance of the device feeding through to the output from the input.

author: Vovk_Z
author_rank: Super Contributor
timestamp: August 22, 2022, 08:00:24 am
content: Change C3 value from pF to nF. There should be something like 3.3 nF ... 33 nF from my experience with opamp electronic loads.And of cause you may play with a gate resistors too - 10 ... 100 Ohms range play a role in stability too.

author: magic
author_rank: Super Contributor
timestamp: August 22, 2022, 10:11:30 am
content: Isn't this whole thing a little overkill for ignition?I don't know how commercial ignition drivers work, but I doubt they have opamps in them.Old cars simply used a resistor in series with the coil...

author: MarkF
author_rank: Super Contributor
timestamp: August 22, 2022, 04:18:33 pm
content: As said before, your feedback capacitor(C3) is too small and I would remove the parallel feedback resistor(R3). I've only seen a series resistor in the feedback loop but one isn't needed.Also, I don't understand why you're injecting a current into the feedback loop (V4 and R2)?The current through the MOSFET is determined by the control voltage(V6) and the sense resistor(R5). Load current = V6 / R5. 10mΩ seems extremely small and I would guess you would need to amplify it before going to the feedback loop. I would think something in the line of 100mΩ would be more appropriate.

author: Terry Bites
author_rank: Super Contributor
timestamp: August 23, 2022, 10:03:20 am
content: As pointed out:You don’t need the bias from R2 and the feedback network is incorrectly configured. That makes R4 superfluous as well. Why lower the loop gain?The feedback cap sets the response time of the control loop.Cf is the same order of magnitude as the input capacitance on the inverting input. This can casue some unexpected results.Check your DC operating condions are what you expect. As it is, the 1.8V will produce a large offset voltage. 4.3x or 7.75V. 1+(R1/(R2llR4))That puts the MOSFET in a permanent on state.The negative rail is not required in this circuit.See attached.

author: yaters
author_rank: Newbie
timestamp: August 23, 2022, 11:18:55 pm
content: Hi All,Thanks for the feedback so far, its been very useful to my understanding.I am still a little confused though.A lot of people seem to be focusing on two facts:- there is a bias current injected into the feedback loop- the feedback capacitor value doesn't fit with what they have previously usedWould these be reasons that the AC response looks strange, or are they just general advice?As I mentioned, the simulated outputs don't show issues with stability.If anything, they are suspiciously stable while being fast to react...Thanks again,

author: MarkF
author_rank: Super Contributor
timestamp: August 23, 2022, 11:52:37 pm
content: Quote from: yaters on August 23, 2022, 11:18:55 pmWe are referring to V4 and R2. You tell us; what is the purpose for these.QuoteIn practice with a real op-amp, capacitor values less than 4nF or so have NO effect at preventing oscillations or reducing ringing.QuoteThe keyword here is 'simulated'. Try plugging your circuit into a real op-amp.A simulation will NEVER take into account all the things an actual circuit will experience.We design our circuits using 'ideal' components. Then, we have to make the real thing work.You will see overshoots and ringing of the op-amp output.Some have had stability issues with the op-amp oscillating. A simulation will not show this.

author: yaters
author_rank: Newbie
timestamp: August 24, 2022, 01:57:01 am
content: Hi Mark,Thanks for the quick reply.QuoteThe actual question I was originally asking was in regard to how much I can take away from simulating this circuit in the first place, precisely because the results looked so suspect.It kind of sounds like you are saying something along the lines of "never trust a simulation"?

author: mawyatt
author_rank: Super Contributor
timestamp: August 24, 2022, 02:08:04 am
content: Quote from: MarkF on August 23, 2022, 11:52:37 pmThis depends of the fidelity of the models employed in the simulation, and a simulation can certainly show an unstable (oscillatory) state with proper models and simulation techniques.In the IC design world many chip circuits can not be breadboarded or even broken out in sections for evaluation, and simulation is the only link between a successful chip design and failed design which can cost many $M to redo!! One must take advantage of the few properties the chip offers and work around the many limitations and why often the chip circuit designs don't resemble the discrete circuit version. On the chip the least expensive component is the transistor (BJT or MOS), whereas inductors and capacitors are the most expensive, so entirely different design approach for chip designs.Best,

author: MarkF
author_rank: Super Contributor
timestamp: August 24, 2022, 08:18:33 am
content: As said elsewhere, the simulation is only as good as the models used.It's up to the user to determine where the limitations are and how to interpret the results.In the end you will have to build and test your design.My comments are based on my experiences building my own electronic load and reading issues others have had with their builds.Here is a video showing the design and various responses (both DC and AC) of Peter's load.This follow-up video shows the effects of different op-amps and the circuits stability.

author: Vovk_Z
author_rank: Super Contributor
timestamp: August 24, 2022, 08:37:04 pm
content: Quote from: yaters on August 24, 2022, 01:57:01 am"Never trust a simulation until a model is good enough".