• 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:

ericgibbs

Well-Known Member
Most Helpful 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.
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

Last edited:

carbonzit

Active Member
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 ...
 

ericgibbs

Well-Known Member
Most Helpful Member
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
 

carbonzit

Active Member
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

Last edited:

ericgibbs

Well-Known Member
Most Helpful Member
WHERE is your circuit Ground Symbol.:rolleyes:

EDIT:
Can you post the original circuit diagram.?
 
Last edited:

carbonzit

Active Member
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

Last edited:

ericgibbs

Well-Known Member
Most Helpful Member
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

Last edited:
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading

 
Top