# How does a capacitor at the output terminal make a voltage regulator stable?

The AMS1117 is a linear voltage regulator. Reading the datasheet of AMS1117, it says this:

The circuit design used in the AMS1117 series requires the use of an output capacitor as part of the device frequency compensation. The addition of 22μF solid tantalum on the output will ensure stability for all operating conditions.

I have recently learnt that linear voltage regulators use a negative feedback loop to keep the output voltage stable. I then realized that this means that there exists a transfer function and logically a bode plot with gain and phase margin. These details are obviously not given.

A linear time invariant control system becomes unstable mainly if the gain is more than 1 when the phase shift is -180. Basically this causes the system to become positive feedback rather than negative feedback.

How does using a tantalum capacitor specifically make the voltage regulator control loop stable? Is it possible for a user to observe oscillation or even instability of voltage regulator output when not using an output capacitor?

• I can't explain how it does it, but I can tell you that a linear regulator with an inadequate capacitor can oscillate. They will usually also get hot.
– JRE
Jun 22, 2023 at 17:20
• What does oscillate mean? I mean if I stick an oscilloscope probe (which ironically has capacitance itself lol), what will I see? Jun 22, 2023 at 17:48
• You will see a wildly swinging output. I've seen the output bounce between the input voltage level.and ground. There will be some main frequency, and probably harmonics and noise.
– JRE
Jun 22, 2023 at 17:55
• Does this answer your question? What prevents this op-amp reference buffer from oscillating? <- it's a duplicate because an op-amp used as a reference buffer has exactly the same problem as any power voltage regulator. My answer explains that there is a range of capacitance where the buffer (aka power supply) is unstable but, as capacitance approaches the microfarad area, stability again appears and, if you add more capacitance then it gets stabler (as you would expect). Jun 22, 2023 at 20:06

Note that the suggestion to use a tantalum capacitor comes from the fact that this 1117 type regulator is (1) an LDO which is far more demanding about impedance on output for loop gain compensation, and (2) it is from an era where a single tantalum capacitor could provide the required impedance as the simplest solution. Regular electrolytics had worse ESR and ceramic capacitors were not large enough and could have too low ESR.

LDOs have added pole compared to standard linear regulators due to their structure, so a zero must be added to the loop, that cancels out the two poles, and the zero comes from the ESR of the capacitor, and this increases the regulator bandwidth.

So this means that the ESR range of the capacitor is critical that must be fulfilled, or you are outside the stable region.

Too high ESR and loop bandwidth increases and unstability occurs.

Too low ESR and there is no phase margin.

Sometimes the trick is to use ceramic capacitor with series resistance to bring ESR into suitable level.

For more info, TI has an appnote AN-1148 for theory of operation and compensation of linear regulators.

And forgot to add, yes, a regulator can be observed to become unstable when it does not have correct output (or input) capacitors. For example I've see a linear regulator output voltge being a high frequency signal between about 4 and 5 V. It really wasn't a regulator but oscillator. I don't recall the details but it was the likely reason why a MCU had some intermittent issues.

• I shall read this application note. So this AMS1117 is basically obsolete now? There are newers devices I guess? The AMS1117 is quite cheap. I wonder why people still like to use parts when there are better alternatives around. Jun 22, 2023 at 17:50
• Is there anywhere that shows bode plots for LDOs before and after adding the output capacitor? I guess they might be in this application note. Also, adding a resistor with ceramic capacitor to get the correct capacitance with ESR seems to be risky, especially since the datasheet does not even tell how much ESR this part needs. Jun 22, 2023 at 17:51
• I don't think the 1117 is obsolete. It's just that after it there are now newer parts that boast being stable with a single ceramic capacitor - which again sounds funny but that was the marketing line after the being stable with single tantalum cap. People use it because it is cheap and largely available and familiar with it as it is almost like LM317. The appnote shows example plots with too high and low ESR. Yes some regulators do specify the ESR range. For example the TI LM1117 specifies it. AMS1117 is likely a cheaper clone/alternative, but may not be identical. Jun 22, 2023 at 18:01
• Whats up with so many regulators ending with 1117 in their name? Jun 22, 2023 at 19:13
• They are 1117 made by National (LM1117), ST (LD1117), AMS (AMS1117). They are similar, not identical, but either official licensed products where they should be identical, or blatant unlisenced cheap clones when patents have expired. Jun 22, 2023 at 19:27