Centre Tapped Transformer Simulation in LTSpice

Discussion in 'General Electronics Chat' started by Sparky49, Jan 29, 2014.

  1. Sparky49

    Thread Starter Active Member

    Jul 16, 2011
    834
    417
    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:

    [​IMG]

    Any thoughts/comments would be really appreciated.

    Thanks for your time guys,

    Sparky
     
  2. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    Looks ok to me re the directive, but shouldn't L3 be much greater than L1 and L2?
     
    Sparky49 likes this.
  3. Sparky49

    Thread Starter Active Member

    Jul 16, 2011
    834
    417
    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. :)
     
  4. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,503
    380
    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.
     
    Sparky49 likes this.
  5. richard.cs

    Member

    Mar 3, 2012
    162
    31
    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.
     
    Sparky49 likes this.
  6. Sparky49

    Thread Starter Active Member

    Jul 16, 2011
    834
    417
    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.
     
  7. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,292
    1,255
    Pick a part number for your FETs.
     
    Sparky49 likes this.
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
    Sparky49 likes this.
  9. Sparky49

    Thread Starter Active Member

    Jul 16, 2011
    834
    417
    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.


    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
     
  10. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    Is the file property set to 'read only'?
     
  11. Sparky49

    Thread Starter Active Member

    Jul 16, 2011
    834
    417
    I don't think it is.

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

    [​IMG]

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

    Thanks again.
     
  12. ifixit

    Distinguished Member

    Nov 20, 2008
    639
    108
    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: Jan 31, 2014
    Sparky49 likes this.
Loading...