Multi-Zone Home Audio System

Dave Erickson built his first multi-zone audio system in the early 1990s using C microprocessor code he developed on Freescale MC68HC11 microprocessors. The system has been an important part of his home.

“I used this system for more than 15 years and was satisfied with its ability to send different sounds to the different rooms in my house as well as the basement and the deck,” he says. “But the system needed an upgrade.”

In Circuit Cellar’s January and February issues, Erickson describes how he upgraded the eight-zone system, which uses microprocessor-controlled analog circuitry. In the end, his project not only improved his home audio experience, it also won second place in a 2011 STMicroelectronics design contest.

Several system components needed updating, including the IR remote, graphic LCD, and microprocessor. “IR remotes went obsolete, so the IR codes needed to change,” Erickson says. “The system was 90% hand-wired and pretty messy. The LCD and several other parts became obsolete and the C development tools had expired. Processors had evolved to include flash memory and development tools evolved beyond the old burn-and-pray method.”

“My goal was to build a modern, smaller, cleaner, and more efficient system,” he says. “I decided to upgrade it with a recent processor and LCD and to use real PC boards.”

Photo 1: Clockwise from the upper left, the whole-house system includes the crosspoint board, two quad preamplifiers, two two-zone stereo amplifiers, an AC transformer, power supplies, and the CPU board with the STMicroelectronics STM32VLDISCOVERY board.

Photo 1: Clockwise from the upper left, the whole-house system includes the crosspoint board, two quad preamplifiers, two two-zone stereo amplifiers, an AC transformer, power supplies, and the CPU board with the STMicroelectronics STM32VLDISCOVERY board.

Erickson chose the STMicroelectronics STM32F100 microprocessor and the work incentive of a design contest deadline (see Photo 1).

“STMicroelectronics’s excellent libraries and examples helped me get the complex ARM Cortex-M3 peripherals working quickly,” he says. “Choosing the STM32F100 processor was a bit of overkill, but I hoped to later use it to add future capabilities (e.g., a web page and Ethernet control) and possibly even a simple music server and audio streaming.”

In Part 1 of the series, Erickson explains the design’s audio sections, including the crosspoint board, quad preamplifiers, modular audio amplifiers, and packaging. He also addresses challenges along the way.

Erickson’s Part 1 provides the following overview of the system, including its “analog heart”—the crosspoint board:

Figure 1 shows the system design including the power supplies, front-panel controls, and the audio and CPU boards. The system is modular, so there is flexibility in the front-panel controls and the number of channels and amplifiers. My goal was to fit it all into one 19”, 2U (3.5”) high rack enclosure.

The CPU board is based on a STM32F100 module containing a Cortex-M3-based processor and a USB programming interface. The CPU receives commands from a front-panel keypad, an IR remote control, an encoder knob, RS-232, and external keypads for each zone. It displays its status on a graphic LCD and controls the audio circuitry on the crosspoint and two quad preamplifier boards.

The system block diagram shows the boards, controls, amplifiers, and power supplies.

The system block diagram shows the boards, controls, amplifiers, and power supplies.


Photo 2 shows the crosspoint board, which is the analog heart of the system. It receives line-level audio signals from up to eight stereo sources via RCA jacks and routes audio to the eight preamplifier channels located on two quad preamplifier boards. It also distributes digital control and power to the preamplifiers. The preamplifier boards can either send line-level outputs or drive stereo amplifiers, either internal or external to the system.

My current system uses four line-level outputs to drive PCs or powered speakers in four of the zones. It also contains internal 40-W stereo amplifiers to directly drive speakers in the four other zones. Up to six stereo amplifiers can reside in the enclosure.

Photo 2: The crosspoint board shows the RCA input jacks (top), ribbon cable connections to the quad preamplifiers (right), and control and power cable from the CPU (bottom). Rev0 has a few black wires (lower center).

Photo 2: The crosspoint board shows the RCA input jacks (top), ribbon cable connections to the quad preamplifiers (right), and control and power cable from the CPU (bottom). Rev0 has a few black wires (lower center).

DIYers dealing with signal leakage issues in their projects may learn something from Erickson’s approach to achieving low channel-to-channel crosstalk and no audible digital crosstalk. “The low crosstalk requirement is to prevent loud music in one zone from disturbing quiet passages in another,” he says.

In Part 1, Erickson explains the crosspoint and his “grounding/guarding” approach to transmitting high-quality audio, power, and logic control signals on the same cable:

The crosspoint receives digital control from the CPU board, receives external audio signals, and distributes audio signals to the preamplifier boards and then on to the amplifiers. It was convenient to use this board to distribute the control signals and the power supply voltages to the preamplifier channels. I used 0.1” dual-row ribbon cables to simplify the wiring. These are low-cost and easy to build.

