You are on page 1of 97

www.Hobby-Electronics.

info Electronics Course

Signature Not Verified


Digitally signed by hobby-electronics.info Date: 2010.01.08 15:52:01 CET Reason: Author Location: www.Hobby-Electronics.info

www.Hobby-Electronics.info Electronics Course

Table of Contents
1. DC and AC Voltages .............................................................................................................. 1 DC Voltage Sources ........................................................................................................... 1 AC Voltage Sources ........................................................................................................... 2 Measuring voltages using a multimeter ................................................................................ 3 2. Current and Resistors ............................................................................................................ 4 Introduction ........................................................................................................................ 4 Resistors in series .............................................................................................................. 4 Resistors in parallel ............................................................................................................ 5 Creating a voltage divider using resistors ............................................................................ 5 Measuring current using a multimeter .................................................................................. 6 Measuring resistance using a multimeter ............................................................................. 7 3. Power dissipation ................................................................................................................... 8 Introduction ........................................................................................................................ 8 Power dissipation in a resistor ............................................................................................ 8 Power dissipation of series-connected resistors ................................................................... 8 Power dissipation of parallel-connected resistors ................................................................. 9 4. Capacitors ............................................................................................................................ 10 Introduction ...................................................................................................................... 10 The impedance of a capacitor ........................................................................................... 10 Phase shift ....................................................................................................................... 11 Relation between voltage and current ................................................................................ 11 Frequency filters ............................................................................................................... 12 ESR ................................................................................................................................. 12 Timer circuits .................................................................................................................... 13 Types of capacitors .......................................................................................................... 14 5. Diodes ................................................................................................................................. 15 Introduction ...................................................................................................................... 15 An AC Voltage Rectifier .................................................................................................... 15 LEDs ............................................................................................................................... 16 Zener Diodes ................................................................................................................... 16 Testing diodes using a multimeter ..................................................................................... 17 6. Bipolar Transistors ................................................................................................................ 19 Introduction ...................................................................................................................... 19 The transistor as a switch ................................................................................................. 19 The Darlington ................................................................................................................. 20 The transistor as an amplifier ............................................................................................ 20 Testing transistors using a multimeter ................................................................................ 22 7. Project: A simple adjustable DC power supply ....................................................................... 24 The transformer ................................................................................................................ 24 The diagram .................................................................................................................... 24 8. Differential Amplifier .............................................................................................................. 26 Typical example ............................................................................................................... 26 DC Current Source ........................................................................................................... 26 9. Operational Amplifier ............................................................................................................ 28 Introduction ...................................................................................................................... 28 Opamp used as an amplifier ............................................................................................. 28 Opamp used as a threshold switch ................................................................................... 29 Opamp used as a voltage-controlled current source ........................................................... 30 Diode and transistor tester ................................................................................................ 31 10. Lab Power Supply .............................................................................................................. 33 The diagram .................................................................................................................... 33 Voltage feedback .............................................................................................................. 33 Current limitation .............................................................................................................. 34 Protective circuitry ............................................................................................................ 34 Choosing your components ............................................................................................... 35

iv

www.Hobby-Electronics.info Electronics Course Assembly ......................................................................................................................... 11. Heatsink ............................................................................................................................. Introduction ...................................................................................................................... Calculations ..................................................................................................................... 12. Power Amplifiers ................................................................................................................ Introduction ...................................................................................................................... Emitter follower ................................................................................................................ Balance amplifier .............................................................................................................. Bias ................................................................................................................................. Darlingtons ....................................................................................................................... Opamp ............................................................................................................................. 13. Inductors ............................................................................................................................ Introduction ...................................................................................................................... The impedance of an inductor .......................................................................................... Relation between voltage and current ................................................................................ Frequency filters ............................................................................................................... Quality factor .................................................................................................................... 14. Decibels (dB) ..................................................................................................................... Power and Voltage Ratios ................................................................................................ Reference-related dBs ...................................................................................................... 15. Vocal Eliminator ................................................................................................................. Introduction ...................................................................................................................... Schematic ........................................................................................................................ Choosing components ...................................................................................................... Testing ............................................................................................................................. Assembly ......................................................................................................................... 16. Symmetric power supply ..................................................................................................... Introduction ...................................................................................................................... Up to about 25mA ............................................................................................................ Up to 1A .......................................................................................................................... 17. JFETs ................................................................................................................................ Introduction ...................................................................................................................... JFET amplifier .................................................................................................................. JFET current source ......................................................................................................... 18. MOSFETs .......................................................................................................................... Introduction ...................................................................................................................... MOSFET amplifier ............................................................................................................ Dual-gate MOSFETs ......................................................................................................... 19. LC filters ............................................................................................................................ Introduction ...................................................................................................................... High pass filter ................................................................................................................. Band pass filter ................................................................................................................ Band pass filter with a smaller band .................................................................................. Resonance ....................................................................................................................... Tuned circuit .................................................................................................................... 20. Miscellaneous filters ........................................................................................................... Introduction ...................................................................................................................... Coupled filters .................................................................................................................. Twin T-filter ...................................................................................................................... Bridged T-filters ................................................................................................................ 21. Frequency-independant voltage devider ............................................................................... Introduction ...................................................................................................................... HF probe ......................................................................................................................... Attenuator in an oscilloscope ............................................................................................ 22. DIACs, SCRs and TRIACs .................................................................................................. DIAC ................................................................................................................................ SCR ................................................................................................................................ TRIAC .............................................................................................................................. v 35 38 38 38 40 40 40 40 41 42 42 44 44 44 44 45 46 47 47 47 48 48 48 48 49 49 51 51 51 52 54 54 54 55 56 56 57 57 59 59 59 60 62 63 63 65 65 65 66 67 68 68 68 69 70 70 70 71

www.Hobby-Electronics.info Electronics Course 23. TV Deflection Circuit ........................................................................................................... Warning ........................................................................................................................... The picture tube ............................................................................................................... Deflection coils ................................................................................................................. Deflection circuit ............................................................................................................... Linearity correction ........................................................................................................... S-Correction ..................................................................................................................... EW-Correction .................................................................................................................. Practical Examples ........................................................................................................... 24. Automatic volume control .................................................................................................... Introduction ...................................................................................................................... Schematic ........................................................................................................................ Choosing components ...................................................................................................... Power supply ................................................................................................................... A. Calculating RMS value ......................................................................................................... B. Inside semiconductors .......................................................................................................... Inside a diode .................................................................................................................. P type and N type semiconductors ............................................................................ Joining P and N together .......................................................................................... Zener diodes ............................................................................................................ Varicap diodes ......................................................................................................... Inside a bipolar transistor ................................................................................................. Joining three layers of P and N together .................................................................... Applying voltages across a transistor ......................................................................... Inside a JFET .................................................................................................................. Joining three layers of P and N together .................................................................... Applying voltages across a JFET .............................................................................. Inside a MOSFET ............................................................................................................ Joining three layers of P and N together .................................................................... Applying some voltages across an enhancement MOSFET ......................................... Depletion MOSFETs ................................................................................................. C. Buffer capacitor ................................................................................................................... Calculation of the value of a buffer capacitor ..................................................................... ESR ................................................................................................................................. D. Amplifier stability .................................................................................................................. Introduction ...................................................................................................................... Stability ............................................................................................................................ E. Complex math ..................................................................................................................... Calculations on a capacitor and resistor in series. .............................................................. Calculations on an inductor and resistor in series. .............................................................. Calculations on a capacitor and inductor in series. ............................................................. Calculations on a tuned LC circuit. .................................................................................... 73 73 73 73 73 75 75 76 76 78 78 78 79 79 80 81 81 81 81 82 82 82 82 82 83 83 83 84 84 84 84 85 85 85 88 88 88 89 89 90 90 90

vi

Chapter 1. DC and AC Voltages


DC Voltage Sources
DC stands for: Direct Current. DC voltage sources have a positive and a negative terminal. The symbol of a DC voltage source is

An example of a DC voltage source is a battery or a DC power supply. To increase the voltage, you can connect multiple voltage sources in series:

The total voltage will be the sum of each voltage source. So when you connect two 1.5V batteries in series, you'll measure a total voltage of 3 volts. By the way, most designers don't draw voltage sources in their schematics; they just draw the terminals:

The third drawing is the most common. The horizontal line at the bottom is the ground symbol. Ground is not always the negative terminal. Many audio devices for example use a so called symmetric power supply. Symmetric power supplies consist of two DC voltage sources connected to each other:

DC and AC Voltages

In these cases ground is the 'middle point' where both sources are connected. Ground is always the reference point. This means that all the voltages in the design or description are always with respect to ground. In other words: the black wire (connected to the COM bus) of your voltage meter should always be connected to ground, as shown in the picture above. In this case voltage meter M1 reads +9V and M2 reads -9V. And this immediately explains why it is called a symmetric power supply. Later in this course you will learn what symmetric power supplies are used for and are we going to build one.

AC Voltage Sources
AC stands for: Alternating Current. AC voltage sources don't have a positive and a negative terminal: the polarity reverses in time. Take a look at the picture below.

In this picture SW1 is a switch. In the drawn position, A is connected to C and therefore to the positive side of the DC voltage source. B is connected to E and therefore to the negative terminal of the 9V source. When you toggle switch SW1, the polarity will be reversed: A will be connected - via D - to the negative end of the voltage source, and B will be connected to the positive end. Now imagine that someone toggles switch SW1 frequently. The signal at terminals A and B will then be an AC voltage. The top value of an AC voltage is called the amplitude. In this case, the amplitude is 9Vt. The voltage between the two tops is called the top-top value; in this case 18Vtt. If we toggle SW1 forth and back in exactly 1 second, we create a 1Hertz signal. Hertz is the unit of frequency: the number of times a signal repeats itself in one second. Hertz is usually abbreviated to Hz. The time it takes for a signal to repeat itself is called the period time, symbol T; in this case T = 1 s. A 10Hz signal means that the signal repeats itself 10 times per second; in that case T=0.1s. So: T = 1/f and f = 1/T It is common practice to use symbols in capitals for DC signals and lower case symbols for AC signals. For example VA would mean the DC voltage at point A, and iR4 would mean the AC current flow in resistor R4. Examples of AC voltage sources are: a microphone, a house outlet, and the speaker terminals of an amplifier. 2

DC and AC Voltages An AC voltage source doesn't really have a symbol of it's own. They are usually drawn as one or two terminals with a ~ sign. If only one terminal is drawn, the other one is connected to ground. Some AC voltage sources have their own symbols, e.g. a microphone:

Measuring voltages using a multimeter


Most digital multimeters look like this:

1 = Display, 2 = Function switch, 3 = Transistor socket (optional), 4...6 = Test lead jacks If you want to measure DC voltages set the function switch to the DC voltage range you want to use. For example, if you want to measure the voltage across a 9V battery, set the switch to 20V DC. If you have no idea what to expect, set the function switch to the highest DC range available and work down. Having done that, we can connect the test leads. Mulimeters usually come with two test leads: a black one and a red one. To measure voltages, you need to connect the black test lead to the COM jack and the red lead to the V/ jack. Connect the other ends of the test leads to the source or load under measurement. In case of a 9V battery, connect the black wire to the negative and red wire to the positive terminal of the battery. If you swap the test leads, you will read a negative value. If you want to measure AC voltages, set the function switch to the proper AC voltage range. Connect the test leads to the device-under-test. Swapping test leads makes no difference (of course!).

Chapter 2. Current and Resistors


Introduction
When you connect the terminals of a voltage source to each other, you create a short circuit. This means a high current flow. To limit the current flow, you can use a resistor. The symbol of a resistor is:

Voltage, current and resistance are related to each other as follows: R = V/I V is the voltage across the resistor [unit: volts, or V]; I is the current in the resistor [unit: amperes, or A]; R is the resistance [unit: ohms, or ]. Example: Imagine you connect a 1000 (or 1k) resistor to a 9V battery. In that case, the current in the resistor (and in the battery of course!) will be: I = V/R = 9V / 1000 = 9mA (milli-amps). You can't buy resistors of any value. You can choose from a series of resistors, e.g. the E12 series. The E12 series has the following values: 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82. If you want other values, you may select one from another (more expensive) series, or create one by connecting multiple resistors in series or parallel.

Resistors in series

Now we'll connect 3 resistors in series with the battery (see picture above). What will be the total resistance of R1, R2 and R3? The voltage across R1 (V1) equals to: V1 = IR1. And V2 = IR2, and V3 = IR3. We know that V1 + V2 + V3 = Vbat, so: Vbat = IR1 + IR2 + IR3 = I(R1 + R2 + R3). This tells us that the total resistance of resistors is series equals to R1 + R2 + R3 + ..., or: 4

Current and Resistors

In this case, the total resistance is 3k. The current I will be: 9V / 3k = 3mA.

Resistors in parallel

The picture on the left shows a DC voltage source connected with 3 parallel-connected resistors. The question is again: what is the total resistance? The current in R1 (I1) equals to: I1 = Vbat/R1. And I2 = Vbat/R2, and V3 = Vbat/R3. The total current Itot equals I1 + I2 + I3, so: Itot = Vbat/R1 + Vbat/R2 + Vbat/R3. This proves that the total resistance of parallel connected resistors equals to: 1/Rtot = 1/R1 + 1/R2 + 1/R3 + ... or:

In this case, the total resistance is 333. The total current will be 3 9mA = 27mA.

Creating a voltage divider using resistors

Take a look at the picture on the right. We see three series connected resistors. We've already learned that the total resistance is 3k. So the current I will be 9V / 3k = 3mA. The voltage at point 5

Current and Resistors B, VB, equals 1k3mA = 3V. (Do you still remember what is meant by 'voltage at point B'? It means: connect the red wire of the volt meter to point B and the black wire to ground.) The general way of calculating the voltage across a resistor in a series connection is: I = Vsource / Rtotal, and Vres = IR. So:

There are three ways to calculate the voltage at point A: 1. The total resistance of R2 and R3 is 2k, so VA = 2k3mA = 6V. 2. The voltage across each resistor is 3V, so VA = 6V. 3. Using the equation above: VA = 9V(2k/3k) = 6V. Does this mean that you can connect your 3V portable cassette player to point B? Well, of course you could, but don't expect it to work! The player acts like a resistor of, say, 50 ohms. That resistor is parallel connected with R3, resulting in a resistance of 47.6 ohms. So VB will drop to 9V(47.6/2047.6) = 0.2V. And that will never be enough for your player. Conclusion: If you design a voltage divider, don't forget to take the load into account!

Measuring current using a multimeter


Most digital multimeters look like this:

1 = Display, 2 = Function switch, 3 = Transistor socket (optional), 4...6 = Test lead jacks If you want to measure DC current, set the function switch to the DC current range you want to use. For example, if you expect to measure 1mA, set the switch to 2mA DC. If you have no idea what to expect, set the function switch to the highest DC range available and work down. Having done that, we can connect the test leads. Mulimeters usually come with two test leads: a black one and a red one. To measure current, you need to connect the black test lead to the COM jack and the red lead to the A jack. Connect the other ends of the test leads in series with the load under measurement. If the current flows from red to black, you will read a positive value. Otherwise, a minus sign appears in the display. If you want to measure AC current, set the function switch to the proper AC current range. Connect the test leads in series with device-under-test. Swapping test leads makes no difference (of course!). 6

Current and Resistors Note: many meters have a separate jack for measuring high current. Usually the A jack measures up to 200mA. The separate jack will be labeled '20A'. This jack only works when the function switch has been set to 20A. Warning: the 20A jack is usually unfused! Overload may seriously damage your multimeter. Tip: if you want to measure the current flow in a component, you'll have to connect the meter in series with that component. This means you may need to unsolder one end of that component. If the same current also flows in a resistor, you can simply measure the voltage across that resistor and calculate the current. After current measurement, disconnect the leads from the meter. If you forget this and want to measure voltages again, you may cause disasterous shorts!

Measuring resistance using a multimeter


If you want to measure resistance, set the function switch to the resistance range you want to use. For example, if you expect the resistance to be 1k, set the switch to 2k. If you have no idea what to expect, set the function switch to the highest resistance range available and work down. Having done that, we can connect the test leads. Connect the black test lead to the COM jack and the red lead to the V/ jack. Connect the other ends of the test leads across the resistance under measurement. Please note that in-cicuit measurement may lead to wrong results, since there may be other components parallel-connected to the resistance. It is also a good idea to make sure that the voltage across the resistance is 0V before starting resistance measurement. Also make sure that the equipment-under-test has been turned off! Interesting links: Circuit Fantasia's electronics course

Chapter 3. Power dissipation


Introduction
When a current flows in a component, that component will heat up. This process is called power dissipation and is measured in Watts. The power dissipation in a device can be calculated very easily: P=VI

Power dissipation in a resistor


Let's calculate the power dissipation in a 100 ohms resistor connected to a 9V battery. The voltage across the resistor will be 9V. The current is 9V/100ohms = 90mA. So the power dissipation will be: 9V 90mA = 810mW. It is very important to calcuate the power dissipation in the components in your design. A regular resistor has a maximum dissipation rating of 0.25W (= 250mW). If you would have used such a resistor in the example above, it would have blown. A 1W resistor is a good choise. Since it's so important, let's create an equation with which we can easily calculate the power dissipation in a resistor. We know: (1) P = V I (2) V = I R (3) I = V / R

