Centre Tapped Transformer Simulation in LTSpice

Thread Starter

Sparky49

Joined Jul 16, 2011
833
Hi all,

I've been trying to simulate a power supply design in LTSpice, however I don't reckon I have quite figured out how to simulate a centre tapped transformer correctly.

I found LT's PDF on simulating transformers, so I found the spice directive to couple the inductors together, but I think I may have fudged it somewhere.

Here is the schematic:



Any thoughts/comments would be really appreciated.

Thanks for your time guys,

Sparky
 

Attachments

Thread Starter

Sparky49

Joined Jul 16, 2011
833
Hi Alec,

I'm hoping to eventually use a 9-0-9 to 230V transformer, I know the values don't reflect that but I was just playing around a wee bit. :)

Many thanks. :)
 

ericgibbs

Joined Jan 29, 2010
18,830
hi sparky,
These are TX inductance values I use, note the primary is set to 10H.
All voltages are RMS.
E.

EDIT: for a true 50/50 duty output cycle on the 555, you could configure the 555 as type 2 oscillator.
 

Attachments

richard.cs

Joined Mar 3, 2012
162
The spice directive for a centre tapped transformer is correct but at the moment you have a voltage step-down of √20 : 1.

I tend to put an inductance per turn-squared (a property of the core you can look-up or estimate*) and primary and secondary turns into spice as parameters with the inductance values being calculated from these.

*If you buy ferrite cores this is a datasheet value, for other transformers it can be calculated from the core dimensions and material, or measured.
 

Thread Starter

Sparky49

Joined Jul 16, 2011
833
Thanks to eric and richard.

I cannot seem to get a transformer to step up a voltage. I am most probably doing something very bad.

Regards,

Sparky

EDIT: sorry, the mouse cursor did not appear on the screen print, the measurement is taken above L3.
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
ronv is correct, the default NMOS mosfet is a very puny FET; you'll hardly get any current at all through the primary inductors.

You're going to experience a problem in the real world with that circuit, and that is a phenomenon known informally as "flux walking". Since the duty cycle will not be even between M1 and M2, the current flow won't be equal, and it'll build steadily in the higher-duty side until finally the primary core saturates, and it will act as practically a dead short. Your MOSFET will evaporate in a miniature "Kaboom!" of smoke and flames, and you'll wonder what in the heck went wrong.

You could use the 555 at 100Hz to clock a flip-flop in order to get an exact 50% duty cycle out.

Use a smaller timing cap and larger timing resistors on the 555. Resistors, particularly metal film, are far more stable over time and temperature than capacitors are. Electrolytic capacitors will have variable amounts of leakage current over time/temp. You'd be better off using poly metal film or ceramic.
 

Thread Starter

Sparky49

Joined Jul 16, 2011
833
Thanks Ron and SgtWookie.

I couldn't find the nmos I wanted to use, so I've attempted to create my own model, for the IRF840.


.model IRF840 VDMOS(mtriode=2.2 Rg=25 vto=4.9 subthres=1 Rd=1m Rs=4m Rb=1.7m Kp=48 Lambda=40m Cgdmin=100p Cgdmax=9n A=.2 Cgs=6n Cjo=12n M=0.5 VJ=0.7 Is=15p N=1 TT=0 mfg=Vishay Vds=500 Ron=0.85 Qg=63n)
However, when I try to copy and paste it into the components file, it says permission denied. I've tried looking for something to explain how to add the component, but I cannot seem to find anything.

Does anyone know of a good tutorial, or perhaps have a simple explanation?

Many thanks again for your time, I've learnt a lot. :)

Sparky
 

Thread Starter

Sparky49

Joined Jul 16, 2011
833
I don't think it is.

Just to confirm, I've been editing the .mos file.



Is this the correct way, or do I need to do it through ltspice?

Thanks again.
 

Attachments

ifixit

Joined Nov 20, 2008
652
Hi Spark,

If LTspice is running it may have locked the file for its own use. Close LTspice and try it.

It is better to just cut 'n paste the .model command directly into your schematic as a spice directive (.op in the top menu). This way it is convenient to edit until you get it working just right.

Have fun,
Ifixit

Edit: If you edit the .mos file, use LTspice itself to open the file. It's safer and it has a nice file editer.
 
Last edited:
Top