Electronic – getting negative base current in LTSpice simulation

basebjtltspicenpntransistors

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

Best 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