Substituting (2) in (1) and (3) in (1) respectively results in: P=I R
2

P=V /R

With these equations you can easily calculate the power dissipation when you connect a DC voltage source to a resistor. But what will the power dissipation be if you connect an AC voltage source to a resistor? In that case, simply substitute V and I by the so called RMS values vRMS and iRMS. RMS stands for Root Mean Square. The RMS value is defined as the DC equivalent that provides the same power as the original waveform. Let's approximate the RMS value of a 1Vt/1Hz sinusoidal signal: v = sin(2ft) = sin(2t). We take 4 samples: at 0s, 0.25s, 0.5s and at 0.75s. The values are 0, 1, 0, and -1. Next, calculate the square of each value: 0, 1, 0, and 1. The mean value of these squares is (0 + 1 + 0 + 1)/4 = 2/4 = 0.5. Finally, calculate the square root of the mean of the squares: 0.5 = 0.707V. So the approximated RMS value of a 1Vt sinusoidal signal is 0.707V. Of course, the approximation is more accurate if you take more samples. Using some math, you can prove that vRMS = A/2 (for a sinusoidal signal). Using this equation we can calculate the RMS value of the signal of our example: vRMS=1/2. = 0.707V. Using the theory above, we can calculate the power dissipation of a 100ohms resistor connected to a 9Vt sinusoidal signal: P=v
2 RMS/R

= A /2R = 81/200 = 0.401W.

Power dissipation of series-connected resistors


If you don't have a 1W resistor, and you still want to perform the experiment above, you may connect four 25ohms resistors in series. We've already learned that resistors in series act like a voltage devider: the voltage across each resistor is 9V/4 = 2.25V. The current is still 90mA since the total resistance is the same. So each resistor dissipates 2.25V 90mA = 0.20W. (Of couse we could also use one of our 'easy' equations: P = I R = (90mA) 25 = 0.20W.) Be carefull: always take resistors with the same resistance. Of course you could also create a 100ohms resistor with three 33ohms resistors and one 1ohm resistor in series, but you're gonna smell some smoke! Which resistor(s) will blow? The 1ohm resistor because it's the smallest? Let's see. 8
2 2

Power dissipation
2 2

Since we know the current is 90mA, we use the equation P = I R = (90mA) 1 = 8.1mW. The 1ohm resistor will survive! The power dissipation of each 33ohms resistor will be (90mA) 33 = 0.27W. It may take some time, but you certainly will loose three resistors!
2

Power dissipation of parallel-connected resistors


Another way to create your own high wattage resistor is to connect multiple resistors in parallel. Let's create a 100ohms resistor with four parallel-connected 400ohms resistors and connect it to a 9V battery. The voltage across each resistor is 9V. So the power dissipation of each resistor is P = V / R = 9 / 400 = 0.20W. Again: always use resistors with the same resistance.
2 2

Chapter 4. Capacitors
Introduction
A capacitor consists of two metal plates with a thin insulator in between, as its symbol shows:

What will happen if we connect a DC voltage source (battery) to a capacitor?

The positive side of the battery attracts the electrons in the top plate of the capacitor. This plate will become positively charged. Because the insulator is very thin, the top plate will attract the electrons in the bottom plate. The gaps these electrons leave behind, will be filled up with the electrons from the negative end of the battery. So it seems if the current flows right through the capacitor, as if there were no insulator at all. But of course, this can't continue for ever. Eventually, there will be no electrons left on the top plate, and no room for more electrons on the bottom plate. The capacitor is now completely charged, and the current flow will stop.

Now let's swap the terminals of the battery. The positive terminal of the battery will attract the electrons on the bottom plate of the capacitor and the negative end of the battery will emit electrons to fill in the gaps on the top plate. This process will continue until the capacitor is charged again. If we continually swap the terminals of the battery, there will be a continuous current flow. In other words: a capacitor conducts AC currents, but blocks DC currents. The capacitance depends on the size of the plates and the matial between them. This material is called the dielectric and reduces the electric field between the plates. This will increase the capacitance. The capacitance can be calculated with: C = A/d, where is the dielectric constant, A the area of one plate and d the distance between the plates. Since we can buy capacitors in any electronics show, we'll seldomly need this equation. The unit of capacity is Farad, symbol F. This unit is usually far too large; uF (micro Farad), nF (nano Farad), and pF (pico Farad) are more common. 1F = 1000000uF, 1uF = 1000nF, 1nF = 1000pF.

The impedance of a capacitor


The impedance of a component is the resistance of that component for AC voltages. The symbol for resistance is R; the symbol for impedance is X. The impedance of a capacitor is not zero; it depends 10

Capacitors on the capacity (size of the plates) and the frequency of the signal (number of polarity changes (forth and back) per second). The impedance can be calculated using the following equation.

f is the frequency in Hertz; C is the capacitance in Farad Example: We have a 1nF capacitor and connect it to a 50Hz AC voltage source. Calculate the impedance of the capacitor. XC = 1/(25010 ) = 3.18M.
-9

Phase shift
When the voltage across a certain resistor increases, the current flow in that resistor will also increase (and visa versa). This is not true for a capacitor. We already saw in the introduction that if a capacitor is fully charged (so the voltage across it has reached its maximum), the current flow stops. The current will have its maximum value when the capacitor is empty. Let's look what happens if we connect a capacitor to a sinusoidal voltage source.

We connected a capacitor to a 1kHz voltage source. The green curve shows the voltage across the capacitor and the blue curve shows the current flow. We see that the current reaches the top value 1/4 period before the voltage. Since 1/4 period of a sine wave equals 90 degrees, we say that the current leads the voltage by 90 degrees, because the current reaches its top value before the voltage does. We can also say that the voltage lags the current by 90 degrees.

Relation between voltage and current


The following equation can be used for any current i(t):

It clearly shows the 90 degrees phase shift if i(t) is sinusoidal: the integral of a sine is a (-)cosine. We also see that, if we charge a capacitor with a constant current I, the voltage across it will increase linearly: v(t) = v(0) + (1/C)It.

11

Capacitors

Frequency filters

Take a look on the diagram above. Assume that the voltage source supplies a 1V/10kHz signal (this means: the amplitude is 1V and the frequency is 10kHz = 10000Hz). The impedance of capacitor C will be XC = 1/(210 10 ) = 15,9. The output voltage (voltage across capacitor C) will be 1V(XC/ZR+C), where ZR+C is the total impedance of R and C. Because a capacitor causes a phase shift in the current flow, we cannot just state that ZR+C = R + XC. Using some complex math we can prove that: ZR+C = (R +XC ). In our case ZR+C = (1k +15.9 ) = 1000.13. So the output voltage becomes 1V(15.9/1000.13) = 0.0159V. Now assume that the voltage source supplies a 1V/10Hz signal. The impedance of capacitor C will then be XC = 1/(21010 ) = 15,9k. The output voltage will be 1V(XC/(ZR+C)) = 1V(15.9k/ (1k +15.9k )) = 0.998V. So we created a very simple frequency filter with just a resistor and a capacitor. In this case we created a so called low pass filter (LPF) since it passes low frequency signals and suppresses high frequency signals. If you swap R and C, you create a high pass filter (HPF). Let's calculate the cut-off frequency of our filter. The cut-off frequency is the frequency at which R=XC => R = 1/(2fC) =>
2 2 -6 2 2 2 2 4 -6

In our case f = 1/(210 10 ) = 159Hz.

-6

ESR
Every capacitor has a certain series resistance. This resistance is not only caused by the leads, but also by the metal plates and the dielectric the capacitor is made of. The sum of these resistances is called ESR, Equivalent Series Resistance. This resistance will not always remain the same, but may increase due to aging. When will the ESR bother us? Of couse this depends on how large the ESR is and the application in which the capacitor is used. Assume the ESR of capacitor C in the filter above is 10. At very high frequencies the output voltage will not be 0V, but 1V(10/1010) = 10mV. In most cases, this will not be any problem. However, if resistor R were also 10, the output voltage would have been 0.5V! We can also expect ESR problems when large charge and discharge currents flow though the capacitor. Remember, a large current means a large voltage across the series resistance. This may even heat up the capacitor. If a capacitor heats up, the ESR may increase. This will heat up the 12

Capacitors capacitor even more, and so on. Eventually (and this may take months) the capacitor will be ready for the dumpster. Troubleshooting can be a pain; a simple capacitance meter uses small currents and will therefore not notice that the ESR has increased. How can we measusre the ESR? The are special ESR meters available for this purpose, but these are pretty expensive. Most of the time we only need an indication. We can connect the capacitor to a power supply via a known resistor R and a switch. If the switch is open, the voltage across the capacitor and ESR will be 0V. On the momen the switch is closed, the capacitor is still empty. The voltage we measure across the capacitor is therefore equal to the voltage across its ESR. If that voltage is equal to half the supply voltage, the ESR must be equal to the known resistor R. Of course: the lower the voltage, the lower the ESR must be. The disadvantage of this method is that the power supply must be able to deliver the current peak. Moreover, we must also include the internal resistance of the power supply in our calculations. That's why we often use the opposite method: we charge a capacitor to a certain voltage and then discharge it via a known resistor. Of couse: the higher the voltage at the moment of discharge, the lower the ESR must be. Please find below a picture of both methods. Resistor R is 10. The supply voltage is 1V.

At t=0, the voltage across the ESR is about 0.34V. So ESR/(R+ESR)=0.34 => ESR=R(0.34/(1-0.34)) = 10(0.34/0.66) = 5.2. At t=100us, the capacitor is discharged via the same resistor R. The voltage immediately drops to 0.66V. So R/(ESR+R)=0.66 => ESR=R((1-0.66)/0.66) = 10(0.34/0.66) = 5.2.

Timer circuits
Now we'll exchange the AC voltage source for a 1V DC voltage source. Since the frequency is 0Hz, XC is infinite, so there will be no current flow. That's true, but not for the first period of time after connecting the voltage source as we already saw in the introduction of this chapter. Assume that capacitor C is completely discharged: VC=0 => VR=1V. So the current flow in resistor R will be 1mA. Having nowhere else to go to, this current will flow 'in' the capacitor, charging it. While the capacitor is charging, the voltage across it raises, leaving less voltage for resistor R. This means that the current flow decreases. Suppose that after T seconds, the capacitor is half full: VC=0.5V. In that case VR=0.5V => IR = IC = 0.5mA. So after 2T seconds, the capacitor will not be completely charged since the current flow isn't 1mA anymore. To calculate the voltage at any given time, use the following equation.

13

Capacitors VB is the voltage of the DC voltage source. t is the time in seconds since the capacitor was connected to the voltage source. e is Euler's constant (2.7182818). When t=RC, -t/(RC) will be -1 and VC = 0.63V, so the capacitor will be 63% full. This time is referred to as the 'RC time'. RC circuits are often used in timers, for example in a simple burglar alarm:

When you enter your own house, you don't want the alarm to go off immediately; you want to have some time to switch it off. In the circuit above you have RC = 100k100u = 10 seconds to do that. After 10 seconds the voltage across the capacitor will raise above 0.63V, and a switch will close causing the flash light to give alarm.

Types of capacitors
There are generally two types of capacitors: polarized and bipolar. Polarized capacitors have a positive and a negative terminal; bipolar capacitors don't. In polarized capacitors the insulator between the plates is usually an electrolyte; hence the name electrolytic capacitors, or electro's. The electrolyte enables manufacturers to create large value capacitors with small dimensions. That's why you'll always see electro's with relatively large values: 1uF and above.

14

Chapter 5. Diodes
Introduction
A diode is a device that conducts the current in just one direction: the direction of the arrow in the diode symbol, which looks like this:

The most important parameters of a diode are: maximum forward current, forward voltage, maximum power dissipation and reverse voltage. The forward current is the current flow in the direction of the arrow of the diode symbol. This current causes a voltage across the diode: the forward voltage drop. Each diode has a certain minimum voltage drop, called the knee voltage. The diode will not conduct when the voltage across it is less than the knee voltage. The knee voltage of a generic silicon diode is about 0.6V. The power dissipation of a diode is the forward current multiplied by the forward voltage drop. The reverse voltage is the voltage across a diode when it is reverse biased. If you want to know how a diode works internally, you'll have to take a peek inside.

An AC Voltage Rectifier
Since diodes conduct current in only one direction, they can be used as an AC Voltage rectifier. Take a look at the picture below.

A triangular AC voltage is connected to the input terminals of the rectifier. The output voltage will be measured across resistor R1. When the upper input terminal is positive, there will be a current flow in the diode and the resistor. This current causes a voltage across R1. Assume the peak voltage is (plus and minus) 9V, and the forward voltage of the diode is 0.7V. The peak current will then be (9V - 0.7V)/ 1k = 8.3mA. The maximum power dissipation of the diode will be 0.78.3mA = 5.8mW. When the voltage at the upper input terminal becomes negative, the diode is reverse biased blocking the current flow. Since the diode has a very large resistance, all the voltage will be across the diode. This should not exceed the maximum reverse voltage. So if you want to perform this experiment, you'll need a diode with the following requirements: the maximum forward current must be 8.3mA or higher; the maximum power dissipation must be 5.8mW or higher; and the maximum reverse voltage must be 9V or higher. Any small signal diode will meet these requirements. The resistor can be a regular 0.25W resistor since the maximum power dissipation is (8.3mA) 1k = 69mW. The circuit above is called a half wave rectifier, since the ouput contains only the positive half of the input. The circuit below shows a full wave rectifier. 15
2

Diodes

This circuit works as follows. When the input signal is positive, the currents flows from the upper terminal, via diode D1, resistor R1, and diode D3 to the lower terminal. When the input signal is negative, the currents flows from the lower terminal, via diode D2, resistor R1, and diode D4 to the upper terminal. Notice that the current always flows in two diodes: either D1 and D3, or D2 and D4. This means that the output voltage will always be about 1.4 volts (two 'forward voltage drops') less than the input voltage. The circuit D1...D4 is called a bridge rectifier. When you look at a bridge rectifier, you'll probably see something imprinted like 'B80C5000/3300'. The number after the 'B' indicates the maximum (reverse) voltage, in this case 80V. The number after the 'C' indicates the maximum peak/continuous (forward) current in mA. In this case the maximum peak current is 5A and the maximum continuous current is 3.3A. Smaller bridge rectifiers only indicate the maximum voltage and current, e.g. 'B40C800'.

LEDs
The abbreviation LED stands for Light Emitting Diode. LEDs consume less power than light bulbs, and have a much longer life time: about 100000 hours. A regular LED needs a current flow of 10...20mA, and has a forward voltage drop of 1.5 to 2 volts, depending on the color. With the circuit below, you can test and experiment with LEDs.

Question: What will be a good value for R1? Assume that the voltage across LED D1 is 2 volts, and we want a current flow of 15mA. Answer: The voltage across R1 will be 9V-2V = 7V. The current flow in R1 will also be 15mA. So R1 should have a value of 7V/15mA = 467. From the E12 series, 470 is a good choice.

Zener Diodes
A zener diode in conducting state acts like a normal diode. It's the reverse voltage that distinguishes a zener diode from a regular diode. Take a look at the picture below.

16

Diodes In this picture you see a reverse connected zener diode. The 'value' of a zener diode is given in volts; this is the reverse voltage. But a zener diode doesn't blow when the voltage tends to get higher. A zener diode stabilizes the voltage at the reverse voltage. So the voltage across the zener diode in the picture above will always be 4.7 volts, even when the battery voltage increases. Again, we need to calculate the value of R1. Unfortunately, it's difficult to say what's the ideal current flow in a zener diode. (Yep, altough the diode is reverse biased, there is a current flow!) In most cases 5mA is fine. Since the voltage across R1 will be 9V-4.7V = 4.3V, a good value of R1 is 4.3V/5mA = 860. A zener diode manufacturer publishes the maximum power dissipation of a zener diode. 0.4 or 0.5W is a very common value for a small zener diode. Using this characteristic, we can calculate the minimum value of R1: Assume we use a 0.4W zener in the design above. Since the voltage across the zener is 4.7V, the maximum current flow is 0.4W/4.7V = 85mA. The voltage across R1 will be 9V - 4.7V = 4.3V. So the minimum value for R1 is 4.3V/85mA = 51. So a good value of R1 ranges from 51 to 860. 820 is a good choice. Note however that the calculations above only count for a zener without a load. Take a look at the picture below.

In this design zener D1 has a 50 load (R2). Again, we'll calculate a proper value for R1. Since the voltage across the load R2 is always 4.7V, the current flow in R2 will always be 4.7V/50 = 94mA. The current flow in D1 should be between 5 and 85mA. So the current flow in R1 ranges from 99 to 179mA. The voltage across R1 is always 4.3V, so the resistance should be between 24 and 43. 39 may be a good choice. In that case, the power dissipation is 4.3 /39 = 0.47W. So you'd better take a 1W resistor! But what should we do if the 50 load can be detached, e.g. because it's an external load? With the load connected, the maximum value of R1 is 43, but without the load the minimum value is 51! The answer is simple: use a higher wattage zener diode, e.g. 1.3W. In that case, the maximum current flow in D1 is 1.3W/4.7V = 276mA. This means, without the load connected, a minimum value of R1 of 4.3V/276mA = 16. Now we have an overlapping range of values for R1 from which you may choose one. Again, a 39/1W resistor is a good choice.
2

