Maker Pro
Using a bipolar transistor to turn a load on and off

Using a bipolar transistor to turn a load on and off

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
(*steve*) submitted a new resource:

Using a bipolar transistor to turn a load on and off - For situations when your microcontroller (or whatever) can't do it on its own.

0 Introduction

This resource describes very simply how to use an NPN transistor to switch a load (for example a relay or a buzzer, or a motor) from a signal source (for example a microcontroller).​

1 The basics

You want to use a small current (from your microcontroller) to switch a larger current (for a motor). We will assume that the motor runs from the same power supply as your microcontroller (but it need...​

Read more about this resource...
 

KrisBlueNZ

Sadly passed away in 2015
That's excellent Steve. I have a few suggestions:

Suggest 2N3904 as well as BC548 - Americans seem to not know, or dislike, the BC series.

Mention relay coils and solenoids, as well as motors, as types of inductive loads.

Suggest removing the + and - markings in the diode picture - they don't really tell you anything useful and they can lead to confusion, and they're backwards in this case anyway!

In section 4.2, "What's that 0.8?", your comment under the transfer characteristic graph that "BBE (typo - should be VBE) doesn't hit 0.8V until 100 mA base current" is wrong - it's the collector current on the graph, not the base current. So 0.8 is not such a crazy number to use.

I think you should mention that you need to ensure that the driving source can comfortably supply the required base current. This mightn't be the case with low power devices or when the transistor is switching high-ish currents (you mentioned the 2N2222 switching up to 500 mA), especially if the transistor's current gain is not high. And to check the droop in output voltage under load.

Also you mentioned earlier that the driving voltage needs to be fairly high - I suggested 3.3V or more as being plenty in my resource - to ensure plenty of voltage across the base resistor.

You might perhaps want to mention that for quick turn-off, a base-emitter resistor helps.

That's an excellent resource Steve. It covers a much wider scope than mine. The subjects overlap but I don't think they would fit together very comfortably because of the different approaches.

If you think otherwise, please feel free to merge them together. Otherwise I guess they can remain as separate resources.
 
Nice work Steve.
Ok I am going to probably embarrass my self now. The magic number 3 is that multiplying the current? So the transistor could draw 900mA? With a gain of 100 isn't it 466.7R and not 4667R. Just can't work out how you did it.
Cheers
Adam
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
. Just can't work out how you did it.

You should be embarrassed! :D I clearly multiplied 4.2 by 100 and got 4200 instead of 420.

Seriously, thanks for pointing that out. I am going to hang my head in shame. I remember thinking at the time that the resistor value seemed quite large, but I (stupidly) didn't check my calculations.

I appreciate that you've done the sanity check.
 
No Probs, easy to make mistake. I do it all the time as you know. I'll have a look at the rest of the document in more detail. I don't expect there will be anymore :)
Adam
 
Does having the load from the collector have any advantage of having the load following from the emitter, if so what is the advantage and why does it occur?
 
Does having the load from the collector have any advantage of having the load following from the emitter, if so what is the advantage and why does it occur?

When the transistor is used as an emitter follower (remove base resistor) and the base voltage is the same as the collector voltage which is quite common for current amplification, ok you loose a diode drop of voltage which is usually acceptable. This configuration develops more power in the transistor, this is because it will have a higher voltage across it compared to the common emitter configuration that Steve shows. Steve circuit also allows you to switch current from a higher collector voltage like 5V switching a 12V load.
Adam
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
A load in the emitter is rarely used for switching because it is harder to saturate the transistor.

If the load has to be connected to ground then you might use a PNP transistor in common emitter configuration. In this case the emitter is connected to the load's positive supply rail.

Of course there are always exceptions and circumstances where you need to do something different.
 
A load in the emitter is rarely used for switching because it is harder to saturate the transistor.

If the load has to be connected to ground then you might use a PNP transistor in common emitter configuration. In this case the emitter is connected to the load's positive supply rail.

Of course there are always exceptions and circumstances where you need to do something different.

Yes indeed, you would need to increase the base voltage to saturate it, which could be quite considerable for high load currents.
Adam
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Mathematically, in a common emitter configuration VB needs to be around VBE for any current IC to allow Vload to get within VCE(sat) of VCC. This means a resistor between VCC and the base of the transistor can be chosen to allow the transistor to be saturated for a given IC.

In a common collector (emitter follower) circuit, VBE needs to be around VBE + Vload to allow Vload to get within VCE(sat) of VCC. Even with a simplification that VBE < VCE(sat), the voltage at the base will get very close to VCC. This makes it hard to select a resistor VB (which is arguably not required), but does require that the driving signal be at or as close as possible to VCC, and able to source current. This alone is difficult. However, when we realise that VBE > VCE(sat) in saturation, VB now has to exceed VCC, a task not possible unless the driving circuit is powered from a voltage higher than VCC. Once we do that, we then need a base resistor to limit current.

If VCC is the highest voltage available then using an NPN or a N Channel mosfet (anything "N") as a high side switch is not possible (or not efficient).

This is why you commonly see "N" devices (NPN transistors and N channel mosfets) as low side switches, and "P" type devices (PNP atransistors and P channel mosfets) as high side switches.

Because "N" devices (NPN, N-CH mosfets and IGBT's) are "better" than the "P" devices (all to do with mobility of electrons) then there are special drivers to allow N channel mosfets and IGBT's (which are only available as NPN/N-CH equivalent) to be used as a high side switch. In these drivers there is typically a switched capacitor or other type of voltage multiplier to generate a voltage rail above VCC (VDD for a mosfet) that can be used to drive the gate. Similar devices are not available for bipolar transistors because of the higher current required for the base electrode.
 
Top