This chapter will look at how semiconductor components can be used to amplify signals, beginning with a brief discussion on how to calculate power, voltage and loudness decibel levels and why the relationship between them is important for audio systems. The next topic considers how a charge barrier restricts the flow of charge in a diode to a single direction, which allows it to be used for full wave rectification to convert an AC power signal (from mains supply) to a DC signal for use in an electronic circuit. This principle of the charge barrier can then be used to amplify an input signal within a transistor, where a small current at the base of the transistor will allow a much larger current to flow through the collector of the transistor – the input base current is used to amplify the collector current at output. This book does not build a transistor amplifier, but LTspice is used to simulate both the characteristic output curves (which dictate biasing) and a full bipolar junction transistor (BJT) common emitter circuit to show how extra components are required to stabilize the performance of a BJT.
Transistors can be unstable (and noisy) and so a better option is to combine many transistors within a single integrated circuit (IC) that provides more stable functionality. The operational amplifier is a common IC example, where the common mode rejection (CMRR) of differential amplification (between inverting and non-inverting inputs) is used to reduce the impact of noise within the circuit itself. The ideal (theoretical) characteristics of an operational amplifier are discussed, where operational amplifiers are explained as a system with source and load resistances, using voltage dividers to show why these resistances are theoretically very high and low. High gain is important for an operational amplifier, but in practice gain must be limited using negative feedback. Voltage dividers are again used to implement this negative feedback – a fundamental element of all amplification systems. An overview of DC output blocking, AC power decoupling and Zobel networks to stabilize loudspeaker output is provided, to help explain where some of the ‘extra’ components in audio circuits come from. The final project uses an LM386 operational amplifier chip to build a minimal audio amplifier. This amplifier will be used as a building block for filtering (chapter 8) and digital circuit control (chapter 9) projects in this book and can also be augmented in other ways in additional research projects of your own.
In electronics, amplification defines how much a system will increase (or reduce) the amplitude of an input signal at output (Figure 7.1).
The diagram shows how an amplifier can be modelled as a system comprising a source and load impedance (as audio signals are AC) – a system must be able to accept a source and drive a load. The amplifier provides gain to amplify a signal, where the gain (A) of the system is defined by the ratio of the input and output signals:
is the voltage gain of the amplifier | |
is the output voltage in volts (V) | |
is the input voltage in volts (V) | |
is the current gain of the amplifier | |
is the output current in amperes (A) | |
is the input current in amperes (A) |
Amplifier gain levels are typically measured using a decibel scale, as the ratio of input to output signals can often be too large to represent on a linear scale. Logarithmic scales like the decibel provide an exponential range of values to describe a quantity, and they are used widely in electronics for amplitude and frequency measurements that cover large variations across a scale:
is the voltage gain of the amplifier | |
is the voltage gain of the amplifier in decibels (dB) | |
is the current gain of the amplifier | |
is the current gain of the amplifier in decibels (dB) |
The equations above are widely used in audio engineering to define gain levels within a system, such as the 0dB reference level on a mixing desk or the −3dB down point on a filter (which will be covered in more detail in the next chapter). In these cases, the decibel level is being measured relative to a known reference level (Figure 7.2)
Quantity |
Reference |
Value |
Notes |
Electrical power |
0 dBm |
1 mW |
Measured relative to 1mW power through a resistor – telecommunications standard level |
Signal voltage |
0 dBu |
0.775 Vrms |
Measured relative to 1mW power (like dBm but unloaded) – sometimes known as dBv (small v) |
Consumer line level |
-10 dBV |
0.316V |
This lower voltage level is used for consumer equipment, and equates to −7.8 dBu |
Professional line level |
4 dBu |
1.2276V |
This higher voltage level is used for professional equipment and equates to 1.78 dBV |
Signal voltage |
0 dBV |
1 Vrms |
Commonly used for audio electronics, equates to 2.218 dBu |
Sound pressure level |
0 dB |
20 μPa |
20 micropascals (air pressure reference level) – lowest audible level |
Sound pressure level |
130dB |
63.2 Pa |
Audible pain threshold (where hearing damage will occur) |
Figure 7.2 highlights some of the measurements in audio that use a decibel scale. For audio electronics, the most common is the dBV measurement, which is made relative to a 0dB value for a 1Vrms signal. Vrms is a root mean square voltage (see chapter 6, section 6.2, eqn. 6.5), which equates to the equivalent DC voltage level for an AC signal. When learning about audio, it can be very confusing to work with acoustic equations for sound pressure level (SPL) and sound intensity level (SIL) that also use the decibel scale, so it is important to remember that Bels and decibels are a unit of measurement – not a quantity.
Amplifiers are often rated in terms of their electrical power (in watts), but it is important to correlate this measurement to other quantities such as signal voltage that are commonly used when working with audio amplifier circuits. In acoustic terms, sound pressure level (SPL) can be linked to voltage by virtue of the acoustic pressure being used to move a microphone diaphragm to create a signal voltage – these can be considered equal to each other in terms of gain for illustrative purposes. It is also important to consider the psychoacoustic scale of perceived loudness, which will also be discussed in the next chapter on audio filters:
These examples calculate some basic gain values for electrical power and signal voltage. The final example uses these values in comparison with perceived loudness.
Q1: Tabulate the power gain and decibel power gain of an audio amplifier with:
(a) A DC input power of 1W and an output power of 2W.
(b) A DC input power of 1W and an output power of 4W.
(c) A DC input power of 1W and an output power of 10W.
Answer:
Power gain, Ap |
Decibel power gain, ap (dB) |
2 |
3 |
4 |
6 |
10 |
10 |
Q2: Tabulate the voltage gain and decibel voltage gain of an audio amplifier with:
(a) An input signal of 1V and an output signal of 1.41V.
(b) An input signal of 1V and an output signal of 2V.
(c) An input signal of 1V and an output signal of 3.16V.
Answer:
Voltage gain, Av |
Decibel voltage gain, ap (dB) |
1.41 |
3 |
2 |
6 |
3.16 |
10 |
Q3: Assuming sound pressure level (SPL) to be a correlate for signal voltage in an audio system, draw a graph of decibel power gain , decibel voltage gain/SPL and perceived loudness ( ).
(a) What does this graph show about the increase of electrical power in relation to perceived loudness?
(b) What does this graph show about the increase in voltage in relation to both electrical power and perceived loudness?
Answer:
Decibel gain |
Power gain, Ap |
Voltage gain, Av |
Perceived loudness (dB) |
3 |
2 |
1.41 |
1.23 |
6 |
4 |
2 |
1.52 |
10 |
10 |
3.16 |
2 |
(a)The graph shows that perceived loudness requires a 10dB increase to double the gain, which is significantly higher than either the power or voltage gains. A power gain of 2 will give an increase of 3dB, so doubling the power does not double the loudness. For the perceived loudness to double the power will need to increase by 10dB, which is a gain of 10. Thus, a 100W amplifier will only sound twice as loud as a 10W amplifier when heard by the listener. This is often misunderstood in audio, where equipment is defined by electrical power rating rather than SPL output (an acoustic measure) or perceived loudness (how it is heard by the listener).
(b)The graph shows that doubling the voltage gain gives an increase of 6dB, which is twice the power gain. This can often be confusing when working with gain ratios and decibels, particularly with filtering (the next chapter shows how the cutoff of a filter is defined in dB).The voltage would need to increase by a factor of 3.16 (from the table) to double the perceived loudness of the sound, which is much less than the power increase of 10 required.
The previous examples aim to familiarize you with the use of power, voltage and loudness gain calculations – all of which are measured on a decibel scale. It is important to reiterate that decibels are a unit of measurement, not a quantity. This can often be confusing when working with similar-sounding scales like dBu, dBm, dbv and dBV – there are also others that have been omitted to preserve some clarity in the discussion! When beginning to learn about amplifiers, the main thing to remember is:
Amplification is a key process in all electronics circuits, and increasing the small signals from sensors like dynamic, piezoelectric or condenser microphones is fundamental to all audio systems. The specifics of how much a signal should be amplified are partly defined by the wider system it will move through, and reference levels for consumer (−10dBV) and professional (+4dBu) are designed to enforce interoperability between different partitions within a larger audio system chain. This knowledge of gain scales can be used to describe the mechanics of amplification, to learn how semiconductor components can be used to increase the amplitude of an input signal for output.
The semiconductor is the fundamental building block of amplification in electronics. Chapter 1 discussed how electrons carry charge, and in order for electrons to move there must be holes in the valence shells of other atoms for them to move into. The chapter also showed that some materials (e.g. copper) are conductors that allow electrons to move easily, whilst others (such as pure silicon, i.e. glass) are insulators with stable valence shells that prevent the flow of electrical charge. There are also materials that can be chemically altered to behave as both conductor and insulator – these are known as semiconductors. The materials used in semiconductors are created by chemically doping the element silicon (Si) to change its atomic structure (Figure 7.3).
In the example in Figure 7.3, silicon has a balanced atomic structure, where four valence electrons form pairs that will not move easily (electron pairing was briefly discussed as part of electromagnetism in section 2.5). If this silicon is now doped by adding boron atoms (three valence electrons) it creates a positive imbalance by breaking the existing valence pairs, so a silicon electron can now pair with a boron electron – leaving holes in the structure for other electrons to move into. On the other hand, doping silicon with phosphorus atoms (which have five valence electrons) means the unpaired electrons create a negative imbalance in the overall atomic structure – the extra electrons are free to move as charge carriers. These doped materials can be combined to create the simplest form of semiconductor, the diode (Figure 7.4).
The left-hand image shows how a diode combines an n-type (negative) material that contains a surplus of electrons with a p-type (positive) material that contains extra holes for those electrons to move into. These two materials are then joined as either a p-n junction or an n-p junction diode, where the junction between them is known as the depletion layer. In the neutral state (without a power source being connected), some electrons from the n-type material move across to fill the holes in the p-type region (middle image). These moving electrons are now at the edge of the p-type material, but by moving they have also left holes behind them at the edge of the n-type region. This creates an electrical field in the depletion layer that is in the opposite direction to the flow of charge, which means no further charge can flow (right-hand image).
Chapter 6 (section 6.3) showed how a capacitor creates an electric field between its plates that reduces the flow of current to zero, and in some ways the depletion layer in a diode performs a similar function – electrons cannot cross the charge barrier created by the small depletion layer to get to the positive holes on the other side, because the potential of the barrier is the opposite of the potential between the two regions. This charge barrier can be overcome by connecting another source of charge that floods the n-type region with even more free electrons, eventually breaking down the polarity of the depletion layer and allowing current to flow (Figure 7.5).
In this diagram, connecting a battery as an additional charge source provides additional electrons at the cathode (negative) terminal, which flood the n-type region of the diode to overcome the charge barrier created by the electric field of the depletion layer. As there are now free electrons on both sides of the depletion layer, current can flow out through the anode to complete the circuit. The right-hand image shows the schematic symbol for a diode, which has been used in projects throughout the book. Note the direction of conventional current flow, where the diode has a triangle pointing in the direction of positive charge flow (it can also help to think of the vertical line as a barrier to conventional current flowing from negative to positive).
Returning to real electron flow, free electrons will only flood the depletion layer if there is a potential difference between the terminals of the charge source (battery) that can overcome the charge barrier. This potential difference (known as the forward bias voltage) equates to 0.7V for silicon diodes (0.3V for germanium), and once it is reached the diode will allow more current to flow without any significant increase in voltage (Figure 7.6).
In the diagram, the relationship between diode voltage and current is shown, where an increase in forward voltage towards the depletion layer charge barrier value (0.7V) sees an exponential increase in the current that flows through the diode. If uncontrolled, this increasing current will quickly burn out the diode – hence a current-limiting resistor has been used for all diode circuits in this book. The reverse region shows how a diode will block the flow of current until it reaches its breakdown voltage (Vbr), which is typically in the range 50–75V for a standard diode. Thus, a diode will allow current to flow in the forward direction once the applied voltage is greater than the potential of the charge barrier (0.7V), but will oppose the flow of current in the reverse direction until it eventually breaks down at high voltage levels. This relationship between voltage and current means a diode has many uses in electronics – for digital circuits, it only allows signals to pass in one direction, which is the logic equivalent of true/false (if forward true, else reverse false). As chapter 6 (section 6.3) noted, diodes can be used in analogue circuits to rectify a sinusoidal AC voltage to produce a DC signal as output (Figure 7.7).
The circuit in Figure 7.7 shows how diodes can be used to route a signal of changing polarity to the same output path, which uses a smoothing capacitor (C1) to shape the rectified output voltage (see section 6.3) that is output across the load resistor R1. Chapter 2 (section 2.1, Figure 2.6) introduced the concepts of source and load within electronic systems, where matching the input and output impedances of different stages of a system is crucial to ensuring they can operate correctly with each other. AC circuits amplify signals either for further processing (e.g. filtering in chapter 8), connection to another system (e.g. within a larger audio recording system such as the one shown in section 2.1, Figure 2.7) or for output to a transducer like a loudspeaker. In all cases, these systems are said to present as sources to drive loads, where impedance matching is an important element of effective power transfer within the circuit. Returning to the diode rectifier above, the operation of the circuit is based on a varying-polarity AC signal input (Figure 7.8).
Rectifier circuits are needed in any electronic system that uses a mains power supply. In audio systems such as effects pedals and preamplifiers, this is often performed by a dedicated DC power supply that steps down the mains voltage (220V in Europe, 110V in North America) with a transformer, and then rectifies and smooths this reduced voltage for connection to an audio circuit. This book does not go into detail on power systems as the Arduino (like many audio preamps effects and pedals) can be powered from a single 9V battery that provides DC at output. In practice, stable power supply (and conditioning) is a significant part of any commercial recording studio or live audio system. Many professional musicians use some form of power conditioner in their systems both to reduce noise and to prevent damage to their equipment – the rectifier circuit shown in Figure 7.8 is an initial stage within this process.
Diodes have many other uses in electronic systems, and many guitar effects pedal circuits exploit the 0.7V forward voltage of a diode to clip an input signal to distort it at output (Figure 7.9).
Distorting an input audio signal is a fundamental process in many genres of music, and thus a staple element of musical production in general. A full discussion of distortion methods and principles is beyond the scope of this book, but combining amplification feedback with diode clipping is a common technique used in many pedal designs. As you extend your studies, you may encounter diodes being used in effect pedal circuits for either soft clipping (in the feedback path) or hard clipping (at the amplifier output) distortion, where different combinations of diodes (and perhaps capacitors) are used to shape the signal.
Many of these effects circuits are based around transistor amplification, which extends the principle of a charge barrier to control and amplify an input signal. Although single transistor circuits have effectively been superseded by operational amplifiers (which combine them for stability), there are many example schematics for classic effects and amplifiers that will employ transistors (or vacuum tubes). This book will not cover valve amplification (nor build a transistor amplifier), but the following section details how a transistor operates primarily to help introduce operational amplifiers. Operational amplifiers have higher performance and are much easier to use, so this section on transistor theory can be skipped if you find it difficult to follow – it is not needed for the practical project circuits in this book. In some ways, the information on transistors is also provided to assist in the analysis of the many classic schematics that employ them – should you wish to extend your learning in this direction. Having said this, the behaviour of a transistor is more complex to follow (and the calculations more involved) than an operational amplifier – it is a topic that cannot be covered fully in an introductory text.
The previous section discussed the principle of a diode as being two oppositely charged pieces of doped silicon being joined together to create a charge barrier in the resulting depletion layer between the n-type and p-type regions. A bipolar junction transistor (BJT) is effectively two diodes placed back to back, where a thin region of one charge type is sandwiched between two regions of the opposite charge (Figure 7.10).
In the diagram, an NPN BJT is shown. NPN indicates a n-type/p-type/n-type configuration (a PNP BJT has the opposite arrangement), where the leads are named to indicate how electrons are emitted from the bottom n-type region to be collected at the top. It is important to remember the direction of conventional current flow from collector to emitter that is indicated by the arrow pointing outwards towards the emitter (the mnemonic ‘not pointing in’ is often used for NPN) – a PNP has the opposite direction of current flow. Regardless of its configuration as either NPN or PNP, the stacking of three regions in a BJT creates two depletion layers and therefore two charge barriers to current flow (middle diagram). This means that, like a diode, in a normal state current cannot flow between any of the three leads (base, collector and emitter).
If a current source (e.g. a battery) is connected across the emitter and collector no current will flow, but if a second source (like an audio input signal) is then connected to the base it creates a positive potential difference between the base and the emitter. This positive potential difference attracts electrons from the lower n-type region which will also cross the bottom charge barrier (Figure 7.11).
The diagram in Figure 7.11 shows that by creating a positive potential difference between the base and emitter, electrons are stimulated to move towards the higher potential of the base. This small current of electrons leaves more holes in the lower charge barrier (between emitter and base) which then allow other electrons to move and effectively overcome the barrier – the middle diagram shows only one charge barrier remaining. Although a small number of these electrons will leave the transistor through the base (as the base current Ib), the majority will now fill the holes in the upper charge barrier (between base and collector) and so this barrier also breaks down. Now there are an excess of electrons in the collector region, and because there is no charge barrier attracting them back towards the p-type region (to keep them in place) they can move towards the positive potential of the battery – this causes a current to flow between emitter and collector (Ic). This highlights the second crucial point about BJT transistors – the collector potential must be more positive than the base (and the emitter) to attract free electrons towards it. In functional terms, the small base current causes a larger current to flow from emitter to collector – the transistor becomes an amplifier (Figure 7.12):
The diagram shows two BJT circuits, where the output signal is measured across a load resistor (either RE or RC). The left-hand circuit is a common collector BJT amplifier (also known as an emitter follower because it does not provide voltage gain), which is often used for power amplification as it can provide high current gain to drive low-impedance loads like loudspeakers. The right-hand circuit is a common emitter amplifier, because the input signal is applied to the base and the output is taken from the collector – so the emitter is common to both loops. A common emitter circuit can amplify both current and also small voltages when operating in active mode (discussed below), which makes it a good choice for audio amplification where it can amplify signals at all stages of a system from input (buffering), through filtering and effects to other preamplification stages prior to output.
The diagram in Figure 7.12 shows base (IB), collector (IC) and emitter (IE) currents, where the emitter current is the combined base and collector currents:
is the emitter current in amperes (A) | |
is the collector current in amperes (A) | |
is the base current in Amperes (A) |
For a BJT transistor, the base current is small so the emitter current is effectively equivalent to the collector current once current begins to flow through the transistor. This is how common collector and common emitter circuits can amplify current signals for output – collector current (IC) and emitter current (IE) are both proportional to the input base current (IB). For a common emitter circuit, the current gain ( ) is thus defined as the ratio of collector and base currents:
is the common emitter current gain of the amplifier | |
is the collector current in amperes (A) | |
is the base current in amperes (A) |
This equation is used to determine the amplifier gain in a common emitter circuit, as it shows how much the input signal will be amplified at output. In a common emitter, the small input current applied to the base controls the size of the output current, thus the original current signal has been amplified by the transistor. The key to a BJT voltage amplifier is therefore the relationship between base current (Ib) and emitter current (Ie) – a small variance in base current creates a much larger variance in collector current output (Figure 7.13).
The diagram shows characteristic output curves for a BJT, where the base current (Ib) at the transistor input controls the size of the collector current (Ic) – the BJT acts as a current amplifier. When there is no base current (Ib= 0) the transistor is off, as indicated by the cutoff region (in white) at the bottom of the graph. Like a diode, the collector current initially increases in proportion to the collector voltage (VCE) until the potential difference needed to stimulate electron flow between base and emitter reaches 0.7V and the transistor is on – this is known as the saturation region (shown in dark grey). After this point, the transistor begins to operate in the active region (in grey), where changes in voltage between collector and emitter do not significantly impact on the current flowing through the transistor – the input current dictates the output current (Figure 7.14).
The diagrams show the three main operating regions of a BJT transistor (an additional reverse mode is not commonly used and so is omitted from this discussion). For the first two regions, the transistor effectively acts as a digital switch. When the input base current is zero, the transistor is in cutoff mode and no current flows. Chapters 4 and 5 showed how to use C code to program the Arduino for digital control. There are millions of transistors inside the ATMega328P chip that executes the programming code, where each transistor will equate cutoff mode to a logic 0 when working with digital signals. When current begins to flow into the base (IB) to create a potential difference between base then emitter electrons start to cross the depletion layers between collector and emitter (in conventional current flow). Once this potential difference reaches 0.7V (like a diode) the transistor moves into active mode where current will flow freely from collector to emitter (IC = IE) – this equates to a logic 1 in a digital signal. These two operating regions are the fundamental building blocks of digital electronic circuits, where a transistor can be held at either logic 0 or 1 and then combined with other transistors to create more complex logical processes.
Although chapters 4 and 5 discussed the basics of digital signals when learning how to program the Arduino, the main focus of this book is the controlled processing of an analogue audio signal. In this instance, a transistor can be used to amplify an input signal when in the active region – where IC = βIB. To look at this active region in more detail, an LTspice circuit can be used to simulate a range of base current inputs to see how they change the collector current at output.
This example will simulate a common emitter BJT amplifier circuit based on the LTspice schematic in Figure 7.15.
To build this circuit in LTspice, use component values of R1 = 100Ω, Transistor Q1 = 2N2222, Current Source IB = 10μA and Voltage Source VCC = 5V. Create a new circuit in LTspice and name it chp7_example1. The process for creating the schematic is as follows:
1.Lay out the components as shown in Figure 7.15: Current Source (on left), Voltage Source (on right), Transistor (middle), Resistor (in line with collector terminal) and the GND node (bottom). For the transistor, choose <npn – Bipolar NPN Transistor> from the component list.
2.Connect wires to form a series loop between Ib, Q1 base (NPN Transistor), Q1 emitter and GND.
3.Connect wires to form a series loop between VCC, R1, Q1 collector (NPN Transistor), Q1 emitter and GND.
4.Configure the Current Source to be a DC value of 10μA. Configure the Voltage Source to be a DC value of 5V. Set the Resistor R1 = 100Ω.
5.Name the Current Source (Ib) and the Voltage Source (Vcc) so they can be accessed by the Spice Directive.
6.Add a Spice Directive to perform a nested DC step analysis, where VCC is incremented from 0 to 5V (in steps of 0.1V) every time Ib is incremented from −5μA to 20μA (in steps of 5μA). The analysis command is .dc Vcc 0 5 0.1 Ib -5u 20u 5u – this will be discussed below.
The LTspice circuit in Figure 7.15 shows a Spice Directive command that performs a nested DC step analysis. Nested analysis is similar to computer programming where a for loop can run inside another for loop, where each iteration of the outer loop will also iterate the entire inner loop from beginning to end (Figure 7.16):
The Spice directive listed above performs a DC analysis of the circuit, allowing the input current (Ib) and transistor supply (collector voltage Vcc) to be stepped through a range of values. In so doing, the resulting current output at the collector terminal of the BJT can be measured during LTspice simulation to show the characteristic output curves of a BJT (Figure 7.17).
The simulation output of the current probe should produce a graph similar to the one in Figure 7.18).
The graph in the diagram shows a series of collector currents, where IC = βIB. The current source sweep ranged from −5μA to 20μA, so the value of the highest output curve in the active region (Ic = 4mA) shows the collector current for a base current of Ib = 20μA. These values can be used with equation (7.5), to derive the common emitter gain for this circuit:
The BJT circuit in this example will amplify an input base current by a factor of 200 – the characteristic output curves show that the collector voltage makes no difference to this value within the active region. BJT devices can produce high gain, where practical common emitter gain values can range from 100 to 300. Having said this, these gain values can also vary widely even amongst the same type of transistor and so amplifier stability is often an issue. For this reason, additional steps are needed to configure a common emitter BJT circuit for use as a voltage amplifier for small input signals.
This use of a transistor may initially seem strange given that the BJT is primarily a current amplifier – why does Figure 7.12 define input and output signals as voltages? To understand this, Ohm’s Law can be used to remember that any resistor will create a potential difference across it by resisting the flow of current, and because this resistance is fixed then any increase in current will also increase the voltage drop across the resistor. This means a common emitter circuit can be used within the active region to create a voltage amplifier, where changes to the base-emitter voltage (Vbe) will vary the base current (Ib) and thus create a larger collector current (Ic). As the output current increases, so will the output voltage across the emitter (Vce) – for small input signals the BJT will act as a voltage amplifier. The problem with a BJT voltage amplifier occurs when working with AC input signals like audio input from a microphone, where the alternating current of the input signal means the transistor will drop out of the active region for half of the input sine wave (Figure 7.19).
The diagram shows how the transistor only allows current to flow in one direction, so when the base current changes polarity in the bottom half of the sine wave cycle (where Ib < 0) the base becomes more negative than the emitter and thus no electrons will be attracted from the emitter towards it. If no electrons flow towards the base then none of them can cross the depletion layers to stimulate a collector current – the transistor will not allow current to flow. In a similar manner to diode rectification in the previous section (Figure 7.8), only half of an input sine wave will be amplified by the transistor and so it will not work effectively with AC input signals.
To avoid this, the base-emitter voltage (Vbe) of the transistor can be biased to always keep it within the active amplification region. This prevents the BJT from either switching off when the base current becomes negative during the second half of the sine wave cycle or dropping into the saturation region where the transistor is not linear. Biasing involves adding a DC component to the input signal to raise the overall level of the entire signal into the active amplification region (Figure 7.20).
Adding a DC voltage to an existing AC signal means the resulting output signal will still vary sinusoidally, but this variance will now be within the positive range of the BJT. In practical terms, the AC signal current will still change direction, but the added DC current means the overall base current will always be positive. A simple analogy can be made with ripples on a pond, where the sinusoidal wave of each ripple will travel at a certain height relative to the overall depth of the water, but the larger body of water in the pond underneath will not vary – it is effectively a direct current. Thus, the ripples now have a greater potential to move than they would if they were in a small puddle because of the larger DC current underneath.
To keep the base current positive, the base potential must be higher than the emitter to attract electrons towards it and must also be negative relative to the collector for electrons to flow across the depletion layers, which then allows current to flow through the transistor. With a BJT, biasing is often achieved by adding a voltage divider around the base lead of the transistor. The divider is connected between the collector current source and ground, and by splitting the supply potential to bias the base lead creates a base potential that is both higher than the emitter and lower than the collector, which keeps the BJT in the active region for amplification (Figure 7.21).
In the diagram, the voltage divider network (R1 and R2) provides the bias voltage needed to lift the input signal into the active region of the BJT so it can be amplified correctly. To determine the optimum bias voltage for a common emitter amplifier circuit, the amplification curves for a BJT (see Figure 7.13) can be used with the DC load line for a specific load resistance (RC) to determine the quiescent operating (Q) point for the amplifier (Figure 7.22).
For a common emitter amplifier, the DC load line is defined for a specific load resistance of RC = 100Ω, and this is calculated as a line that bisects the edge of the saturation and cutoff regions of the BJT:
•For cutoff, when the transistor is fully off then and thus the full potential of the supply voltage ( ) is presented across the emitter. This means that collector-emitter voltage and so the right-hand point on the DC load line must equal the supply voltage.
•For saturation, the region is defined from the point where the collector-emitter voltage , although in practice a 0.7V potential difference is required to stimulate the flow of current across the depletion layers. If this collector-emitter voltage is 0, then the entire supply potential is presented across the collector resistor ( ) and so .
With these two points calculated, the DC load line can then be drawn between them over the output curves to determine the optimum base and collector currents needed to maintain the transistor in the active region. To do this, the quiescent operating point (Q point) of the circuit must be found, which requires the use of several known BJT circuit design characteristics that have been derived by many years of collective practitioner experience:
•The Q point occurs when the collector current is half of the saturation current, ( ).
•With known, the base current of the amplifier can be found using (equation 7.4) if a suitable value of β is assumed (the previous example gave β = 200).
•The value of the bias resistors in the voltage divider can be calculated assuming that the current flowing through R2 should be at least 10 times the base current .
•Using KCL the current through R1 should be 11 times the base current to produce two currents of at the junction ( ).
•The voltage drop across the emitter resistor should be around 10% of the supply voltage ( ).
•Ohm’s Law can be used to define the voltage drop across R2 as being the sum of the base-emitter voltage and the voltage across an emitter resistor (RE) where .
•The voltage gain of the amplifier can be calculated using .
Emitter resistors for gain control will be discussed later in this section, but for now it is important to remember that these known design characteristics represent a very important part of electronic circuit analysis – the theoretical understanding of circuit analysis does not always fully equate to the practical application of those techniques. Transistors are well known for their variance due to both construction and temperature, and so biasing an input signal not only moves it to the centre of the active amplification region but also helps to stabilize the gain characteristic of the amplifier. This is partly because there is now a fixed DC voltage being applied to the base of the BJT, and so any changes in the signal input will be proportionally much smaller than the overall biased signal – a 100mV AC input signal with a 1V bias signal represents a proportional variance of 5% (as the AC component will vary both upwards and downwards). As a result, there will be less change in the transistor’s overall behaviour because it is amplifying a (primarily) fixed voltage – the AC variations represent a much smaller percentage of the signal. Although this is a fairly simplistic explanation of signal biasing for stability, it is important to note that biasing is also used to ensure the stable operation of the BJT in many amplification circuits.
Biasing an input signal is very common in amplification, where a signal must be moved into a valid input range to allow it to be amplified properly. Having said this, simply adding a DC voltage to an AC input signal is not sufficient and further steps must be taken to build a stable circuit. The first issue to be addressed is the additional current now supplied by the divider to the base of the BJT, which effectively ‘swamps’ the small current of the AC input signal. It is important to think through this process carefully, as previous usage of Kirchoff’s Voltage Law (KVL) can create a mindset where current is perceived to flow in a single path that suits the analysis being performed. In practice, electrons will always flow down the path of least resistance, and so a larger current running through the voltage divider (which is taken from the larger collector supply) will flow towards the voltage input as the input current is much smaller at that point. To avoid this, the input to the BJT must be AC coupled to prevent the larger DC current from flowing into it (Figure 7.23).
Having moved the input signal into a higher voltage range for amplification, this signal must also now be reduced at output to remove the DC component (which will also have been amplified). Once again, a coupling capacitor must be added at the output of the BJT to remove the DC bias signal that was added prior to amplification (Figure 7.24).
Adding a coupling capacitor at the output of a BJT amplifier effectively ‘de-biases’ the signal to remove the DC component added prior to amplification. This allows the system to produce an amplified output signal which is referenced to the same level as the input (prior to it being moved by the DC bias). In this way, adding coupling capacitors at both common emitter input and output allows the input signal to be biased for amplification without the bias signal having any impact on the final output. Returning to the earlier analogy of ripples on a pond, the entire volume of water in the pond is not of interest – only the information in the ripple moving across the top of it.
Having dealt with the bias signal, the overall gain of the amplifier must also now be addressed. Controlling the gain of a BJT is important as the initial gain value (the previous example circuit gives β = 200) is not only very large, but also unstable and prone to variance due to construction variance and particularly temperature (which impacts on collector current). To avoid this, the gain of the transistor can be reduced by adding negative feedback to the circuit. Recall from chapter 2 (section 2.1) that feedback can be used to control a system, where the output of the system is used to change the input (Figure 7.25).
The diagram illustrates the use of feedback within a control system, where the temperature sensor will trigger when the radiator output reaches a certain temperature. The system diagram shows how a summing junction is used to combine the two inputs (controller and sensor) to the heating element, where the input from the temperature sensor is effectively subtracted from the input of the temperature controller. This subtraction is called negative feedback (as opposed to positive feedback, where the inputs are added), and in amplification this subtraction can be achieved by summing the input and output signals within the circuit. To understand how feedback can be used in a BJT amplifier circuit, the relationship between the phase of the input and output voltages in a common emitter circuit must be considered, where the output voltage is shifted by 180° from the input (Figure 7.26).
In the diagram, the key to understanding the phase shift between input and output voltage is the relationship between voltage and current. Chapter 1 showed that potential difference is the potential for current to flow, and hence a flow of current down a path in a circuit means that this potential no longer exists. In simple terms, Vout is the potential for current to flow from collector to emitter, and so when the transistor is in the active region and current flows through the emitter (where IE = IC + IB) then an increase in current will mean a reduction in potential difference. The 180° phase shift between input and output means that the output signal is effectively inverted relative to the original input – thus the common emitter is known as an inverting amplifier. Although detailed analysis of AC phase is outwith the scope of this book, the concept of using a phase shift as negative feedback is crucial to all amplifier circuits. In practical terms, the gain of a transistor can be reduced by adding a feedback resistor to control the input signal level being presented at the base of the BJT (Figure 7.27).
The diagram in Figure 7.26 presents a visual overview of the use of feedback resistance, where the aim is to define the concept of adding a negative signal to reduce a positive one (rather than deriving the precise relationships involved). Negative feedback is also known as degeneration (as opposed to positive feedback, which is regeneration) and this idea of negative feedback is used throughout amplification to provide stability and more replicable circuit results, particularly when working with components that can vary as much as individual BJTs. Negative feedback will be discussed again in the following section on operational amplifiers, but for now it is important to note another much more common form of feedback resistor used with common emitter circuits. Although more complex to understand than simply adding an inverted waveform to reduce input, the addition of a degeneration resistor across the emitter of a common emitter BJT amplifier is often used to reduce the potential difference between the emitter and base of the BJT (Figure 7.28).
Adding a degeneration resistor on the emitter lead of a common emitter amplifier reduces the overall potential difference between base and emitter, where Kirchoff’s Voltage Law (KVL) states that the sum of all voltages in a loop must equal zero (VIN + VBE + VRE = 0). For a transistor to operate in the active region, the potential difference between base and emitter (VBE) must be greater than 0.7V – this is where amplification can take place. Transistors vary significantly based on temperature, which changes the collector current and hence the gain of the transistor (restating equations 7.4 and 7.5 for reference):
The first equation shows how an increase in the collector current (due to temperature for example) effectively increases the gain of the circuit (the symbol means proportional to). The second equation shows that when the collector current increases, the emitter current will also increase, so by adding an emitter resistor (RE), any increase in the emitter current will also increase the voltage across that emitter resistor. The third equation uses KVL to state that all voltages around the base loop of the BJT must sum to zero, and so as the emitter voltage increases the base-emitter voltage (VBE) must decrease (because the input voltage does not change). The effect of increasing the emitter voltage means the base-emitter voltage reduces, and thus so must the current at the base of the BJT (IB) – and hence the overall gain of the transistor is reduced. This is an important principle to remember:
This type of degeneration feedback can be a little more difficult to understand, as unlike the collector resistor approach in Figure 7.27 no actual signal is fed back into the input – only the level of gain is reduced. It can help to think of an emitter resistor as a gain control for the BJT, where an increase in the potential difference across it will reduce the current flowing through the base – thus the larger the emitter resistor the lower the gain of the amplifier. Although the gain of the BJT is now lower, the transistor will behave much more linearly as a result of being held within a known range of amplification. This principle of emitter resistance is also used in a circuit known as a long tail pair to allow a positive and negative (180° out of phase) version of the signal to be summed together – this concept will be discussed again in the next section on differential amplification.
With all of the elements in a common emitter amplifier introduced, a final practical circuit can be designed (Figure 7.29).
The diagram shows how an initial AC coupling capacitor is connected in series with the input (Vin) to prevent the current from the biasing network (R1 and R2) from flooding the input with a much larger current. The biasing network itself is used to add a DC bias signal to the initial AC input to ensure that the input signal is always within the active region of the BJT, where the quiescent operating point (Q point) can be determined from the characteristic BJT output curves that we simulated with LTspice in the previous worked example. A second coupling capacitor is connected at the collector output, to remove the DC bias signal that has been applied and return the output signal to the same voltage reference level as the input signal. The degeneration emitter resistor RE is used to reduce the input signal level and thus reduce the gain of the amplifier, where the combination of the collector resistor RC and the emitter resistor RE effectively sets the voltage gain for a common emitter BJT amplifier.
This leads to the final voltage gain equation for a common emitter BJT amplifier:
is the voltage gain of the amplifier | |
is the collector resistor in ohms (Ω) | |
is the emitter resistor in ohms (Ω) |
The equation above shows how the gain of a common emitter BJT amplifier can be controlled by the ratio of the collector ( ) and emitter ( ) resistors, providing a stable gain characteristic that is much more resistant to fluctuations in temperature (and other variances in BJT fabrication). The common emitter amplifier circuit shown in Figure 7.29 above adds a number of extra resistors and capacitors onto the initial design shown in Figure 7.12. This is an important point for your initial learning of electronics, as the ‘extra’ components added to many circuit designs are often crucial to their effective practical operation. It is often the case that it takes less time to learn how a BJT works, but significantly longer to understand how biasing, AC coupling and degeneration feedback function (and why they are necessary).
This book aims to provide a simple introduction to audio electronics, and so a more thorough discussion of transistor amplification theory is not provided. Having said this, a significant amount of theoretical explanation has been circumvented to provide a brief overview of the workings of a BJT amplifier – this does not mean that it is not important to your further learning. For now, a second transistor amplifier example is provided that includes biasing, AC coupling and feedback resistor concepts.
In this worked example, a common emitter amplifier will be simulated using LTspice. The amplifier circuit will use a bias network to keep the BJT within the active region and combine a collector resistor (to control the BJT current) with an emitter resistor to provide degeneration feedback and increase circuit stability. AC coupling capacitors will be used to pass a sine wave input signal through the amplifier and the amplifier output will be connected to a load resistor. The BJT supply will use values from the Arduino (5V, 40mA), though this circuit will only be simulated (not built).
Before the schematic is designed, the previously stated BJT circuit design characteristics can be used to derive the component values for this circuit:
Restating all results for clarity when designing the schematic:
The AC coupling capacitors are usually set to specific values based on the frequency of the signals involved, where the capacitor effectively forms a filter with the input (or output) resistance of the circuit. This example is already quite complex, and as filter circuits will be discussed in more detail in the following chapter capacitor values of 15μF (based around 100Hz) will be used to provide AC coupling on both the input and output of the circuit. A 100mV sine wave input will be used to measure the output signal from this circuit through a 10kΩ load resistance, using the schematic in Figure 7.30.
To build this circuit in LTspice, use component values of R1 = 3454Ω, R2 = 1200Ω, RC = 125Ω, RE = 25Ω, RL = 10kΩ, Cin = 15μF, Cout = 15μF, Transistor Q1 = 2N2222, Voltage Input Source Vin = 100mV and Voltage Supply Source VCC = 5V. Create a new circuit in LTspice and name it chp7_example2. The process for creating the schematic is as follows:
1.Lay out the components as shown in Figure 7.30. Start with the Voltage Input Source (Vin on left), Voltage Supply Source (Vcc on right), Transistor (middle) and the GND node (bottom). For the transistor, choose <npn – Bipolar NPN Transistor> from the component list and then configure it for 2N2222.
2.Add the input AC coupling capacitor (Cin) in line with the base terminal (leave room for the bias network). Set its value to 15μF.
3.Add the bias resistors (R1 and R2) vertically on either side of the base terminal (on OSX, Ctrl R will rotate the component) after the AC coupling capacitor (Cin). Set their values to R1 = 3454Ω and R2 = 1200Ω.
4.Connect wires from the positive terminal of the Voltage Input Source (Vin) to Cin and the Q1 base (NPN Transistor).
5.Connect a wire from the negative terminal of the Voltage Input Source (Vin) to GND.
6.Connect wires from R1 to the Cin base wire, and from this wire to R2, then R2 to GND.
7.Add the collector resistor (RC) vertically above the collector terminal and connect wires between collector, RC and the positive terminal of the Voltage Supply Source (Vcc). Set its value to 125Ω.
8.Add the emitter resistor (RE) vertically below the emitter terminal and connect wires between emitter, RE and the negative terminal of the Voltage Supply Source (Vcc). Set its value to 25Ω.
9.Connect a wire from the negative terminal of the Voltage Supply Source (Vin) to GND (this should also connect to the emitter resistor).
10.Connect a wire from R1 to the positive terminal of the Voltage Supply Source (Vin) to provide power to the bias network.
11.Add the output AC coupling capacitor (Cout) between the collector terminal and RC. Set its value to 15μF.
12.Add the load resistor (RL) vertically between the right leg of Cout and GND. Set its value to 10kΩ.
13.Connect wires between collector terminal and Cout, from Cout to the load resistor (RL) and from RL to GND.
14.Connect wires to form a series loop between VCC, R1, Q1 collector (NPN Transistor), Q1 emitter and GND
15.Configure the Voltage Input Source to be a sine wave of amplitude 0.1 (100mV) and frequency 100Hz (DC offset 0).
16.Configure the Voltage Supply Source to be a DC value of 5V.
17.Add a Spice Directive to perform a transient analysis between 0 and 0.1 seconds, with a step of 0.01 (.tran 0.01 0.1 0) – this will show 10 cycles of a 100Hz sine wave.
If the circuit has been built correctly in LTspice, the simulation should run and a voltage probe can be used to measure both the input signal (take a reading before capacitor Cin) and the output signal (take a reading after capacitor Cout, but before the load resistor RL). This should produce output traces similar to those in Figure 7.31.
The simulation graph shows both input and output voltage signals, where the output is now 180° out of phase with the input – this is an inverting amplifier. It is also interesting to note that the simulated voltage gain of the amplifier is lower than the value predicted when designing the circuit:
There are several reasons for this discrepancy, such as the effect of the internal transistor resistance (often labelled ) on the circuit, the filtering performed by the input and output AC coupling capacitors and also the actual gain coefficient for the 2N2222 transistor (where ) that gives a value of (thus changing other values in the calculations performed in this example). These elements have been omitted to try and reduce the complexity of transistor theory, as the aim of this book is to introduce concepts and demonstrate how they combine within practical audio circuits rather than to provide a complete course on analogue electronics.
This book does not go into significant detail on transistor amplifier designs, as the operational amplifiers that are built from them (see next section) are arguably more stable and simpler to work with. For this reason, the common emitter circuit provided above aims to explain the typical components in transistor amplifier circuits as found in many audio effects pedals in an attempt to disambiguate the basic elements of an amplification circuit. There are many ‘cookbook’ circuits that can be copied and combined into more extensive audio circuits, and though it is recommended that a deeper understanding of transistor theory be pursued it is also noted that this is an area of analogue electronics that can take time to learn. In the next section, transistors will be combined to provide differential amplification, which is the key to understanding integrated circuits known as operational amplifiers.
The previous section introduced bipolar junction transistors (BJT) as used in a common emitter amplifier for small signal voltage amplification. Although some elements of the theory of transistor operation were simplified, the concept of emitter degeneration as a means of creating negative feedback is important in understanding how multiple transistors can be combined to create a differential amplifier (Figure 7.32).
The left-hand diagram in Figure 7.32 shows a long tail pair amplifier configuration, where two BJTs are connected together by a common emitter resistor and powered by a dual supply (VCC and −VEE). Setting aside the dual supply (which requires more advanced analysis), the concept of emitter degeneration feedback (see Figure 7.28) means that any increase in the voltage across one BJT emitter will decrease the gain of the other emitter – and vice versa. Both BJTs are effectively paired at the emitter (tail) where each one’s output turns down the gain of the other, and in this way a long tail pair will not amplify a signal that is common to both. This principle is known as common mode rejection, where the long tail pair will reject any signal that is common to both inputs. The right-hand diagram shows the schematic symbol for an operational amplifier, which is used as a simplified representation of circuits such as the long tail pair. Analysis of more complex transistor circuits such as the long tail pair is outwith the scope of this book, and in some ways is not needed at an introductory level when such transistors are combined within a larger integrated circuit (IC). In practice, operational amplifiers may combine many more transistors to achieve specific input and output characteristics within a single IC (Figure 7.33).
The connections to the schematic symbol shown in the left-hand diagram in Figure 7.33 are a generalized example of an operational amplifier, where a differential amplifier requires power connections for supply (Vs) and ground (in this case) alongside the input and output terminals. The plus and minus signs on the symbol indicate the connections for non-inverting (+) and inverting (−) amplifier inputs, which specify the resulting output phase of the input signal being amplified (inverting amplification shifts the signal by 180° at output). The GND connection indicates a single supply chip, where the input voltage is provided to one rail (positive) relative to the overall circuit ground. Many operational amplifiers are dual supply, where a positive and negative voltage (relative to a common ground) are provided. This is because an operational amplifier has no internal ground reference, so it is not directly connected to a ground terminal unless a single supply is used.
The 8-pin IC shown in the middle diagram shows how these connections would map to a typical chip, where the central die of the chip contains layers of silicon and copper that combine to create complex combinations of resistor and semiconductor components. The die is connected to the external pins of the IC, which allow it to be placed within larger electronic circuits. The right-hand image shows an LM386 audio amplifier as an example of an 8-pin IC – where the LM386 operational amplifier will be used in all projects for the remainder of this book. The middle diagram maps the main connections for the pins of an LM386, which are taken from the data sheet for that chip (this will be discussed in more detail in the chapter project).
The advantages of scale and flexibility provided by integrating large numbers of semiconductor components on a single IC chip has led to them becoming the fundamental building block of modern electronics, alongside their relative ease of use when compared within discrete component circuits. ICs come in many different form factors and configurations, depending on the task that they will be used for. In this book, a simple 8-pin amplifier like the LM386 allows audio amplification and filtering circuits to be built on breadboard without soldering (and with a minimal amount of electronic components). Although there are many uses for differential amplification, one of the most important for amplification (particularly in audio) is the use of common mode rejection to reduce noise within a circuit (Figure 7.34).
The diagram shows how common mode rejection can be used to cancel out noise sources that are common to the entire amplification circuit. In the top example, the use of a BJT as a common emitter means that all sources (both signal and noise) will be amplified for output – any noise introduced into the input circuit by components, connections or the power supply will also be amplified and thus distort the output signal as a result. In the bottom example, a differential amplifier will only amplify the difference between the two inputs, and so any noise sources present in the input circuit will be common to both terminals. The non-inverting and inverting (out of phase by 180°) noise signals are effectively summed and cancel each other out, whilst the input signal (which is only connected to one of the input terminals) will be amplified as the difference between the two terminal inputs.
In practice, no common mode signal is completely cancelled out by this process and other factors (such as input signal frequency) will also impact on a differential amplifier’s ability to cancel out unwanted noise signals. For this reason, the common mode rejection ratio (CMRR) of an amplifier is defined as a logarithmic ratio of the common mode gain ( ) relative to the differential gain ( ):
is the differential gain of the amplifier | |
is the common mode gain of the amplifier |
The previous equation shows that a larger differential gain (compared to common mode gain) will result in a higher CMRR – thus operational amplifiers aim to have as a high a CMRR as possible (theoretically the CMMR should be infinite). The logarithmic scale used to represent CMRR reflects the difference in scale between the quantities involved, where a good amplifier should be able to carry signals of the order of volts with near zero common mode gain – i.e. in the nanovolt range (1 × 10−9). As the scale of the relationship between these two quantities is so large, it is therefore best described using decibels for ease of comparison and calculation. A high CMRR can help to reduce the amount of noise that is subsequently amplified within the circuit, but it is not a single solution to circuit noise problems. The next section will discuss noise (and basic noise-reduction techniques) in more detail, but for now there are other design characteristics of operational amplifiers that must be considered.
In addition to common mode rejection, operational amplifiers are also designed to have very high input impedance and very low output impedance to ensure the highest possible efficiency during the amplification process. A detailed discussion of amplification efficiency is outwith the scope of this book, where audio amplifier classes such as A/B/AB/D relate to the efficiency of different methods used to amplify either all or part of the input signal. For introductory purposes, the efficiency of an amplifier broadly relates to the proportion of the input signal that is accurately preserved and scaled (i.e. amplified) for output. For this reason, the input impedance of the amplifier must be as high as possible (theoretically infinite) and the output impedance of the amplifier must be as low as possible (theoretically zero). To understand why this is the case, the operational amplifier circuit can be considered as an audio system that is designed to amplify a source to drive a load (Figure 7.35).
In a simple amplifier system like that in Figure 7.35, the amplifier circuit must amplify a source (sensor) to drive a load (actuator). To be an efficient amplifier system, the circuit should ideally not reduce the input signal whilst also maximizing the output signal that can be driven by the amplifier. This means that the amplifier should present very high impedance to the source and very low impedance to the load. The simplest way of understanding this is to consider both the input and output of the system as being part of separate voltage dividers (see chapter 3, section 3.3), where the relative size of the impedances involved will dictate the amount of the voltage signal across the amplifier input or output (Figure 7.36).
The diagram shows examples of source and load impedances for an amplifier system. The left-hand divider illustrates that to amplify the input signal effectively, as much of the input signal voltage as possible must be seen across the amplifier input terminal. To do this, the amplifier impedance (represented by R2 in the middle divider see-saw diagram) should be very high relative to the microphone impedance (represented by R1) in order to ensure that VIN is as close to the entire potential difference generated by the microphone as possible. The opposite is true at output, where the amplifier should drive the loudspeaker with as much of the output signal as possible in order to be efficient. Now the amplifier impedance (represented by R1 in this instance) should be very low relative to the loudspeaker (represented by R2) to ensure that VOUT is close to the entire amplifier voltage signal.
The main function of an amplifier is to increase (or perhaps reduce) an input signal for output, and so the gain of the amplifier is its most important practical characteristic. The open-loop gain of an operational amplifier is defined as the uncontrolled (i.e. maximum) possible gain value, which in theory should be infinite – it should ideally be able to increase an input signal by any scaling factor required. In practice, many operational amplifiers will have an actual open-loop gain characteristic that is in the tens or even hundreds of thousands – still far too high for real amplification systems. As with the transistor amplifier in the previous section, some form of negative feedback is therefore needed to bring the gain of an operational amplifier down to a stable and manageable level (Figure 7.37).
The system in this diagram uses negative feedback to reduce the input signal being applied to the non-inverting input of the operational amplifier. The feedback signal is taken from the output of the amplifier and connected to the inverting input, and because the inverting terminal is 180° out of phase it is subtracted from the non-inverting signal. In so doing, the signal is reduced by the amount of feedback provided, which is itself controlled by the potentiometer (volume control) that is connected in series with the inverting input. This combined gain characteristic is known as the closed-loop gain of the amplifier, where the open-loop gain (A) is reduced by the feedback gain (B) connected to the other differential input (Figure 7.38).
The diagram in Figure 7.38 shows the system diagram for an operational amplifier with feedback that takes a microphone input signal (Vi) and amplifies it for output (Vo). The open-loop gain (A) and the feedback gain (B) of the amplifier are summed as differential inputs to the amplifier (represented as a summing junction of a circle with a cross), where the feedback signal is subtracted from the microphone input signal to reduce the output (Vo). These terms can then be used to mathematically derive the equation for closed-loop amplifier gain for the system:
Voltage gain is the ratio of output to input voltage, so the equation for closed-loop operational amplifier gain (G) is:
is the open-loop gain of the amplifier | |
is the feedback gain of the amplifier |
In this equation the open-loop gain (A) is actually unimportant, as can be shown with example values for (A) and (B):
This means that operational amplifier gain can be designed around the reciprocal value of the feedback gain ( ). The system example in Figure 7.37 showed a potentiometer being used to reduce the amount of feedback being applied to the inverting terminal of the operational amplifier, but more commonly a voltage divider is used to determine the level of feedback (and hence the gain) in a non-inverting operational amplifier circuit (Figure 7.39).
The schematic in Figure 7.39 shows how a non-inverting operational amplifier can be designed around the ratio of the feedback resistors (R1 and R2), where the non-inverting amplifier gain is effectively the reciprocal of the feedback gain (B) for the circuit. This feedback gain value is determined as the ratio of the voltage divider that supplies the inverting input:
By inverting the voltage divider equation then dividing throughout by , the equation for non-inverting amplifier gain is:
is the input resistor connected to the non-inverting terminal | |
is the feedback resistor connected to the non-inverting terminal |
This is the standard gain equation for a non-inverting operational amplifier circuit, which is widely used in audio electronics circuits. The other commonly used configuration is the inverting operational amplifier, where connecting an input signal to the inverting terminal will already change the output phase by 180°, thus allowing both the input and feedback signals to be summed at the same inverting input terminal (Figure 7.40).
In this diagram, it is crucial to note that the terminals of the operational amplifier have been reversed. Whenever reading a schematic, one of the first tasks with operational amplifiers is to ensure that the orientation of the terminals is always in the same direction (this will be shown again below). The other significant difference in this circuit is the inclusion of the input (I1) and feedback (I2) currents to show how the inverting terminal has now become a virtual summing point within the circuit. The previous discussion on source and load showed why an operational amplifier should have as high an input impedance as possible – theoretically this value should be infinite. Working from this theoretical case, an infinite input impedance will allow zero current to flow into the circuit, and from Kirchoff’s Current Law (KCL) it can be shown that the sum of all currents flowing into and out of the voltage divider node will equal zero. This principle of infinite resistance allowing zero current flow can then be used to mathematically derive the equation for inverting amplifier gain:
Again dividing throughout by , the equation for inverting amplifier gain can then be stated as:
is the input resistor connected to the inverting terminal | |
is the feedback resistor connected to the inverting terminal |
In many ways, operational amplifiers are theoretically much more straightforward than transistors, and the two basic configurations of non-inverting and inverting amplification are used widely in electronics. The swapping of terminals on the operational amplifier can often lead to confusion, and so it can be useful to rearrange the previous non-inverting circuit to follow the same terminal configuration as an inverting amplifier (Figure 7.41).
The diagram shows both inverting (left) and non-inverting (right) configurations for an operational amplifier, where the orientation of the input terminals is consistent (with inverting top, non-inverting bottom). Although many schematics will use the non-inverting layout shown in Figure 7.38, it is important to recognize the importance of terminal orientation when learning by analysing existing circuits. In the left-hand inverting amplifier schematic, both input and feedback signals are summed at the non-inverting input (which acts as a virtual summing point), whilst in the right-hand schematic a non-inverting input signal is fed from the output to the inverting terminal, where a 180° out-of-phase signal will now be summed as a differential input. The gain characteristics of both amplifiers are relatively similar, though a non-inverting amplifier can never have a gain of less than 1 – which prevents it from being used in specific circumstances where gain reduction is needed.
At this point, the two main operational amplifier configurations used in audio amplification have been introduced. Though many other operational amplifier designs exist (such as those using positive feedback to produce sound), the primary function of signal amplification will form the basis of the following worked example.
In this worked example, an inverting operational amplifier circuit will be simulated using LTspice. As with the previous BJT circuit, the supply will use values from the Arduino (5V, 40mA), though this circuit will only be simulated (not built). A 100mV sine wave input will be used to measure the output signal from this circuit through a 100kΩ load resistance, using the schematic shown in Figure 7.42.
The gain of the circuit can be set using R1 and R2, where . The output load resistance (used to allow LTspice to simulate a voltage level across it) is set to 100kΩ to match R2, though this is simply an approximation for circuit simulation – in practice, more advanced analysis would be needed to derive the equivalent Thevenin resistance for the operational amplifier to determine the optimum load needed to balance the circuit.
To build this circuit in LTspice, use component values of R1 = 10kΩ, R2 = 100kΩ and R3 = 100kΩ, Op-Amp U1 = AD795, Voltage Input Source Vin = 100mV and Voltage Supply Source VCC = 5V. Create a new circuit in LTspice and name it chp7_example3. The process for creating the schematic is as follows:
1.Lay out the components as shown in Figure 7.42. Start with the Voltage Input Source (V1 on left), Voltage Supply Source (V2 on right), Operational Amplifier (middle) and the GND node (bottom). For the Op-Amp, select the [Opamps] folder and then scroll to find AD795.
2.Add resistor R1 between the top terminal of V1 and the inverting input of U1. Set the value to R1 = 10kΩ.
3.Add resistor R2 above the Op-Amp U1 and set the value to R1 = 100kΩ.
4.Add the load resistor (R3) vertically between the output of U1 and GND. Set its value to 100kΩ.
5.Connect wires between V1 and R1, R1 to the U1 inverting input, U1 inverting input (middle) to R2 and the non-inverting U1 input to GND.
6.Connect wires between U1 output and R3, U1 output (middle) and R2, R3 to GND.
7.Add a net name for V+ (same process as a GND connection), leave the Port Type as <none>. Place one above the positive terminal of V2, place the other above the positive power terminal of U1.
8.Add a net name for V−, again leave the Port Type as <none>. Place one below the negative terminal of V2, place the other below the negative power terminal of U1.
9.Connect wires between the V2 terminals and the net names, then between U1 terminals and net names.
10.Configure the Voltage Input Source (V1) to be a sine wave of amplitude 0.1 (100mV) and frequency 100Hz.
11.Configure the Voltage Supply Source (V2) to be a DC value of 5V.
12.Add a Spice Directive to perform a transient analysis between 0 and 0.1 seconds, with a step of 0.01 (.tran 0.01 0.1 0) – this will show 10 cycles of a 100Hz sine wave.
If the circuit has been built correctly in LTspice, the simulation should run and a voltage probe can be used to measure both the input signal (take a reading before R1) and the output signal (take a reading before R3). This should produce output traces similar to those in Figure 7.43.
The simulation graph shows both input and output voltage signals for an inverting amplifier. The amplifier gain value was calculated as and the output trace is now a magnitude of 10 greater than the input but inverted so the output is also now 180° out of phase with the input. It is interesting to note that the design (and analysis) of this circuit was much simpler than that for the previous common emitter example (7.3.1), and also that the gain characteristic is much closer to the required value than was the case for a BJT amplifier circuit. In most modern circuits, operational amplifiers are preferred because of their greater stability and reliability – the calculated gain characteristic is much closer to the simulated value (Vin = 100mV, Vout = 1V, Vout(actual) = −982mV) than with the BJT amplifier. The addition of node names within LTspice allows the power rails of the operational amplifier to be connected up without making the schematic difficult to read. The next section will show how connections like power rails can introduce noise into a circuit that must be reduced, alongside compensating for the complex output impedance of a loudspeaker using a Zobel network and decoupling DC signals (in a similar manner to debiasing a BJT) to reduce the presence of unwanted noise signals in the amplified output.
With an operational amplifier circuit simulated, it is now important to consider some of the additional practicalities involved in designing and constructing a functional circuit. This aspect of operational amplifier design can often be confusing for new learners, as in some respects it appears to be the introduction of a significant amount of additional components (mostly capacitors) that can make the relatively simple schematic of an operational amplifier seem much more complex. The primary reason for the addition of these components is the reduction of noise within the circuit, which has a particularly critical impact upon audio electronics circuits. In practical terms, noise is any non-signal component within an electrical circuit that becomes part of the signal path – thus corrupting the information contained within that signal.
Electronic noise can occur in many ways, but at a fundamental level the primary cause of noise is electrons moving in undesirable (and often unpredictable) ways. The basic principles of KVL and KCL specify what should theoretically happen in an electrical circuit, but in practice electrons do not simply flow in a single path as defined by the wires or PCB tracks that connect voltage and current sources. Chapter 1 (Figure 1.6) showed how negatively charged valence electrons act as charge carriers by moving into positively charged holes within the valence band of another atom. This linear movement helps to explain the movement of charge around a circuit, but as a simple theoretical description it neglects the possibility of an electron moving in another completely different direction (Figure 7.44).
In the diagram, the overall net movement of charge is still left to right, where the majority of charge carriers (electrons) have moved from one valence shell to the next. Having said this, some of these electrons (middle and right atoms) do not progress linearly and may move from right to left (against the overall net movement of charge) or in another direction entirely due to other factors (such as heat). Although circuit analysis techniques like KVL and KCL predict the linear movement of all electrons in a single direction around a path within a circuit, in practice some electrons will not follow this simple rule and will move in less predictable ways. This unplanned movement manifests itself as noise within an electronic circuit, where any factor that influences electrons to move outside the planned conductive path will create some level of noise signal. There are many different types of noise that can occur on an electronic signal path:
1.Johnson-Nyquist (thermal) noise – created by the thermal agitation of electrons within all resistive components
2.Shot noise – created by the movement of charge due to the discrete nature of electrons (more significant for small currents)
3.
4.Burst (popcorn) noise – low-frequency noise occurring in operational amplifiers and other semiconductors
5.White (and other colours) noise – noise colours are defined by the power and bandwidth of the signal involved, where white noise has equal power across the entire audio spectrum (pink noise is often used in room acoustics)
This list is provided to give a brief indication of both the complexity of noise and also the variety of sources that may generate it. Although a full discussion of this topic is outwith the scope of this book, the impact of noise can be significant in even the simplest circuits. As discussed in the previous section, operational amplifiers have a high CMRR and this can help to reduce the amount of noise within the circuit that is subsequently amplified, but this is not (in itself) a solution to circuit noise problems. Numerous audio manufacturers have devoted significant amounts of time (and research effort) to investigating methods of effectively reducing noise, but the simple fact is that noise cannot be completely removed from any signal path. Having said this, the level of noise in a circuit can be managed to keep its influence to a minimum and there are some component additions that can be made to an audio circuit to improve its noise performance.
Power sources in a circuit can introduce noise signals due to interference, where electrons on a power rail move across the insulating gaps on a printed circuit board into the signal path. In the previous section (Figure 7.23 and Figure 7.24), AC coupling capacitors were used in a BJT circuit to block the DC biasing component at both input and output. In operational amplifier circuits, this same concept is used to prevent any DC noise signal (due to power supply interference) from entering the amplifier in either direction (Figure 7.45).
By adding a blocking capacitor at both ends of the amplifier (often called a coupling cap, as they couple the AC component of the input), any DC signal that has been introduced into the signal path will be filtered out before it can reach the operational amplifier. This not only removes the DC noise, but also protects the amplifier from an increase in signal voltage that may prove too large for the internal gain of the circuit. The previous section showed how an input coupling capacitor can be used to prevent the larger bias current from flooding the much smaller input current to the BJT. In the same manner, an output blocking capacitor isolates the signal path from other parts of the system that may work with larger currents which could potentially flow into the output of the operational amplifier and damage it.
When working with operational amplifier power rails, the problem of AC noise also occurs. Although internal power supplies are usually DC signals, noise from the AC mains power supply (which oscillates at 50Hz in Europe, 60Hz in North America) is also a common problem in recording studios. Section 7.2 (Figure 7.7 and Figure 7.8) showed how diodes can be used to rectify an AC mains power supply signal for DC output, but this simple circuit will not prevent all AC noise from entering the DC power supply to an audio circuit. An operational amplifier (which is composed of many transistors) requires a stable DC supply for amplification. In a BJT, the input signal to the base allows collector current to flow so an operational amplifier follows the same principle – any fluctuations in the collector supply will become part of the output signal. To reduce the impact of this noise, additional AC decoupling capacitors can be added to the power rails of the operational amplifier (Figure 7.46).
In the diagram, AC decoupling capacitors have been added to both power supply rails to filter out noise components that may be present on the supply rails. This is particularly important if the circuit will be powered by an AC mains supply that must be stepped down (by a transformer) and then rectified (Figure 7.7) to produce a DC power signal. The diagram in Figure 7.46 represents one possible approach to AC decoupling, as in practice this is an area of noise reduction where more advanced techniques (and more extensive analysis) are required. For the purposes of this textbook (where all circuits will be built on breadboard) it is sufficient to add two decoupling capacitors across the power rails that are connected to the Arduino to reduce the noise introduced by the single rail 5V supply (Figure 7.47).
This image shows how two capacitors can be added to a breadboard to provide a level of AC decoupling to the circuits being built. Although not a comprehensive strategy for dealing with power-supply noise, the prototyping nature of breadboard circuits means that some level of noise will be inherent across the entire circuit and so it is not practical to consider additional noise-reduction steps as a result. The final project in this chapter will build a simple audio amplifier, and it can be a useful test to add and remove these capacitors once the circuit is fully operational to see the effect they have (as their removal will not change the flow of power). As previously noted, significant efforts have been made to develop solutions for noise reduction in audio circuits, but the simple compromise shown in the image provides some level of reduction whilst acknowledging the shortcomings of breadboard prototyping (which in itself will never achieve high-fidelity results).
Another common addition to an audio operational amplifier is a Zobel network, which compensates for the internal inductance of a moving-coil loudspeaker (Figure 7.48).
Otto Zobel published a 1923 paper for Bell Labs on impedance balancing that proposed the idea of image impedance, which in broad terms aims to match the impedance of one side of a network (known as a port into a network) with the other. In audio, this Zobel network takes the form of what is also known as a Boucherot cell, named after the French Railway engineer who first proposed using a series resistor and capacitor (or multiple capacitors) to cancel out the reactive component of an inductive load. In the diagram, the Zobel network of a resistor and capacitor is added to balance the inductor resistor combination (in grey) that represents a loudspeaker. The impedance of a loudspeaker is effectively a combination of both a resistive and an inductive component (due to the voice coil in the loudspeaker). For this reason, the concept of a loudspeaker as an output impedance load (see Figure 7.36) is more complex than simply ensuring that the operational amplifier presents as low an impedance as possible, because the loudspeaker impedance will vary with frequency due to the presence of the inductive component. For reasons of brevity, inductors have not been discussed in detail in this book but the basic concept of an inductor is in many ways the opposite of a capacitor, where inductive reactance increases with frequency (Figure 7.49).
The diagram shows how inductive and capacitive reactance are inversely related (though not directly proportional) to one another. In effect, the rising inductive reactance due to frequency will mean that any loudspeaker connected to an operational amplifier will vary its impedance as the frequency of the output signal increases. To counteract this non-linear response, a Zobel network introduces a resistive and capacitive load to balance out the inductive (and resistive) load presented by the loudspeaker. More detailed analysis of concepts such as Zobel networks is outwith the scope of this book, but it is included because it is a common element in most audio amplifier designs. The primary aim of this section is to introduce the ‘extra’ components that are often added to audio amplification circuits – components that can easily confuse the new learner (Figure 7.50).
At this point, the inverting amplifier circuit from Figure 7.41 has now been augmented with a significant number of extra components (mostly capacitors). This is common in electronic circuits (particularly in audio) to remove DC signals, reduce AC noise and also balance the output of the amplifier when connected to a loudspeaker. It can often be very confusing for the new learner to see real schematics of audio equipment and try to map these back to the initial concepts of BJT or operational amplifiers that they have been built on. Whilst this section has provided a brief overview of noise-reduction techniques, in practice many audio electronics designers spend significant time and effort trying to derive new (and more efficient) ways of reducing noise in a circuit. For now, a more straightforward circuit example is provided in the chapter project, which focusses on building a simple audio amplifier.
This project will use an LM386 operational amplifier to build a functional audio amplification circuit. The LM386 is a popular amplifier for prototyping and learning, which can achieve reasonable results for a relatively small component count. The LM386 is a low-power amplifier that works from a single-rail supply, which allows it to be powered by the Arduino 5V rail (though a 9V battery can also be used). In addition, the LM386 has an internally fixed gain level of 20 (which can be varied up to 200), which removes the need for an external resistor feedback network (Figure 7.51).
The LM386 is fairly straightforward to work with, as there are only three additional components (one resistor and two capacitors) required for the example circuit shown in the right-hand schematic in Figure 7.51. The schematic uses a Zobel network (0.05μF capacitor and 10Ω resistor) to balance the resistive and inductive load of the loudspeaker, alongside a DC blocking capacitor (250μF) to prevent any DC signals flowing into (or out of) the LM386 amplifier. A variable resistor (10kΩ) is shown connected to the non-inverting input of the amplifier to act as a volume control by reducing the voltage seen across the input, but this can be omitted for prototyping purposes to keep the component count down (the project build will show both options). The power supply pin 6 (Vs) can be connected to a 5V source like the Arduino, which can also provide a ground signal (GND pin 4) for this chip. Pins 1 and 8 control the gain of the circuit, and so can be left unconnected – as can the bypass (pin 7), which is only used if the operational amplifier is not internally biased (Figure 7.52).
The project will use the same non-inverting configuration as shown in the LM386 datasheet in Figure 7.52, where the inverting input (pin 2) is tied to GND to provide a reference signal for differential amplification (where any circuit noise will ideally be reduced by CMRR). The only additional components to be added are AC decoupling capacitors (C1 = 1μF, C2 = 0.1μF) across the breadboard power rails (Figure 7.47), which will help to reduce any noise introduced by the Arduino supply and also by the construction of the breadboard power rails (breadboards do not provide high-quality electronic connections). Other capacitors (such as DC blocking on input) can be added for noise reduction, but as the aim of this project is to prototype a basic audio operational amplifier these have been omitted to keep the component count to a minimum. In this project (and the chapter 8 and 9 projects) the audio input and output are connected to the breadboard using PCB mount screw terminal blocks (Figure 7.53).
These blocks help to prevent the audio wires from moving and becoming detached from the breadboard (which can easily happen with a direct wire inserted into the breadboard). As shown in the chapter 5 MIDI drum trigger project, when connecting a wire to the block, it can help to pre-mount the terminal block to the breadboard to provide a solid surface to work with. In the case of two wires (like an audio connector), one issue can be too much exposed wire outside the terminal block that may potentially short out the signal and GND wires by allowing them to make contact with one another. To insert the wires, it can be easier to unscrew one terminal on the block, and with a wire in position (inside the terminal clamp) screw the terminal to clamp down on this wire and hold it in position. Repeat the process with the second wire, and this should provide a suitable audio connection for input or output to the breadboard.
Project steps
For this project, you will need: 1. 1 × LM386 operational amplifier 2. 4 × capacitors (250μF, 0.05μF, 1μF, 0.1μF), 1 × resistor (10Ω), 1 × potentiometer (optional 10kΩ) 3. 1 × audio input connector (3.5mm jack), 1 × audio output connector (loudspeaker) 4. 2 × connector cables and 6 × connector wires (images show short wires) |
|
1. Add the LM386 across the column break with top left pin 1 on e22 (the top of the chip has a notch) – bottom right pin 5 on f25. 2. Add an input screw connector block to [B28 and B30] and an output screw connector block to [J28 and J30]. |
|
Add a ground connector wire between input and output connectors from [e30–f30]. |
|
1. Connect the input and output GND to chip GND (pin 4) with a connector wire from [c25–c30]. 2. Connect the audio input to the LM386 non-inverting input (pin 3) with a connector wire from [d24–d28]. |
|
1. Connect the LM386 inverting input (pin 2) and GND (pin 4) with a connector wire from [b23–b25] and then connect both to the breadboard ground rail with a connector wire from [a25–GND]. 2. Connect the LM386 power supply Vs (pin 6) with a connector wire from [j24–GND]. |
|
Add a 250μF DC blocking capacitor from the LM386 output Vout (pin 5) to the audio output connector from pins [h2–-h28]. The audio output connector may be slightly displaced by the capacitor, but don’t force the capacitor as it can be angled if need be. |
|
1. Add a Zobel network to the LM386 output Vout (pin 5). This can be done in various ways, we will use a connector wire from pins [g25–g19] to provide space for the network. 2. Add a 0.05μF capacitor (or a 0.1μF if not available) between pins [h19–i18] then add a 10Ω resistor between pins [j19–GND]. |
|
Add AC decoupling capacitors (C1 = 1μF, C2 = 0.1μF) between the breadboard power and GND rails. |
|
1. Connect the Arduino 5V and GND to the breadboard power rails. 2. Bridge the breadboard GND rail to connect the LM386 GND connections (pins 2 and 4). |
|
Optional: replace the audio connector wire on [d24–d28] with a 10kΩ potentiometer – right wiper to audio [d28], middle wiper to LM386 [d24] and left wiper to GND. |
|
Connect the 3.5mm audio jack to an audio playback device – the headphone socket will provide a high enough voltage to drive a small (8Ω, <1W) loudspeaker when fed through the LM386 with a gain of 20. If everything has been connected properly, the LM386 should amplify the input signal from the audio playback device and output the electrical signal to be converted into sound by the loudspeaker. |
At this point, a functional audio amplifier circuit has been prototyped, with the option of including a potentiometer across the input connection to vary the voltage level at the non-inverting amplifier input. This circuit will be augmented in the following chapters to include audio filtering (chapter 8) and digital potentiometer control (chapter 9), but it is also possible to expand on the minimal amplifier circuit provided in the LM386 datasheet. The LM386 is a very versatile (and straightforward) operational amplifier chip that can be used for a variety of audio applications. The circuit shown above is effectively a building block for the projects in chapters 8 and 9, and can be used for your own projects outside this book.
This chapter looked at how diodes work by controlling the flow of charge, allowing them to be used in full wave rectification to convert AC signals to DC (and in LED circuits throughout this book). This control of current flow is expanded with the transistor, which can be used as an amplifier by varying the small base current to control the flow of a much larger collector current. Transistors are the cornerstone of all modern electronics, and this book provides an introduction to their workings to help the learner understand many of the audio circuits that use them. Having said this, transistors are much more detailed (and have significantly wider application) than discussed in this chapter, and so further study is recommended. Transistors can be combined within an integrated circuit (IC) such as an operational amplifier, which uses differential amplification to reduce circuit noise (through CMRR) and improve stability. The input impedance of an operational amplifier should be very high (theoretically infinite) and the output impedance very low (theoretically zero), to maximize the transfer of power between input and output signals (as sources and loads). In addition, an operational amplifier should have (theoretically) infinite gain, which must then be reduced using negative feedback.
The final project in this chapter combined a minimal audio amplifier chip (LM386) with additional components for noise reduction (DC blocking, AC power decoupling) alongside a Zobel network to balance the frequency-dependent output impedance of a connected loudspeaker (as an output transducer). The next chapter on audio filters will provide more detail in relation to frequency dependence, where a resistor capacitor network will be used to create both a low- and a high-pass filter. In so doing, the amplifier used in this chapter will be used as a building block for a more useful audio filter circuit – highlighting why a systems approach to audio circuits is important. This chapter has covered a lot of material (though not all of it in detail) and it should be noted that the main aim of this book is to learn the basics of introductory audio electronics circuits (and how to control them with the Arduino). It should not be considered as a replacement for a more advanced study of subjects like transistors and differential amplification, which require much more detailed investigation for current usage.
The following questions are intended to reinforce your understanding of amplification and operational amplifiers (transistors are not included, as no practical transistor circuit is built in this book).
18.217.8.82