To transmit high-quality audio along with power and logic control signals on the same cable, it is important to use a lot of grounds. Two 34-pin cables each connect to a quad preamplifier board. In each of these cables, four channels of stereo audio are sent with alternating signals and grounds. The alternating grounds act as electric field “guards” to reduce crosstalk. There are just two active logic signals: I2C clock and data. Power supply voltages (±12 and 5 V) are also sent to the preamplifiers with multiple grounds to carry the return currents.

I used a similar grounding/guarding approach throughout the design to minimize crosstalk, both from channel to channel and from digital to analog. On the two-layer boards, I used ground planes on the bottom layer. Grounded guard traces or ground planes are used on the top layer. These measures minimize the capacitance between analog traces and thus minimize crosstalk. The digital and I2C signals are physically separated from analog signals. Where they need to be run nearby, they are separated by ground planes or guard traces.

To find out more about how Erickson upgraded his audio system, download the January issue (now available online) and the upcoming February issue. In Part 2, Erickson focuses on his improved system’s digital CPU, the controls, and future plans.

Amplifier Classes from A to H

Engineers and audiophiles have one thing in common when it comes to amplifiers. They want a design that provides a strong balance between performance, efficiency, and cost.

If you are an engineer interested in choosing or designing the amplifier best suited to your needs, you’ll find columnist Robert Lacoste’s article in Circuit Cellar’s December issue helpful. His article provides a comprehensive look at the characteristics, strengths, and weaknesses of different amplifier classes so you can select the best one for your application.

The article, logically enough, proceeds from Class A through Class H (but only touches on the more nebulous Class T, which appears to be a developer’s custom-made creation).

“Theory is easy, but difficulties arise when you actually want to design a real-world amplifier,” Lacoste says. “What are your particular choices for its final amplifying stage?”

The following article excerpts, in part, answer  that question. (For fuller guidance, download Circuit Cellar’s December issue.)

CLASS A
The first and simplest solution would be to use a single transistor in linear mode (see Figure 1)… Basically the transistor must be biased to have a collector voltage close to VCC /2 when no signal is applied on the input. This enables the output signal to swing

Figure 1—A Class-A amplifier can be built around a simple transistor. The transistor must be biased in so it stays in the linear operating region (i.e., the transistor is always conducting).

Figure 1—A Class-A amplifier can be built around a simple transistor. The transistor must be biased in so it stays in the linear operating region (i.e., the transistor is always conducting).

either above or below this quiescent voltage depending on the input voltage polarity….

This solution’s advantages are numerous: simplicity, no need for a bipolar power supply, and excellent linearity as long as the output voltage doesn’t come too close to the power rails. This solution is considered as the perfect reference for audio applications. But there is a serious downside.

Because a continuous current flows through its collector, even without an input signal’s presence, this implies poor efficiency. In fact, a basic Class-A amplifier’s efficiency is barely more than 30%…

CLASS B
How can you improve an amplifier’s efficiency? You want to avoid a continuous current flowing in the output transistors as much as possible.

Class-B amplifiers use a pair of complementary transistors in a push-pull configuration (see Figure 2). The transistors are biased in such a way that one of the transistors conducts when the input signal is positive and the other conducts when it is negative. Both transistors never conduct at the same time, so there are very few losses. The current always goes to the load…

A Class-B amplifier has more improved efficiency compared to a Class-A amplifier. This is great, but there is a downside, right? The answer is unfortunately yes.
The downside is called crossover distortion…

Figure 2—Class-B amplifiers are usually built around a pair of complementary transistors (at left). Each transistor  conducts 50% of the time. This minimizes power losses, but at the expense of the crossover distortion at each zero crossing (at right).

Figure 2—Class-B amplifiers are usually built around a pair of complementary transistors (at left). Each transistor conducts 50% of the time. This minimizes power losses, but at the expense of the crossover distortion at each zero crossing.

CLASS AB
As its name indicates, Class-AB amplifiers are midway between Class A and Class B. Have a look at the Class-B schematic shown in Figure 2. If you slightly change the transistor’s biasing, it will enable a small current to continuously flow through the transistors when no input is present. This current is not as high as what’s needed for a Class-A amplifier. However, this current would ensure that there will be a small overall current, around zero crossing.

Only one transistor conducts when the input signal has a high enough voltage (positive or negative), but both will conduct around 0 V. Therefore, a Class-AB amplifier’s efficiency is better than a Class-A amplifier but worse than a Class-B amplifier. Moreover, a Class-AB amplifier’s linearity is better than a Class-B amplifier but not as good as a Class-A amplifier.

