# Linear PSU design problem

I am trying to develop my own PSU for learning purposes, but would also like to be able to use it once built. The requirements are as follows:

• The PSU must deliver 1 A at 35 to 40 V (max.) continuously, regulated to 35 V.
• The bulk capacitor must be 0.1 F
• I would prefer to have the PSU be linear for simplicity

The reason for the large bulk capacitor is to allow time for the system to detect that mains power is disconnected or failed, and to then switch to a backup external DC source before the output voltage drops below a certain amount. I plan on using the PSU to power large-scale MCU projects in the future, and wouldn't want them to momentarily lose power. Also after doing some research, I found that under max. load the system I intend to power with my PSU will draw close to 1 A, so that's why I would like to be able to deliver that amount of current continuously.

So I manage to solve most of the issues I had with the design but one. To illustrate the issue I am having, I drew up a simplified schematic of the PSU below.

simulate this circuit – Schematic created using CircuitLab

I removed various components just to simplify things a bit. I have already developed a method to prevent the inrush current caused by the massive bulk capacitor, so for the time being ignore the fact that the above circuit will have a massive amount of inrush current. My issue is once the bulk capacitor is fully charged, the ripple current is still extremely high even though the ripple voltage is very low and the bulk capacitor loses very little of its charge. The image below shows my LTSpice simulation.

• Green -> Ripple Voltage
• Blue -> Ripple Current

Once I add a series resistor to limit the ripple current between the full-bridge rectifier and node 1 with enough resistance to cause the ripple current to not be an issue, the bulk capacitor discharges faster than it gets charged and my output voltage starts to drop below 35 V.

I have tried to lower the transformer ratio to allow a higher voltage at the output stage, but doing so results in the capacitor charging above 40 V in cases when the current provided by the PSU will be lower.

Any advice will be appreciated, thanks!

• ”ripple current is still extremely high” How high? What’s your transformer primary inductance? If too low, you are probably seeing magnitizing current. Commented Jan 3, 2023 at 18:13
• What is the rating of the transformer? Is the regulator box an off-the-shelf component or is it a circuit of your own design? Have you tried a smaller capacitor, say 470 μF, just for testing? Commented Jan 3, 2023 at 18:23
• @winny The second image shows the ripple current values on the right y-axis, as for the transformer, in my simulation I bypassed it and directly applied the stepped-down AC voltage (40 V), so I doubt it is magnetizing current. The reason for doing it this way is that LTSpice does not provide a transformer component out of the box. Commented Jan 3, 2023 at 18:24
• Too high capacitance. Commented Jan 3, 2023 at 21:20
• It would probably be much better to use a battery instead of a capacitor. You are basically trying to design a UPS. Commented Jan 4, 2023 at 6:08

The reason for the large bulk capacitor is to allow time for the system to detect that mains power is disconnected or failed, and to then switch to a backup external DC source before the output voltage drops below a certain amount.

This can happen in one line cycle, so 18-20ms depending on where in the world you are. No need for a 100mF capacitor to carry things over for such a short time.

Here's a circuit to look at for a capacitor 5x smaller. It droops 1V per line cycle at 50Hz.

simulate this circuit – Schematic created using CircuitLab

The capacitor droop is actually important for detecting functional loss of mains. You don't care much what caused the capacitor droop to happen. You don't even want to be actually sensing the mains - you simply don't care whether AC is present or not.

But you do care that the supply will fall out of regulation soon if something isn't done. So, the simplest way to implement switchover is to detect droop below spec. If you have a stiff regulator, the input can be 36V DC under load for a 35V regulated output. Set a comparator for, say 36.5V, and cut-over when it trips. The switchover would be done with a mosfet or a relay and happen much faster than one line cycle, so, the extra 0.5V is all you need. With a 22mF capacitor. A flip-flop would enable the cut-over only after the capacitor has been charged past the threshold first. Don't forget comparator hysteresis! 1V at least to accommodate worst case startup load with ample margin. I.e. the comparator would be set to trip at 37.0V with +/-0.5V of hysteresis.

I have already developed a method to prevent the inrush current caused by the massive bulk capacitor

The transformer and rectifier impedance will provide this. Transformers aren't ideal, and they have parasitic inductance that looks to the load is if it was a series inductor. Never mind the winding resistance, and the rectifier resistance.

I highly recommend you actually play with this thing on the bench, and only start simulating once you know what behavior should be present in the simulation. The simulated circuit has to be a bit more complex than the schematic diagram might suggest - the diagram, after all, uses idealizations.

