Author Topic: LDO output oscillation  (Read 14031 times)

0 Members and 1 Guest are viewing this topic.

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
LDO output oscillation
« on: November 28, 2016, 06:57:01 pm »
The circuit is a basic PMOS low drop-out linear regulator. The part numbers shown in the circuit diagram is exactly what I am having on the breadboard. I know that I did not include the output filter cap here, but this is intentional in this experiment. In my final application circuit, the pot would be replaced by a DAC. The +12V rail is the input rail (measures somewhere over 15V in reality though.) The +5V rail is an auxiliary rail independent of the input rail, and measures 5V.

Without the output cap, I am seeing a frequency dependent of the pot's location at the output (top of R6.) With the pot at the top, the frequency is somewhere around 170kHz. When I attached a 470uF cap between the output and ground, or when I attached a 470uF cap with a 22 ohm resistor in series, the frequency I am seeing also varies, so does the amplitude of the AC component.

Why? And how to eliminate if this regulator have a potentially widely variable load?
« Last Edit: November 28, 2016, 07:36:18 pm by technix »
 

Offline gamalot

  • Super Contributor
  • ***
  • Posts: 1303
  • Country: au
  • Correct my English
    • Youtube
Re: LDO output oscillation
« Reply #1 on: November 28, 2016, 07:06:40 pm »
Positive feedback?

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #2 on: November 28, 2016, 07:08:37 pm »
Positive feedback?
The feedback is definitely negative. The level shifter MOSFET Q1 have negative gain.
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: LDO output oscillation
« Reply #3 on: November 28, 2016, 07:10:06 pm »
Have you tried adding a series resistor between the amp output and the mosfet gate?
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1352
  • Country: si
  • I like to measure things.
Re: LDO output oscillation
« Reply #4 on: November 28, 2016, 07:10:28 pm »
The schematic does look like it has positive feedback, but if that were actually the case in his circuit, he wouldn't see oscillation, it would just latch up. My guess is that his actual circuit has the inputs of the opamp reversed, like they should be.

What I'm seeing is LOADS of gain and absolutely zero frequency compensation. You need to study up on control loop theory.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline tatus1969

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: de
  • Resistance is futile - We Are The Watt.
    • keenlab
Re: LDO output oscillation
« Reply #5 on: November 28, 2016, 07:13:55 pm »
Positive feedback?
The feedback is definitely negative. The level shifter MOSFET Q1 have negative gain.
so does Q2. negative x negative = positive.
We Are The Watt - Resistance Is Futile!
 

Offline tatus1969

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: de
  • Resistance is futile - We Are The Watt.
    • keenlab
Re: LDO output oscillation
« Reply #6 on: November 28, 2016, 07:21:03 pm »
The schematic does look like it has positive feedback, but if that were actually the case in his circuit, he wouldn't see oscillation, it would just latch up. My guess is that his actual circuit has the inputs of the opamp reversed, like they should be.

What I'm seeing is LOADS of gain and absolutely zero frequency compensation. You need to study up on control loop theory.
+1. additionally, the PFET will not be happy with 4.7k discharge resistor, which will result in a slow turn-off response and possibly a lot of overshoot during regulation. Remember that transistor has 1.3nF input capacitance, 1/(2 PI R C) = 26kHz. Besides adding proper loop compensation, I would significantly reduce this.
We Are The Watt - Resistance Is Futile!
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #7 on: November 28, 2016, 07:21:50 pm »
Have you tried adding a series resistor between the amp output and the mosfet gate?
Not working...
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #8 on: November 28, 2016, 07:26:24 pm »
Positive feedback?
The feedback is definitely negative. The level shifter MOSFET Q1 have negative gain.
so does Q2. negative x negative = positive.
If I switch the input pins around, the circuit latches hard.
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #9 on: November 28, 2016, 07:28:15 pm »
The schematic does look like it has positive feedback, but if that were actually the case in his circuit, he wouldn't see oscillation, it would just latch up. My guess is that his actual circuit has the inputs of the opamp reversed, like they should be.

What I'm seeing is LOADS of gain and absolutely zero frequency compensation. You need to study up on control loop theory.
+1. additionally, the PFET will not be happy with 4.7k discharge resistor, which will result in a slow turn-off response and possibly a lot of overshoot during regulation. Remember that transistor has 1.3nF input capacitance, 1/(2 PI R C) = 26kHz. Besides adding proper loop compensation, I would significantly reduce this.
Bumping the discharge resistor down to 510 ohms gave me more AC amplitude at 310kHz
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #10 on: November 28, 2016, 07:30:25 pm »
Wait... I checked my connection, and yes I drew the circuit diagram the wrong way. The reference goes into pin 3 and the divider goes into pin 2.
 

