Which topology of power regulator gives a stable voltage output, linear or switching?

I am experimenting on the stability parameter of switching vs linear regulators. By stability I mean how much the output voltage ripple is changing.

A lot of online reading has made me understand that switching regulators have higher output voltage accuracy but more noise and linear regulators have lower output voltage accuracy but less noise.

I soldered up a circuit on a dotted PCB board:

• Battery: 18650 4.1V
• Battery charger module: TP4056H
• Boost module: MT3608
• LDO: AMS1117-3.3

Imagine my surprise (I don't know if its my gap in knowledge to be this surprised) to see the output of AMS1117 (without caps) as below in a DSO.

This shows a PeaktoPeak of 120 mV.

Adding a capacitor to the output and input (as shown in diagram) reduces this to 40 mV as shown below.

Below is the DSO screenshot of MT3608 without capacitor:

This is with a 10 uF capacitor attached externally to the module:

I am trying to read the midpoint voltage of the voltage divider to an ADC (ADS1115 module) and reading using Arduino UNO using I2C to see which hardware configuration is giving me the stable output. Both of them are giving me an accuracy of 30 Ω. I am trying to get that down to 10 Ω.

I am aware of Vref ICs, ordered them and lead time is 2 weeks. In the mean time I am fiddling with this circuit. I am really surprised by the LDO output and would appreciate really if someone can tell why its not a linear line. One of my colleagues asked if power line noise is being coupled to the DSO probe, to which I don't have an answer.

( Edit1: Adding my circuit photo if it helps )

• The data sheet of the linear regulators say you must have capacitors! Read the data sheet. Linear regulators work very well at low frequencies (power line frequencies). They do not work well with high frequencies (500khz from a switcher). Please add an inductor to the output of the switcher. This makes a LC filter. The inductor opens up at high frequencies and the capacitors shorts out high frequencies. This will greatly help the noise.
– user338146
Commented Jun 22, 2023 at 14:30
• Output voltage accuracy has nothing to do with the type of regulator (switching or linear). It's entirely to do with the accuracy of the voltage reference and and offset voltages/currents in the feedback circuitry. Also, I'm not sure how you're measuring voltage accuracy in ohms. And how are you powering your Arduino? That supply will affect your measurements, not to mention its internal voltage reference (assuming you are using its ADC, not I2C...I'm not sure how you would measure an analog voltage with I2C). Commented Jun 22, 2023 at 17:38
• @ronsimpson I didnot feed the linear regulator from switcher. I will try the LC filter and check. Commented Jun 23, 2023 at 3:58
• @LetterSized But if the regulator is not providing stable output, the voltage accuracy is affected right? Its not the voltage accuracy, its the resistance value calculation i am measuring in ohms. The ADS1115 does the adc conversion and sends the value via I2C to Arduino. I am powering the arduino from my laptop's USB port Commented Jun 23, 2023 at 4:01
• I see, I blanked over that line where you mentioned the ADC. It's a little hard to tell from your picture, but are you powering the ADC from your laptop USB? That will be a fairly noisy, inaccurate source of power. Although your ADC does have an internal reference, I'm not sure how well it's filtered (might say in the datasheet). Regarding voltage regulator accuracy: accuracy is typically defined as the DC output level, which is completely independent of AC ripple level. You could have 100mVpp ripple around 5.00000V DC and call it highly accurate. Not to say it's a great regulator though... Commented Jun 23, 2023 at 17:32

The output of a switching converter will always have some ripple at the switching frequency. The amplitude of this ripple depends on input voltage, output voltage, choice of components, etc. To measure this ripple you need to use the proper probing technique: either X10 probe with short ground spring, or coax soldered to the board with SMD 50R resistor. This is to avoid the ground alligator clip wire from the probe picking up stray magnetic fields from the DC-DC, which can make the measurement completely useless. It is preferable to probe at the load or on previously arranged test points. Probing on a SMD capacitor will underestimate the ripple, because the capacitor has low impedance at the ripple frequency.

If the load draws low current, most switching converters will enter power-saving mode. The details of how it works depends on the particular chip, but the end result is always the same: the chip wakes up, pumps some energy into the output by switching once or a few times, then goes back to sleep. Output voltage ripple will look like a sawtooth, as your screenshot shows. When the chip wakes up, it pumps some energy in the output cap which increases output voltage, then it goes to sleep and lets the output cap power the load. During this time output voltage ramps down slowly. With synchronous DC-DC converters it is sometimes possible to disable this mode to get lower ripple at the cost of light load efficiency.

When power-saving mode is active, output ripple is determined by the hysteresis of the comparator that controls sleep mode. So using a larger output cap will reduce ripple frequency, but not amplitude.

When power-saving mode is not active, a larger output cap, or some filtering will reduce ripple amplitude, but not frequency, since it's the switching frequency.

Now LDOs and other linear regulators:

These don't create any ripple, they reduce the input ripple and noise according to power supply rejection ratio, and add some noise and drift of their own.

If it is powered from a ripple-free source, a properly working linear regulator will always have a cleaner output, at the (sometimes enormous) cost of efficiency.

AMS1117 requires the correct type of output capacitor. If you test it without capacitor, then it is not in the "working correctly" case, so indeed you are measuring large output voltage variations.

AMS1117 is a bit of a clunker, quite slow and crummy, and there are lots of counterfeits. There are many better LDOs around.

Most parameters depend on output current and input-output voltage difference, so testing with only a voltage divider at the output will not reveal much.

You can't measure a 1 pixel high signal on the scope screen because it may be noise from the scope. You should use AC mode and adjust input sensitivity until you get a measurable signal that fills a few divisions on the screen.

The difference between a voltage reference chip (Vref) and a linear regulator chip (LDO) is that the Vref chip is optimized for stable accurate output voltage with a low, constant load whereas the LDO is optimized less for accuracy and more for powering variable current loads.

Pulling a variable current from any of these will result in output voltage variations which will most likely exceed the chip's output noise spec: a stable voltage source only exists if the current drawn from it is also constant.

• Thanks @bobflux for your time. Doubt no. 1 , whether LDO output should normally resembles the screenshot that i have attached? I tried directly providing Battery voltage (4V) to AMS1117 with input and output 10uF electolytic caps to a voltage divider load. Still this pulse kind of waveform i am observing in the DSO. Doubt no. 2, whether these pulses are the ripples, or is it something else. Commented Jun 26, 2023 at 5:45
• The DSO probe is 10x and ground spring is 16cm. Commented Jun 26, 2023 at 5:53
• You used DC mode and zoomed on the scope noise... Use AC mode and proper sensitivity to measure the LDO and not the scope Commented Jun 26, 2023 at 6:26