Skip to main content

Audio Circuits in Action - Any Card Can Be a Sound Card

cat

Image Credit: Author - Athena (cat 1) making sure a new subwoofer enclosure checks out

Counting my blessings to have all five senses still working reasonably well. After eyesight, we rely on hearing as a key input to our environment. Nature has gifted us the ability to not only hear the sound waves but to also get a sense of where the sound originates. Our “hardware” as an organism has two microphones (ears) that parse the distribution of air molecules against our eardrums sending that information upstream to be processed. We can turn our heads in order to hone in on the sound. The brain does the heavy lifting of interpreting the signals.

Microphone Arrays - Can You Hear Me Now?

A typical feature of many animals is that their ears pivot independently of their head. We have our general hearing and then we have focused hearing. We want our machines to have the same ability. Making our things into better listeners takes an array of microphones and some smarts to figure out what to ignore. The usual application will have a mic flex with at least three, likely four microphones. There will be a condenser type of mic that is omnidirectional and others that are more selective.

“Consider the Coax that brings cable into the home and compare speaker wire that resembles an electrical cord.”

The processing happens in real-time where the goal is to locate the voice and also locate background noises. The system will favor the mic with the best signal to noise ratio. Note that there has to be some distance between the microphones. What we’re measuring are sound waves that travel at, well, we all know the speed of sound. Did you forget? Trick question: it’s Mach 1.  That is fast, but a long way from light speed, so the small distance works as well as having an ear on both sides of our head.

ford mustang

Image Credit: Hemmings - We’re Going Mach 1

Audio CODECs - A Symphony on Silicon

Digital Signal Processing (DSP) has been around for a while now and it no longer takes a seven-foot-tall rack of equipment to have a high bitrate connection. Voice Over Internet Protocol (VOIP) and up to broadcast quality audio runs through many different CODECs. The differences are primarily bit rate, latency and whether the format is considered lossy. The practical difference is whether it is open source or requires royalties. I scraped the following list from Techhive:

  • AAC (Advanced Audio Coding) A lossy codec commonly used by iOS devices and at the iTunes store)

  • ALAC (Apple Lossless Audio Codec) Commonly used by iOS devices

  • APE A free and very efficient lossless codec from Monkey’s Audio

  • AptX A near-CD-quality audio codec supported by some Bluetooth devices

  • DSD (Direct Stream Digital) A high-resolution codec that originated with SACD (Super Audio CD)

  • FLAC (Free Lossless Audio Codec) A common free lossless codec

  • MQA (Master Quality Authenticated) A backward-compatible lossless codec that applies a digital fingerprint to a file to guarantee it was sourced from the original master recording

  • MP3 (MPEG audio layer 3) A very common lossy codec

  • Ogg-Vorbis A lossy codec that is popular, but less common than MP3

  • WMA (Windows Media Audio) A lossy codec commonly used by Windows devices

  • WMAL (WMA Lossless) a lossless codec commonly used by Windows devices

The mobile hardware is going to come in QFN and BGA packages. Size matters and the smaller BGA packages will force the PCB into High-Density Interconnect (HDI) technology. That means micro-vias which are a cost and schedule hit. Even when you use the perimeter pins of a QFN, there is the central ground paddle that must be connected with via-in-pad technology. These are generally well-known technology hurdles.

CODEC chip

Image Credit: NXP - Block diagram of a typical CODEC chip.

It is not hard to design a robust sound system following the IC vendors’ recommendations. Respect the phase lock loop (PLL) circuit as it is a noisy signal. Inputs are quite often differential pairs while the output is likely to be two-wire. Consider the Coax that brings cable into the home and compare speaker wire that resembles an electrical cord. PCB routing follows a similar convention.

Wire? Wire not?

Thinking outside of the semi-mobile devices, consumers can opt for upgraded cables with fancy-sounding technology and pay for the glorified wire by the inch. That’s another story. “Prosumer” HiFi gear is designed for realistic sound production at average listening volume. A different market serves professional sound reinforcement. Their goal is to project the sound over a larger area. A ten-meter cable will fill a shoebox but won’t empty your wallet. Both will use shielded wire, one for the absolute lowest distortion and one for an acceptable level of distortion over a longer run. Getting back into our lane, a good portion of our speaker connections will be over Bluetooth or WiFi.

Speakers: Giving a Voice to the Product

Upgrading speakers is one of my hobbies. I look at the puny matchbox speakers that go into a laptop with dismay until we get our prototypes built. Dismay turns to amazement. Using the keyboard for a speaker grill works better than I thought it would. The power is typically only a few Watts per speaker so a thick trace from the left and right speaker connectors.

printed circuit board

Image Credit: Google - Speakers located just above the outboard battery cells

The speakers themselves use connectors with a short length of cable. Spreading them out helps create a stereo image. In the case above, the right speaker has a smaller enclosure shaped by the available space. The resonating chamber that projects the sound waves can be custom made as a pair for sonic quality in a small space. Audio Engineers obsess over this detail.

Since the signal velocity on the trace is so much faster than Mach 1, length matching from the CODEC to the speakers is not required. Maybe you’ll end up doing it anyway so you can have one more bullet point to sell the audiophile equipment.

Audio technology is reaching beyond entertainment and is becoming more interactive. Digital assistants and other smart devices have to wade through a cacophony of distractions to absorb and interpret our voices. Clean transmission and amplification of sound matter to the person on the other end of the line, especially if that person is artificial. Make our world a better place. Speak clearly and listen thoughtfully. Make sure your inventions follow suit.

About the Author

John Burkhert Jr is a career PCB Designer experienced in Military, Telecom, Consumer Hardware and lately, the Automotive industry. Originally, an RF specialist -- compelled to flip the bit now and then to fill the need for high-speed digital design. John enjoys playing bass and racing bikes when he's not writing about or performing PCB layout. You can find John on LinkedIn.

Profile Photo of John Burkhert