Offline tatus1969

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: de
  • Resistance is futile - We Are The Watt.
    • keenlab
Re: LDO output oscillation
« Reply #11 on: November 28, 2016, 07:30:58 pm »
Positive feedback?
The feedback is definitely negative. The level shifter MOSFET Q1 have negative gain.
so does Q2. negative x negative = positive.
If I switch the input pins around, the circuit latches hard.
have you checked correct pinout of both MOSFETs? Your circuit schematic definitely has positive feedback and cannot regulate.
We Are The Watt - Resistance Is Futile!
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #12 on: November 28, 2016, 07:34:20 pm »
Positive feedback?
The feedback is definitely negative. The level shifter MOSFET Q1 have negative gain.
so does Q2. negative x negative = positive.
If I switch the input pins around, the circuit latches hard.
have you checked correct pinout of both MOSFETs? Your circuit schematic definitely has positive feedback and cannot regulate.
I have updated the correct circuit diagram. The MOSFETs are connected correctly (or my LED wold have gone in smokes.)
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: LDO output oscillation
« Reply #13 on: November 28, 2016, 07:37:38 pm »
Q1 adds gain, Q2 adds gain and IC1A adds even more gain.
You need to add some compensation (reduce gain at high frequencies by adding a capacitor around IC1A), otherwise that circuit won't be stable regardless how you change the component values.
Try simulation the circuit to see its frequency response.
« Last Edit: November 28, 2016, 07:39:10 pm by bktemp »
 

Offline gamalot

  • Super Contributor
  • ***
  • Posts: 1303
  • Country: au
  • Correct my English
    • Youtube
Re: LDO output oscillation
« Reply #14 on: November 28, 2016, 07:40:29 pm »
Positive feedback?
The feedback is definitely negative. The level shifter MOSFET Q1 have negative gain.
so does Q2. negative x negative = positive.
If I switch the input pins around, the circuit latches hard.
have you checked correct pinout of both MOSFETs? Your circuit schematic definitely has positive feedback and cannot regulate.
I have updated the correct circuit diagram. The MOSFETs are connected correctly (or my LED wold have gone in smokes.)

Try to add a decoupling capacitor before Q2

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: LDO output oscillation
« Reply #15 on: November 28, 2016, 07:47:10 pm »
Q1 adds gain, Q2 adds gain and IC1A adds even more gain.
You need to add some compensation (reduce gain at high frequencies by adding a capacitor around IC1A), otherwise that circuit won't be stable regardless how you change the component values.
Try simulation the circuit to see its frequency response.
Yes, this is true. There is positive feedback but only at higher frequencies, due to the phase shift in the op-amp. I'd actually advise reducing the gain at all frequencies.
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #16 on: November 28, 2016, 07:47:52 pm »
Q1 adds gain, Q2 adds gain and IC1A adds even more gain.
You need to add some compensation (reduce gain at high frequencies by adding a capacitor around IC1A), otherwise that circuit won't be stable regardless how you change the component values.
Try simulation the circuit to see its frequency response.
Now I got something like this, squeezed a 220nF cap in there. With this cap in there my 20MHz CRO is not showing a clear trace at 100mV/div, and my frequency counter is jumping all over the place. However there is still some oscillation I need to remove.

I don't have a circuit simulation kit though so I am breadboarding it using real components on a solderless breadboard.
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: LDO output oscillation
« Reply #17 on: November 28, 2016, 07:51:32 pm »
Add a capacitor to the ouput.
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #18 on: November 28, 2016, 07:52:48 pm »
Add a capacitor to the ouput.
Not so fast - I intentionally left it off to diagnose internal troubles. That masks a lot of problems I am diagnosing.
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #19 on: November 28, 2016, 07:54:48 pm »
Hmm there is still a 500kHz in there even with an 10uF MLCC output cap.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: LDO output oscillation
« Reply #20 on: November 28, 2016, 07:57:23 pm »
Q1 adds gain, Q2 adds gain and IC1A adds even more gain.
You need to add some compensation (reduce gain at high frequencies by adding a capacitor around IC1A), otherwise that circuit won't be stable regardless how you change the component values.

