# Using Bipolar Transistors As Switches

By Mike Martell N1HFX

While transistors have many uses, one of the less known uses by amateurs is the ability for bipolar transistors to turn things on and off. While there are limitations as to what we can switch on and off, transistor switches offer lower cost and substantial reliability over conventional mechanical relays. In this article, we will review the basic principles for transistor switches using common bipolar transistors. The most commonly used transistor switch is the PNP variety shown in Figure 1. The secret to making a transistor switch work properly is to get the transistor in a saturation state. For this to happen we need to know the maximum load current for the device to be turned on and the minimum HFE of the transistor. For example, if we have a load that requires 100MA of current and a transistor with a minimum HFE of 100, we can then calculate the minimum base current required to saturate the transistor as follows:

Minimum base current = 100 MA / 100 Minimum base current = 1 MA In actual practice, it is best to calculate about 30% more current than we will need to guarantee our transistor switch is always saturated. In this case, we will use 1.3 MA. We must also select our supply voltage, so for this example we will use 12 volts. We can now calculate resistor R1 in the circuit as follows: Maximum Current Required = 100MA Supply Voltage = 12 Volts

R1 = Supply Voltage / ( Maximum Current Required / Minimum HFE * 1.3 ) R1 = 12 / (.1 / 100 * 1.3) R1 = 9230.7 or 10K for nearest standard value. Resistor R2 is not essential to this circuit but is generally used for stability and to insure that the transistor switch is completely turned off. This resistor insures that the base of the transistor does not go slightly negative which would cause a very small amount of collector current to flow. The value of this resistor is not critical but a value about 10 times R1 is normally chosen. For this circuit we will calculate R2 to be 10 times R1 as follows: R2 = 10 * 10000 R2 = 100K To turn on our transistor switch all that is needed is to short resistor R1 to the negative ground.

