Home > Articles > Programming > Games

This chapter is from the book

3.9 Transistor Basics

In Chapter 1 we discussed some basics of the semiconductor physics involved with the bipolar junction transistor (BJT), so we aren’t going to discuss that again. Instead we are going to see how they are used practically, using a very simple (yet accurate) model. In general transistors are used for two things: switching and amplification. Switching is the more pertinent application in our case; amplification is a secondary concern. However we will still want to understand the how use transistors as amplifiers.

Referring to Figure 3.61, there are two types of transistors NPN and PNP: They look identical physically, but internally they are different inasmuch as the doping of the semiconductor material. In either case, the figure shows the symbols for both NPN and PNP transistors and their most common package (for through hole work), the TO92 package.

Figure 3.61

Figure 3.61 NPN and PNP transistors.

The only difference between NPN and PNP as far as their schematic symbols go is the direction of the arrow on the emitter lead. For NPN the emitter arrow points away from the base or body of the transistor; for PNP the emitter arrow points toward the base or body of the transistor.

That’s all fine and dandy, but what does a transistor do? It basically allows you to control a secondary circuit with a small current or voltage in another primary circuit. For example, we can switch on a large amount of current with a small current, or we can use transistor to create digital gates, etc. The point is that the ability to turn on/off another circuit, thereby mimicking a mechanical relay, is very powerful, so transistors in one configuration are devices that allow us to control current in another circuit in a digital on/off manner. Additionally, transistors can be used as amplifiers. With that in mind, we can model a transistor as a current controlled switch or resistor with the following properties.

3.9.1 Transistor Properties and Rules

The rules we are going to derive are for the NPN transistor; for the PNP all polarities are simply inverted, but the operation is the same other than that. Please refer to Figure 3.62 for this discussion. Here are the rules:

Figure 3.62

Figure 3.62 Transistor analysis model.

  • Rule 1: The collector voltage must always be greater than the emitter by approximately 0.2V.
  • Rule 2: The base-emitter and base-collector circuits in a transistor act like diodes. The base-emitter diode is forward biased and conducting when the transistor is operating. The base-collector diode is reverse-biased and not conducting. This should seem like a paradox, and it is. Since internally transistors are not just diodes, we are doing a little hand waving here, so don’t feel uneasy if you look at the figure and see current flowing through a reverse biased diode: Remember there is no diode there. Using a couple diodes to help you understand parts of the transistor operation is okay—but in reality transistors do not act like diodes!
  • Rule 3: Transistors all have maximum current and voltage ratings. Some of the values of importance are IB (base current), IC (collector current), IE (emitter current), not shown here yet. Also there are the voltages VBE (base-emitter), VCE (collector-emitter), and so forth.
  • Rule 4: Now comes the fun part: So as long as the collector voltage is greater than the emitter voltage and we don’t exceed any of the voltage maximums, the transistor "action" will occur. This action describes the relationship between the currents in the transistor. This relationship is

Equation 3.4: Transistor base/collector current relationship.

  • IC = hFE*IB = β*IB

hFE and or β (beta) is called the current gain, beta, or just plain gain of the transistor, and is a measure of the current amplification from the base current to the collector current. For common transistors such as the 2N3904/3906, the gain is anywhere from 50–250. A reasonable average gain to count on is 100 minimum.

So the gain formula tells us that a small amount of base current causes a large amount of collector current. This is the key to the transistor, its current amplification ability. Also, since the base-emitter leg of the transistor is very similar to a diode, we can even model the diode drop properly; in other words when you apply a voltage to the base, the base-emitter diode will drop about 0.6–0.7V, no matter what. Or in other words, you cannot ever apply a voltage across the base-emitter junction greater than this or you will destroy the transistor. Therefore, we can write this modeling equation:

  • VB = VE + VBE (approximately 0.6–0.7V)

Most people just use 0.6V and be done with it, resulting in

Equation 3.5: Transistor base-emitter voltage relationship.

  • VB = VE + 0.6V

And of course, all this is reversed for PNP, but luckily for us in digital electronics +5V= "1", +0V = "0", and a positive voltage happens to turn on a NPN transistor, so you will tend to use NPN transistors only in your designs! Lastly, try not to think of the base-collector as a real diode; it only has some of the properties as a diode.

3.9.1 Transistor Switching

As a first example, let’s see how the transistor works as a simple switch. Figure 3.63 depicts a NPN transistor with a 1K base resistor controlled by a switch connected to the +5 rail. In the collector circuit there is a load resistor RL (this could be a light, device, whatever). Finally the emitter is connected to ground.