I agree with bktemp; this is the problem.  The oscillation is loop oscillation because each common source MOSFET is adding voltage gain and decreasing phase margin of the operational amplifier.

I would start by controlling and lowering the gain of Q1 by adding source degeneration or shunt feedback.  Or I would replace Q1 with a bypassed zener diode so the operational amplifier can drive Q2 directly.

If the gate capacitance of Q2 becomes a problem, then I would use a PNP emitter follower to help drive it which actually points to an interesting alternative.  If the Vgs of a p-channel MOSFET is high enough, then combining the Vgs of two p-channel MOSFETs with one replacing Q1 as a source follower might work as a 5 to 12 volt level shift but that is something I would want to test since Vgs is not well controlled.  A zener diode or bipolar level shifter is a sure thing.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: LDO output oscillation
« Reply #21 on: November 28, 2016, 08:00:42 pm »
Now I got something like this, squeezed a 220nF cap in there. With this cap in there my 20MHz CRO is not showing a clear trace at 100mV/div, and my frequency counter is jumping all over the place. However there is still some oscillation I need to remove.

If you make the feedback capacitor large enough to stop the oscillation without fixing the other problems, then the regulator's performance will be horrible.

Quote
I don't have a circuit simulation kit though so I am breadboarding it using real components on a solderless breadboard.

A circuit simulation will be pretty useless until you fix the uncontrolled gain problem.
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #22 on: November 28, 2016, 08:15:05 pm »
So this happened. However I am still seeing some noise at about 100mV. The +12V rail comes from a boost converter so it is fairly noisy.

How do I fix the remaining gain problem without a significant C1? I need to reduce the noise.
« Last Edit: November 28, 2016, 08:16:44 pm by technix »
 

Offline kxenos

  • Frequent Contributor
  • **
  • Posts: 284
  • Country: gr
Re: LDO output oscillation
« Reply #23 on: November 28, 2016, 08:28:18 pm »
Increasing C1 will not make the 12V rail noise go away. I would decrease C1 by an order of magnitude and see if the feedback is stable (it will probably be still ok). For the noise consider placing an LC low pass filter in the 12V rail with an f-3dB an order of magnitude less than the dominant freq. of the noise.
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #24 on: November 28, 2016, 08:35:43 pm »
So here is the state of the circuit. Q1 should have unity gain, effectively a pure level shifter.

Trace on top = output, trace at bottom = input, both probes are x10.
« Last Edit: November 28, 2016, 08:43:31 pm by technix »
 

Offline BobsURuncle

  • Regular Contributor
  • *
  • Posts: 82
  • Country: us
Re: LDO output oscillation
« Reply #25 on: November 28, 2016, 08:44:28 pm »
You need filter capacitors near pin 2 (V+) of your reference chip to avoid instabilities in the output.
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #26 on: November 28, 2016, 08:50:51 pm »
You need filter capacitors near pin 2 (V+) of your reference chip to avoid instabilities in the output.
I have those (not shown in the schematics - see the board shot)
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #27 on: November 28, 2016, 08:54:08 pm »
Moved the op amp's power pin to the SMPS output to guarantee enough gate drive for the MOSFET. The SMPS output is solid as-is though. There is an oscillation about 100kHz at the output?
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: LDO output oscillation
« Reply #28 on: November 28, 2016, 09:02:10 pm »
So this happened. However I am still seeing some noise at about 100mV. The +12V rail comes from a boost converter so it is fairly noisy.

How do I fix the remaining gain problem without a significant C1? I need to reduce the noise.
Now you're getting somewhere. Try increasing the value of R7.

EDIT:

So here is the state of the circuit. Q1 should have unity gain, effectively a pure level shifter.

Trace on top = output, trace at bottom = input, both probes are x10.
Oh, sorry, missed that. You could even increase R7 further so it has a loss.
« Last Edit: November 28, 2016, 09:12:11 pm by Hero999 »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: LDO output oscillation
« Reply #29 on: November 28, 2016, 09:32:11 pm »
Whyyy??  :scared:

Why did you put additional gain, of uncertain magnitude, after the op-amp?  :palm:

A huge amount of it, no less.  Like 40dB excess!  It's guaranteed to oscillate that way.

I will tell you a secret. Gather 'round... :popcorn:

Checklist:
- Bounded inputs, bounded outputs (for all stages)
- Linear transfer function, bounds coincide on the curve
- Loop gain is in the stable range
- Phase shift doesn't blow out the op-amp's phase margin

