Nov 1, 2008

Basics of Audio Electronics


Basics of Audio Electronics


When an object vibrates it sets the surrounding air in motion, sending waves of compression and rarefaction we call sound radiating outward from the object. When these waves strike another object, they cause that object to vibrate. An electro-mechanical transducer like a microphone can convert these vibrations into an electrical signal that oscillates in proportion to the air pressure variations. Once the information content of the sound is transferred to an electrical signal, it can then be stored and manipulated in the process we know as sound recording. Most of the process involves the electrical analog of the original sounds, since sounds are impossible to store directly, so an understanding of the function of electronic devices is fundamental to mastering the art of sound recording.


Equipment including recorders, amplifiers, mixers, equalizers, compressors and other gear can be used to alter the electrical information in specific ways, giving an engineer the ability to dramatically alter the reproduction of the sounds that were recorded. While these devices may be complex, their operation is based on a few elementary concepts of analog electronics. Analog electronics refers to a system where the electrical signal amplitude varies continuously in direct proportion to the intensity of the mechanical vibrations that were transduced. Until recently, this was the only method available for processing audio data. Digital electronics now allow discrete measurements of the transduced signal to be created, stored, and manipulated by computers at a very high rate of speed, producing a fast but non-continuous numerical representation of the original sound. We will begin by exploring the more simple concepts of analog electronics.


Electricity is simply the movement of charge (electrons in most cases). The flow of charge can be through a resistive medium like air (lightning), or through a solid conductor like a wire. The path through which the charges move is called a circuit; to be useful, the charges need to move from the source (battery) through a loop (circuit) back to the source. DC (direct current) flows in only one direction, while AC (alternating current) flows back and forth in both directions. The rate at which an AC signal changes direction determines its frequency, the rate at which a sinusoidal oscillation repeats. Some simple electrical principles include:


Voltage (V): electromotive force (EMF) pushing charges through a circuit (analogous to pressure in a liquid flow system). Audio signals are usually time-varying voltage signals.


Current (I): flow of charge through a circuit. (Amperes = coulombs/sec; the coulomb is a measure of electric charge: 1 coulomb= 6.414 x 1018 electrons).


Impedance (Z): opposition to flow of current (somewhat analogous to the diameter of a pipe in a fluid flow system), measured in ohms (resistance (R), reactance (X): while resistance does not depend on the frequency of the signal, reactance does).


The term signal denotes a time-varying voltage or current that encodes information: a voltage or current that varies in proportion to a transduced air pressure, for example.


While we normally regard a wire simply as a conduit for electrical current flow, there is a very important phenomenon generated by current flow in a wire: namely the creation of a magnetic field that varies with the changing flow of current. Any time current flows, it sets up a magnetic field, and any time a wire moves through a magnetic field, a current flow is induced in the wire. This phenomenon provides the basis for many steps in the recording process. It also creates some basic problems by providing unwanted coupling of signals in some situations.


The simplest electronic components are the passive devices: resistors, capacitors, and inductors. Passive means they do not require external power to function, only the power contained in a signal itself. (Active components like transistors, vacuum tubes, and integrated circuits require external power as well as the energy of the signal itself.) Electronic devices are described by their current-voltage (I-V) relationships: as we vary the current through the device, what does the voltage across them do? (Although these circuit elements all exhibit slight deviations from the "ideal" behavior, the differences are usually small enough to ignore to a first approximation.)


Passive devices are only capable of opposing the flow of current and therefore cannot amplify signals. The opposition to current flow occurs in two different forms: resistors dissipate power as heat while "ideal" capacitors and inductors temporarily store energy that can be returned to a circuit and do not dissipate power. The opposition to current flow in resistors is termed resistance while that of capacitors and inductors is called reactance, but both forms are included in the term impedance. Impedances are measured in ohms whether we are referring to resistance or reactance.


Resistors: V = I x R (resistance (R) does not depend on time or frequency) Resistors are passive devices which have a constant impedance regardless of the frequency of the current flowing. They can be conceptualized as the diameter of a hose: they oppose the flow of current by an amount directly related to the resistance (like a constriction in a hose opposes the flow of liquid). Resistors resist current flow by dissipating energy as heat.


