Thursday, March 18, 2010


Aah, the transistor. Where would we be without it? For starters, I wouldn't be sitting on the couch writing this post. The computer would be a bit too big and expensive for that, what with all the vacuum tubes it would take to make it work. As it is there's far more processing power in my laptop than there was on the Apollo space capsule that put men on the moon, thanks to the transistor.

But what is a transistor, exactly? A transistor is a semiconductor that allows a low current to control a much higher current. (I'm not going to go into what exactly a transistor is, 'cause it's boring.)

I'm going to limit this post to basic bi-polar junction transistors, although the basics apply across many other types of transistors as well. Transistors can be used to amplify current, or be used as a switch. For the circuits I'll be building for my haunt the transistors will be primarily used as switches, so that's what I'll focus on here.

There are two types of bpj transistors - PNP & NPN. This refers to the polarity of the junctions in the transistors, and determines how they are connected and used.

Transistors have three connections - the base, emitter, and collector. In a NPN transistor, a small amount of current applied to the base allows a larger current to flow from the collector to the emitter and on to ground.

Power is connected to the load, and the negative connection of the load connects to the collector of the transistor. A small current applied to the base allows the current to flow from the collector through the emitter and on to ground, completing the circuit.

In the above diagram you'll notice a couple of resistors. The resistor between the base and the trigger source is vital to the longevity of the transistor. The connection between the base and the emitter has very low resistance, and when power is applied to the base the connection is close to a short circuit. This would cause what's called "thermal overrun" (a fancy way of saying the transistor would get really hot).

OK, great. So we need a resistor, but how do we know what resistor to use? Too much resistance and the transistor won't reach saturation and pass the full amount of current needed, too little resistance and too much current passes through the transistor and it burns up. Never fear, there's a way to figure it out, & all it takes is a little math (you know, the stuff we learned in school that we never thought we'd need to know...)

When you look at the specifications of a transistor, you'll see DC collector current and hFE. The DC collector current is the highest sustained current that the transistor can handle, and the hFE is the forward current gain (not sure why they call it hFE, but if they called it fcg we haunters might confuse it with a flying crank ghost.) To figure out what value resistor we need, we have to figure out how much current the base requires for the transistor to reach saturation. This is simply the DC collector current divided by the hFE. So for example, if we have a DC collector current of 5 amps and a hFE of 1000, the base current would be .005 amps, or 5 milliamps. To ensure saturation it's a good idea to increase this a bit, so we'll multiply the base current by 1.2 in our final calculation. To find our resistor value we go back to Ohm's law - V/I = R. Assuming we're dealing with a 12 volt circuit, our calculation would be 12/(5 / 1000 * 1.2) = 2000, or 2K ohms.

The other resistor in the circuit isn't critical, but can help if you have erratic switching. In the case of the NPN circuit the resistor is considered a pull-down resistor. It's job is to hold the base low when no trigger voltage is present. The value of this resistor isn't critical, but should be significantly higher than the base resistor. A good rule of thumb is to multiply the base resistor's value by 10 for the pull-down resistor's value.

A PNP transistor is similar to the NPN, but instead of applying current to the base to trigger current flow, you apply ground.

In this case power is applied to the emitter, and when the base is grounded current passes through to the collector and into the load.

The resistor calculations are the same, but in this case the second resistor's job is to hold the base high when the transistor isn't triggered (called a pull-up resistor in this case).

Transistors are very versatile - you'll be hearing about them a lot in the future. Unless of course you get sick of my ramblings and quit reading...

Sunday, March 7, 2010

Resistance is futile

OK, so we've covered some of the basic terms we'll run into in simple circuits. So now lets look at some of the components we'll use to actually build them.

Lets start with the lowly resistor. A resistor limits the current flow in a circuit (I know, we've already established that.)

More specifically, a resistor is a device that is added to a circuit to control and limit the flow of current. The resistance of a resistor is fixed and not affected by the flow of current or changes in voltage. (There are variable resistors, but they don't count.) (OK, they kinda count, but we're just talking about plain old resistors right now.)

For some strange reason, resistors aren't marked labeled with plain markings. That would be too easy. Instead, they're marked with a series of colored stripes. The colors denote the value and tolerance of the resistor.

Resistors also have a wattage rating that denotes the overall safe power rating of the resistor.

There are some really good resistor color code calculators online.