First, let's measure the power dissipation on the pass element in the "classical" circuit. We shall look at three cases, all under full 1A load.

1. Worst case: 0V output voltage.
2. "Medium" case: 35V/2 output voltage.
3. Best case: 35V output voltage.

simulate this circuit

The power dissipation spans from 14W to 48W, from the best to worst case, respectively. That's a lot, and that's our baseline.

Now we shall look at what happens when a second, low-power pass element is added, and the first pass element is used for pre-regulation ahead of the capacitor.

simulate this circuit

The energy dissipation is lowered by about 30% to 40% for the worst and best case, respectively.

Note that the 2nd pass element dissipates only 1-2W, and costs almost nothing to add (!), yet offers substantial heat dissipation reduction.

Now we shall replace the 1st pass element by a "saturated" switch that is either ON or OFF, and dissipates very little energy. The switch turns on at zero crossing, and turns off when the capacitor voltage is above what's needed for regulation, taking droop into account.

simulate this circuit

Significant power dissipation only occurs when the output voltage setpoint is changed. When the output voltage setting is fixed, the dissipation is <3W in all cases.

Now we can start thinking a bit about how the implementation of this idea might look. Let's start with some simple comparators - since they are for the pre-regulation, V_BE of a transistor is a good enough reference.

simulate this circuit

The Set, Reset, SR latch output, capacitor voltage and output voltages look as follows:

The mosfet gate driver and the linear pass stage are still stand-ins.

Let's tackle the gate driver first. A current switch is simple to implement: 0.5mA is flowing either into or out of the gate. The current can be adjusted to get the mosfet switching at a leisurely pace. so that it won't add any EMI on top of what the rectifier diodes are already producing.

simulate this circuit

Now, to make things easier to see, we should split the final linear stage from the pre-regulator stage. We can continue working on the pre-regulator stage, and come back to the final stage when the pre-regulator is mostly done.

simulate this circuit

The 500uA current source can be made from an LM334, for example, with a cascoding transistor. The S-R latch can be e.g 74HC279.

This circuit maintains quite reasonable pre-regulation of the capacitor voltage, referred to V3:

The linear output stage can be one of the classic designs, e.g. from HP/Harrison supplies that use discrete transistors, or one of many op-amp based designs that implement CV/CC control.

Absolute inrush current limiting can be implemented by comparing the source-drain voltage across M1 against a threshold when D13 conducts. Otherwise, the output voltage reference V3 can be a ramp, as that will inherently limit the charge current for any given practical capacitor (i.e. not an ideal one).

The ramp could be generated on a capacitor driven with a tiny CV/CC controller that follows the setpoint voltage from a front panel potentiometer or rear voltage programming terminals.

D3-D4 can be replaced with two NMOS devices each to save a diode drop and have an ideal rectifier.

D1-D2 can be replaced by two NMOS devices each: those can perform both rectification and pre-regulation switching if you wish.

Now, when DC back-up is active, preregulation is gone, so the output stage has to dump those almost 50W, and that’s bad news for efficiency on battery.

So, for battery use, you’d absolutely want a switching pre-regulator.

And at that point, the mains frequency pre-regulator seems kinda moot. Or is it?

We already have an inductor - the transformer secondary winding, and we already have some diodes and a storage capacitor. Could we perhaps use it as a buck regulator for battery backup?

Let's compare the buck converter topology to our basic transformer secondary rectifier:

simulate this circuit

In the buck configuration, D2 would not conduct, and D3 would incur a nominal conduction loss. Only D4 would be "in the way" and would have to be disabled. Of course, the primary would have to be disconnected as well. A relay could do that.

So, one could have something like:

simulate this circuit

SW2 is a SPDT section in a relay. Another SPDT section in the same relay would disconnect the primary (mains) when the battery backup kicks in.

SW1 would be switching rather slowly - at mains frequency would be fine.

The AC-to-DC switchover would still be triggered by dropout on the DC link capacitor C1. The DC-to-AC switchover would require a small auxiliary transformer (1VA is fine) with a rectifier bridge on the secondary, a load resistor and a smoothing capacitor. Its output going above the threshold would trigger the DC-to-AC switchover.

The SPDT relay section that turns off the primary of the main transformer would transfer the power to the auxiliary transformer, so that the 1W dummy load would not be wasting energy when mains is present. It would only be used to recover back to mains power.