Figure 3.63

Figure 3.63 Transistor switching analysis circuit.

3.9.1.1 Switch Off—Transistor Off

With the switch off, there is no base current. Since there is no base current, there is no collector current, since IC = hFE*IB and IB=0. Due to this, the load is not driven.

3.9.1.2 Switch On—Transistor On

When we flip the switch on, the transistor starts to conduct; it does this since there is a current path from the base to the emitter through R1. The base-emitter junction drop increases to about 0.6V, so the base ends up at 0.6V. That means that the voltage drop over R1 must be 5.0V – 0.6V = 4.4V, therefore the current through R1 and consequently into the base must be:

  • IB = 4.4V/1K = 4.4mA

Now, here comes the fun part: Referring back to our modeling equation of the current gain, and assuming that the transistor has an average beta of 100, we know that

  • IC = 100*IB = 100*4.4mA = 440mA

Is this right? Yes, but it’s not good; remember the beta may vary wildly from one transistor to another, but if you design assuming that beta can range from 50–250 then you would be covered. And in a switch like this, that would be easy. In any case, continuing the analysis, we see that the collector current is 440mA—that’s a lot of current, but is this possible? This depends on the load. If the load was 10 ohms then the voltage across the load would be

  • Vload = 440mA * 10Ω = 4.4V

Therefore, the voltage at the collector itself VC is still above the emitter by at least .2V, so we are okay. But let’s up the load to 100 ohms and see what happens. At 100 ohms, the voltage drop would be

  • Vload = 440mA * 100Ω = 44V

Which is actually funny and makes no sense since the supply is only 5V. However, you would be amazed at how many people would leave this as an answer on a test. Anyway, something’s got to give. And that something is the current, so we assume that the transistor will only allow enough current such that the voltage VC is 0.2V greater than the emitter voltage VE (which is at ground). Or in other words, VC = 0.2V; therefore, the voltage drop over our 100 ohm load will be

  • Vload = 5V – 0.2V = 4.8V

and the current through the 100 ohm load is

  • Iload = IC = 4.8V / 100Ω = 48mA

Therefore, the circuit can only supply 48mA to a load of 100 ohms, but can supply 440mA to a load of 10 ohms.

This is basically how transistors are used as switches. You control the base with a voltage or current to turn the "switch" on or off, and then based on the collector circuit design, it serves whatever purpose you need.

3.9.2 Emitter Followers and Impedance Reflection

Another interesting use for transistors is what’s called "emitter followers"; that is, using a transistor to "pass" a voltage to another stage untouched, with the added benefit that the transistor’s base has huge impedance, which is good for the input signal. Let’s take a look at this property by referring to Figure 3.64. We know that the base voltage VB is always 0.6V or so higher than the emitter voltage VE, so let’s just turn this equation around like this:

  • VE = VB – 0.6V
Figure 3.64

Figure 3.64 Circuit to demonstrate impedance reflection.

And presto, you have a voltage follower. That is, whatever voltage you apply to the base, the emitter follows it with a slight translation (decrease) of 0.6V. However, there are limits to this of course. You must make sure that VBE is always 0.6V; if it’s less, the transistor will stop conduction, and of course you must have the emitter resistor there to create a voltage drop. The reason why is if you put 3V on the base, and the emitter was tied directly to ground, then you would damage the transistor, since we must maintain the property that the base-emitter junction never has more than approximately 0.6V across it.

All right, the voltage following capability is interesting, but is there anything else we can get from this configuration? The answer is impedance reflection, or in other words, when you are sending a signal from one part of the circuit to another, you don’t want to load your output: You want the input to the next stage to have infinite impedance if possible (unless you are transferring power, then you want to match the impedance). This is hard to do when the load can change, but with a transistor you can "reflect" the load through the transistor’s gain and multiply the apparent impedance by the gain factor. The analysis follows.

First, we need to slightly modify our current model and define IE:

  • IE = IB + IC

In most cases, IE = IC since IB is so small, but in this case, let’s use a more exact model. Plugging in the fact that IC = hFE*IB, we get:

  • IE = IB + hFE*IB = IB*(1 + hFE)

Therefore,

  • IB = IE / (1 + hFE)

And we know that VE = VB – 0.6, but if are looking at the differences in VB and VE then we can write

  • ΔVE = ΔVB

Computing the current thru R, we get

  • ΔIE = (ΔVE / R) = (ΔVB / R)

And combining the results, we get:

  • ΔIB = ΔVB / [R*(1 + hFE)]

