MENU

Adding Class D audio to embedded systems in an unconventional way

Adding Class D audio to embedded systems in an unconventional way

Technology News |
By eeNews Europe



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.

 

SiM3U1xx 32-bit MCUs and Utility Class D ToolStick

Silicon Labs’ Precision32™ SiM3U1xx 32-bit MCUs based on the ARM Cortex-M3 processor have peripherals and features capable of meeting all of these requirements. These MCUs are uniquely suited to an unconventional Class D power amplifier application by directly driving the speaker using a 5 V, 150 mA source, 300 mA sink high-drive I/O. The only external components required on the outputs to drive audio from an SiM3U1xx MCU are an inductor, some capacitors and a ferrite bead per output channel.

The high-drive I/Os also have programmable current limiting, enabling up to 16 levels of volume control without the need for firmware to scale the audio data, saving time and code space. Since these I/O pins are on a separate voltage network from the rest of the device; they can also interface with large, external, high-gate capacitance MOSFETs that are at any voltage level up to 6 V without the need for external drivers.

Figure 2: SiM3U1xx Device Features in a Class D Audio Application

 

In addition to the high-drive I/O, the high-precision enhanced programmable counter array (EPCA) operates at double the peripheral clock speed, which effectively provides 10.4 ns resolution and reduces output distortion. This peripheral is highly configurable and automatically generates center-aligned synchronized PWM signals; all the firmware has to do is copy the 9-bit quantized data to the EPCA registers to implement the Class D PWM.

The SiM3U1xx devices also include a crystal-less USB transceiver compatible with the USB audio interface, two 250 ksps 12-bit successive-approximation-register analog-to-digital converters (SARADCs), and an I2S receiver to implement audio streaming from a PC, portable music player or a wide range of I2S-enabled audio devices. Numerous digital communications peripherals such as three serial peripheral interface (SPI) modules, a 16-bit external memory interface with programmable timing and up to 256 kB of flash enable audio data storage coupled with an on-chip capacitive sensing block enable the development of capacitive button and slider user interfaces.

Finally, the priority-decoded dual-crossbar architecture implemented in Precision32 MCUs enables developers to shift peripherals dynamically or during configuration to maximize usage of the device pins. This innovative crossbar architecture allows an application to pick and choose the desired peripherals from a feature-dense device without nearly as much hassle and conflicts as other MCUs on the market.

To support audio application development for 32-bit designs, Silicon Labs offers the cost-effective Utility Class D ToolStick development platform (priced at $35 USD) with full source code available that implements a demonstration Class D amplifier using the smallest 40-pin 6 mm x 6 mm package in the SiM3U1xx MCU family. This demonstration and evaluation tool implements four modes of operation: sampling data from a portable music player using the ADCs, USB audio streaming from a PC, playing pre-recorded data stored from on-chip flash using a common audio compression algorithm, and a voice recorder that stores data in on-chip flash using a common audio compression algorithm. The development board also provides access to the I2S receiver pins.

Figure 3: Utility Class D ToolStick Board Features

 

Complimentary IDE and AppBuilder tools for Precision32 MCU products allow fast and easy adjustments to the example source code. With these easy-to-use tools, it’s a snap to add Class D audio to any 32-bit embedded product using the innovative SiM3U1xx MCU family. For more details about the Class D ToolStick development platform, please visit www.silabs.com/toolstickclassd.

About the author
Tabitha Parker serves as a senior applications engineer for Silicon Laboratories’ Embedded-Mixed Signal group, focusing on the company’s microcontroller products and technologies. Ms. Parker joined Silicon Laboratories in 2004 as an applications engineer. She holds a bachelor’s degree in Computer Engineering from California Polytechnic State University at San Luis Obispo.

 

If you enjoyed this article, you will like the following ones: don't miss them by subscribing to :    eeNews on Google News

Share:

Linked Articles
10s