Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Spice model for transformer?

Status
Not open for further replies.

carbonzit

Active Member
Has anyone got a Spice model for a transformer?

I understand a transformer can be constructed from two inductors using mutual inductance statements/parameters, but unfortunately I don't know how to do this.

I also understand that there are many possible parameters for a transformer. For my purposes, a "generic" model (one which assumes no parasitic capacitance and near-zero resistance, for example) would do fine at this point. A simple "plug-n-play" model, if one exists, would be perfect.

Any help much appreciated.
 
Last edited:
Has anyone got a Spice model for a transformer?

I understand a transformer can be constructed from two inductors using mutual inductance statements/parameters, but unfortunately I don't know how to do this.

I also understand that there are many possible parameters for a transformer. For my purposes, a "generic" model (one which assumes no parasitic capacitance and near-zero resistance, for example) would do fine at this point. A simple "plug-n-play" model, if one exists, would be perfect.

Any help much appreciated.

hi cz.
Two asc files, one is a dual secondary, note the 'K1' string.

EDIT:
You should this one helpful, shows different voltage options. For a a 230Vac 50Hz input
BasicTxr1
 

Attachments

  • Tapped1.asc
    3.5 KB · Views: 442
  • txr2.asc
    1.9 KB · Views: 361
  • BasicTxr1.asc
    726 bytes · Views: 393
Last edited:
Wow, that was fast. Thanks!

So all I need are two inductors and the "K L1 L2 1" Spice directive?

I understand that the inductance ratio is the square of the turns ratio, correct? (Source: LTwiki)

I'm going to give it a spin now ...
 
Wow, that was fast. Thanks!

So all I need are two inductors and the "K L1 L2 1" Spice directive?

I understand that the inductance ratio is the square of the turns ratio, correct? (Source: LTwiki)

I'm going to give it a spin now ...

cz,
Dont forget to use a States mains voltage, the voltage in the 'source generator model' has to be 110V * 1.414
 
Actually, I'm modeling a flyback transformer, not a power transformer.

I'm attempting to model one of Colin's circuits, a 3-volt to 5-volt step-up flyback converter (it's the power supply for this project).

Getting weird results. First time out I got nothing, so I flipped one of the inductors. Now it grinds and grinds, doesn't seem to want to converge on a solution. I copied this directly from his schematic, and I trust that his circuit is tested and works. So I guess I must have made a boo-boo somewhere.

I used a 1KΩ load on the output side: maybe not enough? will try a smaller R.

My simulation is attached. (Note: inductances are wrong. Fixed them but still doesn't work right.)

At least I now know how to make a transformer in LTspice.
 

Attachments

  • 3v-9v converter.asc
    1.8 KB · Views: 306
Last edited:
WHERE is your circuit Ground Symbol.:rolleyes:

EDIT:
Can you post the original circuit diagram.?
 
Last edited:
Whoops. OK, put it in, but still no joy. Hmm, I wonder if Colin is around ... must be something verrrrry mysterious about his little circuit. I'm getting less than 2 volts out of it (supposed to be 5).

Oh well, if anyone has any ideas I'm listening, but otherwise I'm going to pack it in and try again later.

Hmm; choosing higher inductance values (200/600µH instead of 20/60) made a big difference. Getting expected results (including the ~20KHz spikes he described). New .asc posted below.

Spice are good!
 

Attachments

  • 3v-9v converter.asc
    1.8 KB · Views: 289
Last edited:
Whoops. OK, put it in, but still no joy. Hmm, I wonder if Colin is around ... must be something verrrrry mysterious about his little circuit. I'm getting less than 2 volts out of it (supposed to be 5).

Oh well, if anyone has any ideas I'm listening, but otherwise I'm going to pack it in and try again later.

Hi,
Try using mH not uH values and try again, lets see.
 

Attachments

  • AAesp01.gif
    AAesp01.gif
    35.9 KB · Views: 403
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top