Testing diodes using a multimeter


Most digital multimeters look like this:

17

Diodes 1 = Display, 2 = Function switch, 3 = Transistor socket (optional), 4...6 = Test lead jacks If you want to test a diode, set the function switch to "diode test". Next, connect the test leads. Mulimeters usually come with two test leads: a black one and a red one. Connect the black test lead to the COM jack and the red lead to the V/ jack. Connect the other ends of the test leads across the diode. Connect the black wire to the cathode and red wire to the anode. The display should now read about 0.6V (600mV). If you swap the test leads, the display will indicate an overflow. Note that in-circuit testing may lead to wrong results, since other components may be parallelconnected to the diode. Also make sure that the equipment-under-test has been turned off! Later in this course we'll build a nice device for testing diodes (and transistors).

18

Chapter 6. Bipolar Transistors


Introduction
Bipolar transistors are amplifying devices and can also be used as switches. There are two types: NPN and PNP. See the picture below for a typical circuit.

A bipolar transistor has three terminals: Base, Collector and Emitter. In case of a NPN transistor, a small current flows from B to E (IB) causes a larger current flow from C to E (IC). The ratio IC/IB is called the current gain, symbol hFE. Inside a transistor, there's a diode between B and E and between B and C, so VBE,max and VBC,max are about 0.6V to 0.7V. Let's assume for example RB = 1M, RL = 1k, VS = 9V, hFE = 300 and VBE = 0.6V. The voltage across RB will be VS-VBE=8.4V, so IB=8.4/1M=8.4A. IC=IBhFE=8.4A300=2.52mA. So the voltage across RL will be 2.52V.

The transistor as a switch


What will happen if in the example above, RB=100k instead of 1M? IB=8.4/100k=84A. You may expect that IC will be 84A300=25.2mA, but that isn't possible since the voltage across RL would be 25.2V which is more than VS. IC,max in this circuit is VS/RL=9/1k=9mA. So even if IB=84A, IC will be 9mA. IC/IB=107, which is less than hFE. In such a case, when IC/IB < hFE, we say that the transistor has become saturated and can be considered as a closed switch (between C and E). Take a look at the diagram below.

You see a battery operated clock, operating at 3V. This clock has an alarm function: at a preset time, you hear a chime. Imagine that you don't want to hear a chime, but that you want to switch some other equipment on, for example a radio operating a 9V. This radio has an internal resistance of 100. At alarm time, the output voltage of the clock is 3V. VBE=0.6V. hFE=100 What would be a proper value for RB? A large value may not saturate the transistor; a small resistor may overload the output stage of the alarm circuitry of the clock. 19

Bipolar Transistors IC,max=9/100=90mA. IC/IB < hFE => IB > IC/hFE => IB > 90mA/100 = 0.9mA. The voltage across RB equals 3-0.6=2.4V. This means RB < 2.4V/0.9mA = 2.7k. To be on the safe side, 2.2k would be a good value. IB will then be 2.4/2k2 = 1.09mA. Please note that this will only work if the "ground" of the clock (the minus terminal of its battery) is connected to the ground of our little switch (the emitter).

The Darlington
If the clock in the diagram above is a wrist watch, even a 1.09mA current may overload its alarm circuitry. In that case, you may use two transistors as shown in the diagram below. This is called a darlington.

A darlington can be considered as a single transistor with the following characteristics: VBE,darlington=VBE1+VBE2 IB,darlington=IB1. IC1= hFE1IB1. IC2=hFE2IB2=hFE2IE1=hFE2(hFE1+1)IB1. IC,darlington=IC1+IC2=hFE1IB1+hFE2(hFE1+1)IB1=(hFE1+(hFE1+1)hFE2)IB1. hFE,darlington=IC,darlington/ IB,darlington=hFE1+(hFE1+1)hFE2. hFE1>>1 => hFE,darlington=hFE1+hFE1hFE2. hFE1hFE2>>hFE1 => hFE,darlington=hFE1hFE2. Let's now recalculate a proper value for RB. Assume T1's current gain is 300 and T2's current gain is 100. IC,darlington = 9/100=90mA. hFE,darlington=300100=30000. VBE,darlington=1.2V. The voltage across RB equals 3V-1.2V=1.8V => RB < 1.8V/3A = 600k. 560k is a safe value. IB,darlington will be 1.8/560k = 3.21A.

The transistor as an amplifier


As discussed in the first part of this chapter, a transistor is an excellent amplifier. The picture below shows an example.

20