Paying close attention to this result, we see that the load impedance R seen from the base is not just R, but R multiplied by (1+hFE). Or in other words, if there was a 1K load R and the gain of the transistor was 100 nominal then using an emitter follower "reflects" the impedance and multiplies it by the gain, resulting in 100*1K = 100K of equivalent input impedance. That is very useful; we just unloaded the output by a factor of 100 in comparison to if we were just driving the 1K directly.

3.9.3 Amplification

The transistor modeling for amplification is a little more complex than for a switch, so we don’t need to cover it. However, I do want to leave you with a general circuit for amplification of small signals with AC coupling and some discussion of its operation. Figure 3.65 is a nice single stage transistor amplifier with high pass filters on the input and output and "voltage divider" biasing.

Remember, the transistor always has the ability to amplify current, but if you want to amplify a voltage such as an audio signal then you must first realize that the audio signal is very small, and it’s probably AC. So step one is to "AC couple" the signal into the amplifier, so you don’t amplify the DC component; this is accomplished at C1. Only AC will pass through C1, so the small signal will get through, but whatever DC component will get blocked. Next we see that the base of the transistor is biased such that the resistors R1 and R2 create a voltage divider network; we would want to set the voltage of the base, which is somewhere in the middle of the voltage supply, so that we can swing the input as large as possible and with symmetry. The actual voltage on VB will of course be

  • VB = VCC * R2/ (R1+R2)
Figure 3.65

Figure 3.65 Single stage transistor amplifier.

Additionally, we should note that the C1 and the parallel combination of R1||R2 create a high pass filter.

Okay, next we need an output load resistor to drop the output signal on; this is RL. Attached to RL’s top node is another capacitor C2, which once again AC couples the signal out of the amplifier without any DC component. And of course C2 and RL create yet another high pass filter.

Now, to actually select the values of the resistors and capacitors we have to decide on a few things, but the interesting part will be that the final gain of the circuit will have nothing to do with the gain hFE! And that’s what we want—gain invariance: We want the gain to be a function of the component values which we can control, not a random process on the transistor. In any event, let’s set some values. If VCC is 5V and we want to maximize output swing then we assume that VE is at 2.5V; given that we know that RL has a 2.5V drop over it, but we need to decide on the quiescent operating point. That is, how much current flows with no input. A good range might be from 100μA to 10mA, so let’s pick something in the middle with easy math: 1.0mA. Therefore, if there is 1.0mA flowing through RL with a voltage drop of 2.5V then RL must be

  • RL = 2.5V / 1.0mA = 2.5K ohm

Next is to figure out what values for the voltage divider we need. The base will be about 0.6V above the emitter voltage or VB = VE+0.6 = 2.5+0.6 = 3.1V; therefore we need to select voltage divider resistors that divide the voltage 1.9V over R1 and 3.1V over R2, or a ratio of 1:1.63. There are of course an infinite number of pairs that will do this, so we need some more information to pin the values down better. One is the impedance reflection: The rule of thumb is to make sure that the input impedance voltage divider network is about 1/10 that of the reflected impedance seen at the base, which is calculated as (hFE*2.5K) = 250K, and 1/10th of that is 25K. So we know the parallel combination of R1 and R2 should be in that range, so we select them as follows (rounding off to common values):

  • R1 = 50K
  • R2 = 50K*1.63 = 82K

Perfect. Next, we need to decide on the AC coupling capacitors C1 and C2; this means we need to think about what it is we are amplifying. Since 99% of the population commits 1,000 felonies a year stealing MP3s, it looks like people are willing to die and go to jail to listen to music! So let’s make audio frequencies from 20–20KHz our target frequencies. Since the assemblies (C1, R1, R2) and (C2, RL) both create high pass filters, we simply need to select C1 and C2 to pass anything greater than 20Hz. If you recall from our discussion of high pass filters, the 3dB point for a high pass filter—that is, the point at which the filter kicks in and passes 70% or more of the input—is

  • f3dB = 1/2**R*C

Since the parallel combination of R1||R2 = 31K ohm, we can find C1 for the input filter as follows:

  • 1Hz = 1/2**31K*C1

C1 = 5.13μF, so we might use a 10μF, which would cause the f3dB point to be even sooner, which is fine. Next, let’s calculate C2 with RL=2.5K:

  • 1Hz = 1/2**2.5K*C2

C2=63.66μF, so a nice 100μF capacitor would work fine. This concludes our analog coverage of transistors. You have seen how to use them as switches, impedance reflectors, and amplifiers. Now, we are going to briefly delve into some very crude transistor models for digital logic for fun before we see real ICs in the upcoming chapters.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020