Audio feedback is a meaningful way to differentiate an embedded product from the hundreds of other offerings on the market. After a developer decides to add audio to the product, the questions then become: What type of amplifier is best for the product? What's an easy way to implement that amplifier? Will the audio data be streaming or stored? What types of streaming or storage interfaces are most appropriate for the product?
Class A amplifiers consist of a transistor device that conducts for the entirety of the input waveform. These amplifiers have low output distortion, since the input always translates to the output, but they also have lower power efficiency. These amplifiers are typically intended for high-end audio applications that aren't as power sensitive.
Class B amplifiers conduct for half of the input waveform, leading to high output distortion but much better power efficiency than Class A. Class AB amplifiers combine aspects of both Class A and Class B to create an amplifier that is more power efficient than Class A, but less distorted than Class B. Class AB amplifiers are the most common non-switching amplifier architectures.
Class D represents an entirely different amplifier architecture from Class A, Class B and Class AB. This type of amplifier is based on a switching power amplifier architecture that uses high-frequency pulse-width modulation (PWM) to generate the output waveform. The transistors are fully on or fully off, and they tend to lose much less power in the form of heat. This architecture, therefore, lends itself to very small and cost-effective MOSFETs.
Class D amplifiers can reach very high efficiency levels, resulting in significant power savings. However, the translation from the input signal to PWM and the PWM quantization itself can cause more distortion on the output than other amplifier architectures. The goal of a Class D amplifier implementation is to reduce this distortion to barely audible levels while maintaining very high power efficiency.
Figure 1: Example Pulse Width Modulated Class D Architecture
The Class D amplifier can be implemented in either analog or digital form. An analog Class D amplifier is non-trivial and typically consists of a comparator, triangle waveform generator, and several blocks to condition the input signal before transferring to the output MOSFETs. A digital Class D amplifier consists of a method for transferring digital data and a PWM generation block.
The Class D amplifier can be implemented as an external, standalone device on a product; however, this adds an additional real estate cost for the device footprint, a physical cost as an additional IC that must be purchased and soldered, and potentially development cost debugging the interface between the input signal and the amplifier.
A digital Class D microcontroller-based amplifier requires the following:
- PWM output (switching) frequency 10x+ faster than the highest input frequency to adequately reconstruct the input signal
- High-resolution control of the PWM pulse width to reduce output quantization distortion
- Method for sampling or receiving the input waveform
- Fast core for digital processing and manipulation of data
- Pins capable of driving the amplified signal or interfacing with external MOSFETs.