Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Unexpected OPAMP behavior in programmable low-side current sink

dutchengineer

Newbie
Newbie level 3
Joined
Apr 17, 2025
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
58
Hello everyone,

I have a question about a circuit I'm designing for my project.

First i'll explain what I want to achieve: I want a programma low-side current sink. (https://www.ti.com/lit/an/slaa868a/slaa868a.pdf?ts=1744035225495)

The PWMInput1 signal goes through a voltage divider to scale it down from 3.3v to 1.65v. Then there's an RC-circuit to create a DC-voltage. This DC voltage can be a maximum of 1.65v.
R17, C35 and R25 I looked around on the internet to find these values, I'm not sure how important they are if I change them.
Then there is Q2 and R43 as MOSFET and sense resistor. The load is hooked up to a voltage that can be anywhere between 0 - 48 V, goes through a series of LEDs, and then arrives at the MOSFET drain (EndLedChannel1).

Finally I have a 150k / 10k resistor divider to scale this 48 V (in case there's a short circuit between my LEDs and the 48V is connected straight to the drain) down to 0 - 3 V, so I can measure it with my ADC.

I built this circuit on a breadboard to test if. It works as expected to set a desired current by changing the duty cycle of the PWM signal.

However my problem is this.

In situation A: I connect PWMInput1 with a wire straight to ground. The opamp output now measures around 910 mV.
In situation B: I connect PWMInput1 with a probe to a 50-ohm impedance waveform generator. I set this waveform generator to output a DC voltage of 0V. The opamp output now measures at 0V.

In both situations the opamp non-inverting input (+) is connected to ground via (R15 + R13 // R21) or (R15 + (R13 + 50 ohm impedance waveform generator) // R21). However, in situation A the output voltage is around 910 mV, and in situation B the output voltage is my expected 0V.

Can someone explain why connecting the PWMInput1 straight to ground causes an unexpected 910 mV at the output? I would greatly appreciate it.
 

Attachments

  • Currentsink.png
    Currentsink.png
    110.7 KB · Views: 57
What is supply V to OPA4991 ?

Do you measure gen output directly to be 0 V ? Its not got an offset ?

You measuring directly OpAmp output ?

OpAmp / MOSFET not oscillating ?
 
Last edited:
The opamp output now measures around 910 mV.
It´s cause be the OPAMP errors (offset voltage, offset current ...) and the feedback via the MOSFET.
The voltage will vary from one ciruit you build to the other.

With your circuit the LED current can not be guaranteed to go down to zero.

2) same as above. I just expect the generator outputs some voltage negative.
In detail it also depends where exactly you connected the signal generator (´s GND) ---> ground bounce.

****
If you want to be sure to get zero mA output, then just lift the inverting input with a high ohmic resistor to some positve voltage.
Maybe start with 1M to 3.3V

Klaus
 
Not directly related to your question, but 3.3V OP supply is clearly to low to drive the MOSFET over intended current range.

As stated by KlausST, nonzero OP output is expectable, but doesn't cause a problem. You may force output to ground by adding a small offset voltage > OP U,os,max.
 
Offset current typ (datasheet no max but characterization curves << 1 nA) is +/- 10 pA.

Offset V at room seems to max out < 1 mV.

Ileak of MOSFET 1 uA max....

The control loop (OpAmp in linear operation) wants MOSFET to exhibit some conduction, so
Vgson of min 1.2V (80 uA Idrain) seems like what OpAmp is doing at 910 mV out......maintaining
its control loop.
 
Not directly related to your question, but 3.3V OP supply is clearly to low to drive the MOSFET over intended current range.

As stated by KlausST, nonzero OP output is expectable, but doesn't cause a problem. You may force output to ground by adding a small offset voltage > OP U,os,max.
Why do you say the 3.3V opamp supply is too low to drive the MOSFET?

The intended current range is 350 mA. (Max DC voltage at input is 1.65 V, divided by 4.7 ohm).
The MOSFET has a threshold voltage of typ. 1.6V and max 2.0V. So there's around 1.3V "headroom", isn't there?

And would powering the opamp with 5V instead work better?

Thank you
 
Required OP output voltage is 1.65V + Vgs@350 mA, Threshold voltage is defined for 50 uA Id, rather need up to 2.5 V => 5V OP supply sounds good.
 
and max 2.0V
To clarify: V_GS_max of 2.0V is still for 50uA = 0.05mA!!
But you want up to 350mA ... this is a factor of 7000.

for 350mA I´d at least calculate with 2.5V.
(the exact value depends on production, temperature, V_DS ....)

... plus the 1.65V = 4.15V. OPAMP output

Klaus
--- Updated ---

Added:
R17, C35 and R25
R25 and C35 is for the stability, to "shorten" the feedback loop.
R25 is OK.
C35 seems a bit low for me. It makes a cutoff frequency of about 4MHz ... it´s too close to the GBW limit for my taste, thus it does almost nothing. (useless)
I´d go with at least 100pF, but depending on waht timing behaviour you want you could go up to 100nF.

R17 is a bit low value for my taste. I mean I guess it would work with zero Ohms, too. But for the resistor to do something useful I´d rather go in direction of 1k.
I´d start with 330 Ohms. With this I expect a stable operation while preventing from driving the OPAMP into overcurrent.

When the LED is disconnected the output will stall HIGH, the input stage will also saturate. For usual OPAMPs I recommend to add a zener from OPAMP output to inverting input to keep the OPAMP in regulation.
But your chosen OPAMP is rather uncritical (timing wise as well as voltage wise) with saturated operation, thus you may omit the diode here.
But if you choose a different OPAMP you may have to consider this.
What happens in worst case: The when LED disconnected the output is HIGH driving the MOSFET fully ON. Now if you connect the LED in this situation, then there will be LED overcurrent until the OPAMP regulates down. Other OPAMP may be stalled in this contition several 10s of milliseconds .. this might be enough to kill your LEDs.
The faster the OPAMP is able to regulate the current down, the less stress for the LEDs.

Klaus
 
Last edited:
Be careful with faster OpAmps, they tend to have less phase margin. And less tolerance to
Cload.

1744897468805.png


Step response seems OK insofar as LED transient, but with a MOSFET and its Cin, not forgetting Miller
additional C....

Look at phase response versus Cload, that OpAmp not a good choice, or alternatively consider
using a bipolar versus MOSFET

1744897854509.png


Tradeoffs, always tradeoffs.....
 
Last edited:
Hi,

@dana.
I agree.
Do you expect any stability problems when using
R17 = 330R
R25 = 3k9
C35 = 100pF?
as recommended as starting point.

(assumed good PCB layout and proper power supply bypass capacitors)

Klaus
 
I expect stability problems when looking into a MOSFET gate with 1800 pF not counting
aggravating miller load, thru a real low R and manufacturer curves telling me my phase
margin is around 25 degrees (not counting miller). And an OpAmp datasheet speced
mainly at 10 pF load.......
 
Last edited:
I understand .. but with 330R in series with the capacitance which limits the current ... and the loacal feedback capacitor, which limits dV/dT...

Klaus
 
I understand .. but with 56R in series with the gate capacitance of 1800 pF (not counting gobs of
Miller) .....
--- Updated ---

The answer to this is rather than guessing at values sim the circuit and
play with values for feedback to sim user. Obviously include parasitics
for a more complete sim.

Or get on bench and conduct transient testing (which can predict phase
margin to some extent). With a box full of guesses to try.

Or both, whatever.....especially since sims spice models seem never to
be as complete to the transistor level.
 
Last edited:

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top