These characteristics make Class-AB amplifiers a good choice for most low-cost designs…

CLASS C
There isn’t any Class-C audio amplifier Why? This is because a Class-C amplifier is highly nonlinear. How can it be of any use?

An RF signal is composed of a high-frequency carrier with some modulation. The resulting signal is often quite narrow in terms of frequency range. Moreover, a large class of RF modulations doesn’t modify the carrier signal’s amplitude.

For example, with a frequency or a phase modulation, the carrier peak-to-peak voltage is always stable. In such a case, it is possible to use a nonlinear amplifier and a simple band-pass filter to recover the signal!

A Class-C amplifier can have good efficiency as there are no lossy resistors anywhere. It goes up to 60% or even 70%, which is good for high-frequency designs. Moreover, only one transistor is required, which is a key cost reduction when using expensive RF transistors. So there is a high probability that your garage door remote control is equipped with a Class-C RF amplifier.

CLASS D
Class D is currently the best solution for any low-cost, high-power, low-frequency amplifier—particularly for audio applications. Figure 5 shows its simple concept.
First, a PWM encoder is used to convert the input signal from analog to a one-bit digital format. This could be easily accomplished with a sawtooth generator and a voltage comparator as shown in Figure 3.

This section’s output is a digital signal with a duty cycle proportional to the input’s voltage. If the input signal comes from a digital source (e.g., a CD player, a digital radio, a computer audio board, etc.) then there is no need to use an analog signal anywhere. In that case, the PWM signal can be directly generated in the digital domain, avoiding any quality loss….

As you may have guessed, Class-D amplifiers aren’t free from difficulties. First, as for any sampling architecture, the PWM frequency must be significantly higher than the input signal’s highest frequency to avoid aliasing….The second concern with Class-D amplifiers is related to electromagnetic compatibility (EMC)…

Figure 3—A Class-D amplifier is a type of digital amplifier (at left). The comparator’s output is a PWM signal, which is amplified by a pair of low-loss digital switches. All the magic happens in the output filter (at right).

Figure 3—A Class-D amplifier is a type of digital amplifier. The comparator’s output is a PWM signal, which is amplified by a pair of low-loss digital switches. All the magic happens in the output filter.

CLASS E and F
Remember that Class C is devoted to RF amplifiers, using a transistor conducting only during a part of the signal period and a filter. Class E is an improvement to this scheme, enabling even greater efficiencies up to 80% to 90%. How?
Remember that with a Class-C amplifier, the losses only occur in the output transistor. This is because the other parts are capacitors and inductors, which theoretically do not dissipate any power.

Because power is voltage multiplied by current, the power dissipated in the transistor would be null if either the voltage or the current was null. This is what Class-E amplifiers try to do: ensure that the output transistor never has a simultaneously high voltage across its terminals and a high current going through it….

CLASS G AND CLASS H
Class G and Class H are quests for improved efficiency over the classic Class-AB amplifier. Both work on the power supply section. The idea is simple. For high-output power, a high-voltage power supply is needed. For low-power, this high voltage implies higher losses in the output stage.

What about reducing the supply voltage when the required output power is low enough? This scheme is clever, especially for audio applications. Most of the time, music requires only a couple of watts even if far more power is needed during the fortissimo. I agree this may not be the case for some teenagers’ music, but this is the concept.

Class G achieves this improvement by using more than one stable power rail, usually two. Figure 4 shows you the concept.

Figure 4—A Class-G amplifier uses two pairs of power supply rails. b—One supply rail is used when the output signal has a low power (blue). The other supply rail enters into action for high powers (red). Distortion could appear at the crossover.

Figure 4—A Class-G amplifier uses two pairs of power supply rails. b—One supply rail is used when the output signal has a low power (blue). The other supply rail enters into action for high powers (red). Distortion could appear at the crossover.

