Transistor Confusion?

For a BJT transistor to pass current, there should be approximately 0.7V between B and E (called Vbe).

In your circuit (with collector to +12v):Now if your base is at 5v (Vb), then in order to pass current, the transistors emitter will be 0.7v below that, so Vb - 0.7V = Ve.

That means at the emitter you will have 5-0.7 = 4.3V, as long as the collector voltage is larger or equal to the base voltage. If it is less, the transistor is turned off.

If you have it the other way around (emitter to gnd):
As the emitter is to GND, the Ve = 0v. This means that in order for the transistor to conduct, Vb = Ve+0.7 = 0 + 0.7 = 0.7V. That means you need to have 0.7v at Vb. Not 5v, not 12v, but 0.7V.

Due to the way a BJT works (it is a CURRENT amplifier), then if you let a certain amount of current flow through the base, you let a larger (but proportional) amount of current to flow from collector to emitter. As such we first work out how much current needs to flow through the collector. This depends on what load you are driving. Say 100mA.
The transistor has a gain called Beta (aka HFE), which is Ic/Ib (collector current/base current). This can be found in the datasheet, but lets say for our case it is B=100. Than means we then need a base current of Ib = Ic/B = 100mA/100 = 1mA.

We are using a 5v logic, which means we need to use a resistor to drop the 5v down to the 0.7v required across the gate, so:
Vr = 5v - Vb = 5-0.7 = 4.3V.
We also know we need a current through the gate, and hence through the resistor, of 1mA, so:
R = V/I = 4.3/0.001 = 4.3kOhm.

If you go down to your local shop, you are unlikely to find a 4.3k resistor. Furthermore, it is unlikely that the current in the load will be exactly constant. Fortunately, the transistor can happily run whereby the current flowing from collector to emitter is no longer being limited by the base, but by the load.

Say we use a 3.9k resistor. Working backwards, we get Ib = V/R = 4.3/3900 = 1.1mA. Notice that we have increased the current through the base of the transistor slightly? What does that mean for the load. Well, Ic = Ib * B = 1.1mA * 100 = 110mA. But wait I hear you cry, the load only draws 100mA... well, the transistor can conduct 110mA, but it doesn't have to, thats the wonder of a semiconductor. As long as the 'allowed' current is greater or equal to the 'required' current, all is well.

If for example we go the other way and choose a 4.7k resistor, we get Ib = V/R = 4.3/4700 = 0.91mA. This means we have Ic = Ib*B = 0.91mA * 100 = 91mA. Now we do have a problem. The load needs 100mA, but the transistor can only conduct 91mA. The transistor conducts the 91mA and no more by adjusting the voltage between collector and emitter.

One thing I haven't mentioned is if you put a logic 0 on the transistor. Well you would have 0v on the base, which means Vbe = 0, which means no current can flow - it is turned off :smiley:

So, In summary:
In your first scenario, you have limited the voltage of the load to 4.3v because of the 0.7v Vbe requirement. This is not what you want as all that will happen is the transistor will likely get hot as it dissipates more power than the load (what a waste). Say if your load was 100mA, the transistor would drop 12-4.3 = 7.7V, and thus dissipate 7.7*100mA = 0.77W. This is a lot. If you tried for 2A, you would dissipate 15.4W which would almost certainly blow it up.

In the second scenario, you now have proper control over the load. The load can dissipate almost 12v depending on the transistors resistance. You have an upper limit on current flow which is controlled by your base resistor which helps protect both load and transistor.