simulate this circuit

For additional retro-vibe, D4 would be an SCR, its gate driven continuously during mains operation, and turned off for battery backup. D1 and D3 should be ultrafast diodes, say UF4003 or a similarly fast diode rated for appropriate current.

simulate this circuit

Not shown are the snubbers etc. I've built such a thing a long time ago, facing similar requirement to yours, and it worked, but I doubt I paid much attention to the safety and EMI aspects at the time.

For the above architecture to retain the benefits of a linear supply design - mainly a very low EMI level - the buck and pre-regulator switches need to switch "softly" - slowly, trading off some of the efficiency for low EMI. On the other hand, the rectifier diodes need to be fast. Slow rectifier diodes add significant EMI to "quiet" transformer-rectifier designs. The "classical" designs that use 1N400x diodes should be using UF400x diodes instead: they get quieter that way.

• Wow! Thank you for the amount of effort you've gone to to help educate and promote the art of electronics. Wish I could upvote you more than once. Commented Jan 5, 2023 at 11:14
• @Kuba hasn't forgotten Monica. Thank you for the insight, it is much appreciated. I will definitely look into your advice and then head back to the drawing board. Commented Jan 7, 2023 at 20:11

This is a known, and inevitable, part of power supply design. If you're using a capacitor-only filter and you want to minimize ripple, the only thing you can do is let the ripple current go up.

Typically the way this is dealt with is to just allow for more ripple voltage, or use a choke-input filter, like this:

simulate this circuit – Schematic created using CircuitLab

The problem with this topology is, first L1 has to be big, both physically and in terms of inductance, and second, you pretty much can't get those any more because an entire, sophisticated switcher is less expensive to buy than just the inductor (perhaps less than the inductor's shipping charges, these days).

If you want to go that route, L1 needs to be in the neighborhood of 1 Henry, and be rated for the highest current it sees. C1 can now be much smaller.

This is straying firmly into opinion, but my advice is that unless you specifically want to specialize in switching power supply design, you decide what current and voltage you need, and buy a surplus supply. This is how it's done even in companies that build computing hardware -- the people who specialize in MCU (or other larger systems) design are not the people who specialize in power supply design, and an "MCU" company will often buy pre-made power supplies and not even mess around with designing their own.

Similarly, a power supply company won't mess with MCU (or other larger systems) design.

I have tried to lower the transformer ratio to allow a higher voltage at the output stage, but doing so results in the capacitor charging above 40 V in cases when the current provided by the PSU will be lower.

That's the price you have to pay for simplicity. Make sure your input voltage is high enough to cover whatever ripple you may have, and make the regulator burn the excessive voltage to produce a stable 35V. Put a 50V (or even a 63V) capacitor to make sure it can cope with the voltage.

Using regular capacitors for backup power is even more wasteful, you'll need absolutely insane capacitance to provide 35W of power for any measurable time. Take a look at what an UPS for a Raspberry Pi looks like: it uses an 11F supercap to provide 1A of current for less than 20 seconds, and it still needs a DC/DC converter to completely drain the supercap while maintaining the output voltage. If the load was connected directly to the supercap, the voltage would drop below the spec after just a couple of seconds.

As @TimWescott writes, this is the inevitable problem of a simple diode bridge.

The power factor becomes very bad (the current becomes very non-sinusoidal).

A suitable choke would be of tremendous proportions.

I want to share a simple circuit that is usually used to replace these huge chokes with a few small and cheap components, the "gyrator choke". It mimics some important aspects of the choke, and allows to turn the current into a somewhat less peaky waveform.

The drawback is that it wastes a lot of power in the pass transistor - up to 10W potentially. But maybe this is fine for you if you want to stick with a linear power supply after all. They are never good of efficient.

simulate this circuit – Schematic created using CircuitLab

If you still want to do this using a huge capacitor, you could charge it up slowly and keep it disconnected until the mains voltage drops out, and then switch your load to the large capacitor. Otherwise, your load would be connected to a much smaller capacitor that would only need to ride out for a few cycles during which the switchover relay has time to operate.

Somehow I lost my schematic :(. Let's see if I can recreate it.

simulate this circuit – Schematic created using CircuitLab

The 10 ohm resistor R2 limits charging current into C2 to less than 20A. The 1 ohm resistor R1 simulates transformer and capacitor ESR. An AC relay should switch faster to minimize the voltage drop upon transfer.