Simple Guitar Transmitter (EE Tip #102)

You need a guitar amplifier to play an electric guitar. The guitar must be connected with a cable to the amplifier, which you might consider an inconvenience. Most guitar amplifiers operate off the AC power line. An electric guitar fitted with a small transmitter offers several advantages. You can make the guitar audible via an FM tuner/amplifier, for example. Both the connecting cable and amplifier are then unnecessary. With a portable FM broadcast radio or, if desired, a boombox, you can play in the street or in subway.

Source: Elektor 3/2009

Source: Elektor 3/2009

stations (like Billy Bragg). In that case, everything is battery-powered and independent of a fixed power point. (You might need a permit, though.)

Designing a transmitter to do this is not necessary. A variety of low-cost transmitters are available. The range of these devices is often not more than around 30′, but that’s likely plenty for most applications. Consider a König FMtrans20 transmitter. After fitting the batteries and turning it on, you can detect a carrier signal on the radio. Four channels are available, so it should always be possible to find an unused part of the FM band. A short cable with a 3.5-mm stereo audio jack protrudes from the enclosure. This is the audio input. The required signal level for sufficient modulation is about 500 mVPP.

If a guitar is connected directly, the radio’s volume level will have to be high to get sufficient sound. In fact, it will have to be so high that the noise from the modulator will be quite annoying. Thus, a preamplifier for the guitar signal is essential.

To build this preamplifier into the transmitter, you first have to open the enclosure. The two audio channels are combined. This is therefore a single channel (mono) transmitter. Because the audio preamplifier can be turned on and off at the same time as the transmitter, you also can use the transmitter’s on-board power supply for power. In our case, that was about 2.2 V. This voltage is available at the positive terminal of an electrolytic capacitor. Note that 2.2 V is not enough to power an op-amp. But with a single transistor the gain is already big enough and the guitar signal is sufficiently modulated. The final implementation of the modification involves soldering the preamplifier circuit along an edge of the PCB so that everything still fits inside the enclosure. The stereo cable is replaced with a 11.8″ microphone cable, fitted with a guitar plug (mono jack). The screen braid of the cable acts as an antenna as well as a ground connection for the guitar signal. The coil couples the low-frequency signal to ground, while it isolates the high-frequency antenna signal. While playing, the cable with the transmitter just dangles below the guitar, without being a nuisance. If you prefer, you can also secure the transmitter to the guitar with a bit of double-sided tape.

—Gert Baars, “Simple Guitar Transmitter,” Elektor,  080533-1, 3/2009.

Dual-Channel 3G-SDI Video/Audio Capture Card

ADLINK PCIe-2602

ADLINK PCIe-2602 Video/Audio Capture Card

The PCIe-2602 is an SDI video/audio capture card that supports all SD/HD/3G-SDI signals and operates at six times the resolution of regular VGA connections. The card also provides video quality with lossless full color YUV 4:4:4 images for sharp, clean images.

The PCIe-2602 is well suited for medical imaging and intelligent video surveillance and analytics. With up to 12-bit pixel depth, the card  provides extreme image clarity and smoother transitions from color-to-color enhance image detail to support critical medical imaging applications, including picture archiving and communication system (PACS) endoscopy and broadcasting.

The card’s features include low latency uncompressed video streaming, CPU offloading, and support for high-quality live viewing for video analytics of real-time image acquisition, as required in casino and defense environments. PCIe-2602 signals can be transmitted over 100 m when combined with a 75-Ω coaxial cable.

The PCIe-2602 is equipped with RS-485 and digital I/O. It accommodates external devices (e.g., PTZ cameras and sensors) and supports Windows 7/XP OSes. The card comes with ADLINK’s ViewCreator Pro utility to enable setup, configuration, testing, and system debugging without any software programming. All ADLINK drivers are compatible with Microsoft DirectShow.

Contact ADLINK for pricing.

ADLINK Technology, Inc.
www.adlinktech.com

Low-Cost, High-Performance 32-bit Microcontrollers

The PIC32MX3/4 32-bit microcontrollers are available in 64/16-, 256/64-, and 512/128-KB flash/RAM configurations. The microcontrollers are coupled with Microchip Technology’s software and tools for designs in connectivity, graphics, digital audio, and general-purpose embedded control.

The microcontrollers offer high RAM memory options and high peripheral integration at a low cost. They feature 28 10-bit ADCs, five UARTS, 105-DMIPS performance, serial peripherals, a graphic display, capacitive touch, connectivity, and digital audio support.
The PIC32MX3/4 microcontrollers are supported with general software development tools, including Microchip Technology’s MPLAB X integrated development environment (IDE) and the MPLAB XC32 C/C++ compiler.

Application-specific tools include the Microchip Graphics Display Designer X and the Microchip Graphics Library, which provide a visual design tool that enables quick and easy creation of graphical user interface (GUI) screens for applications. The microcontrollers are also supported with a set of Microchip’s protocol stacks including TCP/IP, USB Device and Host, Bluetooth, and Wi-Fi. For digital audio applications, Microchip provides software for tasks such as sample rate conversion (SRC), audio codecs—including MP3 and Advanced Audio Coding (AAC), and software to connect smartphones and other personal electronic devices.

The PIC32MX3/4 family is supported by Microchip’s PIC32 USB Starter Kit III, which costs $59.99 and the PIC32MX450 100-pin USB plug-in module, which costs $25 for the modular Explorer 16 development system. Pricing for the PIC32MX3/4 microcontrollers starts at $2.50 each in 10,000-unit quantities.

Microchip Technology, Inc.
www.microchip.com