DSP 01, part 2: architecture & electronics

 

 

 

DSP architecture, version 1.

DSP architecture, version 1.

here are the goals i set for the DSP:

  • stereo inputs with clip-detect lights. DSPs are notorious for gain staging problems, so i wanted the user to give it the largest possible signal without clipping the inputs.
  • six outputs to support stereo triamplified speakers or stereo biamplified speakers + subwoofer.
  • modular user interface for an arbitrary configuration of switches or dials.
  • easy to integrate with off-the-shelf amplifier boards, into a single chassis.
  • can be powered by a single-cell Li-ion battery for portable use.

the heart of my DSP is Analog Device's ADAU1701. it is an amazing piece of work. two 24-bit ADCs and four 24-bit DACs. integrated 50MHz DSP core. self-boot capability. auxiliary 8-bit ADC to read potentiometers. 

coming from a place of analog skepticism, i expected it to sound awful. i planned to use digipots on the outputs to do volume control in analog, and avoid digital attenuation. i threw in a microcontroller (ATtiny) for clip-detect and to adjust the digipots. i added output amplifiers.

then i actually listened to the evaluation board and it sounded fine. the digipots and output amplifiers were completely extraneous. clip-detect could be built into the DSP itself - i could leave out the microcontroller too. this led to a much simplified version 2:

DSP architecture, version 2

DSP architecture, version 2

this includes:

  • ADAU1701: the DSP core, including 2 inputs and 4 outputs.
  • AK4430: additional 2 outputs, for 6 outputs total.
  • DIR9001: SPDIF receiver to receive digital audio.
  • USBi: Analog Device's SigmaDSP programmer.

after more listening, i decided the SPDIF input was also extraneous. i would include the hooks to add it later. it could live on the modular user interface, and connect through a header.

these changes led to version 3:

DSP architecture, version 3

DSP architecture, version 3

why a 24.576MHz clock? the AK4430 delivers maximum THD+N if your master clock is at least 512*(sample rate). at a 48kHz sample rate, that's a minimum clock of 24.576MHz. this relationship exists because the AK4430 uses a switch-cap output filter. like all switch-cap filters, its corner frequency is affected by the clock frequency. 

why the AK4430 at all? it's good enough, and quite cheap, and runs at 3.3V.

now let's calculate our power requirements:

looks like our worst-case current draw is about 200mA. what about power supply noise?

ADAU1701 power supply noise requirements:

  • PSRR is 50dB at 1kHz, with 200mV signal on AVDD
  • FS (full scale voltage) is 2.5 Vpp
  • SNR is 104dB
  • PSRR noise is PSN (power supply noise) - 50dB
  • PSN - 50dB << FS - SNR
  • PSN << FS - 54dB
  • PSN << 5 mVpp

AK4430 power supply noise requirements:

  • PSRR is 62dB at 1kHz, 50mVpp signal on VDD and CVDD
  • FS is 5.66 Vpp
  • SNR is 104dB
  • PSN - 62dB << FS - SNR
  • PSN << FS - 42dB
  • PSN << 40 mVpp

the ADP3335 LDO has excellent load regulation, 500mA maximum output current and a peak voltage noise of under 0.3 mVpp. it will do fine.

i'll also throw on a 30-pin header to connect the Main Board and the UI Board.

time to bang it out!

a picture is worth a hundred hours.

a picture is worth a hundred hours.

two pictures is worth 200 hours.

two pictures is worth 200 hours.

OSHpark time!

did it work? (yes)

did it work? (yes)

next update, i will describe the user interface and lasercut chassis.

Tshen2 2014

 

 

 

DSP 01, part 1: from analog to digital

 

 

 

analog signal processor, circa 2012

analog signal processor, circa 2012

four years ago, my favorite programming language was solder. i drew a BJT on my badge at job fairs. i'd just designed my first op-amp. it would soon be on Digikey.

like most analog nerds, i called myself an audiophile. unlike most audiophiles, i called myself a scientist.

my speaker designs used Class-D amplifiers. active crossovers, biquad bass boost, baffle step compensation, all done in analog, with op amps. a total absence of vacuum tubes.

but the numbers didn't add up. i wanted audio to be cheap. analog is expensive. i wanted to tweak. analog is hard-coded. i wanted modularity. analog is inflexible.

i worked around analog's limitations. too expensive? i used more passive filters. not modular? i built an entire system of modular analog blocks.

stupid but cute.

stupid but cute.

then in 2014, i finally wised up and built a digital signal processor (DSP).

and now i will describe it.

 

signal processing in speakers.

most speakers contain multiple drivers.

they have tweeters for the highs, woofers for the mids, subwoofers for the bass. tweeters are small to act as point sources for short wavelengths. subwoofers are large to move lots of air. all of these must move together to produce clear, balanced sound.

all multi-driver speakers contain a crossover circuit, which distributes the highs, mids and lows to each driver appropriately. the crossover is a set of matched high-pass, band-pass and low-pass filters.

most speakers use a passive crossover. it looks like this:

passive crossover.jpg

there is only one amplifier per speaker, and the crossover receives a high-power, amplified signal. the crossover is made from huge, high-power inductors and capacitors.

here is my preferred method, the active crossover:

active crossover.jpg

now the crossover receives a low-power audio signal, and there is a separate amplifier for each driver. the active crossover is usually built from low-noise, low-distortion op amps. these can be used (instead of huge passive components) because they only have to receive and transmit a small amount of power.

passive crossovers are still in use because amplifiers used to be expensive, and hi-fi nuts like to choose their own amplifier. these are terrible reasons. on the other hand, here are some benefits of active crossovers:

  • the drivers are driven by the near-zero output impedance of the amplifier, instead of the output impedance of the passive crossover, which fluctuates wildly with frequency. this vastly decreases crosstalk and IMD between drivers.
  • since we are filtering with (relatively cheap) op-amps instead of huge capacitors and inductors, we can build filters with steeper slopes. this reduces the amount of work a driver has to do which is outside its operating frequency range.
  • multiple small amplifiers instead of one large amplifier. this is usually cheaper and more efficient.
  • each amplifier has a less complex signal to deal with. again, this improves IMD.
  • active crossovers have very stable filters. passive crossovers must handle high-power signals, will heat up in use, and their filter characteristics will drift with temperature.
  • active crossovers can have electronic gain! that means you can easily compensate for one driver being less sensitive than the other. or add a bass-boost, or all-pass filter, or any weird thing you can't do with passive filters.

pay attention to that last point. active crossovers can include a wealth of signal processing, to compensate for the unique deficiencies of each individual driver! this is where i stop referring to them as crossovers and start calling them signal processors.

in summary: i used to build analog signal processors, using buckets of expensive op amps. in the next update, i will describe the electronics of the digital signal processor.

analog signal processor, circa 2013

analog signal processor, circa 2013

Tshen2 2014