Learn & build · Electronics · Chapter 16
Audio
Audio is the whole course in one signal chain. A microphone turns air pressure into a few millivolts, an amplifier (chapter 7's op-amps, then transistors that can push current) makes it big, and a speaker (chapter 14's motor, moving in a line instead of a circle) turns it back into air. Along the way it's chapter 8's filters, chapter 10's power supplies, chapter 13's PWM, and the ear as the final judge: you'll hear each amplifier's mistakes below.
1. Microphones: pressure to voltage
A dynamic microphone is a speaker run backwards: a diaphragm moves a coil in a magnet's field and induces a voltage (chapter 3), no power needed, about 2 mV for speech. An electret capsule is a capacitor (chapter 2) whose one plate is the diaphragm, permanently charged; sound changes the gap and so the voltage, and a tiny built-in transistor needs a few volts of bias through a resistor to read it out. A MEMS microphone (every phone and laptop) is the same idea etched in silicon with its own ADC, sending numbers over I²S (chapter 13's buses again). Here's yours, if you let the page listen:
🎯 Challenge: whistle a steady note and read its frequency.
2. Decibels: from millivolts to watts
Audio levels span a huge range, so they're counted in decibels, chapter 8's filter scale: every ×10 in voltage is +20 dB, every ×2 is about +6 dB. A dynamic mic gives ~2 mV, "line level" between devices is ~1 V, and a speaker at a loud party gets ~10 V across it. Each stage of a chain has a gain in dB, and the gains just add.
\[ G_\text{dB} = 20 \log_{10} \frac{V_\text{out}}{V_\text{in}} \]
A preamp turns a 10 mV microphone signal into 1 V. What's its gain in dB?
Sound's chain is pressure to millivolts to volts to current to pressure. Each stage's gain adds up in decibels, and every flaw is the copy not being exact.
3. Amplifier classes, drawn and played
The output stage has to push real current into a speaker, and the ways of doing it trade quality against heat:
- Class A: one transistor biased half-on all the time (chapter 4's amplifying region), so it amplifies the whole wave smoothly. It also burns power even in silence: at most 25% of the supply's power reaches the speaker (with a simple resistor load).
- Class B: two transistors in push-pull, one for the positive half, one for the negative. Nothing flows at rest, up to 78.5% efficient. But each transistor needs ~0.6 V to turn on (chapter 4: a bipolar transistor's base and emitter form a diode), so near zero neither conducts: a little flat step at every zero crossing, crossover distortion, that sounds harsh exactly when the music is quiet.
- Class AB: class B with a small idle current through both so the handover is seamless. Almost every hi-fi amplifier.
- Class D: the output transistors only switch fully on or off at hundreds of kHz (chapter 13's PWM, with the duty following the music), and an LC filter (chapter 8) smooths it back to audio. Switches waste almost nothing: 90%+, which is why a tiny Bluetooth speaker runs all day.
🎯 Challenge: find the setting that sounds worst at a low volume, then the one that clips at a high volume.
Why is crossover distortion worse at low volume, while clipping is worse at high volume?
- The transistors heat up when quiet
- The dead zone is a fixed ±0.6 V: a big wave barely notices it, a small wave is mostly dead zone. Clipping only starts when the wave reaches the supply rails.
- The speaker distorts quiet sounds
4. Speakers: power into ohms
A speaker is a coil glued to a paper or plastic cone, sitting in a magnet's gap: the current pushes the coil in and out (chapter 14's force, \(F = B I \ell\)). Its impedance, usually 4 or 8 Ω, is mostly the coil's resistance (plus its inductance, which rises with frequency). Power is chapter 1's \(P = V^2/R\), with the RMS voltage (a sine's peak ÷ √2).
\[ P = \frac{V_\text{rms}^2}{R}, \qquad V_\text{rms} = \frac{V_\text{peak}}{\sqrt{2}} \]
Why divide by √2?
- At each instant a resistor turns \(v^2/R\) into heat. For a sine, \(v = V_\text{peak}\sin\theta\), where \(\theta\) is the spinning arrow's angle (chapter 6), so the power swings between zero and \(V_\text{peak}^2/R\).
- What heats the coil and moves the air is the average power over a cycle, so we need the average of \(\sin^2\theta\).
- An arrow of length 1 casts shadows \(\cos\theta\) and \(\sin\theta\) on two walls at right angles (chapter 6), so \(\sin^2\theta + \cos^2\theta = 1\) at every instant (chapter 2's right triangle).
- Over a whole cycle, \(\sin^2\) and \(\cos^2\) are the same wave shifted by a quarter turn, so they have the same average. Two equal averages that add to 1 are ½ each.
- Average power is \(V_\text{peak}^2 / 2R = (V_\text{peak}/\sqrt2)^2 / R\). The RMS voltage is the steady voltage that would heat the resistor just as much.
Where it breaks: √2 is only for sines
A square wave spends all its time at ±peak, so its RMS is the peak itself. At the same 12.6 V peak into 8 Ω, a sine delivers \(12.6^2 / (2 \times 8) \approx 9.9\) W and a square wave \(12.6^2 / 8 \approx 19.8\) W, twice as much. An amplifier that clips hard (section 3) flattens its sine toward a square, so it pushes more power into the speaker than its sine rating suggests, much of it at the high harmonics a square wave is made of. RMS is still the right idea; only the √2 changes with the shape.
What RMS voltage drives an 8 Ω speaker at 10 W?
A 4 Ω speaker on the same amplifier, at the same voltage, takes twice the power of an 8 Ω one. Why can that be a problem?
That's Part I: every idea on its own, in a simulator. Part II builds real things from real chips, one project per chapter, each using the theory you now have: next, reading a schematic and building a 555 blinker. Chapter 21's speaker amplifier puts this chapter to work. And the radio course is where filters, mixing and audio meet again, in software.
Previous: Hands-on · All chapters: Learn & build.
Last updated