You can tell gain is in the stable range, if the gain outside of the op-amp (in the loop from its output to its feedback input) is less than or equal to the reciprocal of its maximum stable gain.  (Which for most, is a gain of 1, i.e., "unity gain stable".  Some are "decompensated" and only stable at higher gains, or with compensation capacitors added to other pins.  The datasheet will tell.)

The above circuit fails because:

Bounded inputs
------------------
Op-amp inputs: has ESD protection diodes, and inputs are bounded voltage, or limited current (in the worst case, a limited current input will be clamped by the input protection diodes).  Good.
Gain stage (Q1): is driven by op-amp (bounded output).  Good.
Output stage (Q2): Unbounded.  Bad.

Bounded outputs
--------------------
Op-amp output: 0 to 5V.  Limited current capacity (10s of mA?).  Good.
Gain stage (Q1): 0 to +12V.  Not very good: greatly exceeds the input range of the following stage, and if +12V isn't limited elsewhere, neither will this be.  Unlimited current capacity: 100s of mA. 2N7000 is quite a beefy little MOSFET.  Bad.
Output stage: voltage is suitable for purpose (0 to +V).  Current: unlimited (10s of A?).  Bad.

Transfer functions
-------------------
Op-amp: only active in a narrow range (a diference of some mV), but that's okay, because we want all the loop gain centered here.  Good.
Gain stage (Q1): Nonlinear.  Offset (Vgs(th) not accounted for).  Saturates well before the full available range.  Uses maybe 1.0 to 1.5V out of a 0-5V range.  Exponential to quadratic curve, not linear (gain varies with quiescent point!).  Bad.
Output stage (Q2): Nonlinear.  Offset (Vgs(th) not accounted for).  Unlimited output current.  Turns on around -1V (relative to +V) and keeps going up from there, until 5-10V range where it's either saturated (Rds(on) resistive region -- in dropout) or at maximum amps, short circuit (10-30A?).  Gain varies proportional to load current.  Bad.

Loop gain
------------
Who knows?  The voltage gain from Q1 may be 10's, and the same for Q2.  In the threshold to subthreshold region, where both are just barely turning on, it might even be less than 1.

The wildly varying loop gain is a sure sign of having done something wrong.

Phase shift
------------
Again, who knows?  Q1 at least isn't driving much of a load.  Q2's gate won't be the tiniest thing ever, but it won't dominate the loop response.  It may be relevant towards the cutoff frequency though.

Q2 isn't driving a capacitive load, which is unusual, and probably not a good thing: having little load (especially at high frequency) means the loop gain is very high (especially at high frequencies).  So you're also in a bit of a worst-case situation, for the load shown.

