Electronic – Could someone answer the questions on a transformer with regulator circuit in LTspice

analogltspicepower supplysimulationtransformer

Circuit

The circuit itself is a UK mains power supply turning 230Vac to 20Vdc.

The first section is a transformer. The second part is a bridge rectifier, it then moves onto a voltage regulator by the name of LM317.

Questions:

Considering that this is a UK mains power supply what transformer resistances are usual?

I understand that this requires more in-depth knowledge of the core and windings, its resistances and reactances, however choosing a resistance of 1 seems to be a bit too “simple” should I say. Upon changing resistances, it mostly only affects the negative voltage. I.e reaches a positive peak of 20V but does not reach a negative peak of -20V, like 0.01 out.

I understand for LTspice to determine the ratio of voltage, is to use the equation (V1/V2)^2 = L1/L2. Which is why the inductances are 2640 and 10 respectively as this produces a 20V output.

However, to simulate such a thing in ltpsice is this the correct way of doing so? (Youtube videos really don’t help much.)

Also, the inductance coefficient is 1, what is a more reasonable value?

The bridge rectifier (i.e changing 20Vac to 20Vdc) is easier to understand.

But I’m lacking understanding of how I could reduce the voltage lost? For this the peak voltage loses about 1V.

The diode used is the default diode for LTspice, which I have some sources claiming to be the 1n4148

Are there better diodes to use as bridge rectifiers?

I’m most confused about the voltage regulator.

C1 is important to reduce noise and upon adding more capacitors the noise reduces.

Is adding more capacitors before the voltage regulator good?

Is adding a polarised capacitor better?

C2 is there just for the voltage drop, otherwise it would be zero. However changing C2 to a resistor say, the input signal to the voltage regulator has a lot more fluctuations.

Why is this? I didn’t think it would have such an effect.

The input voltage into regulator is ~19V and output is 12.5V with fluctuations in the 10^-5. I do not understand how there is 6.5 voltage drop and regardless of the input voltage into the regulator the voltage is 12.5V.

What is the cause and how could I reduce this?

I guess the most important question here is, is this a good power supply circuit?

What could be done to make this better?

I understand that this is a long question, I appreciate your time for answering.

Best Answer

Upon changing resistances, it mostly only affects the negative voltage. I.e reaches a positive peak of 20V but does not reach a negative peak of -20V, like 0.01 out.

The Ground symbol on L2 short circuits it to the other ground symbol on R3 which is your output ground, making the rectifier diodes useless. Remove the ground symbol circled in red...

enter image description here

But I’m lacking understanding of how I could reduce the voltage lost? For this the peak voltage loses about 1V.

1V sounds correct for usual rectifier diodes.

Are there better diodes to use as bridge rectifiers?

You can use schottky diodes for lower voltage drop, but that's uncommon. These days, linear power supplies like this one are used for low switching noise. If you worry about efficiency, get a switching power supply, that'll spare you the losses in the LM317...

C1 is important to reduce noise and upon adding more capacitors the noise reduces.

C1 is the smoothing cap... it is charged by the rectifiers and supplies the regulator when the rectifiers do not conduct, which is most of the time, since the input is AC.

Is adding more capacitors before the voltage regulator good?

On 50Hz AC, rectifiers will charge C1 every 10 milliseconds, rectifiers stay on for a couple milliseconds then C1 supplies load current. There should be enough capacitance so the voltage does not drop below what U1 requires to keep the output voltage in regulation at the maximum design current, plus a bit of margin.

Is adding a polarised capacitor better?

Weird question. The simulator doesn't know about polarized caps, but in real life, sure...

C2 is there just for the voltage drop, otherwise it would be zero.

Huh?

C2 is the output cap after the regulator. It handles the higher frequency AC part of load current. Depending on which regulator you use it may be required for stability, with conditions on capacitance and ESR (read the datasheet).

However changing C2 to a resistor say, the input signal to the voltage regulator has a lot more fluctuations.

Sure, if you put a load on the regulator it's going to draw current, so voltage ripple on C1 will increase. This is normal, as I said above C1 should have enough capacitance so the voltage on it does not drop below what U1 requires.

The input voltage into regulator is ~19V and output is 12.5V with fluctuations in the 10^-5. I do not understand how there is 6.5 voltage drop and regardless of the input voltage into the regulator the voltage is 12.5V.

It's a regulator... it regulates the output voltage... check LM317 datasheet, it explains how to pick R3 and R4 to get the output voltage you want.

I guess the most important question here is, is this a good power supply circuit?

Sure it'll work.

Unless your load is very sensitive to switching noise, a wall wart switching supply will be cheaper and more efficient though.