4

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

user16307
  • 11,802
  • 51
  • 173
  • 312
  • 2
    What is the current direction when you place a probe? – Eugene Sh. Dec 14 '15 at 17:24
  • the current direction arrow points +V2 – user16307 Dec 14 '15 at 17:26
  • 2
    Run the sim and place the probe close to the transistor's base and you'll see a clamp-on ammeter cursor. Left-click it and you'll see the current going into the base, not out of R3. Alternatively, hit ALT and at the same time move the probe to the wire between R3 and Q1 base. You'll see the clamp-on ammeter cursor; click it and you'll see the current into Q1 base. – EM Fields Dec 14 '15 at 19:54
  • @EMFields I think the trick is when you hold the ALT key it always shows the real current direction? Thanks – user16307 Dec 14 '15 at 20:09
  • 2
    Yup. Another trick with ALT is that if you hold it and move the cursor over a component, you'll see a thermometer, and if you left-click it it'll you'll see the power that component is dissipating. – EM Fields Dec 14 '15 at 20:19
  • great! at least I dont need to bother anymore just hold ALT and see where current flows. – user16307 Dec 14 '15 at 20:20
  • @user16307 There is no "real direction" of current. Much like solving it on paper, where you choose arbitrary current directions and then solve for the sign, LTspice has its directions (for currents in wires) displayed in a grid, that goes from top left to bottom right, rightwards and downwards. The current through components that have two pins is chosen to go inside the first pin and outside the second. If you reverse the resistor (F7, or F8, then Ctrl+R twice), you'll see that the current goes into the base. For components with more than two pins, the direction is towards the pin (going in). – a concerned citizen Sep 03 '16 at 12:40

1 Answers1

15

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

The Photon
  • 126,425
  • 3
  • 159
  • 304
  • This saved my life! LTSPICE! If you are going to keep track of pins...at least show them near the symbol....lol – Dumbo Aug 22 '17 at 18:28