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.

LTSpice - simulating the switching of an inductor

Status
Not open for further replies.

atferrari

Well-Known Member
Most Helpful Member
Using LTSpice to simulate the switching of an inductor as per attached .asc file.

I understand that the emitter current (Q2), at the moment it is turned on, should be positive starting from 0 mA.

LTSpice insists in showing a negative current which contradicts the sense of the one through L2, which is positive, starting from 0.

BTW, current through D2 is consistent with that of L2.

At lost here...

Inductor 01.png
 

Attachments

  • Inductor test 01.asc
    1.7 KB · Views: 276
Positive current and negative current is relative.
Example: current in a resistor =+, cut the resistor out and flip it 180 and put it back, =-.
Also: If the transistor's collector current is (+) then the emitter current is (-). flow into/out of

If you don't like the way the wave for looks right click on the name of the trace. change the name from I(l2) to -I(l2) this will invert the trace. (math, negative current in l2) This does not really change anything but it helps your head.

Another idea. Say you are looking at base current and collector current of a transistor. The collector current is 100x that of the base so you can hardly see the small base current. Rename the base current by adding 100*ahead of the name or *100 after the name. Now the graph will display 100x the base current and the collector current.

There are many math options.
 
Also: If the transistor's collector current is (+) then the emitter current is (-). flow into/out of

There are many math options.

It makes sense now. Gracias Ron!

Thanks for the tips as well.

EDIT to add:

Just to see it working I copied the 10 ohms collector resistor and pasted on the emitter. Now, curent measured through it, is consistent with that through L. Good!

/EDIT
 
Last edited:
hi

You can also insert a voltage source, with a value of zero, and it will behaive as a current sensor.
It will not affect the behaivior of the circuit. If you want to reverse the current reading, just swap
the connections.

eT
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top