Capacitors: V = ∫ I dt/C (or I = C dv/dt) : Xc=-1/(2πfC) (reactance (Xc, XL) involves the storage of energy and therefore does depend on time and/or frequency). A capacitor is simply two charged plates placed close together with a dielectric (non-conducting) material sandwiched between the plates. When a charge is applied to one plate, it repels charges on the opposite plate until equilibrium is established. For direct current, the capacitor charges up with a time constant that depends on the capacitance value and the impedance through which the current flows into the capacitor. Once the capacitor is fully charged, no more current flows. This means that the capacitor is an effective block for direct current. For alternating current (like audio signals), the response is more complicated. The charge that develops on the capacitor depends on how fast the current is changing. It takes time for the charge to build up, and that time results in a frequency dependent delay (or phase shift) in the output signal. In series, a capacitor acts somewhat like a rubber diaphragm in a hose. Capacitors store energy in the electric field created by the separated charges on the plates.


Inductors: V=L dI/dt : XL=2πfL An inductor is simply a coil of wire, which can be wrapped around either air or metal cores. As current flows into an inductor, a magnetic field is created around the coil. When the current stops, the magnetic field collapses, generating an induced current flow in the coil. Low frequency currents flow easily into the inductor, but as the alternating current frequency increases the impedance of the inductor increases. Like the capacitor, the inductor introduces a phase shift. Inductors allow direct current to flow, but as the frequency of oscillation increases, so does the inductor’s impedance. An inductor is conceptually similar to a water tank (resonant circuits with inductors are sometimes referred to as "tank" circuits). Inductors store energy in the magnetic field that builds around the device when current flows.


Transformers: (M = mutual inductance) Vout= L dI/dt + M dI/dt. A transformer consists of two separate coils with overlapping magnetic fields, so that current flowing in one circuit is inductively coupled to the other. Often, transformers consist of an iron core wrapped with two or more coils, which couple magnetically. Transformers are used to get voltage gain (at the expense of current reduction) and to step down power line voltages for power supplies. Transformers are also used to match impedances between devices and to provide ground isolation. Although transformers are bi-directional, the side that is actively driven is called the primary while the other side is the secondary.


Ohm’s Law: Ohm’s law is one of the simplest, yet most important principles of electronics. It states that:


V = I x R


The voltage drop across a resistor is the current multiplied by the resistance. This holds true for the impedance of inductors and capacitors as well, if we take into account their frequency-dependent nature. The amount of work done per unit time in a circuit is given by:


P (power) = I x V = V2 / R = I2 x R


Where Ohm’s law has been substituted for either I or V.


Analog Circuits


Although most electronic devices are full of active components like op-amps and transistors, much of the actual "work" is done by simple arrangements of the passive elements: resistors, capacitors, and inductors. Understanding the simple circuits will allow an engineer to examine the schematic diagram of a new device and immediately gain knowledge about the proper application of the device. It also makes troubleshooting possible. By examining some simple combinations of resistors and capacitors, we will see how equalizers function.


Voltage Divider: The simplest functional circuit, but one of the most important, is the voltage divider:


Vout=Vin(R2/(R1+R2))


The voltage divider is so-called because the input voltage divides linearly in proportion to the resistances of the circuit. If we measure the voltage drop across R2, it is the input voltage times the ratio of R2 to the total resistance of the circuit. By using capacitors and inductors along with resistors, the voltage divider can function as a frequency-selective circuit called a filter.


R-C circuits: Most filters in use today rely only on resistors and capacitors. (Inductors are seldom used because


they are large, expensive, hard to get large values, susceptible to electromagnetic interference, and largely unnecessary.) The voltage divider circuit, when composed of frequency-selective passive elements (capacitors or inductors) will act as a filter. The frequency above (or below) which attenuation occurs depends on the value of resistance and capacitance (or inductance).


Above is a low-pass filter: low frequency signals pass through unattenuated. As the signal frequency increases, the capacitive reactance decreases. At the frequency at which the capacitive reactance just equals the resistance, the output signal is reduced by 1/√2 (-3dB). This is known as the corner frequency of the filter and is determined by:


f0=1/(2πRC)