Transistor switches are used for a wide variety of applications. The actual transistor used as a switch is not critical in these applications. The maximum design current must not be exceeded or the output voltage will be reduced. All that is needed is to know the minimum HFE and the power dissipation of the transistor.3 volts is lost through the collector to the emitter of the transistor.3 volts.1). However. If a power transistor is used to turn on a high current device. This is especially important when using a low current logic output from a CMOS IC. . It is good practice to always use a diode when turning on any inductive load. the transistor must be able to withstand 30 milliwatts (. about . it may be necessary to use another lower current transistor switch to drive a transistor switch used in a high current application. it does have a few drawbacks. It is essential to know the HFE or Beta of a transistor. Transistor switches are often used to take the low-level output from logic circuits to turn on or turn off a particular device. cooling fans and even relays. However. Many amateurs will notice that the circuit in Figure 1 is used as the PTT in many transmitter circuits.While PNP transistors are normally used for a negative ground configuration. This is to prevent the kickback voltage in the reverse polarity from destroying the transistor. many power transistors in TO-220 cases often have an HFE no greater than 25. We can calculate the power dissipation by multiplying the current by . so that we can have a large enough base current to achieve saturation. R1 must be shorted to the positive end of the supply to turn the switch on.3 times . Although the transistor is in saturation when turned on. in the NPN transistor. it is very important to use a 1N4001 diode reversed biased in parallel with the relay coil as in Figure 3. it is possible use a NPN transistor if a positive ground configuration is desired as indicated in Figure 2. While our transistor switch can easily replace many mechanical relays. The calculation of resistor values is identical to the PNP version. Virtually any general purpose NPN or PNP transistor can be used as a switch. We must also insure that the maximum power dissipation of the transistor is not exceeded. Transistor switches are commonly used to turn on transmitter circuits. when using a transistor to turn on a relay coil. While most all transistors in a TO-92 case will have HFE’s of at least 100. A short circuit of the output will overheat and destroy the transistor in many cases. In the case of 100 MA. This reverse voltage occurs momentarily when the normal current stops flowing through the coil. LED’s.

if the output voltage is 12 volts and the input voltage is 24 volts then we must drop 12 volts across the regulator. The primary advantage of a switching regulator is very high efficiency. when the existing linear types work just fine. These circuits are low in cost and offer ease of design for the radio amateur.While there are a few applications where our transistor switches may not be suitable. For most amateurs the switching regulator is still somewhat of a mystery. At output currents of 10 amps this translates into 120 watts (12 volts times 10 amps) of heat energy that the regulator must dissipate. As we see in the diagram. Switching Regulator Basics By Mike Martell N1HFX Although most power supplies used in amateur shacks are of the linear regulator type. For example. Is it any wonder why we have to use those massive heat sinks? As we can see this results in a mere 50% efficiency for the linear regulator and a lot of wasted power which is normally transformed into heat. a lot less heat and smaller size. The resistance of the regulator varies in accordance with the load resulting in a constant output voltage The primary filter capacitor is placed on the input to the regulator to help filter out the 60 cycle ripple. To understand how these black boxes work lets take a look at a traditional linear regulator at right. the linear regulator is really nothing more than a variable resistor. an increasing number of switching power supplies have become available to the amateur. The linear regulator does an excellent job but not without cost. it is usually a much more reliable and inexpensive alternative to using mechanical relays. . One might wonder why we even bother with these power supplies.

Now lets take a look at a very basic switching regulator at right. To understand the action of D1 and L1. This switch goes on and off at a fixed rate usually between 50Khz to 100Khz as set by the circuit. The time that the switch remains closed during each switch cycle is varied to maintain a constant output voltage. Notice that the primary filter capacitor is on the output of the regulator and not the input. A 1N4001 just won't switch fast enough in this circuit. The obvious result is smaller heat sinks. The previous diagram is really an over simplification of a switching regulator circuit. First. Inductor L1 must be a type of core that does not saturate under high currents. Diode D1 and Inductor L1 play a very specific role in this circuit and are found in almost every switching regulator. the switching regulator is really nothing more than just a simple switch. As we see can see. lets look at what happens when S1 is closed as indicated below: . Capacitor C1 is normally a low ESR (Equivalent Series Resistance) type. the switching regulator is much more efficient than the linear regulator achieving efficiencies as high as 80% to 95% in some circuits. As is apparent. diode D1 has to be a Schottky or other very fast switching diode. An actual switching regulator circuit more closely resembles the circuit below: As we see above the switching regulator appears to have a few more components than a linear regulator. less heat and smaller overall size of the power supply.

we are starting to see even more switching power supplies replacing traditionally linear only applications. begins to generate an electromagnetic field in its core. Because of the unique nature of switching regulators. along with shielding.As we see above. . very special design considerations are required. Notice that diode D1 is reversed biased and is essentially an open circuit at this point.) To meet this requirement. minimized lead lengths and all sorts of toroidal filters on leads going outside the case. Because of lowered component costs as well as a better understanding of switching regulator technology. L1. it is rich in harmonics way up into the HF and even the VHF/UHF region. The use of this inductor/diode combination gives us even more efficiency and augments the filtering of C1. Now lets take a look at what happens when S1 opens below: As we see in this diagram the electromagnetic field that was built up in L1 is now discharging and generating a current in the reverse polarity. many designers use a cooling fan and or a minimum load which switches out when no longer needed. This action is similar to the charging and discharging of capacitor C1. Without the minimum load. (This is why it is not a good idea to turn on a computer switching power supply without some type of load connected. recent switching regulator IC's address most of these design problems quite well. which is determined by the inductor value. Fortunately. As a result. D1 is now conducting and will continue until the field in L1 is diminished. Because the switching system operates in the 50 to 100 kHz region and has an almost square waveform. the regulator will generate excessive noise and harmonics and could even damage itself. Special filtering is required. It is no doubt that we will see fewer linear power supplies being used in the future. The switching regulator also has a minimum load requirement. which tends to oppose the rising current.

In this article we addressed basic switching regulator design concepts and it is hoped that amateurs will begin to look at switching regulators much more seriously when they decide to replace an old power supply. These IC's come in a variety of packages with 1. An additional . The use of coupling capacitors for input and output is required for this configuration. Op Amps have two inputs called the noninverting and the inverting designated by the plus and minus sign. Op Amps typically have voltage gains between 20. R2 actually limits the gain of the Op Amp by providing a form of negative feedback. In a future construction article. Op Amps are actually differential amplifiers because they amplify the difference between the inverting and the noninverting inputs. Because Op Amps have input impedances as high as several hundred thousand ohms or greater. Design Guidelines for Op Amp Audio Preamplifier Circuits By Mike Martell N1HFX Operational Amplifier Design Operational amplifiers are simple to use.000. Op Amps can be easily configured to a single power supply by the use of a resistor network. inexpensive and offer a very large amount of gain. Resistors R3 and R4 can be any value from 1K to 100K but in all cases they should be equal. Setting The Gain of The Op Amp The gain of this circuit is determined by resistors R1 and R2 and is calculated by the following equation: Voltage Gain = R2 / R1 R1 can be any value from 470 to 10K.1uf capacitor has been added to the non-inverting input to reduce noise caused by this configuration. In no case . resistors R3 and R4 place a voltage of 1/2 of the supply voltage across the non-inverting input which causes the output voltage to also be 1/2 of the supply voltage forming a sort of bias voltage. R2 can be any value from 10K to 1M. 2 or 4 complete Op Amps in a single IC.000 to 200. Single Power Supply Operation While intended for dual power supply operation. we will review an actual switching regulator circuit. Op amps will normally operate from any supply voltage in the 6 to 15 volt range. any input power lost through R1 is insignificant. In the above example. respectively.

000. The voltage gain is essentially independent of the supply voltage. Preventing Oscillations Because of the extremely high gain afforded by operational amplifiers. . precautions are often needed when very high gains (greater than 100) are used.should the voltage gain set by R2 / R1 be greater than 1. The use of 1 to 10 ohm resistor and a 100uf capacitor connected to the Vcc terminal of the Op Amp will isolate the power source and prevent oscillations.

Design Guidelines for JFET Audio Preamplifier Circuits By Mike Martell N1HFX The Junction Field Effect Transistor (JFET) offers very high input impedance along with very low noise figures. When the gate voltage goes positive. Resistor R3 does almost nothing for the actual biasing voltages of the circuit. Drain Characteristics Even though no voltage appears at the gate. It is very suitable for extremely low level audio applications as in audio preamplifiers. current can flow through the drain and source in any direction equally. power gain is almost infinite. Unlike bipolar transistors. the gate is considered an open circuit and draws no power from the source. Transconductance The ability of a JFET to amplify is described as trans-conductance and is merely the change in drain current divided by the change in gate voltage. The other important characteristic is the absolute maximum drain current. Although voltage gain appears low in a JFET. drain current will increase until the minimum drain to source resistance is obtained and is indicated below: Minimum Rds(on) or On State Resistance The above value can be determined by reading specification sheets for the selected transistor.22ma .5mmhos to 7. Listed below are absolute maximum drain currents for some common N-channel transistors: • • MPF102 . In fact. This zero gate voltage current through the drain to the source is how the bias is set in the JFET. Often the drain and source can be reversed in a circuit with almost no effect on circuit operation.20ma 2N3819 . The JFET is more expensive than conventional bipolar transistors but offers superior overall performance. It is indicated as Mhos or Siemens and is typically 2. merely sets the input impedance and insures zero volts appears across the gate with no signal. Resistor R3. it is safe to assume it is zero. In cases where it is not known. a substantial amount of current will flow from the drain to the source. which is listed in the above diagram. the JFET does not actually turn off until the gate goes several volts negative. Because of the high input impedance.5mmhos for the MPF102 transistor.

005) ) / .1uf capacitor was used for input coupling and a 4. We will allow no more than 5 ma of drain current under any circumstances. never use more than 75% of the maximum drain current as specified by the manufacturer.600 = 1800 ohms To prevent oscillations a 10 ohm resistor and a 100uf capacitor were added to isolate the circuit from the power supply.7uf capacitor which bypasses R2 is used to obtain the maximum amount of gain the transistor will deliver. Vcc = 12 Minimum Rds(on) = 0 Ids = 5 ma (Vcc . Slightly larger or smaller capacitor values will also give acceptable results. we will use 1 Meg for a very high impedance across the gate. The optional 4. JFET Design Example 1 For the first design example. We will make the following assumptions: . A . We will assume the Minimum Rds(on) to be zero.R2 R1 = 2400 . we must select the desired voltage drop across this resistor. it is normally set between 20 to 30% of Vcc. it is highly recommended to prevent the absolute maximum current from being exceeded under any conditions. The addition of this capacitor may introduce a small amount of unwanted white noise and should only be used when an absolutely quiet preamplifier is not required.• 2N4416 . JFET Design Example 2 In the second design example. The gate resistor is normally anywhere from 1 Meg to 100K. The higher values allow the JFET to amplify very weak signals but require measures to prevent oscillations. The lower values enhance stability but tend to decrease gain. For this example we will set R2 to 25% of the supply voltage (minus any voltage dropped across the drain and source) as follows: R2 = .(Minimum Rds(on) * Ids)) / Ids = Total Resistance of R1 and R2 (12 . Because we will only allow 5 ma of current through the drain to source. For resistor R3. we will calculate the total resistance for resistors R1 and R2.25 * Total Resistance of R1 and R2 R2 = .25 * 2400 = 600 ohms (nearest standard value is 560 ohms) R2 = 560 ohms R1 can now be easily calculated by subtracting R2 from the total resistance as follows: R1 = Total Resistance .(0 * . we will use an MPF102 transistor to add an additional stage of amplification to our circuit. In design calculations. the gate resistor.15ma When designing a JFET circuit.005 = 2400 ohms To calculate R2. we will use an MPF102 transistor with a Vcc of 12 volts. Sometimes the value of this resistor needs to be adjusted for impedance matching depending on the type of signal source involved.7uf capacitor was used for output coupling.

If you decide to use a 2N3819 be aware that the pin-out is different than other JFET transistors .25 * 1714 = 429 ohms (use 470) R2 = 470 R1 = Total Resistance .R2 R1 = 1714 . A 10K level control was added to complete the preamplifier circuit.7uf capacitor was used for input coupling and a 10uf capacitor was used for output coupling. Slightly larger or smaller capacitor values will also give acceptable results.007 = 1714 ohms We will assume R2 to have 25% of the supply voltage.007)) / .(Minimum Rds(on) * Ids)) / Ids = Total resistance of R1 and R2 (12 .429 = 1285 ohms (use 1200) R1 = 1200 ohms A 4. By putting our two circuits together we now have a two transistor JFET audio preamplifier with excellent gain and very low distortion. The optional 10uf capacitor which bypasses R2 is used to obtain the maximum amount of gain the transistor will deliver.(0 * .R3 = 1Meg Vcc = 12 Minimum Rds(on) = 0 Ids = 7ma (Vcc . R2 = .25 * Total of R1 and R2 R2 = .

it is necessary to acquaint ourselves with some very important design equations. it is safe to assume a value of 50 for modern transistors. The formula for hfe refers to the ratio of collector current (Ic) to base current (Ib).Design Guidelines for Bipolar Transistor Audio Preamplifier Circuits By Mike Martell N1HFX Before attempting to design a transistor amplifier circuit. For most modern transistors it is typically in the 50 to 100 range. The first few equations are derived from ohms law and you should already be familiar with them. The most commonly used design equations are listed to the right to help us with our effort. The bottom two equations deal with transistor gain and are equally important to our work. To insure a circuit will always work properly. .

Resistor R4 can now be calculated as follows: R4 = 1.7 volts.9ma) and the base current (.0009 = 1889 If the voltage drop across R4 is 1.005 / 50 = . For this circuit we will use 1 volt which is about 8 percent of Vcc.7 volts happens to be the voltage drop across resistor R4.0001) = 196 Because the voltage across the base to emitter of a silicon transistor is always .9 ma. We need to determine how much voltage is to appear across the emitter resistor. R2.005 + . the voltage from the base to ground is . before we calculate its value.3 volts. R3 can now be calculated as follows: R3 = 10. The current through R3 is the total of the current through R4 (. This is necessary to insure that the amplifier remains in the linear operating range of the transistor. as follows: R1 = 1/2Vcc / . A good value is anywhere between 5 to 10 percent of Vcc. resistor R4 should have a current of about 5 to 10 times the base current.7 volts. Resistor R2 is now calculated as follows: R2 = 1 / (Ic + Ib) R2 = 1 / (.005 = 1200 Notice above that we assumed 1/2 of the supply voltage to be dropped across R1.3 / .7 for a total of 10.7 volts then the voltage drop across R3 must be 12 .At this time.1ma) for a total of 1 ma. we will assume 9 times the base current for a total of . Using the one of the hfe formulas. This 1.7 volts / . we will select the nearest standard values as indicated below: . we can now begin our design. the collector load resistor.1 ma Lets calculate R1.1.001 = 10300 Now that we have calculated all our resistor values. In order to provide a stiff base voltage. For this design example we will choose the following: • • • • Vcc = 12 V Ic = 5 ma hfe = 50 Q1 = 2N3904 With all those big decisions made. For this example. we need to make some decisions about our audio preamplifier circuit. we will now calculate the base current as follows: Ib = Ic / hfe Ib = .7 plus the 1 volt drop across R2 for a total of 1.005 R1 = 6 / .

This capacitor increases the current gain to the hfe of the particular transistor used.7uF capacitors were use for input and output coupling and slightly larger or small values could be used satisfactorily.005 Amps = . This emitter bypass capacitor should only be used when the maximum amount of gain is desired without regard to a predictable level of gain.0002) = 10.0018 R4 = (1 + .01 + .010 = 600 Ib = . Although our preceding circuit does have substantial gain.001 Amps = .1 . One common error that designers make is that they forget to calculate the actual power that each resistor will dissipate in a circuit. Failure to perform these calculations can sometimes result in a resistor exceeding its maximum power level and cause premature resistor failure.0051 Amps = .00153 Watts The preceding calculations indicate that 1/4 watt.0018 = 944 R3 = (12 .7uf capacitor across the emitter resistor R2.0103 Watts R4 = 1.0051 Watts R3 = 10.8K The circuit at right is the result of our design efforts.3 / .01/50 = . This is particularly important for circuits which have collector currents exceeding 40 milliamps. Notice the optional 4.. 5% resistors are adequate for this design. power ratings for each of our resistors in this circuit can be easily calculated as follows: R1 = 6 Volts * . Before we can begin our design we must make those all important design decisions again as indicated below: Q1 = 2N3904 Vcc = 12V Ic = 10ma hfe = 50 Vr2 = 1V (8% of Vcc) Ir4 = 9 times Ib Now were ready to calculate our resistor values as follows: R1 = 6/. Fortunately.0009 Amps = . lets design a second stage to the previous circuit to further increase gain.0002) = 98 Ir4 = 9 * .03 Watts R2 = 1 Volt * .7)/(.0018 + . It is always better to assume an hfe that is at least 20% less than that specified by the manufacturer.R1 = 1.7)/.0002 = . Remember.7 Volts * .3 Volts * . hfe will vary from transistor to transistor even though they have the same part number and even if they were produced by the same manufacturer.002 = 5150 .2K R2 = 180 R3 = 10K R4 = 1. 4.0002 R2 = 1/(Ic + Ib) = 1/(.

Slightly larger or small capacitor values could also be used satisfactorily. Incidentally. lets summarize what we've learned below: Vcc = Supply Voltage hfe Ic = Absolute minimum current gain for the selected transistor = Selected collector current . Perhaps a good exercise for the designer is to recalculate all of the above resistor values using a Vcc of 9 volts which will allow the use of a 9 volt battery. the emitter bypass capacitor should only be used when the maximum amount of gain is desired without regard to a predictable level of gain. we can substitute a 2N2222A. There are many general purpose NPN transistors that can be easily used in this circuit with good results. Now lets add the two transistor stages together to get the resulting circuit below:.1K R4 = 1K The circuit at right is the result of our design efforts. 10uF capacitors were use for output coupling and optional emitter bypass. 2N4401 or any general purpose NPN with a minimum hfe of 50 for the 2N3904 transistor used in this design example. Because of the large amount of gain obtained with this circuit. Now that we got our hands wet designing these circuits. As always. we added a 10K variable resistor at the output as a gain control. This circuit will provide good results for almost any microphone pre-amplifier application.We will select standard resistor values as follows: R1 = 560 R2 = 100 R3 = 5.

Vr2 = .Ib = Ic / hfe (base current) Vr1 Vr2 Vr3 Vr4 = 1/2 Vcc = 5 to 10% of Vcc = Vcc ..Vr2) / (Ir4 + Ib) = (.7 .7 + Vr2 Ir4 = 5 to 10 times Ib R1 R2 R3 R4 = 1/2Vcc / Ic = Vr2 / (Ic + Ib) = (Vcc .7 .7 + Vr2) / Ir4 ..

Sign up to vote on this title