Friday, 1 February 2019

transistors - Why am I getting negative base current in LTSpice simulation?


enter image description here


When I was trying to bias an NPN transistor I noticed that the base current Ib is negative in LTSpice. So for the sake of simplicity I only apply voltage to the base-emitter junction. As you see in the figure above LTSpice shows this current negative. Infact when you bring the cursor on R3 the arrow points +V2.


Isn't the direction of Ib is from +V2 to GND in an NPN transistor? Here is one example in tutorials: http://www.zen22142.zen.co.uk/Design/cct/sw1.gif


I'm confused..



Answer



You didn't measure the base current, you measured the current through R3.


Even though the symbol doesn't show it, LTSpice is keeping track of which pin is 1 and which is 2, and defining the sign of current with some fixed convention relative to those pin numbers. Either current is defined as going in to pin 1, or into pin 2, though I don't know which one.


To get the current through R3 to have the same sign as the current in to the BJT base, you just need to turn the resistor around 180 degrees.


Edit: User W5VO made some images showing how the cursor shows the reference direction when you hover over the resistor:



enter image description here


And how it changes after you rotate the resistor by 180 degrees:


enter image description here


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...