Ideally, the phase shift across the transistors should be small (or, put another way, their frequency response as amplifiers should be higher than the op-amp's fT), which shouldn't be hard to arrange.


So, how to fix it?
--------------------

By now, you should be able to guess the most obvious help: reduce the gain of Q1 and Q2, so that they more fully utilize the voltage ranges available.

Simplest solution: add a source degeneration resistor to Q1.  This reduces the voltage gain and increases the input voltage range.  It doesn't remove the offset, but it makes it less important.  (Changing to a BJT like 2N3904 would reduce the offset a bit, and also reduce capacitance.)

The same can be done for Q2, but this worsens dropout at high currents.  But a conceptual restructuring is in order, for that one.

Suppose you have a nice big capacitor on the output (which is typical for most applications!).  Outside of the resistive range, Q2 is only ever a transconductance amplifier (output current dependent on gate voltage).  It would be nice to stabilize its gain, so it is linear, and so its output current can be bounded responsibly.

A current source into a capacitor makes a single pole filter.  If we close the loop around that, with the op-amp being a second pole, we get an easily-solved second order system, which can be optimized for step response quite easily.

The challenge, then, is making Q2 have a nice, flat, limited operating range, without compromising its resistance.

Backing up a level -- once you make a clean, linear current source block, all you need to do is level-shift the error amplifier's output to meet the input range of the current source, providing little or no gain in the process.  Simply match up the output and input bounds.

Or converting the error amp's output to a constant current sink, if your current-source block works out better as a current amplifier or mirror (current in --> current out).  Bounding the input of the current source necessarily gives you a fixed and accurate current limit, thus solving the problem of short-circuit protection, too!



Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #30 on: November 28, 2016, 09:56:09 pm »
Whyyy??  :scared:

Why did you put additional gain, of uncertain magnitude, after the op-amp?  :palm:

A huge amount of it, no less.  Like 40dB excess!  It's guaranteed to oscillate that way.

I will tell you a secret. Gather 'round... :popcorn:

Checklist:
- Bounded inputs, bounded outputs (for all stages)
- Linear transfer function, bounds coincide on the curve
- Loop gain is in the stable range
- Phase shift doesn't blow out the op-amp's phase margin

You can tell gain is in the stable range, if the gain outside of the op-amp (in the loop from its output to its feedback input) is less than or equal to the reciprocal of its maximum stable gain.  (Which for most, is a gain of 1, i.e., "unity gain stable".  Some are "decompensated" and only stable at higher gains, or with compensation capacitors added to other pins.  The datasheet will tell.)

The above circuit fails because:

Bounded inputs
------------------
Op-amp inputs: has ESD protection diodes, and inputs are bounded voltage, or limited current (in the worst case, a limited current input will be clamped by the input protection diodes).  Good.
Gain stage (Q1): is driven by op-amp (bounded output).  Good.
Output stage (Q2): Unbounded.  Bad.

Bounded outputs
--------------------
Op-amp output: 0 to 5V.  Limited current capacity (10s of mA?).  Good.
Gain stage (Q1): 0 to +12V.  Not very good: greatly exceeds the input range of the following stage, and if +12V isn't limited elsewhere, neither will this be.  Unlimited current capacity: 100s of mA. 2N7000 is quite a beefy little MOSFET.  Bad.
Output stage: voltage is suitable for purpose (0 to +V).  Current: unlimited (10s of A?).  Bad.

Transfer functions
-------------------
Op-amp: only active in a narrow range (a diference of some mV), but that's okay, because we want all the loop gain centered here.  Good.
Gain stage (Q1): Nonlinear.  Offset (Vgs(th) not accounted for).  Saturates well before the full available range.  Uses maybe 1.0 to 1.5V out of a 0-5V range.  Exponential to quadratic curve, not linear (gain varies with quiescent point!).  Bad.
Output stage (Q2): Nonlinear.  Offset (Vgs(th) not accounted for).  Unlimited output current.  Turns on around -1V (relative to +V) and keeps going up from there, until 5-10V range where it's either saturated (Rds(on) resistive region -- in dropout) or at maximum amps, short circuit (10-30A?).  Gain varies proportional to load current.  Bad.

Loop gain
------------
Who knows?  The voltage gain from Q1 may be 10's, and the same for Q2.  In the threshold to subthreshold region, where both are just barely turning on, it might even be less than 1.

The wildly varying loop gain is a sure sign of having done something wrong.

Phase shift
------------
Again, who knows?  Q1 at least isn't driving much of a load.  Q2's gate won't be the tiniest thing ever, but it won't dominate the loop response.  It may be relevant towards the cutoff frequency though.

Q2 isn't driving a capacitive load, which is unusual, and probably not a good thing: having little load (especially at high frequency) means the loop gain is very high (especially at high frequencies).  So you're also in a bit of a worst-case situation, for the load shown.

Ideally, the phase shift across the transistors should be small (or, put another way, their frequency response as amplifiers should be higher than the op-amp's fT), which shouldn't be hard to arrange.


So, how to fix it?
--------------------

By now, you should be able to guess the most obvious help: reduce the gain of Q1 and Q2, so that they more fully utilize the voltage ranges available.

Simplest solution: add a source degeneration resistor to Q1.  This reduces the voltage gain and increases the input voltage range.  It doesn't remove the offset, but it makes it less important.  (Changing to a BJT like 2N3904 would reduce the offset a bit, and also reduce capacitance.)

The same can be done for Q2, but this worsens dropout at high currents.  But a conceptual restructuring is in order, for that one.

Suppose you have a nice big capacitor on the output (which is typical for most applications!).  Outside of the resistive range, Q2 is only ever a transconductance amplifier (output current dependent on gate voltage).  It would be nice to stabilize its gain, so it is linear, and so its output current can be bounded responsibly.

A current source into a capacitor makes a single pole filter.  If we close the loop around that, with the op-amp being a second pole, we get an easily-solved second order system, which can be optimized for step response quite easily.

The challenge, then, is making Q2 have a nice, flat, limited operating range, without compromising its resistance.

Backing up a level -- once you make a clean, linear current source block, all you need to do is level-shift the error amplifier's output to meet the input range of the current source, providing little or no gain in the process.  Simply match up the output and input bounds.

Or converting the error amp's output to a constant current sink, if your current-source block works out better as a current amplifier or mirror (current in --> current out).  Bounding the input of the current source necessarily gives you a fixed and accurate current limit, thus solving the problem of short-circuit protection, too!



Tim
I actually have NPN current mirror chip (BCV61) so how to do that? OPA to 510 ohm or 4.7k into the input leg of BCV61, 510 ohm discharge resistor into the other leg of BCV61?
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #31 on: November 28, 2016, 10:17:16 pm »
So this happened. However I am still seeing some noise at about 100mV. The +12V rail comes from a boost converter so it is fairly noisy.

How do I fix the remaining gain problem without a significant C1? I need to reduce the noise.
Now you're getting somewhere. Try increasing the value of R7.

EDIT:

So here is the state of the circuit. Q1 should have unity gain, effectively a pure level shifter.

Trace on top = output, trace at bottom = input, both probes are x10.
Oh, sorry, missed that. You could even increase R7 further so it has a loss.
Like this?
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: LDO output oscillation
« Reply #32 on: November 29, 2016, 01:15:19 pm »
So this happened. However I am still seeing some noise at about 100mV. The +12V rail comes from a boost converter so it is fairly noisy.

How do I fix the remaining gain problem without a significant C1? I need to reduce the noise.
Now you're getting somewhere. Try increasing the value of R7.

EDIT:

So here is the state of the circuit. Q1 should have unity gain, effectively a pure level shifter.

Trace on top = output, trace at bottom = input, both probes are x10.
Oh, sorry, missed that. You could even increase R7 further so it has a loss.
Like this?
I wouldn't go that far, as the MOSFET may not have a high enough gate voltage to turn on.

Does it have to be a MOSFET? Can't you use a BJT? It would be much easier to stabilise?
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #33 on: November 29, 2016, 02:04:41 pm »
So this happened. However I am still seeing some noise at about 100mV. The +12V rail comes from a boost converter so it is fairly noisy.

How do I fix the remaining gain problem without a significant C1? I need to reduce the noise.
Now you're getting somewhere. Try increasing the value of R7.

EDIT:

So here is the state of the circuit. Q1 should have unity gain, effectively a pure level shifter.

Trace on top = output, trace at bottom = input, both probes are x10.
Oh, sorry, missed that. You could even increase R7 further so it has a loss.
Like this?
I wouldn't go that far, as the MOSFET may not have a high enough gate voltage to turn on.

Does it have to be a MOSFET? Can't you use a BJT? It would be much easier to stabilise?
The output stage must be a MOSFET as I am shooting for an extremely low (sub-volt) drop-out voltage. This is used in my high efficiency lab power supply project, which uses an adjustable linear LDO power supply and a tracking SMPS to minimize both noise and loss.

I could have gone with a pure SMPS design, but low-ripple SMPS gets very complicated at high power levels. (15V 50mA with 10mVpp ripple is easily achievable even with MC34063, but 15V 3A with 10mVpp ripple is a whole another story.)
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: LDO output oscillation
« Reply #34 on: November 29, 2016, 04:25:26 pm »
Mind that:
1. LDO is a terrible architecture to begin with, for low ripple applications.  Remember all that stuff about loop gain and frequency response?  The loop gain is also your ripple reduction (factored by Q2's Coss).  It gets worse as you go up in frequency!
2. Since you have a higher supply voltage available, you can use a conventional follower topology with no penalty.  Which means high performance BJTs are on the table!
3. If you need low ripple, you probably don't need high efficiency.  Why not skip the pre-regulator entirely?
4. If you need low ripple, you probably don't need an incredibly precise voltage.  Why not use a capacitor multiplier, or several?
5. If you do need both, why not use a C-mult. and wrap the feedback loop around that?  (You don't even need a post-regulator, you can simply servo the SMPS to it.  Slowly, but good enough.)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #35 on: November 29, 2016, 05:22:52 pm »
Mind that:
1. LDO is a terrible architecture to begin with, for low ripple applications.  Remember all that stuff about loop gain and frequency response?  The loop gain is also your ripple reduction (factored by Q2's Coss).  It gets worse as you go up in frequency!
2. Since you have a higher supply voltage available, you can use a conventional follower topology with no penalty.  Which means high performance BJTs are on the table!
3. If you need low ripple, you probably don't need high efficiency.  Why not skip the pre-regulator entirely?
4. If you need low ripple, you probably don't need an incredibly precise voltage.  Why not use a capacitor multiplier, or several?
5. If you do need both, why not use a C-mult. and wrap the feedback loop around that?  (You don't even need a post-regulator, you can simply servo the SMPS to it.  Slowly, but good enough.)

Tim

I can try running with a source follower N-channel MOSFET, but regardless the power component must be a MOSFET, as I really don't want to tackle the base current of the power BJT.

The project I am designing have a 17V input rail (unregulated from the transformer,) the two-phase tracking synchronous buck converter output (so I can get more current than the transformer can supply when the output voltage is low) and the main output. (there is, of course, also a separate 5V rail used by op amps, ADC and the microcontroller) I can use a low Vgs(th) MOSFET here.
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: LDO output oscillation
« Reply #36 on: November 29, 2016, 06:25:50 pm »
Most opamps oscillate if there is a capacitor to ground on the output like you have. The datasheet for the TLC2272 opamp you have shows pretty poor stability if the capacitor to ground on the output is 100pF or more and show that if you need a capacitor then isolate it from the output of the opamp with a 100 ohm series resistor.

Most LDO regulators need a mandatory capacitor to ground on their output, because the series pass device has gain (most ordinary regulators have an emitter follower or source follower with no gain).
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: LDO output oscillation
« Reply #37 on: November 29, 2016, 07:10:00 pm »
Most opamps oscillate if there is a capacitor to ground on the output like you have. The datasheet for the TLC2272 opamp you have shows pretty poor stability if the capacitor to ground on the output is 100pF or more and show that if you need a capacitor then isolate it from the output of the opamp with a 100 ohm series resistor.

Most LDO regulators need a mandatory capacitor to ground on their output, because the series pass device has gain (most ordinary regulators have an emitter follower or source follower with no gain).

Look carefully; the cap's not going to ground.  :palm: :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: LDO output oscillation
« Reply #38 on: November 29, 2016, 07:19:41 pm »
Most opamps oscillate if there is a capacitor to ground on the output like you have. The datasheet for the TLC2272 opamp you have shows pretty poor stability if the capacitor to ground on the output is 100pF or more and show that if you need a capacitor then isolate it from the output of the opamp with a 100 ohm series resistor.

Unless there is a schematic that I missed, that 330pF capacitor is between the output and inverting input and rolls off the frequency response starting at 64kHz.

Quote
Most LDO regulators need a mandatory capacitor to ground on their output, because the series pass device has gain (most ordinary regulators have an emitter follower or source follower with no gain).

I agree; the output capacitance needs to be included in the design.

technix, I think you are going about this the wrong way which will only lead to tears.  A low dropout common source or emitter design will require a lot more effort to reject high frequency ripple then a source or emitter follower design.  If you must do this, then add an LCR filter at the input and definitely include the output capacitor which is required for good LDO performance anyway.  Using a breadboard for prototyping is not ideal but you can probably get away with that since a better construction method will improve performance.

I have done what you are trying in the past with both standard and low dropout designs and besides using careful filtering at the input and attention to ground loops, I included a separate high frequency discrete feedback loop (effectively T3sl4co1l's capacitance multiplier suggestion but I never thought of it that way) at the pass transistor from the low frequency control loop using the operational amplifier.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2817
  • Country: au
Re: LDO output oscillation
« Reply #39 on: November 29, 2016, 09:56:51 pm »
The ripple regulation might improve if the opamp is allowed to have more high frequency or proportional gain by putting a resistor in series with C1.
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: LDO output oscillation
« Reply #40 on: November 30, 2016, 01:47:02 pm »
Try this but it will oscillate with a low ESR output capacitor. The transient response also isn't great. The load is a 1R resistor which is switched on and off to test the transient response.

 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: LDO output oscillation
« Reply #41 on: November 30, 2016, 01:56:49 pm »
Y'know, an R || L would probably help, in series with the drain, just after the feedback is tapped off.  ESR serves the same purpose, but this stabilizes it at high frequency, regardless of load, so that gain and feedback stage keeps on working until its own roll-off frequency.

The local feedback to a ground referenced stage is good news for ripple rejection, at least until higher frequencies. :)

The gate driver is pretty poor.  It'll work for large swings, but that deadband is icky.  :-\  You could make a properly biased complementary emitter follower, at some expense to quiescent current and added parts.

PNP pass device is still an option, probably easier to drive because of the higher gain (dIc / dVbe).  DC base current isn't a big deal as long as hFE >= 100, which is easy enough to find.  Base current requirement doubles as an excuse for quiescent current, so you don't need a crazy driver.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #42 on: November 30, 2016, 02:02:41 pm »
Maybe I should just try to improve on the SMPS design to achieve low output ripple then? Currently the two-phase design is based on LM2642, but maybe I can try build my own using STM32? (also using a multi-phase synchronize rectifying design, but since I am using a MPU I can turn phases on and off as needed)
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: LDO output oscillation
« Reply #43 on: November 30, 2016, 02:15:06 pm »
What's wrong with tacking on extra filtering?  Is the LM2642 known to produce subharmonic ripple or something?

A 5th order lowpass at 50kHz should do a fine job of filtering ~300kHz ripple.  Put a 3rd order on the input also, and use common mode chokes and shielding as necessary.  Quiet as can be!

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #44 on: November 30, 2016, 02:59:46 pm »
What's wrong with tacking on extra filtering?  Is the LM2642 known to produce subharmonic ripple or something?

A 5th order lowpass at 50kHz should do a fine job of filtering ~300kHz ripple.  Put a 3rd order on the input also, and use common mode chokes and shielding as necessary.  Quiet as can be!

Tim
LM2642 cannot output arbitrarily low voltage, and requires external compensation as it too uses an analog control loop. For the STM32-based design the MCU's limited ADC speed naturally rolls off the response frequency to a few tens of kHz at best, the entire compensation circuit can be replaced with a software compensation algorithm, it can go for as low as the ADC allows it to for the output, and it can be controlled using isolated UART (or UART over optical fiber.)
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: LDO output oscillation
« Reply #45 on: November 30, 2016, 08:39:29 pm »
I don't see why not.  What in the LM2642 limits output voltage?

If you mean because the voltage sense is fixed at 1.3V, you are using way less imagination than it takes to make a better system with DSP. ;)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline snarkysparky

  • Frequent Contributor
  • **
  • Posts: 414
  • Country: us
Re: LDO output oscillation
« Reply #46 on: November 30, 2016, 08:59:16 pm »
I would try putting a resistor voltage divider between the  op amp output and the gate of Q1.
The divider will apply the lowest voltage to the gate  that solidly turns on Q1 with the op amp output at maximum voltage.

Another divider between the drain of Q1 and the gate of Q2 such that with Q1 fully switched on the gate of Q2 is pulled just low enough to fully turn on Q2.

This helps reduce unnecessary gain.
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #47 on: November 30, 2016, 09:21:48 pm »
I don't see why not.  What in the LM2642 limits output voltage?

If you mean because the voltage sense is fixed at 1.3V, you are using way less imagination than it takes to make a better system with DSP. ;)

Tim
When the output voltage of LM2642 is changed, the entire component value calculation is thrown off and way too many components have to be recalculated,, especially when the differences of the output voltages are vast. For STM32-based SMPS, the same compensation algorithm can still work.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: LDO output oscillation
« Reply #48 on: November 30, 2016, 09:45:59 pm »
Well gee, if you're dependent on their calculation tool, sure, but why would you voluntarily excuse yourself from using your own brain?

If you use the simulation model instead (I assume the thing is in Tina-TI or whatever), you can probably find a combination of parts, and a circuit, that works.  That model might not even be made to accommodate such operation.  You might have to breadboard the poor thing to truly find out!

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: LDO output oscillation
« Reply #49 on: December 01, 2016, 07:13:01 am »
Well gee, if you're dependent on their calculation tool, sure, but why would you voluntarily excuse yourself from using your own brain?

If you use the simulation model instead (I assume the thing is in Tina-TI or whatever), you can probably find a combination of parts, and a circuit, that works.  That model might not even be made to accommodate such operation.  You might have to breadboard the poor thing to truly find out!

Tim
Even with that in mind I still need DACs and digipots to control it don't I?

If a MCU-based solution is used, by using logic-level MOSFETs, there is absolutely zero interfacing circuitry required.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: LDO output oscillation
« Reply #50 on: December 01, 2016, 06:47:06 pm »
STM32 isn't 5V capable, IIRC.  And it's certainly not high side capable, so you still need drive circuitry.  And "logic level" drive always sucks (slower switching speed), even with so-called "logic level" parts.

DACs and a dumb MCU (use an ancient PIC for all that matters! ;D ) are a far sight easier, and better, than coming up with your own algorithm that uses inferior hardware resources to deliver suboptimal switching performance.  And that's if you already know what you're doing!

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf