Sunday, July 24, 2016

Do you have a bad transistor (BJT)?

It is common to build a circuit, power it up and -- ouch nothing works. Has it happened to you? It has certainly happened to me. I tested and found 4 BC547s in my stash today to be damaged. That's why this post. After this post you and I do not need to be in that situation. Lets test the transistor. Right now.

The prerequisite of any testing is: knowing what to expect; at least in the ball parks. So let's begin.

Transistors are devices that are called semiconductors. There is a reason they are called that way. Because when not connected to anything they are non-conductors of electricity (to a large extent).

First step to using or testing any transistor is to know its pins. So make sure you have identified the base, collector and emitter correctly. Check and double check before connecting anything to your transistor.

Second step is to know whether it is a PNP or NPN.

Now we are ready to begin.

If you measure the resistance offered by the collector-emitter of any transistor you are going to get a very large value. So large that your meter cannot measure it. It is as good as no connection at all. Remember - semiconductor is a non conductor when no current is applied to it base. So touching the leads of your multimeter to the emitter and collector should read - yes nothing. Thats a good sign. If you are getting some reading on the meter at this point there is a very good chance you have a very dead transistor.

Next measure the resistance between the base and emitter. And then again base and collector. Now the transistor is supposed to behave like a high resistance when touching the positive lead to the base in case of a n-P(ositive)-n [or negative lead to the base of a p-N(egative)-p transistor]. The actual value depends on the characteristics of the specific transistor but is in the range of more than 5 Mega Ohms typically. If your transistor reads in the order of Kilo Ohms then check the data sheet and throw away the transistor (or you can do the reverse as well). So if your meter is reading 5-10 MOhm when positive lead is connected to base of an NPN transistor towards both emitter or collector - It is good! (Negative lead to base for PNP of course)

During that above step you will notice that if you touch the positive lead to the pNp (that is the reverse orientation) the resistance between base and emitter or collector is again very high (meter cannot measure as good as an open connection) - That's also good. If your transistor conducts from base to emitter/collector no matter what the polarity is - again toss it in the bin.

There you have it - complete procedure to understand what to expect of transistors when working / testing them

Saturday, July 23, 2016

Simple NPN Switch

The transistor based switch is probably the "hello world" of electronics. It works based based a few simple "known" facts.

1. Most transistors have a very high impedance between collector and emitter when connected to nothing (except your multimeter of course, which is also a very high impedance load when measuring resistance

2. Most transistors will bring the high impedance between C-E when a small (~0.6 V relative to emitter) is applied to its base

The circuit below was built and tested by me. It was drawn in fritzing

Choosing the values of components
Internet tells me that the current through an LED is 20mA. This may have been true 30 years ago, but today any ordinary LED will light up nice and bright by the time it has about 5mA flowing through it. The typical VCE of this transistor is about 0.2 volts and the drop across the leads of the LED is about 1.2 volts. So,

IC = (12 - (0.2 + 1.2)) / 2.2*1000
    = 0.0048 Amps or just 5mA

And I tested this by removing the transistor from the circuit (yes that offsets the 0.2 V C-E drop). Led shines bright no problem

Myth: Typical LED current is 20mA - Busted, it is only 5mA could be less


Now let us focus on the left hand side.

We want a nice 0 (or near zero) to 1 volt swing on the wiper of our pot. That means we want 1 volt or less drop across our pot (1K). That gives us a current of
1V/1000Ohm = 1mA. The remaining 11 volts must drop across our R2. Therefore

R2 = 11v/1mA = 11kOhm. Hard to find, so used 10k. But let us recalculate that current now

which is = 12V / 10k Ohm + 1 kOhm = 0.00109 Amp
Thus making the drop across the pot to be 1.09V. Not too bad. We can still resolve fine voltages across its wiper.

Connecting a multimeter in the base-emitter we see that the LED starts to glow real faint by the time we have about 0.45 volts. By the time we have about 0.6 volts the LED is fully ON and by going any further has no effect.

The total current drawn by the circuit it about 6 mA (0.0048 + 0.00109) which is confirmed by the multimeter.