[It might appear that the amplitude of the output signal at the corner frequency should be half and therefore the output should be down by -6 dB *, but there is another consideration: the capacitor has an effect on the phase of the signal as well as its amplitude. As the frequency of the signal increases, the time response of the capacitor begins to shift the phase of a sine wave signal as it flows through the capacitor. We must use a vector description of the circuit, one that involves imaginary numbers to deal both with the amplitude and phase of the signal. When the vector description of the impedances are used, the magnitude part of the vector sum is:


Ztotal=(R2+Xc2)


(* See discussion of dB below.)


So, substituting in the voltage divider equation, we get:


Vout=(R(R2+Xc2))Vin


Rearranging:


Vout=Vin(RR2+Xc2)


So at the frequency where Xc=R, the gain (Vout/Vin) is 1/√2 or -3dB.]


A similar analysis can be applied to the high-pass filter, shown below. Here, the capacitive reactance is high for low frequencies, but decreases as the frequency increases. This configuration is often used in audio input circuits to block unwanted DC components, which could overload amplifiers if not removed.


By rearranging the components, we can make a hi-pass filter. In this case, the capacitor effectively blocks DC and low frequency components. As the frequency of the signal increases, the impedance of the capacitor decreases and more of the signal is delivered to the output.


Frequently, an intuitive understanding of the operation of circuit elements is as helpful as a complete engineering analysis. Most circuits can be understood on a superficial basis, since one is not trying to design a circuit, but simple appreciate what a circuit is doing to the signal in a general way: i.e. boosting high frequencies, mixing signals, buffering/impedance matching, etc.


Often, a circuit can be well understood just using Ohm’s law and the R-C circuit theory introduced above. We, as users, are not concerned as much with engineering precision as with general circuit function.


As far as capacitors and inductors are concerned, capacitors have high impedance for low frequencies and inductors have high impedance for high frequencies. Exactly what constitutes high and low frequency depends on the values of the other circuit elements (resistors and other capacitors and inductors.)


Audio Signals


Audio signals are voltages or currents in electronic circuits that vary in time directly in proportion to a transduced sound pressure. Waves of air pressure are converted by a microphone or other transducer into electrical signals that can be manipulated and stored. In order to deal with these signals, we need some way of describing and measuring them. Most people are familiar with the VU meter, the indicator of signal amplitude so commonly found on audio equipment. The meter tells the observer how large the signal is relative to some reference level, thereby conveying information about the loudness of the sound that generated the electronic signal. But audio signals also convey information about pitch by varying the frequency of the electrical signal oscillation, and this is not directly reflected in the readings of a VU meter. There are many aspects of audio signal measurement that must be understood if one is to fully comprehend the operation of audio circuitry.


Of course, the obvious way of monitoring signals is to listen to them. But consider a modern console with 48 inputs and 24 outputs: it is simply not possible to listen to every individual signal at once, so other methods of signal monitoring have been devised to augment the auditory monitoring system. Since the main characteristics of signals are their amplitude and frequency, standard methods of describing these aspects have been adopted. Amplitude measurements are made in decibels (dB), a logarithmic measure of signal magnitude that describes the amplitude of a signal relative to a standard reference amplitude. Frequency measurements are more complicated, since most signals are composed of many frequency components added together. Further complicating things, most amplitude measurements assume a perfect sine-wave signal, which seldom occurs in real musical sounds. In order to understand the standard audio signal measurements, we will first examine sine waves, the simplest type of signal.


Frequency measurement: The sine wave is an alternating voltage or current which swings symmetrically about 0 volts (or amps) or some other fixed DC value. One cycle consists of a positive and negative swing. The frequency is the number of such complete cycles per second. The measure of frequency is the Hertz (Hz), which is the same as cycles/second. The equation for the sine wave is:


V=Vmaxsin(x), where Vmax is the maximum amplitude and x varies from 0° to 360° (0 to 2π radians).


The sine function is shown below, along with several of the conventional amplitude measurements.


One Cycle OneAlternationMaxPos.MaxNeg.AverageRMSPeak0˚90˚180˚270˚360˚Peak toPeak















RMS = 0.707 x Peak Voltage


Peak = 1.414 x RMS Voltage


Average = 0.637 x Peak Voltage


RMS = 1.11 x Average Voltage


Peak = 1.57 x Average Voltage


Average = 0.9 x RMS Voltage


RMS = 0.3535 x Peak-to-Peak Voltage


Peak-to-Peak = 2.828 x RMS Voltage