Bipolar Transistors The input signal is connected to the amplifier via C1. C1 prevents a DC current flow in R1 and the input signal source, e.g. a microphone. DC currents may destroy the microphone (unless it's an electret; a type of microphone with a built-in amplifier). The characteristics of transistor T1 are: hFE=100 and VBE=0.6V. Assume we want to connect an end amplifier with a 10k input resistance to the OUT terminal. For maximum power transfer, the output resistance of our amplifier must be equal to the input resistance of the end amplifier. The output impedance of an amplifier is defined as vOUT/iOUT. In our case vOUT = vRC and iOUT = iRC. So the output impedance of this amplifier is vRC/iRC = RC. So RC = 10k. For stability reasons VRE must be VS/5. Since VS = 9V, VRE must be 1.8V. This means that the voltage at the OUT terminal can vary between 1.8 and 9V. So the maximum AC output voltage (vOUT,max) is 91.8=7.2Vtt. Obviously, this can only be arranged if the quiescent output voltage (when vIN=0) is exactly between 1.8 and 9V. This means VOUT=1.8+(9-1.8)/2=5.4V. We already know that RC=10k, so IC = (95.4V)/10k = 0.36mA. IE will also be 0.36mA, so RE=VRE/IE=1.8/0.36m=5k. VB = VBE + VRE. VBE is always 0.6V, so vRE = vB. (Remember: AC voltages and currents are written in lower case letters.) When C1 is large enough, vIN = vB = vRE. VOUT = VS - VRC = 9V - VRC => vOUT = vRC. Knowing this, we can calculate the gain A of the amplifier, which is defined as: A = vOUT/vIN = -vRC/ vRE=-(iCRC)/(iERE). Since iC=iE (hFE is large enough to neglect iB), A=-(iCRC)/(iCRE) = -RC/RE. This means our amplifier's gain is -10k/5k =-2. VR1 = VS-VBE-VRE = 9-0.6-1.8 = 6.6V. IR1=IC/hFE=0.36mA/100=3.6A. R1 = 6.6V/3.6A = 1.8M. Unfortunately, transistors with the same type designation can have a wide range of hFE. For example, the hFE of a 2N3904 transistor ranges from 100 thru 300. The question is: will our amplifier still function properly if hFE = 300? Let's see... IB = (VS-VBE-VRE)/R1. VRE = ICRC = hFEIR1RE = hFERE(VS-VBE-VRE)/R1 = hFERE(VS-VBE)/R1 hFEREVRE/R1 => VRE+(hFERE/R1)VRE = hFERE(VS-VBE)/R1 => (1+3005k/1.8M)VRE = 3005k8.4/1.8M => 1.833VRE=7 => VRE = 7/1.833 = 3.8V. IB = (8.4-3.8)/1.8M = 2.6A. IC = 3002.6A = 0.767mA. However, IC,max = VS/(RC+RE)=9/ 15k=0.6mA. So hFEIB > IC,max, which means that the transistor is saturated and thus acts like a closed switch! Solution: add an extra resistor which makes VRE (and therefore IC) independent of hFE:

Make sure IR1 >> IB => IR1IR2. Let's estimate proper values for R1 and R2. VR2 = VBE+VRE = 0.6+1.8V = 2.4V. VR1 = VS-VR2 = 9-2.4 = 6.6V. So R1:R2=6.6:2.4. E.g. R1=33k and R2=12k. In that case IR1(=IR2) = 6.6V/33k = 0.2mA, which is much larger than IB. 21

Bipolar Transistors As mentioned before, the voltage gain of this amplifier is just (-)2. In many cases that will not be enough. You can easily increase the gain by adding an extra resistor and capacitor as shown in the picture below: the most common transistor amplifier.

Capacitor C2 shorts RE2 for AC voltages. So for DC signals, RE = RE1 + RE2, and for AC signals, RE = RE1. If RE1 = 500 and RE2 = 4.5k, we have an amplifier with the same characteristics as above, but the gain is 10k/500=20. The impedance of C2 must be much smaller than RE1: 1/(2fminC2) RE1 => C2 1/(2fminRE1) where fmin is the lowest frequency the amplifier must be able to handle. For example: if fmin = 20Hz, C2 1/(220500) = 16F. 47 or 100F is a good choice. The AC input resistance of the amplifier is approximately R1//R2 = 8.8k. So the impedance of C1 must be much less than 8.8k => C1 1/(2208.8k) = 0.9F. 10F is a good choose. The positive terminal of C1 must be connected to the amplifier, unless the input signal's DC component is larger than 2.4V.

Testing transistors using a multimeter


Most digital multimeters look like this:

1 = Display, 2 = Function switch, 3 = Transistor socket (optional), 4...6 = Test lead jacks If your meter has a transistor socket, set the function switch to hFE and simply insert the transistor leads into the proper holes of the socket. To determine the type (NPN/PNP) and to locate the B, C and E leads, use the transistor's datasheet. The display will show the transistor's current gain (hFE). If your meter doesn't have a hFE test, you can at least test the BE and CB diodes using the diode test. 22

Bipolar Transistors Later in this course we'll build a nice device for testing transistors (and diodes).

23

Chapter 7. Project: A simple adjustable DC power supply


The transformer
In this project we use all the components we've learned about in the previous lessons. The only new component is a transformer. A transformer transforms high voltages to low voltages (or vice versa). It basically consists of two coils of wire wrapped around a soft-iron core. When you connect one of the coils to an AC voltage source, it produces an alternating magnetic field in the soft-iron core. This magnetic field also flows in the core of the second coil. This causes an alternating current flow in the second coil. The coil connected to the source is called the primary coil; the second coil, connected to the load, is called the secondary coil. The voltage ratio is equal to ratio of the number of turns of each coil: vs:vp=Ns:Np The current ratio is equal to: is:ip=Np:Ns

The diagram
Let's take a look on the diagram below.

On the left, you see the aforementioned transformer. In this case, the transformer's output voltage is 15V AC. This AC voltage is rectified by bridge rectifier G1. The rectified voltage is smoothed by capacitor C1. Without C1, the output would be just a rectified sine wave signal. If you would power your walkman with this voltage, you would hear a terrible 100Hz humming. The result of a computer simulation below shows what C1 does.

In this picture you see two signals: a rectified sine wave (the situation without C1), and the situation with C1. At t=0, C1 is discharged, so VC1=0V. G1 will then charge C1 until t=T1. The top value of the 24

Project: A simple adjustable DC power supply rectified signal is 15V2 - 20.6V = 20V. After t=T1 C1 will be discharged by the load until t=T2. Then, everything will start all over again. Vr is called the ripple voltage. Especially in audio equipment it should be as small as possible, because voltage ripple in the power lines means voltage ripple in the sound signals! You can reduce the ripple voltage by using larger capacitors. You can calaculate the value of the capacitor, but you can also use the rule of thumb: 2000...5000uF (2...5mF) per ampere load current. You might think that the maximum voltage across C1 will be 20V. But this is only true if the secondary voltage of the transformer is 15V. Unfortunately, this voltage depends on the load. The open line voltage may be 18V or even more! Take this into consideration when buying a capacitor for C1, since all capacitors have a maximum voltage they can sustain. The load-dependency of the output voltage of the transformer also explains the presence of zener diode D1. Without D1 the output voltage would depend on the load, and that is something we don't want. Thanks to D1, the voltage across P1 and R2 is always 12V. So the voltage at the base of T1 only depends on the position of P1. With P1 turned to the maximum position, VB=12V. The output voltage VE will be 12V-0.6V=11.4V. With P1 turned all the way down, VB=VR2. VE=VR2-0.6V. Of course we want VE to be 0V, so VR2=0.6V. We can now calculate R2: R2:P1=VR2:VP1=0.6:11.4, so R2=(0.6/ 11.4)10k = 526. 470 is a good choise. If we want 5mA current flow in D1, IR1=5mA+VD1/(P1+R2)=5mA+12/10470=6.15mA. R1=(Vtop-VD1)/ IR1=(20-12)/6.15mA=1.3k. 1.2k is a good choise. This calculation assumes that T1's base current is very small. And it should be, because a large current will cause a high voltage drop across the top part of P1. This will reduce the base voltage and this the output voltage. And since the base current depends on the output current, the output voltage would depend on the output current. And we don't want that. You may need to replace T1 with a darlington. Zener diode D1 has another advantage: a small ripple voltage across C1 does not appear on the output terminals. Even if Vr=5V, the voltage across C1 will never drop below 15V and VD1 remains 12V. This means that you can create a ripple free power supply without coffee table size capacitors! However, don't make C1 too small. Charging C1 causes a high current flow in the transformer. If C1 is small, charging takes a relatively long time and might overheat the transformer. When VC1=15V, IR1=(15-12)/1200 = 2.5mA. This leaves 2.5-1.15 = 1.35mA for D1. And this might not be enough for D1 to operate properly. If we want ID1 to be 5mA (and thus IR1 6.15mA), then R1=(15-12)/6.15m = 488. So R1 should be replaced with a 470 resistor. Let's now calculate the current when VC1 reaches its top value (20V). IR1=(20-12)/470 = 17mA. So ID1=17-1.15 = 15.35mA. PD1=1217m=0.2W. So a 0.4W zener will survive. Please keep in mind that the top value is only 20V when the transformer voltage is 15V. We already saw that this voltage depends on the load current, and that the open line voltage can be 18V or more. Always consider the worst-case scenario. Assume we measure an 18V open line voltage. Add 10% to this, just to be safe. So we assume a top value of 20V2 - 20.6V = 27V. IR1=(27-12)/470 = 32mA. PR1=(27-12)32m = 0.48W. R1 must therefore be a 1W resistor. ID1=32-1.15 = 30.85mA. PD1=1230.85m=0.37W. Although this is just below 0.4, D1 should better be replaced with a higher wattage zener. Another method is enlarging C1, making the ripple voltage smaller. Assume that the ripple voltage has been reduced to 2V. VC1,min is now 20-2=18V. R1=(18-12)/6.15m = 976. We'll take an 820 resistor. When VC1=27V, IR1=(27-12)/820 = 18.3mA. PR1=(27-12)18.3m = 0.27W. An 1/3 of 1/2W resistor will now be sufficient. ID1=18.3-1.15 = 17.15mA. PD1=1217.15m=0.21W. A 0.4W zener can handle this very easily.

25

Chapter 8. Differential Amplifier


Typical example

In the picture above, you see a typical schematic of a differential amplifier. The DC current source I1 provides a continuous 1mA current flow. Transistors T1 and T2 have the same electrical characteristics, e.g. hFE1=hFE2=100. Therefore, the quiescent emitter currents of T1 and T2 are the same: IE1=IE2=0.5mA. The voltage across R1 (and R2) will be: VR1=10k0.5mA=5V. So the voltage at the OUT terminal equals V1-VR2=9V-5V=4V. If we inject a 1uA current in IN1, IE1 will raise by 1uA100=0.1mA, so IE1=0.6mA and IE2 will be 0.4mA since the sum must be 1mA. VR2=0.4mA10k=4V and VOUT=9V-4V=5V. So we can write down the following (DC) formula for VOUT: VOUT=V1-VR2=9V-(0.5mA-IIN1hFE)R2=9V5V+IIN1hFER2=4V+IIN1hFER2. When we omit the DC component we get this AC equation: vOUT=iIN1hFER2. Of course, we can also inject a current in IN2, resulting in: vOUT=-iIN2hFER2 (Note the minus sign). Combine both equations and you get: vOUT=(iIN1-iIN2)hFER2 Hence the name differential amplifier. All so called operational amplifiers are based on a differential amplifier. We'll take a closer look on operational amplifiers in the next chapter. First, we have to find out how to create a DC current source.

DC Current Source
If you actually want to build a differential amplifier using the diagram in the previous section, you have a problem. You can buy the resistors, transistors and the battery in any shop, but where to buy a DC current source? The answer is simple. Don't go looking for it, because no one sells one. We have to create one ourselves. There are several ways to do this. We'll use a so called current mirror.

26

Differential Amplifier

Again, both transistors have the same characteristics. VR3=9V-0.6=8.4V, so IR3=8.4V/8.2k=1.02mA. Since the transistors have the same characteristics and VBE1=VBE2, both collector currents must be the same: IC3=IC4=IR3=1.02mA. You can obtain any current flow you like by adjusting R3. To use the current source in the differential amplifier, connect the collector of T3 to the emitters of T1 and T2.

27

Chapter 9. Operational Amplifier


Introduction

The picture above shows the symbol on an operational amplifier, or opamp. Opamps are differential amplifiers with a very large gain: VOUT=(VIN1-VIN2)A. Gain A is usually greater than 100000. This means that VIN1-VIN2 must be very small: even 1mV would result in an output voltage of more than 100V, which of course is impossible, because the source voltage is just 18V. In the next section we'll see that the gain can be reduced by using resistors. The input resistance of both input terminals is very high: 1G. This means that there will be no current flow in the input terminals of an opamp. IN1 is called the non-invering input; IN2 is called the inverting input, because its signal is inverted: if VIN2 increases, VOUT decreases and vice versa. The voltage at the non-inverting input is called Vp; the voltage at the inverting input is called Vn. So in this case: Vp=VIN1 and Vn=VIN2.

Opamp used as an amplifier


In this section we'll learn the two easiest ways to reduce the huge gain of an opamp. First, we take a look at the non-inverting amplifier:

R1 and R2 make a voltage divider: Vn=VOUTR1/(R1+R2), so VOUT=(Vp-Vn)A = (VIN-VOUTR1/(R1+R2))A = VINA-VOUTAR1/(R1+R2) => VOUT+VOUTAR1/(R1+R2)=VINA. Since A is nearly infinite, term VOUT is negigible, so VOUTAR1/(R1+R2)=VINA => 28

Operational Amplifier VOUT=VIN(R1+R2)/R1 Remember the first equation of this section? Vn=VOUTR1/(R1+R2). This is equal to: VOUT=Vn(R1+R2)/R1. And we've just proved that VOUT=VIN(R1+R2)/R1. This means that VIN=Vn, and since VIN=Vp, Vp must be equal to Vn! This is always the case. If an opamp is used as an amplifier: Vp=Vn Note: the gain of this non-inverting amplifier is always greater than or equal to 1. To create an amplifier with a gain less than 1 (an attenuator), we connect the input signal to R1, creating an inverting amplifier:

Since Vp is 0 and Vp=Vn, Vn=0. This means VOUT=VR2. VR2=(VOUT-VIN)R2/(R1+R2) => VOUT=(VOUT-VIN)R2/(R1+R2) => VOUT=VOUTR2/(R1+R2)-VINR2/(R1+R2) => VOUT-VOUTR2/(R1+R2)=-VINR2/(R1+R2) => VOUTR2/(R1+R2)-VOUT=VINR2/(R1+R2) => (R2/(R1+R2)-1)VOUT=VINR2/(R1+R2) => -R1/(R1+R2)VOUT=VINR2/(R1+R2) => -R1VOUT=R2VIN => VOUT=-(R2/R1)VIN Note the minus sign: the input signal is inverted. This amplifier becomes an attenuator if R1>R2.

Opamp used as a threshold switch


Since VOUT=(Vp-Vn)A and A is infinite, it's easy to see that an opamp can be used as a threshold switch: if Vp>Vn then VOUT equals the positive source voltage; if Vp<Vn then VOUT equals the negative source voltage. Take a look at the picture below.

29

Operational Amplifier Assume P1 is in the middle position. Let's call the top section P1a and the bottom section P1b. In the middle position P1a=P1b=5k => Vp=4.5V. If R1>R2, Vn<Vp and the lamp will be turned on. If R1<R2, Vn>Vp and the lamp will be turned off. If R1 is a light dependent resistor (LDR), the circuit becomes a switch that turns the lamp on automatically when it gets dark. LDRs have a high resistance in the dark and a lower resistance when light shines on it. So in the dark Vn<Vp and the lamp will be turned on. At dawn, Vn will become greater than Vp and the lamp will be turned off. Use P1 to change the threshold. But what will happen if Vn=Vp? In that case, the lamp might switch on and off rapidly. Fortunately we can prevent this by adding one resistor:

Feedback resistor R3 makes Vp dependent on the state of the switch. Assume again that P1 is in the middle position. When the lamp is turned on, VOUT=9V, so R3 can be considered as parallelconnected to the top section of P1 (P1a): Vp=9VP1b/(P1b+[P1a//R3]) = 9V5k/(5k+[5k//10k]) = 5.4V. So the lamp will only be turned off when Vn>5.4V. In that case, VOUT=0V, so R3 can be considered as parallel-connected to P1b: Vp=9V[P1b//R3]/(P1a+[P1b//R3]) = 9V[5k//10k]/(5k+[5k//10k]) = 3.6V. So the lamp will only be turned on again when Vn<3.6V. The difference 5.4V-3.6V=1.8V is called the hysteresis.

Opamp used as a voltage-controlled current source

The current flow in the collector and emitter will be the same. The current in the lamp and R1 will therefore also be the same. The voltage across R1 depends on the current flowing in it; this voltage will therefore also depend on the current flow in the lamp. The opamp will try to keep Vn=Vp. This means that the current flow though the lamp depends on the voltage at the non-inverting input of the opamp. Because R1 is 1 ohm, a 1V voltage will cause a 1A current flow. The voltage across R1 will also be 1V, which leaves 11V for the lamp. R1 dissipates 1W.

30

Operational Amplifier

Diode and transistor tester

This gadget allows us to test diodes and transistors very easily. When testing diodes, it tells us which terminal is the cathode and for transistors it shows whether it's an NPN- or PNP-transistor. The circuitry around opamp U1.A make an oscillator. Directly after connecting the power supply, C1 is still empty and thus the voltage across it will be 0V. The output will carry the supply voltage. The output is also said to be 'high'. C1 is charged via R4. When the voltage over C1 exceeds the voltage at pin 3, the output voltage will be 0V, or 'low'. C1 will now discharge via R4 until the voltage is less than the voltage at pin 3. Now everything starts all over again. Resistor R3 provides the hysteresis. U1.B's invertering input is connected to U1.A's non-inverting input and vice versa. So the voltages at pin 7 and at pin 1 are in antiphase. That is: if pin 1 is 'high', pin 7 is 'low' and vice versa. Next, we connect our test diode to pins 1 and 3 of connector J1, making sure the cathode is connected to pin 1. If U1.B's output is 'high' (and U1.A's output is 'low'), a current will flow from U1.B via the test diode, D2 and R7 to U1.A. LED D2 comes on. After the oscillator flipped the output of both opamps, there is no path for the current to flow. After all, the test diode is in reverse. So actually D2 blinks, but the frequency is so high that you won't notice that. When we swap the terminals of our test diode, only D1lights. So the LEDs show us which side of the diode is the cathode. They also show if the diode is working properly: if both LEDs light, the test diode apparently conducts current in both directions. If neither of the LEDs light, the diode blocks current flow in both directions and we can trash it as well. Let's now try connecting a NPN-transistor to J1. The diagram above shows where the collector, base and emitter go. If U1.A is 'high', current will flow via R5, the base and emitter of our transistor to U1.B which will be 'low' of course. If the transistor functions properly, it will now switch on, allowing current to flow from U1.A, via R6, D1, the collector and emitter of the transistor to U1.B. So, in case of a NPNtransistor, D1 comes on. If we connect a PNP-transistor D2 lights. And again: if both LEDs come on of remain off, the transistor is busted. To make it easier for you to assemble this nice device, a PCB has been disigned. The design can be downloaded in JPEG, EPS and HPGL format. The picture below shows which component goes where.

31

Operational Amplifier

J1 is a 5 pin socket. Of course 3 pins are enough to test a transistor, but this design allows us to test any transistor no matter if the base, collector or emitter is in the center. If we use a 3 pin socked, we may need to bend the terminals of some transistors, which may result in shorts. The power supply can be a 9V block battery of 4 AA batteries in series.

32

Chapter 10. Lab Power Supply


The diagram

This is the schematic of the 30V/2A power supply I use in my own lab. Click here to see the full size image. It may look very complex, but it really isn't very difficult to understand: it uses only the knowledge we've learned in the previous lessons. The top part looks like the power supply we built in a previous lesson: the transformer L1 transforms the outlet voltage to a safe 30V, which is rectified by bridge rectifier G2 and smoothed by capacitor C5. Transistors T3 and T6 form a darlington transistor. This darlington replaces transistor T1 in Lesson 7. However, the base voltage is not controlled by a simple potmeter, but by an 'electronic potmeter' with voltage feedback. The advantage of this feedback is a load-independent output voltage.

Voltage feedback
Imagine you connect your 'Lesson 7' power supply to a device that switches a lamp on and off. This device requires 4.75 ... 5.25V supply voltage to operate correctly. When the lamp is off, it draws just 5mA. When the lamp is on, the current flow rises to, say, 1A. You connect the device to the power supply with wires that have a total resistance of 1. You use a volt meter to adjust P2 to an output voltage of 5V. After a while, the lamp switches on. The voltage drop over the wires will now be 1V, leaving just 4V for the device. This is not enough and the device shuts down, turning off the lamp. The device now receives 5V again and the lamp switches on. The supply voltage drops to 4V, and the lamp goes off, and so on, and so on... The remedy for this is eighter using very thick wires or voltage feedback. When you want to permanently connect the device to a power supply, the first option is probably the best, especially 33

Lab Power Supply when the wires are short. In this chapter however, we want to build a lab power supply. You may already have noticed R14. This is a 0.5 current sense resistor which will be discussed later in this chapter. This means that even if we use thick wires, the voltage drop will always be at least 0.5V per ampere. In the schematic above the feedback terminals are FB+ and FBGND. R19 and R16 devide the actual output voltage by 2 and R13 feeds it back to the non-inverting pin of opamp U2. The inverting pin of U2 is connected to P2 via R17. U3 is a cheap 15V voltage stabalizer. To keep it as stable as possible, it is fed by separate transformer winding (or a separate transformer), bridge rectifier (G1) and smoothing electrolytic (C3). So Vp=0.5VOUT and Vn ranges from 0 ... 15V. Lesson 9 tought us that if Vp > Vn, U2's output is 15V. T5 will be saturated and the base voltage of the driver darlingtom T3/T6 will be 0V. The load at the output terminals will discharge C2 until Vp < Vn. At that moment, U2's output will become 0V, T5 opens, and a current starts to flow in R4 and the bases of T3 and T6. This current will saturate the darlington. A large current will charge C2 and feed the load. This will continue until Vp > Vn. At that point everything starts all over again. Again we see that opamp U2 tries to keep Vp equal to Vn, just like an opamp amplifier. In matter of fact, U2 is used as an amplifier: it amplifies the voltages over P2 (=Vn) 2 times (because R19 and R16 devide the output voltage by 2). Since Vn ranges from 0 ... 15V, VOUT will range from 0 ... 30V. Without R21 and R22, we should not turn on the power supply until FB+ and FBGND were both connected! If FB+ and FBGND were disconnected, U2 might have thought that the output voltage were too low, and a voltage of 40V or more might have appeared across the output terminals! When T5 closes, there may still be up to 30V across C2. Since The base voltage of T3 is 0V, there will be -30V between the base of T3 and the emitter of T6. However, T6 cannot withstand voltages less than -7V. For T3, VBE must be greater than -60V. R5 and R20 devide the -30V, so that T6 will survive.

Current limitation
When the output current increases, the voltage across R14 will also increase. This voltage is amplified by the cicuitry around opamp U1. The gain can be controlled by potmeter P1. When U1's output voltage exceeds 0.6V, T2 switches on. This causes a current flow in T1, which also switches on. The current flow in R3 switches on T5 and the voltage at the output terminals will drop to 0V. Of course, the current flow will also be 0A, and VR14 will also be 0V. However, T1 also feeds T2 via R1, so the output voltage remains 0V until switch SW1 is closed. WARNING: remove the load prior to closing SW1. The overload protection does not work as long as SW1 is closed! You may wonder why the voltage across R14 is first devided by R9 and R10 and then amplified by U1. In the the worst case scenario, the OUT terminal is shorted to the GND terminal. This means that the full output voltage will be across R14. This voltage can be up to 30V. However the supply voltage of U1 is just 15V. If the non-inverting pin were directly connected to the GND terminal, opamp U1 would be destroyed, because the input voltage of an opamp should never exceed its supply voltage. R9 and R10 make sure that Vp never exceeds 15V. Capacitor C1 prevents current spikes triggering the overload protector.

Protective circuitry
When you switch off the power supply, C5 and C3 will remain charged for a certain period of time. Since C5 is much larger than C3, it is very likely that C3 will be empty while C5 is still charged. If C3 is empty, U2 ceases to function, T5 will be open and the full voltage across C5 will appear on the output terminals! The protective circuitry around T4 will prevent this. While U2 receives its supply voltage T4 remains closed and everything works as it should. However, when U2 loses its supply voltage, T4 opens. In that case, T5 closes due to a current flow in R18 and D5. This will make sure that the output voltage remains 0V. 34

Lab Power Supply

Choosing your components


When you want to build this power supply, you may encounter some difficulties while buying the components. Or maybe you want to build one that has different characteristics. For transformer L1, I use a 30V transformer with an extra 20V winding. If you can't find a transformer like this, you can also use 2 transformers. The maximum voltage across C5 will be 30V2 - 1.4 = 41V. So I choose for G2 a B80C5000/3300. (80 = maximum voltage; 5000 = maximum peak current [mA]; 3300 = maximum continuous current [mA]). C5 should be able to sustain 50V. The maximum power dissipation in R4 is 41 /3k3 = 0.51W. Usually, you take the next value available, in this case 1W. However, in this case the voltage across R4 will not continuously be 41V, but just for short periods of time. So I took a 0.5W resistor. T6 is a high power transistor. Make sure you cool it using a proper heatsink. I also attached T6 to the metal case of my power supply. Its minimum current gain is 20, so the maximum current in T3 is 2A/ 20 = 0.10A. The maximum power dissipation in T3 is 41V0.10A=4.1W. According to the datasheet, the maximum power dissipation without heatsink is just 2W, so this transistor needs a little heatsink. N.B. Do NOT use a TIP41, since its VCE,max = 40V. Use a TIP41A, B or C. T1 can be any PNP transistor. T2 can be any NPN transistor. T4 and T5 can be any transistor where VCE,max >= 45V. So American users should take care when applying a 2N3904 here; the maximum VCE of this transistor is 40V. If anyone knows a good American replacement for it, please let me know. (I'm not sure if the BC-series are available in America.) The maximum power dissipation in R14 is 3 0.5 = 4.5W. The next available value is 5W. For opamps U1 and U2 I used a CA3140. Do not use a cheap 741 or so; these are not suitable for this job. If you want more than 30V output voltage, you need to change more than just the transformer. You also need higher voltage versions of C2, C5, T4 and T5. You also need to change the voltage deviders R19/R16 and (maybe) R9/R10. For example, if you want to build a 40V power supply, C2 = 10uF/50V and C5 = 10000uF/63V. T4 and T5 should be replaced with a BC546. Without any change, the maximum voltage on the non-inverting pin of U1 is 40V/2.8 = 14.2V. Although this is less than 15V, you'd better replace R10 with a 2k2 resistor. When VFB+ = 40V, Vp,U1 should (still) be 15V. This means that R19/R16 should devide the voltage by 40/15 = 2.67: R19 = 56k and R16 = 33k. If you need less than 30V, you only need a lower voltage transformer and different values for R19 and R16. For example, if VOUT,max = 20V, R19/16 should devide the feeback voltage by 20/15 = 1.33: R19 = 18k and R16 = 56k.
2 2

Assembly
You can download the PCB (printed circuit board) in several formats here: JPEG, EPS and HPGL. There are many ways to create a PCB from a layout, but that's beyond the scope of this course. The component layout looks like this:

35

Lab Power Supply

Components not mentioned on the board are: transformer L1, bridge rectifier G2, capacitor C5, C2 and diode D1. These are mounted in the cabinet. The positive terminal of C5 is connected to pin VSIN on the board, and its negative terminal is connected to the VSGND pin. C2 and D1 are directly soldered to the output terminals. The 20V winding of the transformer is connected to the AC20A and AC20B pins on the PCB. Transistor T6, potmeters P1 and P2, switch SW1 and LED D1 are mentioned on the PCB, but not mounted on it. I mounted T6 on the metal back pannel of the cabinet (electrically insulated!) and used three pieces of wire to connect it to the PCB. The other components are mounted on the front panel. Pins OUT and GND are the output terminals of the power supply. FB+ and FBGND are the feedback pins. I soldered them directly to the OUT and GND terminals. It is highly recommended to use IC sockets for U1 and U2: soldering out a defective chip can be quite a pain. When you're carefull not to mount diodes and electro's the other way around, you should have no problems on this project. And if it doesn't work immediately, you have enough knowledge to deduce the problem! Good luck!

36

Lab Power Supply

A picture of the power supply from one of the course members.

37

Chapter 11. Heatsink


Introduction
Heatsinks are used to prevent transistors from getting too hot. Air and plastic are a very bad heat conductors; the heat a transistor produces is not easily transferred to the surrounding air or plastic. Metal however is a very good heat conductor. That's why small power transistors have a small metal plate and large power transistors even have a full metal case. The larger the metal surface, the easier the produced heat is transferred to the ambient. And that is exacly what a heatsink does: enlarging the metal surface of a transistor. This chapter describes how to calculate the size of the heatsink you need.

Calculations
The ability to transfer heat is called the thermal conductance, but we always use the reciprocal value: the heat resistance. The thermal resistance (Rth) is measured in C/W. If the Rth of a heatsink is 1C/ W, the temperature will rise 1C per Watt power dissipation. So: R=T/P Doesn't this folmula look familiar? Yep, if you replace T with V and P with I, you get the formula for electrical resistance. This anology makes it very easy to calculate the heak sink you need: replace all heat producers with current sources and temperatures with voltages. Take a look at the diagram below.

This diagram shows transistor T6 of the lab power supply, a 2N3055 producing 60W at its junction. (The junction is the silicon chip inside the transistor.) The thermal resistance from junction to case is 1.5C/W. The ambient temperature is 25C. Resistor RTHC-A is the thermal resistance of the heatsink. This is the resistance we want to calculate. The maximum junction temperature of the 2N3055 is 200C. The 'temperature drop' across RTHJ-C is 60W1.5C/W = 90C. That leaves 200 - 90 - 25 = 85C for the heatsink. So RTHC-A = 85C/60W = 1.4C/W. Let's now calculate the heatsink for T3, a TIP41A. The maximum junction temperature is 150C. The datasheet says: when you keep the case temperature to 25C, the transistor can dissipate 65W. This means that RTHJ-C = 125C/65W = 1,9C/W. The transistor dissipates 4.1W, so the total resistance from junction to ambient may not exceed 125C/4.1W = 30.5C/W. So the thermal resistance of the heatsink should not exceed 30.5 - 1.9 = 28.6C/W. A very small heatsink will suffice. Important notes: When you attach a heatsink to a transistor, there will always be air pockets between the two metal plates. And air is a bad heat conductor. To reduce the thermal resistance between the transistor case and the heatsink, you should use special heat conducting paste (heatsink compound). Bear in mind that one of the pins (base, collector or emitter) will be internally connecteded to the metal case of a transistor. If you want to mount two transistors on one heatsink, make sure you don't create shortcuts. For example, both the TIP41A and the 2N3055 have their collectors 38

Heatsink connected to the case. In our lab supply, both collectors are connected anyway, so you can mount these transistors on the same heatsink. But obviously, this is not always the case! Fortunately, you can buy insulators to put between the transistor and the heatsink. Note however that this will introduce extra thermal resistance! In some catalogs you may find thermal resistances measured in K/W (Kelvin per Watt). This is the same as C/W: 1K/W = 1C/W. Transistor datasheets can be found on the internet.

39

Chapter 12. Power Amplifiers


Introduction
During this course, we've already learned how to amplify small voltages using transistors and operational amplifiers. The maximum output current of these amplifiers was very low and therefore not suitable for driving a loudspeaker. In this lesson we will learn how to increase the maximum output current.

Emitter follower
We already know that transistors are made for this job. Take a look at the picture below.

RL is an 8 loudspeaker. VBE does not depend on the AC input voltage; it's always about 0.6V. This means that for AC voltages vE = vB => vBE = 0 => vRL = vIN. Since the AC emitter voltage 'follows' the base voltage, this kind of amplifier is also called an 'emitter follower'. The picture next to the schematic above shows the output signal. As you can see, this amplifier works only for the positive half period of the input signal. During the negative half period, the base voltage drops below 0V, and T1 can be considered as an open switch. If we replace T1 with a PNP transistor (and connect its collector to -15V), the amplifier works only for the negative half period of the input signal. So we must combine these two.

Balance amplifier

Ah, that's much better. But what's that horrible distortion at ground level? When vIN = 0V, VB1 = VB2 = 0V (assumed R1 = R2). Since VRL is also 0V, VBE1 = VBE2 = 0V. This means that when VIN is between -0.6 and 0.6V, T1 and T2 both remain open. This usually happens when vIN crosses the 0V line. 40

Power Amplifiers That's why it is called 'cross-over distortion'. To get rid of this, we must make sure that the quiescent voltages VBE1 = 0.6V and VBE2 = -0.6V. This can be simply accomplished by adding two diodes:

Bias

This looks much better. Let's now calculate the proper values for R1 and R2. Assume RL is an 8W loudspeaker, VBE = 0.7V and hFE = 20. So u rms/RL = 8W => u rms = 8W8 => urms = 8V => utop = 8V2 = 11.3V => VRL,max = VE1,max = 11.3V => VB1,max = 11.3 + 0.7 = 12V => VR1 = VS - VB1 = 15 12 = 3V. IRL,max = VRL,max/RL = 11.3/8 = 1.4A => IE1,max = 1.4A. IB1,max = IE1,max/(hFE+1) = 1.4A/21 = 67mA = IR1 (IBID1). R1 = VR1/IR1 = 3V/67mA = 45. The quiescent diode current will be (215V - 20.7V)/(245) = 302mA. The power dissipation in R1 and R2 will be I R = 3.6W each! Needless to say, this is not a very economical amplifier. And to make things even worse: every diode has a certain resistance. And even if this resistance is just 5, it results in a 302mA5 = 1.5V voltage drop. This means that the voltage across the diodes increases from 0.7V to 2.2V! This means that VBE1 and VBE2 also increase. And if VBE increases, IC will also increase. Result: the quiescent collector current will be very large! Of course we could replace the diodes with resistors, making sure VBE will always be 0.7V. However, diodes have a major advantage: thermal stability. Transistor and diode parameters are temperaturedependent. If you keep VBE (or VD) constant, IC (ID) will increase with temperature. And vise versa: if you keep IC constant, VBE decreases with 2mV/C. So if you use resistors to keep VBE 0.7V, an increase in temperture will cause IC to rise. This may heat up the transistor, so IC increases even more, and so on... This is called thermal runaway. However, if you use diodes instead of resistors and attach the diodes to the transistors (to make sure they have the same temperature) there will be no thermal runaway: if the transistor heats up, the diode also heats up, reducing VBE preventing and increase of IC. The only way to reduce the power dissipation in R1 and R2 and the voltage drop across D1 and D2, is to reduce the (quiescent) current flow in these components. And that is only possible with larger hFE values. So we need darlingtons!
2 2 2

41

Power Amplifiers

Darlingtons

Assume hFE3 = hFE4 = 100. This means that the total hFE of each darlington is 2000. IRL,max = 1.4A => IE1,max = 1.4A. IB1,max = IE1,max/(hFE+1) = 1.4A/2001 = 0.7mA = IR1. VB1,max = 11.3 + 20.7 = 12.7V => VR1 = VS - VB1 = 15 - 12.7 = 2.3V. R1 = VR1/IR1 = 2.3V/0.7mA = 3.3k. Let's now calculate the maximum power dissipation in T1 and T2. PT1 = VCE1IE1 = (VS - VRL)(VRL/ RL) = (VSVRL - V
2 RL)/RL.

PT1 reaches its maximum value if dPT1/dVRL = VS - 2VRL = 0 => VRL = VS/
2

2 = 7.5V. PT1,max = (157.5 - 7.5 )/8 = 7W. Since T1 works only during the positive half periods, T1's (and T2's) maximum dissipation will be 3.5W.

Opamp
If you want to build an operational amplifier and a power amplifier into one device, you can do it like this:

42

Power Amplifiers

You don't need diodes or resistors anymore to prevent cross-over distortion; the opamp takes care of this. Since the opamp tries to keep Vp equal to Vn, the voltage gain is 2. Variable resistor (potentiometer) P1 allows you to adjust the quiescent output voltage to exactly 0V. An appropriate symmetric power supply can be found in another chapter.

43

Chapter 13. Inductors


Introduction
An inductor consists of a coil of wire, as its symbol shows:

The image above shows two coils. Inductor L1 has no core; the wire of L2 is wrapped around a ferrite (soft iron) core. What will happen if we connect a DC voltage source (battery) to an inductor? As a child, you may have built an electromagnet by wrapping copper wire around a nail and connecting it to a battery. Without knowing it, you actually created an inductor. Now you know what happens if you connect an inductor to a battery: you end up with an electromagnet. Be careful though; small coils you buy in a store are made of very thin wire. If you connect it to a battery, the high current may overheat the inductor within a second. Although electromagnets are very useful, things get really interesting if we connect an inductor to an AC voltage source. When you disconnect an inductor from its battery, it wants to keep its magnetic field. Reversing the magnetic field is therefore not an easy task. But that's exectly what an AC current wants to do: it wants to reverse the magnetic field over and over again. The higher the frequency, the harder this will be. In other words: an inductor blocks AC currents, but conducts DC currents. The unit of inductance is Henry, symbol H. In schematics, you usually find mH (miliHenry) and uH (microHenry).

The impedance of an inductor


The impedance of a component is the resistance of that component for AC voltages. The symbol for resistance is R; the symbol for impedance is X. The impedance of an inductor is not zero; it depends on the inductance (number of turns; core material) and the frequency of the signal (number of polarity changes (forth and back) per second). The impedance can be calculated using the following equation.

f is the frequency in Hertz; L is the inductance in Henry Example: We have a 1mH inductor and connect it to a 50Hz AC voltage source. Calculate the impedance of the inductor. XL = 25010 = 0.31.
-3

Relation between voltage and current


For any voltage v(t) the following equation is true:

It shows a 90 degrees pahse shift if v(t) is sinusiodal: the integral of a sine is a (-)cosine. 44

Inductors It also shows that, if we apply a constant voltage V across an inductor, the current flow in it will increase linearly: v(t) = v(0) + Vt/L. If we remove this voltage, the current flow will continue, provided of course there's a path. If there is no path for the current, a large voltage peak will appear across the inductor. Hence the diode across a transitor-controlled relay:

A relay consists of an electromagnet and a switch that closes when a current flows in the electromagnet. This current is generally controlled by a transistor. When the transistor turns off, there is no path for the coil current. The voltage peak across the relay may destroy the transistor. The diode will prevent this. After turning off the relay, the coil current will flow in the diode.

Frequency filters

Take a look at the diagram on the right. Assume that the voltage source supplies a 1V/10kHz signal (this means: the amplitude is 1V and the frequency is 10kHz = 10000Hz). The impedance of inductor L will be XL = 210 10 = 62.8. The output voltage (voltage across inductor L) will be 1V(XL/(ZR+L)), where ZR+L is the total impedance of R and L. Because an inductor, just like a capacitor, causes a phase shift in in the current flow, we cannot just state that ZR+L = R + XL. Using some complex math we can prove that: ZR+L = (R +XL ). In our case ZR+L = (1k +62.8 ) = 1002. Thus, the output voltage is 1V(62.8/1002) = 0.0627V. (By the way, an inductor causes a +90 degrees phase shift, while a capacitor causes a -90 degrees phase shift.) Now assume that the voltage source supplies a 1V/10MHz signal. The impedance of inductor L will then be XL = 210 10 = 62.8k. So ZR+L = (1k +62.8k ) = 62.8k. This is the same as XL, so 45
7 -3 2 2 2 2 2 2 4 -3

Inductors the output voltage will be 1V. So we created a very simple frequency filter with just a resistor and a inductor. In this case we created a so called high pass filter (HPF) since high frequency signals pass this filter easily while frequency signals are suppressed. If you swap R and L, you create a low pass filter (LPF). Let's calculate the cut-off frequency of our filter. The cut-off frequency is the frequency at which R = XL => R = 2fL =>

In our case f = 1k/(210 ) = 159kHz.

-3

Quality factor
In the previous sections we only looked at ideal inductors. However, every inductors has a certain series resistance. This is not only determined by the resistance of the wire, but also by the kind of material the wire has been wrapped around. This resistance looks very much like the ESR of a capacitor. But with inductors we don't talk about ESR, but about the quality factor Q, which is defined as: Q = XL/rL where rL is the series resistance. XL and rL are both frequency-dependant, but not to the same extent. Q is therefore also frequency-dependant. Assume that the series resistance of the inductor in the previous section is 20 ohms at 159kHz. The quality factor at 159kHz will then be 1k/20 = 50. The Q plays an important role in determining the notch depth and the bandwidth of LC filters. This will be discussed in a next lesson. This lesson will also teach us how to measure the Q without expensive equipment.

46

Chapter 14. Decibels (dB)


Power and Voltage Ratios
If you browse through the technical specs of your stereo amplifier or your boom box, you'll notice that some parameters are specified in dB. For example: S/N ratio: 70dB; channel separation: 60dB. What does this mean? dB is defined as 10log(P1/P2) Since P1 = V1 /R and P2 = V2 /R, we can also write: dB = 10log(V1 /V2 ) = 20log(V1/V2) In case of a signal-to-noise ratio (S/N ratio or SNR), dB = 20log(Vsig/Vnoise) Knowing this, we can calulate the Vsig:Vnoise ratio if the S/N ratio is 70dB: 70dB = 20log(Vsig/Vnoise) => log(Vsig/Vnoise) = 70/20 = 3.5 => Vsig/Vnoise = 10 = 3162. This means that the music signal is 3162 times stronger than the noise generated by the amplifier. Channel separation indicates how much signal meant for the right channel is present in the left channel and vice versa. If the channel separation is 60dB, the wanted channel signal is 10 = 1000 times stronger than the unwanted channel signal. In other words: if you only listen to the left loudspeaker, you will also hear the music that should only come from the right speaker. However, this 'unwanted channel signal' is 1000 times weaker than the music coming from the right speaker. In the previous lesson, we learnt that the attenuation of an RL filter is about 10 times per decade. How much is this in dB? Since we were looking at the voltage attenuation, the attenuation of an RL filter is 20log(10) = 20dB per decade.
60/20 3.5 2 2 2 2

Reference-related dBs
In case of reference-related dBs, dB is defined as 10log(P/Pref) or 20log(V/Vref). In the table below you find the most commonly used dBs. dBV dBW dBj dBm Vref = 1VRMS Pref = 1W Vref = 1mVRMS Pref = 1mW dBV = 20log(V/1VRMS) dBW = 10log(P/1W) dBj = 20log(V/1mVRMS) dBm = 10log(P/1mW) dBu = 20log(V/0.775VRMS)

dBu (=dBv) Vref = 0.6V = 0.775VRMS (0.6V is the voltage across a 600 ohm resistor dissipating 1mW) Examples: 0dBV = 1V = 60dBj; 0dBW = 1W = 30dBm.

47

Chapter 15. Vocal Eliminator


Introduction
A vocal eliminator is a device that removes the vocals from a song. These devices are primarily used by professional singers. Amateurs want to have one, but these eliminators are quite expensive. So the poor amateurs always had to perform their soundmix show by simply singing louder than the artists on CD. Well... not anymore! Simply build this vocal eliminator and amaze your friends!

Schematic
Vocal eliminators use the fact that only the music is recored in stereo; the vocals (of the lead singer) are recorded in mono. This means that we only have to subtract the left channel signal from the right channel signal. Unfortunately, this also eliminates nearly all low frequence signals (bass); these have to be added afterwards. The schematic below does exactly that:

Opamps U1.A and U1.B buffer the input signals. Opamp U1.D is used as a differential amplifier. It's a combination of an inverting and a non-inverting amplifier. Since R3 = R4 = R5 = R6, U1.D's output is RIN - LIN. The inverting amplifier around opamp U1.C adds RIN and LIN. Its output is fed to a low pass filter (R11, C1, U2.A). The result is a signal that only contains the low frequency part of both the left and the right channel. This signal is added to RIN - LIN by opamp U2.B. Output resistors R14 and R15 make sure U2.B survives an accidental short to ground of the output terminals.

Choosing components
Opamps: You can just take any opamp you like. I used a TL084 for U1.A...U1.D and a TL082 for U2.A and U2.B. A single TL084 contains 4 opamps; a TL082 contains 2 opamps:

48

Vocal Eliminator

Resistors All resistors except R3...R6 are generic 1/4W resistors. R3...R6 should be 1% precision resistors to make sure that U3's output is exactly RIN - LIN. If you want to control the amount of bass signal, you may replace R12 with a variable resistor. Power supply The power supply has not been drawn in the schematic. It can be just a simple small symmetric power supply. A +/- 6V supply is sufficient for the vocal eliminator, so, in the supply, TR1 can be a 15V transformer and U1 a 78(L)12 voltage regulator.

Testing
Connect RIN and LIN to the line out terminals of a CD player, cassette deck or whatever you use as the music source. Connect ROUT and LOUT to the line in terminals of an amplifier. If you have a mono amplifier, just connect either ROUT or LOUT. Note however that the music source must be stereo. If you play a mono CD track or tape, RIN and LIN are the same, so RIN - LIN = 0. You can test this by temporarily removing R12. You should hear no sound. If you disconnect LIN or RIN, you should hear the music. Having R12 still removed, play a stereo song. You should now hear the music, but no vocals. Otherwise, the vocals are recorded in stereo as well; try another song (preferably from another CD or tape). If you hear that the vocals are gone, you can put R12 back in place. If you hear the vocals again, the low pass filter may not have been properly dimensioned. Experiment a little with R11 and C1. If you can't get it right, you may need to add a second filter (just between R11/C1 and the + pin of U2.A), making the attenuation 40dB per decade.

Assembly
You can download the PCB (printed circuit board) of the vocal eliminator in several formats here: JPEG, EPS and HPGL. There are many ways to create a PCB from a layout, but that's beyond the scope of this course. The component layout looks like this:

49

Vocal Eliminator

The power supply has its own PCB. You can mount both boards in one cabinet, or in separate cabinets. If you give the power supply its own case, you can use it for other projects as well.

50

Chapter 16. Symmetric power supply


Introduction
Several projects and lessons need a symmetric power supply. This chapter describes several of them.

Up to about 25mA

G1 is a cheap B80C800 bridge rectifier. The 7824 is a 24V/1A voltage regulator. It looks like this:

1=IN, 2=GND, 3=OUT. You may also use a 78L24, a 24V/100mA voltage regulator. It looks like this:

1=OUT, 2=GND, 3=IN. The resistors devide the 24V output voltage; the voltage across R2 (and R1) will be 12V. The opamp buffers this 12V voltage. The maximum power dissipation of the opamp is about 600mW, so make sure the output current doesn't exceed 600mW/24V = 25mA. You can download the PCB (printed circuit board) in several formats here: JPEG, EPS and HPGL. There are many ways to create a PCB from a layout, but that's beyond the scope of this course. This is the component layout:

51

Symmetric power supply

After soldering every component in its place, connect a power cord to power pole connector J1, and make sure the output voltage of the power supply is correct.

Up to 1A

G1 and G2 are both B40/C1500 bridge rectifiers. The 7812 is a 12V voltage regulator; the 7912 is a -12V voltage regulator. They both look like this:

7812: 1=IN, 2=GND, 3=OUT. 7912: 1=GND, 2=IN, 3=OUT. The voltage across C1 and C3 is about 21V. The output voltage of the regulators is +/- 12V. So the voltage drop is 9V. Without a heatsink, the thermal resistance from junction to ambient is 65C/W. The maximum junction temperature is 150C. When the room temperature is 25C, we don't need a heatsink when the power dissipation doesn't exceed (150-25)/65 = 1.9W. To be safe, start using a heatsink when the power dissipation exceeds 1.5W. This means it's safe not using a heatsink up to 1.5W/9V = 166mA output current. Do NOT mount both regulators on the same heatsink without using an insulator! Also make sure that the screws don't create shorts. You can download the PCB (printed circuit board) in several formats here: JPEG, EPS and HPGL. There are many ways to create a PCB from a layout, but that's beyond the scope of this course. This is the component layout: 52

Symmetric power supply

After soldering every component in its place, connect a power cord to power pole connector J1, and make sure the output voltage of the power supply is correct.

53

Chapter 17. JFETs


Introduction
The acronym FET stands for Field Effect Transistor; the J stands for Junction. JFETs are transistors with a very high input resistance. They have three terminals: Drain, Gate and Source. JFETs come in two flavours: N-channel and P-channel:

A JFET looks like a voltage-controlled current source; the current source between the Drain and the Source is controlled by the voltage across the Gate and the Source. The ratio dID/dVGS is called the forward transfer admittance, symbol yfs. To make an N-channel JFET work, the Gate voltage must always be less than the Drain and Source voltages. That means that VGS must be negative. If VGS becomes more negative, ID will decrease. The voltage at which the drain current becomes zero, is called the pinch-off voltage. A JFET only behaves like a voltage-controlled current source if VGD is less (more negative) than the pinch-off voltage. Otherwise, the JFET will behave like a voltage-controlled resistor. (For an explanation, take a look inside a JFET.) Let's take a look at the BF245A, an N-channel JFET. According to the datasheet, yfs = 3mA/V (or 3mS, millisiemens). ID = 1mA if VGS = -1V. If VGS increases by 0.5V, ID will be 1 + 0.53 = 2.5mA. We can use this behaviour to create an amplifier.

JFET amplifier

The diagram above shows a very simple JFET amplifier. Let's make some DC calculations (no input signal). T1 is a BF245A. The datasheet tells us that the yfs is 3mA/V if -1<VGS<0. So we choose VGS = -0.5V. At that voltage, ID = 2.5mA. We want VOUT to be 6V, so RD = 6V/2.5mA = 2.4k. 54

JFETs Since VG = 0V and VGS = -0.5V, VS must be 0.5V. So RS = 0.5V/2.5mA = 200. Next, we connect a 0.1Vt sinus signal to the IN termial. What will be the the amplitude of the output signal? A 0.1V change in VGS causes a 0.1V3mA/V = 0.3mA change in ID and thus a 0.3mA2.4k = 0.8V change in the output signal. So the voltage gain is 8 (or actually -8; it's an inverting amplifier). Capacitor CS makes sure that VS remains constant, so that vGS = vIN (for AC signals). RI is usually 1M or so. It guarantees that VIN = 0V (DC), while the input resistance remains very high. Just like the current gain (hFE) of a bipolar transistor may vary over a wide range, so may the forward transfer admittance of a JFET. In case of the BF245A, yFS may vary between 3 and 6.5mS. Far worse is the fact that the pinch-off voltage of a BF245A ranges from -0.25 to -8V. That means that at VGS=0.5V, ID can be much less or greater than the 2.5mA mentioned above; that was just a typical value. Resistor RS is therefore often replaced by a current source.

JFET current source

We already saw that the JFET is a voltage-controlled current source. If VGS remains constant, so will ID. The circuit above makes use of that behaviour. The transistor is a BF245B. VGS = 0V. According to the datasheet ID will be 10mA. In this simple circuit we use it to supply an LED with a current flow that is independant of the source voltage. Note that we cannot use this current source in the JFET amplifier in the previous section. The JFET in the current source has the same parameter variety as the one in the amplifier. That's no problem for driving LEDs, but it is in an amplifier.

55

Chapter 18. MOSFETs


Introduction
As said in the previous lesson, the acronym FET stands for Field Effect Transistor; MOS stands for Metal Oxide Silicon. There are enhancement and depletion MOSFETs. Each type is available in an N-channel and Pchannel flavour. This means that there are four types of MOSFETs available:

JFETs and MOSFETs have many properties in common: Both have a very high input resistance. Both have three terminals: Drain, Gate and Source. Some MOSFETs have an extra Bulk terminal. Both can look like a voltage-controlled current source; the current source between the Drain and the Source is controlled by the voltage across the Gate and the Source. The ratio dID/dVGS is called the forward transfer admittance, symbol yfs. Both can also look like a voltage-controlled resistor; VGD must be between 0V and the pinch-off voltage. JFETs and depletion MOSFETs have even more in common: At VGS=0V, the D-S channel is conductive. (Enhancement MOSFETs need a certain G-S voltage before a Drain current can flow.) To close an N-channel, VGS must be negative; increasing VGS will increase ID. Of course, there are also differences between JFETs and MOSFETs. MOSFETs make perfect switches. The channel resistance in 'on mode' is very low, generally less than 10 ohms. To switch an N-channel enhancement MOSFET on, simply apply a high enough voltage across the Gate and Source. You cannot do that with a JFET, because a JFET's VGS must be negative (N-channel); when VGS is positive, the G-S diode will be forward-biased, dramatically decreasing the input resistance! And although MOSFETs make perfect switches, they can be used in amplifiers as well.

56

MOSFETs

MOSFET amplifier

The diagram above shows a very simple MOSFET amplifier. T1 is an depletion N-channel MOSFET. Assume its datasheet tells us that the VGS threshold voltage is -2V, and that yFS=10mA/V at VGS=0V. If R1=470, the gain will be 10mA/V470 = 4.7.

Dual-gate MOSFETs
A dual-gate MOSFET consists of two MOSFETs in series:

Typical applications are: An amplifier with gain control. The input signal is fed to G1. The voltage at G2 controls the gain, because it determines the thickness of the channel of the top MOSFET. The transfer characteristics below shows the drain current versus VG1 for different values of VG2.

57

MOSFETs It clearly shows that yfs (=ID/VG1) depends on VG2. And, of course, this means that the gain depends on VG2. In an antenna amplifier, weak signals should be amplified enough to be processed by the next stage. But stong signals shouldn't overload the next stage. We only need a simple circuit that produces a voltage of, say, 5V for weak signals and 1V for strong signals and feed that voltage to G2. That's how AGC (Automatic Gain Control) implemented in many receivers. An AM modulator. An AM modulator is a device that varies the amplitude of a high frequency signal with a low frequency signal. This is simply done by connecting G1 to the HF signal and G2 to the LF signal. Like above, the gain will vary with VG2 and thus with the LF signal. HF amplifier. The amplifier in the previous section works fine for low frequency signals, but it's not suitable for amplifying antenna signals in a TV set. Due to the MOSFET's construction, the capacitance between Gate and Drain is relatively high, about 5pF for a small signal MOSFET. At 100MHz, this means an impedance of just 318. But the capacitance between G1 and Drain of a dual-gate MOSFET can be as low as 20fF (1fF = 1 femto-Farad = 10 F). At 100MHz, the impedance will be 79.6k. G2 if usually connected to the possitive supply voltage, or to an AGC voltage (see above).
-18

58

Chapter 19. LC filters


Introduction
We have already learned about filters consisting of a resistor and a capacitor and of a resistor and an inductor. In this lesson we will learn about filters consisting of a capacitor and an inductor.

High pass filter


As a start, we will look at the following two filters.

A previous lesson tought us that the filter on the left has a cut-off frequency of 159kHz. The XC of the 1n capacitor is 1k at 159kHz. So the cut-off freqency of the filter on the right is also 159kHz. However, at 10kHz, XC will be 15.9k. The output voltage will be 1V(XL/(ZL+C)). Again, we must use some complex math to prove that: ZL+C = |XL - XC|. At 10kHz this will be |62.8 - 15.9k| = 15837.2. The output voltage will be 1V(62.8/15837.2) = 0.00397V. This means that a CL filter suppresses unwanted freqencies much better than RL filters. Let's calculate how much better. To do this we calculate the output voltage of both filters at one tenth of the cut-off frequency, i.e. 15.9kHz. At this frequency, XC=10k and XL=100. Vout,RL=1V(XL/(XL +R )) = 1V(100/1005k) = 0.0995V. This is 10 times less than the input voltage. Vout,CL=1V(XL/|XL-XC|) = 1V(100/9.9k) = 0.0101V. This is 100 times less than the input voltage. Calculating the output voltages at one hundreth of the cut-off frequency (i.e. 1.59kHz) gives: Vout,RL=1V(XL/(XL +R )) = 1V(10/1000.05) = 0.0099995V. This is 100 times less than the input voltage. Vout,CL=1V(XL/|XL-XC|) = 1V(10/99.99k) = 0.0001V. This is 10000 times less than the input voltage. We see that the attenuation of an RL filter is 10 times (or 20dB) per decade, and the attenuation of a CL filter is 100 times (or 40dB) per decade! The same is true for RC and LC filters. Let's now calculate the cut-off frequency of an LC filter. We already know that XC=XL. It can now be easily proven that:
2 2 2 2

59

LC filters Filling in L=1mH and C=1nF gives f=159kHz (but we already knew that).

Band pass filter

The circuit above is called a band pass filter, because olnly a band of frquencies appears at the output. The capacitor stops all low frequencies and the inductor all high frequencies. The current flow in C and L is the same. The phase shift in the voltage across the capacitor is +90 degrees; the phase shift in the voltage across the inductor is -90 graden. The phase shift between both voltages is therefore 180 graden, and are thus in anti-phase! The output voltage reaches its maximum value if the voltages across C and L are equal; they simply cancel each other, and the full input voltage will appear across R. If the voltages are equal, XC must be equal to XL. The previous section already showed us that in that case:

We have also found a way to determine the quality factor Q of the inductor. We already know that Q=XL/rL. And rL can easily determined, because we have a simple voltage devider here, since the total impedance of C and L at resonance frequency is rL. The full procedure is: 1. Adjust the source frequency to the frequency you want to know the Q of; 2. Adjust C to maximum output voltage; 3. Calculate rL and Q. Example: we want to determine the Q of an inductor at 159kHz. 1. Adjust the source frequency to 159kHz; 2. Adjust C to maximum output voltage. It appears to be 0.83 times the input voltage; 3. The voltage across rL is 0.17 times the input voltage. So the ratio rL:R is 0.17:0.83. This means that rL is about 20 ohms. So: Q=1k/20=50. Please note that we asumed that the internal resistance of the source is 0 ohms. In reality, that will never be the case. Additionally, we need very accurate voltage meters and rL is usually very small causing high current flows. Later in this lesson we will discover a better method. But let's first determine the bandwith of our filter.

60

LC filters

The bandwith is determined by the frequencies at which the output voltage is 3dB less than its maximum value. The maximum voltage is at -1.6dB, so we need to read the frequencies at which the output voltage is -4.6dB. The lowest frequency is about 150kHz and the highest 169kHz. So the bandwidth is about 169kHz-150kHz=19kHz. Fortunalely, we can also calculate the bandwidth: B=f(R+rL)/XL In our case: B=159kHz120/1k=19.1kHz. (R+rL)/XL looks very much like 1/Q. XL/Rtotal is therefore also called the quality factor of the circuit. So the bandwidth can also be noted as: B=f/Qc In our example Qc=1k/120=8.3. So B=159kHz/8.3=19.1kHz. When we swap R and C, we get a low pass filter:

At low frequencies, the output voltage is equal to the input voltage (so Vout/Vin=0dB). We may expect it remains this way until the cut-off frequency (159kHz) at which point it will decay by 40dB per decade. However, we first see the capacitor voltage increasing to about 18.4dB. At this point, the voltage is 8.3 times higher than the input voltage! This ratio is eual to Qc. By making R 0 ohms, the voltage ratio will be equal to the inductor's Q! This is the second method to determine the Q of an inductor. We don't need very accurate voltage meters anymore, but the source's input resistance and the (possible) high currents are still bothering us.

61

LC filters

Band pass filter with a smaller band

This circuit is also a band pass filter. High frequencies are shorted by the capacitor and low frequencies by the inductor. It can be proven that: Zr=QXL where Zr is the impedance at resonance freqency and Q is the quality factor of the inductor. This equation is an approximation, but the Q of most inductors is so large that it can almost always be used. Some complex math proves that the impedance reaches its maximum value at:

Again, this is an approximation that assumes the series resistance of the inductor is so small that it doesn't affect the frequency. In our case f is 159kHz again. If rL is 20 ohms, Q is 1k/20=50. Zr will be 501k=50k. The current and the input voltage are in phase, so: Vout,max/Vin=Zr/(R+Zr)=50k/1050k=0.0476. The image below shows the frequency response.

The bandwidth is about 160.7kHz-157.5kHz=3.2kHz. If RZr and Q is large enough, then: B=f/Q. In our case B=159kHz/50=3.18kHz. 62

LC filters And this is finally the best way to determine the Q of an inductor: 1. Adjust the source frequency to the frequency you want to know the Q of; 2. Adjust C to maximum output voltage; 3. Turn the source frequency down until the output voltage decreased by 3dB (=factor 1.41); 4. Increase the source frequency until the output voltage is again 3dB less than the maximum voltage; 5. Subtract both frequencies. This is the bandwidth; 6. Calculate Q: Q=f/B With this method, the internal resistance of the source doesn't matter, and we don't run the risk of a high current flow.

Resonance
What will happen if we attach a charged capacitor to an inductor? Of course, the capacitor will discharge, causing a current to flow in the inductor. If the voltage across the capacitor has become zero, there will still be a current flow in the inductor. This current will re-charge the capacitor. The voltage across it will become negative. When the indictor has transferred all its energy to the capacitor, the capacitor will discharge again. Next, the inductor will charge the capacitor and everything will start all over again. This is called oscillation. The frequency equals:

Tuned circuit

Ever wondered how on earth a radio (or a TV set) is capable of picking up the right channel out of hundreds of channels available? One way of doing this using a tuned circuit. A tuned circuit consists of a capacitor and a parallel-connected inductor. Usually, the capacitor can be tuned: you can change its capacitance by turning the attached knob. Actually, this circuit is the band pass filter from a previous section. So the bandwidth is equal to B=f/Q and the resonance frequency can be calculated using:

The notch must be small enough to block all other channels, but wide enough to allow the full signal of the selected channel to pass. When the antenna picks up a signal close to this frequency, the tuned circuit will resonate on that frequency. Just look what happens if the antenna picks up a 159kHz radio signal: 63

LC filters

Another radio station broadcasts at 149kHz, just 10kHz below the resonant frequency. The image below shows the signal for this frequency.

The difference is obvious. The detector (a circuit that demodulates a radio signal to audible sound) will only work on the 159kHz signal; the 149kHz signal is simply too weak.

64

Chapter 20. Miscellaneous filters


Introduction
In this lesson we will learn about coupled filters and T-filters.

Coupled filters
Filters can be coupled both inductively and capacitively:

The top circuit is an inductively coupled filter. The two at the bottom are capacitively coupled filters. In inductively coupled filters, the windings of the inductors are wrapped around the same core. The ratio VL2:VL1 (omitting C1 and C2) is called coefficient of coupling k. This coefficient has a major influence of the frequency response:

From left to right, k increases. This will result in an increasing output voltage. When k reaches a certain value, the frequency response starts having two top values. A filters are critically coupled when this just doen't happen. This appears to be the case when k = 1/Q, in which Q is the quality factor of both inductors. Of course, both inductors need to have the same Q. If k < 1/Q; the filter is undercoupled and will be narrow banded. If k > 1/Q; the filter is overcoupled, and will be wide banded. In capacitively coupled filters, k is deternined by capacitors. The cirtuit on the left shows top coupling. Here, k = CT/(C3C4). The filter on the right shows foot coupling, where k = (C6C7)/CF. When we compare coupled filters with LC filters, we'll see that coupled filters are much steeper. In the narrow banded LC-filter the difference in output voltage at 150kHz and 159kHz is about 15dB. In the critically couple filter, this difference is about 35dB! Note however that the output voltage of a coupled filter is much less than that of an LC filter. 65

Miscellaneous filters

The picture above is a part of the circuit diagram of a radio receiver. The transistor amplifies the input voltage and the coupled filter picks out the wanted signal. You notice that the manufacturer used a tapped inductor. The voltage at pin 9 will be less than at pin 8, which reduces the current flow drawn by the next stage. This is important, because this current will change the resonance frequency if it's too high.

Twin T-filter

The circuit above is called a twin T-filter. The current in the resistors is in phase with the voltage. The phase shift in the current in the capacitors will be 180 degrees. At a certain frequency the current amplitues will be same, but in anti-phase. This frequency will therefore be suppressed. The circuit is therefore called a band stop filter, or notch filter. The center frequency equals:

If R = 1k and C = 1n again, this frequency will be 159kHz. This picture below shows the frequency response.

66

Miscellaneous filters A twin T-filter with feedback can be found on my projects page.

Bridged T-filters

These are also band stop filters. Both filters have the same frequency response, which is even steeper than that of a twin T-filter:

To calculate the central frequency, we can use the same equation as for simple LC filters:

At this frequency the output voltage will be 0V if R = QXL/4.

67

Chapter 21. Frequency-independant voltage devider


Introduction
In one of the first lessons we have already learned about voltage deviders. These voltage deviders consisted of resistors only, and were therefore frequency-independant. However, when we want to connect a voltage devider to some measuring equipment, we'll have to take its input capacity into account. In this chapter the 'measuring equipment' is an oscilloscope, which input impedance can be seen as a 1M resistor parallel connected to a 30pF capacitor; this is usually written as 1M//30pF. At 159Hz the impedance of the 30pF capacitor is also 1M. So the total impedance at 159Hz is just 500k. The input-impedance is frequency-dependant. A 9M resistor will not suffice to devide the voltage by 10. This wordt for DC voltages, but at 159Hz the voltage will not be devided by 10, but by (9M+500k)/ 500k = 19! We will first create an HF probe that doesn't have this problem. Next, we will discover how this problem is solved in the attenuator of an oscilloscope.

HF probe
The most simpele HF probe contains just a resistor and a variable capacitor:

RIN and CIN make the input impedance of the scope. RP and CP make the probe. For DC voltages VRIN/VRP = RIN/RP. For high frequency voltages VRIN/VRP = XCIN/XCP = CP/CIN. To make the voltage devider frequency-independant RIN/RP must be equal to CP/CIN. So: CP = CINRIN/RP. In our case CP must be adjusted to 30p1M/9M = 3.33pF. If you own a scope and HF probe, you already know that the probe has a little 'screw' that needs to be adjusted. That screw is capacitor CP. CP can be adjusted properly by connecting the probe to a square wave voltage. A square wave signal contains many sinusoidal signals. E.g. a 1kHz square wave contains sinusoidal voltages of 1kHz, 3kHz, 5kHz, 7kHz, etcetera. If CP has been adjusted properly, a square wave will appear on the scope's screen (left). All frequencies the square wave consists of will be attentuated equally. If CP is too low, the higher frequencies will be attenuated too much (middle); if CP is set too high, the higher frequencies will not be attenuated enough (right).

68

Frequency-independant voltage devider

RP and RIN are in series, so the input resistance is 1M+9M=10M. CP and CIN are also in series, so: 1/C = 1/CP+1/CIN = 1/3.33p+1/30p. Thus, the input capacity is 3pF. So the input impedance of the probe is 10M//3pF.

Attenuator in an oscilloscope
Of course, the attenuator in an oscilloscope must also be frequency-independant. Moreover, the input resistance and capacitance must always be the same. Otherwise, we need to re-adjust our HF probe for every attenuator.

The picture above shows two attenuators. The top one devides the voltage by 10, the bottom one by 100. Let's first take a look at the top one. R103 is parallel-connected to the input resistance (RIN) of the scope. So the total resistance is: 1/R = 1/RIN+1/R103, so R = 100k. R102 is 900k, which means that the attenuation is 10, and that the input resistance remains 1M. C103 is parallel-connected to the input capacity (CIN) of the scope. The total capacity will be 47p + 30p = 77pF. VC102 must be adjusted to 77p100k/900k = 8.56pF. The new input capacity is 7.7pF. To make it 30pF again, VC101 must be set to 30p - 7.7p = 22.3pF. For the bottom attenuator we can follow the same route. R105 makes RIN 10.1k//1M = 10k. R104 is 990k, so the attenuation is 100. C105 makes CIN 82p + 30p = 112pF. VC104 must be set to 112p10k/ 990k = 1.13pF. The input capacity is now just 1.12pF. VC103 must therefore be adjusted to 30p 1.12p = 28.88pF.

69

Chapter 22. DIACs, SCRs and TRIACs


DIAC
A DIAC looks like a Diode for AC. If we increase the voltage across a DIAC (via a resistor), at a certain voltage it will start to conduct; the voltage across the DIAC becomes 0V. When we then decrease the voltage, the DIAC remains conductive. The DIAC doen't close untile the current ceases. The picture belows may make things more clear.

This DIAC starts to conduct when the supply voltage reaches 32V. Even when the supply voltage becomes less than 32V, the DIAC remains conductive. The DIAC only closes, when the supply voltages becomes 0V. It's obvious that the DIAC also works for negative voltages. Hence, a DIAC doen't have an anode and cathode like a normal diode.

SCR
SCR stands for Sicilon Controlled Rectifier. An SCR looks like a transistor: a current flow in one of the terminals (the gate) makes the SCR conductive. The difference however is that the SCR remains conductive when the gate current becomes zero. The SCR only closes when the current flow stops (just like a DIAC). Take a look at the picture below.

70

DIACs, SCRs and TRIACs By applying a voltage at the base of T1, T1 will turn on. This will provide base current to T2 wich will also turn on. On turn, T2 provides base current to T1, so the SCR remains turned on. The SCR only turns off in the voltage across anode and cathode becomes zero. We can make a very simple dimmer switch using an SCR:

While experimenting, keep in mind that the whole circuit (including P1!) is connected to the mains! Capacitor C1 is charged by R1 and P1. As soon as the voltage across C1 reaches the DIAC's breakdown voltage, the SCR starts conductiong and will turn on the lamp. The SCR will remain turned on until the mains voltage becomes 0V. And then things start all over again. The larger P1, the longer it takes before the voltage across the capacitor is high enough to make the DIAC and SCR turn on. A higher value of P1 will reduce the light output. When we turn on the light, we sometimes here a 'pop' coming from the loudspeakers of a radio. This cirtuit turns on the light 100 or 120 times a second (depending on the mains frequency). R2 and C2 reduce the amount of noise caused by the switching SCR.

TRIAC
The name TRIAC actually stand for 'TRIode for AC'. And triode is the ancient name for transistor. But 'SCR for AC' really is a better name. Just like an SCR, a TRIAC turns on by applying a gate current and doesn't turn off until the voltage across the TRIAC becomes 0V. A TRIAC is capable of conducting the positive and negative half period of an alternating current, provided that the gate current also alters its direction. The circuit below is a very common switch.

71

DIACs, SCRs and TRIACs While experimenting, keep in mind that the whole circuit is connected to the mains! U1 is an optocoupler. An optocoupler consists of an LED and a transistor. When the LED is turned on, the transistor will become conductive. This allows current to flow from the gate to A1. Now current will flow from A2 to A1 turning on the lamp. This circuit does have a disadvantage: there can be no current flow from A1 to the gate; so the TRIAC will be off during every negative half cycle! Fortunately, this can easily be resolved:

Optocoupler U1 contains a TRIAC instead of a transistor. This allows gate current to flow in both directions. There are also optocouples available that contain a zero-crossing detector, e.g. the MOC3041. In that case R2 and C2 can be omitted. One last remark: gate current always flows from or to A1. Therefore you cannot swap A1 and A2!

72

Chapter 23. TV Deflection Circuit


Warning

Caution! All information in this chapter is solely meant to explain the deflection circuitry in a TV set. It is not meant to teach you how to repair a TV. Leave this to the qualified service personel! There are dangerously voltages present in a TV (and especially in the deflection circuit), even if the plug is pulled!

The picture tube


The front of the tube is phosphor coated. This phosphor gives off light when hit by a high energy electron. The electrons are emitted by electron guns, located in the neck of the tube. The guns emit more electrons when they are warm. Hence the presence of the heating filament. That's the thing we can see glowing in the neck of the tube. When leaving the gun, the electrons don't have enough energy. To increase the energy, a high voltage is applied. This high voltage, which can be 25.000V or higher, remains on the tube, even if the TV has been turned off! It may take a few days before the tube is discharged.

Deflection coils
Without any further actions, all electrons would hit the center of the screen. We can deflect the electron beam by applying a magnetic field. This magnetic field is produced by deflection coils. There are vertical deflection coils, moving the electrons up and down, and horizontal deflection coils moving the beam sideways. The TV picture is refreshed 25 times per second (PAL format). So the frequency of the vertical deflection coil current is 25Hz. The period time is 40ms. In that interval 625 horizontal lines are written. So the period time of the current in the horizontal deflection coils is 64us. This is also referred to as the scan time. It corresponds to a frequency of 15625Hz. This is the high pitched whine we someting hear coming from a TV set.

Deflection circuit

73

TV Deflection Circuit Let's have a look at the horizontal deflection circuit. When a positive voltage is applied to the base, the Horizontal Output Transistor (HOT) turns on. This means that the full power supply voltage will be across the deflection coil Ld. This will cause the current in Ld to rise according to the law dI=(V/Ld)dt. In our case V = 150V and Ld = 1mH, so the current in Ld will rise by 150000A per second! The electrons will now move from the center to the right. When the electrons arrive at the right end of the screen, the transistor must be turned off again. The on-time of the transistor is equal to half scan time. Or actually, it's somewhat less than half scan time, since there's also some time needed to move the electron beam from the right side to the left for the next line. This time is called the flyback time, and costs about 10us, leaving 54us to write one line. This means that the HOT must be turned off after 54us/2 = 27us. The coil current has inceased to (150V/1mH)27us=4.05A. After turning off the transistor, there will still be a current flow in Ld. This curent cannot flow through the transistor anymore, nor can it flow through the reverse biased diode. The current can only flow into capacitor Cfb. When Ld has transferred all its energy to Cfb, the current will be 0. Let's calculate the voltage across Cfb. The energy in a coil equals 0.5LI . And for the energy in a capacitor we can write: E = 0.5CV . Since all energy is tranferred from the coil to the capacitor, we can write: 0.5LdILd = 0.5VCfb . The voltage across the capacitor will therefore be: VCfb,max = ILd(Ld/ Cfb). Of course, we also need to add the 150V supply voltage: VCfb,max=150 + ILd(Ld/Cfb) = 150 + 4.05(1m/10n) = 1431V. The capacitor will now discharge through the coil. The current flow will be in opposite direction and will therefore be negative. When Cfb has transferred all its energy to Ld, the voltage across Cfb will be zero. At this point, the current in Ld will be -4.05A (assumed that all components are ideal). Ld wants to transfer its energy to Cfb again. The voltage across it will therefore be negative. This will cause the diode to become forward biased, so the voltage across it will be (almost) 0V. Again, a fixed voltage exists across the coil, and the current will start to increase (become less negative) according to the law dI=(V/Ld)dt. By the time the current becomes 0, the HOT has been turned on again. So, the voltage across the deflection coil remains 150V and everything starts all over again.
2 2 2 2

An appropriate value for Cfb can be easily calculated. We already saw that Cfb and Ld make a tuned circuit. A half period takes 10us. So the period time is 20us. We know that f = 1/(2(LdCfb)), so T = 2(LdCfb). Hence, Cfb = T /(4 Ld). In our case Cfb = 10nF. If all components were ideal and the picture tube would be a perfect sphere, the deflection circuit would be as simple as described above. Of course, reality is different.
2 2

74

TV Deflection Circuit

Linearity correction

We will first take a look at the linearity correction. The deflection coil is not ideal, but has a certain (wire) resistance. The voltage across this resistance rises as the current in it increases. So the voltage across the actual coil is less than it should be. The current in the coil will not increase as fast as it should. To prevent this, we need a negative resistance that compensates for the DC resistance of the deflection coil. Unfortunately, we cannot buy a negative resistor in a shop. But we can create one using an inductor with a ferrite core (Lsat). As the curent in this inductor increases, its core will become more and more magnetic, until its limit is reached. Because a (small) change in current does not affect the magnetic field anymore, the impedance has become zero. Of course it doesn't matter in which direction the current is flowing. By pre-megnetising the core, we'll end up with an inductor which inductance increases as the current becomes more negative and increases when the current becomes more positive. The voltage across Lsat equals VLsat=LsatdI/dt. Because the inductance of Lsat is far less than the inductance of the deflection coil, dI/dt will remain (almost) the same. However, Lsat decreases when the current rises. This means that VLsat decreases when the current increases. So Lsat behaves like a negative resistance. It's obvious that when Lsat becomes defective, it must be replaced with an original part from the manufacturer.

S-Correction

Let's see how we can get a nice picture on a flat (instead of a sphere-shaped) screen. The electrons are deflected too much to the left and to the right. This can be solved by replacing the voltage source by a capacitor. When the transistor is on, the current will now be drawn from the capacitor Cs. The voltage across it will decrease. This will cause the current to rise less rapidly (less than 150000A/s). When the transistor is off and the coil current is negative, the voltage across Cs will rise again. And that is exactly what we want. The coil current is now somewhat S-shaped. This correction is therefore 75

TV Deflection Circuit referred to as the S-correction. We only need to take care that the average voltage across Cs remains 150V. To assure that, we cannot just connect a voltage source across Cs. The capacitor is therefore charged via the deflection coil. Choke Lp prevents shorting the voltage source when the HOT is on.

EW-Correction

We have now solved the problem that electrons are deflected too much to the left and to the right. But we have the same problem at the top and at the bottom of the screen, although not as obvious to the viewer. Especially TVs with large screens will have an East-West correction. To solve the problem, we could vary the source voltage, but this will cause another problem. Lp is actually the primary winding of a transformer. The secundary voltages must remain stable, so the voltage across Lp must also remain the same. This can be accomplished by putting a 'dummy' deflection circuit is series with the 'real' one. Both transistors switch on and off at the same time, so Lp still receives 150V pulses. By varying the voltage across Cmod, we can change the voltage across Cs, because VCs=VBVCmod. The maximum voltage across Cmod is usually 0.2VB, which equals 30V. Cfb and Cfb2 make a voltage devider. So the 30 volts can be obtained by making Cfb2 4 times larger than Cfb. In that case VCfb2 will be 1VB/(1+4) = 30V. Because the period time of both circuits must be the same, CfbLd = CmodLmod. So Lmod must be Ld/4. Nowadays, the voltage across Cmod is generated by a dedicated chip. Since both transistors must swich on and off at the same time, they can be replaced by one transistor. We now have a so called diode modulator used in most large TV sets.

Practical Examples

This is the deflection circuit of a small TV. It has no East-West correction. 76

TV Deflection Circuit Transistor 7445 is the HOT. Capacitor 2451 is the Cs. It's obvious that choke Lp is part of a transformer. Capacitor 2446 is the Cfb. Its peak voltage is 700V. That also shows that it must be a small TV.

This is a deflection circuit that does have an East-West correction. Transistor Q503 is the HOT. D505 contains both diodes of the diode modulator. C524 is Cfb and C525 is Cfs2. P501 represents the horizontal defelction coils. P502 is Lsat. C520 and C521 make the Cs. L501 is Lmod and C527 is Cmod. By the way, this is not the deflection circuit of a TV, but of a computer monitor. This can be easily concluded from the fact that the scan time is just 3.3 + 15.2 = 18.5us, instead of 64us. The refresh frequency is 1/11.75ms = 85Hz. That also explains why Cs consists of two capacitors in series. At other frequencies, a MOSFET can be turned on, which connects C518 in parallel with C520. This will change the value of Cs, providing a better picture quality for that frequency.

77

Chapter 24. Automatic volume control


Introduction
Automatic volume control means that the gain of an amplifier decreases when the input voltage increases. This way, we can prevent overdriving the next stage.

Schematic

Opamp U1A is used as an amplifier. Its gain depends on the DS resistance of JFET T1. The lower this resistance, the larger the gain of U1. The resistance between T1's Drain and Source depends on VDS and VGS. To keep VDS as small as possible, R1 and R3 will first devide the input voltage by 100. The voltage between Gate and Source is controlled by U2. U2 amplifies U1A's output signal. To prevent a too strong low-frequency response, the signal is filtered by an HPF consisting of C2 and R7. U2's gain is determined by P1. D1 makes sure that only negative half cyles make it to the Gate, since the JFET can only pinched off by a negative Gate voltage. The negative half cycles are smoothed by C1. Please note that 'the positive' of C1 is connected to ground, because the voltage across it will always be negative! A small input voltage will result in a small output voltage at U1A and U2. At T1's Gate, there will thus be a small negative voltage. The DS resistance will therefore be low and U1A's gain will be high. A larger input voltage will cause a more negative voltage at the Gate, resulting in a higher DS resistance, and a lower gain. So U1A's gain is higher for small input voltages and smaller for large input voltages. And that is exactly what we want. The minimum DS resistance of the chosen FET is about 150. The maximum gain of U1A is therefore about 100. The maximum DS resistance is infinite, so the minumum gain is unity. Assume that P1 has been set so that U2's gain is 10. Also assume that T1's pinch-off voltage is -1.5V. If the input voltage is 0V, U1A's gain will be 100, because the Gate voltage is also 0V. If the input voltage is 200mVtop the output amplitude at U2 will initially be 200mV/10010010 = 2V. This voltage will charge C1. This will cause the Gate voltage to become more negative, increasing the DS resistance and decreasing the gain of U1A. The output voltage at U2 will therefore decrease 78

Automatic volume control as well. C1 will be charged less and less rapidly. Eventually the Gate voltage will give U1A a gain at which the output voltage at U2 equals the Gate voltage. What will happen if the Gate voltage is almost equal to the pinch-off voltage and the input voltage is increased even more? The FET will never get pinched-off completely, because U1A's gain will then be unity and that will never be enough to maintain the Gate voltage at pinch-off voltage (unless the input voltage is increased to 15Vtop, but this circuit is not meant for that). So the output voltage at U2 will not increase. This means that the output voltage at U1A cannot increase either. At the certain input voltage (depending on the position of P1 and the pinch-off voltage of the FET) the amplitude of the output voltage remains the same! So this circuit can prevent overdriving the next stage. The circuit around U1B provides some extra gain.

Choosing components
U1A and U1B must be low-noise opamps that have a low offset voltage. We need a low-noise opamp, because the input signal is devided by 100 by R1 and R3. So the input voltage at U1A is just a few mV. A low offset voltage is needed because of the high gain. A generic cheap opamp will carry a large DC component at its output. This DC voltage will also be amplified by U1B. A NE5532 perfect for this job. If we want to use a cheap opamp anyway (for example a TL082), we will have to add a 100n capacitor between node pin 1/C2 and pin 5, and a 1M resistor between pin 5 and ground. This will block the DC component without attenuating the low-frequency signals too much. U2 can be any generic opamp. A TL081 works perfectly. JFET T1 is not very critical, as long as its pinch-off voltage isn't too low. A BF245A (pinch-off voltage: -1.5V) is a good choise. If we only have a BF245C (pinch-off voltage: -4.5V), then we can use it as well. We'll just turn up U2's gain using P1.

Power supply
This circuit draws just a few mA. Of course it needs a symmetrical power supply. We may use the small power supply discussed in a previous lesson. The supply voltage isn't very important, as long as the opamps can sustain it. A NE5532 works reliably between +/-5V and 18V.

79

Appendix A. Calculating RMS value


RMS stands for Root Mean Square, which shows what it is: the square root of the mean of the squares. Let's assume we take n samples. The value of sample x will be v(xT/n) where T is the period of the signal. The RMS value is the square root of the average of the square of all samples (x ranging from 0 thru n-1):

Next, we replace xT/n by t: t = xT/n. This means we also have to change the range of the sum sign: if x=0, t=0; if x=n-1, t=(n-1)T/n = T when n is very large. The calculation becomes more accurate if n nears infinite:

Multiply both the numerator and the denominator by the time step between each sample (which nears zero when n nears infinite), and we get the following equation:

In case of a sinusoidal signal, v(t) = A sin(2ft) where A is the amplitude of the signal. v (t) = A sin (2ft). You may have learned in high school that sin (x) = 0.5(1-cos(2x)). So:
2 2 2 2

80

Appendix B. Inside semiconductors


Inside a diode
P type and N type semiconductors
Most diodes are made of silicon. A silicon atom has four electrons in its outer orbit. Silicon atoms together form a crystal structure, leaving no "free electrons" moving around. Hence, pure silicon is an insulator. Let's replace a few silicon atoms with a atoms that have just three electrons in the outer orbit. Each atom forms a "hole" in the silicon lattice. It has now become attractive for electrons, just as if it were positively charged. This material is called a P type semiconductor. Of course we can also replace some silicon atoms with atoms that have five outer electrons. This material is called N type semiconductor, since it repells electrons.

Joining P and N together


What will happen if we join some P and N material together?

The P type material attracts electrons while the N side repells them. So at the junctions some electrons from the N side will fill the holes on the P side, creating a depletion zone:

In this zone are no free holes and no free electrons: this zone is an insulator. Let's see what happens if we apply a voltage across the PN material. First, we connect the positive to the P side and the negative to the N side:

The negative lead of the voltage source pushes the electrons in the N material through the depletion zone, filling up the holes in the P type metarial. The P side is now negatively charged, and the electrons will flow from the P side to the positive lead of the voltage source. The material has become a conductor! In our next experiment, we will reverse the voltage:

81

Inside semiconductors The negative lead fills holes in the P side and the positive lead attracts free electrons in the N side. The result is that the depletion zone will become larger. In other words, the PN material is now an insulator! So the PN material forms a device that conducts current in only one direction: a diode.

Zener diodes
If you connect a diode reverse biased to a voltage source and increase the voltage, you'll notice that at a certain voltage, current starts to flow. The voltage at which this happens is called the breakdown voltage or zener voltage. As long as the current is kept within certain limits, breakdown will not damage the diode. The zener voltage depends on the amount of impurities (non-silicon atoms) in the lattice: the more impurities, the lower the voltage will be.

Varicap diodes
We already saw that the depletion zone is an insulator. The remaining part of the P and N material does conduct electrical current. And what do we call a device that consists of two conductors with an insulator in between? A capacitor! We also saw that the depletion zone increases when you increase the reverse voltage. This means that the capacity depends on the voltage. Although all diodes show this behaviour, there are diodes specially designed for this purpose. These are called varicaps. They are used in radio and TV tuners. The frequency can thus be controlled by the reverse voltage across the diode.

Inside a bipolar transistor


Joining three layers of P and N together
When we look inside a diode, we see it consists of a P layer and an N layer. To create a transistor, we need three layers. We have two possible combinations: N-P-N and P-N-P. Hence the names NPN and PNP transistor. An NPN transistor looks like this:

Please note that the P layer between the two N layers is very thin. Just 2 micron or so.

Applying voltages across a transistor


Let's connect an NPN transistor to some voltage sources:

When VBE = 0V, there will be no current flow between C and E, since the CB diode is reverse biased. 82

Inside semiconductors When we increase VBE, electrons will flow from E through the N layer and the P layer to B. As we have noticed, the P layer is very thin. In no time the electrons flowing from B to E will have filled all the holes in the P layer. The remaining electrons will be free electrons. The P layer now appears to be an N layer. N type silicon always contains free electrons, so there is now a conductive path from C to E! If IBE increases, the number of free electrons increases and so will ICE. And that is how a bipolar transistor works.

Inside a JFET
Joining three layers of P and N together
Like a bipolar transistor, a JFET consists of three layers of P and N silicon. However, these layers are connected in a different way. The picture below shows the inside of an N-channel JFET.

The two P layers are connected to each other and form the Gate. The Source and the Drain are both connected to the N layer. That's why this is called an N-channel JFET.

Applying voltages across a JFET


Let's connect an N-channel JFET to some voltage sources:

While discussing the inside of a diode, we saw that the depletion zone between a PN junction increases if the reverse voltage increases. So if VGS becomes more negative, the depletion zone between the P layers and the N layer will become thicker, narrowing down the channel between the Source and the Drain. The voltage at which the channel is closed, is called the pinch-off voltage. Now let's see what happens if VGS remains constant and VDS increases:

At first ID increases as well, just like the D-S channel were a resistor. However, increasing VDS also makes VGD more negative, narrowing down the channel. When VGD has reached a certain voltage, the pinch-off voltage, ID cannot increase any further. The FET has now become saturated. So if VGD is between 0 and the pinch-off voltage, the S-D channel looks like a resistor; its resistance can be controlled by VGS. If VGD becoms less than the pinch-off voltage, the S-D channel acts like a current source that can be controlled by VGS. 83

Inside semiconductors We see that both VGS and VGD have a "pinch-off value". Since JFETs are symmetrical, the pinch-off voltages are the same. You may even swap the Drain and the Source!

Inside a MOSFET
Joining three layers of P and N together
Like a JFET transistor, a MOSFET consists of three layers of P and N silicon, where one of the layers form a channel between the Source and the Drain. However, a MOSFET looks a bit different. Let's take a look at the inside of an N-channel enhancement MOSFET:

The two N layers are connected to Source and the Drain. The Gate is connected to a layer of metal. Between that metal layer and the P layer, there a very thin film of insulating material (SiO2). The P layer is connected to the Bulk terminal. In nearly all cases, the Bulk is internally connected to the Source. The metal layer and the P layer make a capacitor. Let's apply some voltages across the transistor and see what happens.

Applying some voltages across an enhancement MOSFET

If VGS=0V, the D-S channel is closed, because there is always a reverse-biased PN junction. If VGS>0V the metal layer becomes positively charged. The metal layer will now attract the electrons in the P layer. Thus, a layer of electrons is formed. These electrons make the P layer close to the gate look like N silicon. And now the're a channel of free electrons between the Source and the Drain making current flow possible. If VDS is small, the channel acts like a resistor, which resistance is controlled by VGS. However, if VDS increases, the 'gate-bulk capacitor' will decrease at the Drain side. This will narrow down the channel. At a certain threshold voltage, the channel will be pinched off, and ID will remain constant.

Depletion MOSFETs
Depletion MOSFETs look very much like enhancement MOSFETs:

Please note the thin layer of N silicon near the gate. This means that even if VGS=0V, there already is a conductive path between the Drain and Source. Increasing VGS makes the path wider. Making VGS<0V narrows the channel down.

84

Appendix C. Buffer capacitor


Calculation of the value of a buffer capacitor

In the picture above you see that the discharge of buffer capacitor C1 starts at t=T1. Now assume that T1=0. The rectified sine wave will now be a rectified cosine. At t=T2 VC1=-Vtopcos(2fT2). (Note the minus sign. At t=T2, the original transformer output is negative.) So cos(2fT2)=-VC1/Vtop. This means

When you discharge a capacitor with current I, VC(t) = VC(0)-It/C. In our case: VC1(t) = VC1(0)-It/C1, so at t=T2: VC1 = Vtop-IT2/C1. Since VC1=Vtop-Vr, we can also say Vtop-Vr = Vtop-IT2/C1. So Vr = IT2/C1. This means

If f=50Hz and Vtop=20V and we want a 2V ripple voltage, we need a 4.3mF capacitor per ampere load current. Note: Make sure your calculator uses radians!

ESR
In the calculations above, we didn't take the ESR of the capacitor into account. However, the ESR plays an important role in power supplies due to the large charge and discharge currents. The ripple voltage will increase by at least IESR. This will be in the case where the capacitor can be fully charged. However, that will never be the case. Calculating the ripple voltage for a certain ESR is not an easy task. Since we often do not know the exact ESR value of a capacitor, we'd better use computer simpulation to view the results of a certain ESR:

85

Buffer capacitor

C = 4700uF; ESR = 0

C = 4700uF; ESR = 1 The frequency of the (non-rectified) input signal is 50Hz. The discharge current is 0.5A. The first image shows the situation whithout ESR. The ripple voltage is about 0.9V. On the right, the output voltage is plotted when the ESR is 1. The ripple voltage is now 1.8V! So the ESR added 0.9V to the ripple voltage. Let's see what happens if, due to aging, the ESR increases to 3.

The ripple voltage has now grown to 3V. In audio applications, a heavily aged supply capacitor can be heard as a 100Hz humm.

86

Buffer capacitor If computer simulation shows that the ESR has to be impossibly small, you may connect multiple capacitors in parallel:

This image shows the situation with two 2200uF capacitors each having an ESR of 1. Although the total capacitance is less, the ripple voltage is less than the situation with one 4700uF capacitor: just 1.3V. The increase of the ripple voltage (due to ESR) has dropped from 0.9V to 0.4V. This is one of the reasons you'll often see parallel-connected capacitors in power supplies. (Another reason may be that there are no capacitors available with a higher capacitance.)

87

Appendix D. Amplifier stability


Introduction
Every amplifier will produce a certain amount of heat. When a transistor heats up, its characteristics will change. For example, the quiescent collector current will increase. This may heat up the transistor even more, causing the quiescent current to increase, etcetera. This behaviour is called thermal runaway. This may cause the amplifier to clip, and may destroy the transistor. This, of course, must be prevented.

Stability
Assume that a dT increase in temperature results in a dP increase in the transistor's power dissipation, and that a power increase of dP results in a temperature increase of dT'. Everything will be fine as long as dT' < dT. We can calculate dT' by multiplying the power increase (dP) with the thermal resistance from junction to ambient, so: dT' = Rth,j-a dP So an amplifier will be thermally stable if: Rth,j-adP < dT, or: Rth,j-adP/dT < 1 Let's take a look at a very simple amplifier:

Without input signal the transistor (NPN or PNP) will dissipate: P=VCEIC. VCE=VS - ICRL => P=(VS - ICRL)IC=VSIC - IC RL. dP/dIC=VS - 2ICRL. => dP=(VS - 2ICRL)dIC The amplifier will therefore be stable if: Rth,j-a(VS - 2ICRL)dIC/dT < 1 This will always be true if: VS < 2ICRL => ICRL > VS/2 ICRL = VS - VCE => VS - VCE > VS/2 => VCE < VS/2 So, the amplifier will be stable if VCE is smaller than VS/2. For maximum output amplitude, the collector voltage must be VS/2. If the emitter is grounded, VCE will be equal to VS/2 and the amplifier may be thermally instable. Therefore a small resistor is connected between emitter and ground. The voltage across this resistor must be about VS/5. This is a compromise; less voltage may result into instability due to component spread and aging. A higher voltage will decrease the maximum output amplitude and thus the efficiency.
2

88

Appendix E. Complex math


Calculations on a capacitor and resistor in series.
We already know how to calculate the impedance of a capacitor:

At 10kHz a 1nF capacitor has an impedance of 15.9k. When we connect a 10k resistor in series with this capacitor, we may expect that the total impedance will be 25.9k is. But that's not the case, because a capacitor causes a -90 degrees phase shift in the current flow. The equation

doesn't show this. But what if we plot the impedance as a vector? The length will be the (absolute) impedance and the angle the phase shift:

This component has an absolute impedance of 1 ohm and causes a 45 degrees phase shift between voltage and current. A resistor doesn't cause a phase shift; this vector will be on the x-axis. a capacitor causes a -90 degrees phase shift and will be on the (negative) y-axis. The total impedance of R and C is R + XC. However, we have to add vectors instead of plain numbers. Since we have 90 degrees angles, it's easy to calculate the (absolute) impedance: we can just use Pythagoras' theorem. Zt = (R +XC ). The phase shift is equal to arctan(-XC/R) Wouldn't it be nice if we had a more simple way for saying: the impedance is x ohms and causes a y degrees fase shift? A 180 degrees phase shift is easy; in that case we could say: the impedance equals -x ohms. A 180 degrees phase shift equal to multiplying by -1. Now suppose that a phase shift of 90 degrees is equal to multiplying by j. A 180 degrees phase shift will be the same as multiplying by j . This means that j = -1. A negative square is only possible in so called 'complex math'. (Mathematicians among us may be accustomed to use i instead of j. But we already use i as a symbol for current, so that's confusing.) Every impedance can be written as: a + bj. Number a is called the real part and is plotted on the xaxis. Number b is called the imaginary part and is plotted on the y-axis. A resistor doesn't cause a phase shift and is therefore purely real. We know that a capacitor causes a -90 degrees phase shift; its impedance is therefore purely imaginary, and can be written as: 89
2 2 2 2

Complex math

As an example, we'll look again at our 10k resistor in series with a 15.9k capacitor. The total (complex) impedance is 10k - 15.9kj. The absolute value (|Z|) equals (10k + 15.9k ) = 18.78k. The phase shift it causes in the current (arg(Z)) is arctan(-15.9k/10k) = -57.8 degrees. So, when we connect a resistor and capacitor in series: ZR+C = R - XCj. The absolutie value is: |ZR+C| = (R +XC ). The phase shift is: arg(ZR+C) = arctan(-XC/R).
2 2 2 2

Calculations on an inductor and resistor in series.


An inductor causes a 90 degrees phase shift. After reading the previous section, it's clear that the complex impedance can be written as:

So: |ZR+L| = (R +XL ) and arg(ZR+L) = arctan(XL/R). As an example, we'll take a 10k resistor in series with a 15.9k inductor. The total (complex) impedance is 10k + 15.9kj. The absolute value is (10k + 15.9k ) = 18.78k. The phase shift in the current flow will be arctan(15.9k/10k) = 57.8 degrees.
2 2

Calculations on a capacitor and inductor in series.


From the previous sections we've learnt that:

So: ZL+C = XLj - XCj = (XL - XC)j. The impedance is purely imaginary. |ZL+C| = |XL - XC|. This means that the total impedance is less than the impedance of each single component. If XL and XC are equal, the impedance will be zero! This can also be explained in an other way. The current flow through both components is the same, while the voltage across one component has a 90 degrees phase shift and the voltage across the other component a -90 degrees phase shift. The phase shift between the voltages across C and L will be 180 degrees. Because the absolute impedances are the same, the voltage amplitudes will also be the same. So both voltages will 'rule each other out'. The total voltage across L and C will be 0V. This means that the impedance is 0.

Calculations on a tuned LC circuit.


We want to calculate for which frequency the tuned circuit reaches its maximum value.

90

Complex math

The impedance of two parallel-connected components can be calculated using the equation:

From the previous sections we've already learned that

Substituting this in the first equation gives:

Since the nominator is frequency-independent, Z reaches its maximum if the denominator reaches 0, so:

91