DiyMobileAudio.com Car Stereo Forum banner
1 - 15 of 15 Posts

·
Registered
Joined
·
115 Posts
Discussion Starter · #1 ·
This post provides pictures and text that briefly describe the process of embedding a digital-to-analog converter (DAC) into a car audio amplifier (amp). Some remarks about component use & selection are also provided.

First, though, some background and context.


Background & Motivation for Project

It's been a long time since I've posted online, and thus I feel compelled to outline what lead to this DAC-in-amp project.

Several years ago I built an audio signal processor to use for crossover and equalization in my car (described on DIYMA here). The processor has both analog and digital outputs (optical S/PDIF), with the reason for S/PDIF being to exploit some capabilities afforded by digital outputs that are not available from analog. In particular, I wanted to have a signal path that from start to finish was devoid of high-pass DC blocking capacitors, with the high-pass cap aversion stemming from the following rational:

  • I wanted to "fully compensate" for cabin acoustics, speaker electromechanical distortions (e.g. Fs & Qt, see, for example, Linkwitz compensator here) & signal-path distortions in the low frequency range (below 200-500 Hz). Here, by "full compensation" I mean not only equalization of frequency magnitude response, but also compensation for reflections and phase, so that the pressure wave at the driver's head position closely matches a linear-phase low-pass version of the signal on the source material. (The reason for limiting the compensation to low frequencies is that at low frequencies sound wavelengths are long enough for the region of space spanned by a driver's ear positions to be approximated as a single acoustical point, whereas at higher frequencies different compensations are required throughout the region of possible positions of a driver's ears).
  • Due to the complexity of the phase response I measured in my car (not yet documented online), I was unable to solve for digital IIR filters with appropriate phase, and thus I was forced to use FIR filters that could more easily meet arbitrary phase requirements. However, the relatively large amount of memory required for FIR compensation of low frequency phase was demanding for the hardware in my signal processor (ADAU1442), and thus I wanted to remove DC blocking caps from the signal chain in order to reduce the DSP memory requirements that would otherwise be needed to correct for the low frequency phase distortions introduced by the caps.

As for my desire for "full compensation" in the low frequencies, it was driven by three factors:
  • I had convinced myself with headphones that there are audible differences between transient signals (clicks) played through filters with flat frequency magnitude responses but different phase responses. (For details, see the text below the last figure posted by me on the DIYMA page here; also, for a different conclusion about the audibility of slightly less severe phase distortion in the 100 Hz range, see a page by Linkwitz here)
  • Regardless of whether phase distortion is audible with flat magnitude responses, a question in addition to audibility that arises in the "pressure-chamber" environment of a car is whether phase distortion affects the way low frequency content is felt. Such a question arises from the fact that with phase distortion, transient energy that is concentrated over a short interval of time may be delayed differently at different frequencies, and thus that energy would be delivered over a longer time period by speakers, possibly affecting, for example, the degree to which "attack" or "punch" is felt.
  • Last, there potential reductions in signal degradation that can be realized by removing DC blocking caps from the audio path (see, for example, the note by maximintegrated here).

Last, I'll note that in order to achieve a cap-free audio path, I long ago integrated an S/PDIF transmitter into the "media player" -- i.e. CD changer -- in my car (not yet documented online). Thus the audio signal path is as follows:
  • Digitial signal from integrated circuit (IC) that performs CD reading in CD changer
  • S/PDIF transmission to signal processor
  • Digital signal processing by ADAU1442 in signal processor
  • S/PDIF transmission to DAC preceding power section of amp (see pics below)

Integration of DAC into Amp

Shown below is the DAC with its supporting ICs & circuitry mounted on a SchmartBoard for 0.65 TSSOP packages:



Primary ICs are these:
  • S/PDIF receiver: CS8416
  • Asynchronous sample rate converter (assembled for 96 kHz output): CS8421
  • Digital-to-Analog converter: PCM5102A
  • DAC output buffer: LME49860 (swappable; 8-pin DIP)

Some remarks:
  • There are 0402 package caps that are hand-soldered across some of the leads of the 0.65 pitch TSSOPs
  • Some of the "big" caps that span over a lead are 2.2 uF 0603's for the charge pump section of the DAC output (more below)
  • The PCM5102A DAC has a ground referenced output (afforded by its integrated charge pump), and thus requires no DC blocking caps, which, in addition to being critical for my particular application, is convenient in general
  • There are other ground-referenced offerings in addition to the PCM5102A (e.g. WM8524, Wolfson; CS4353, Cirrus Logic), but I am drawn to the low out-of-band noise touted for the PCM5102A. According to TI, all that is needed is a first-order low-pass filter to tame the out-of-band noise from the DAC, which is a lot nicer -- and safer -- to use than some other offerings I've worked with in the past. I wouldn't want to degrade the performance of the power amp section by unwittingly exposing it to difficult-to-deal-with high frequency content above the audible range.

Next is the DAC circuitry in a RockfordFosgate T600-2:



Remarks:
  • Thin blue and black wires are signal (DAC output); thick red and balck wires are power (+/- 13V and ground)
  • The DAC outputs (buffered by the LME49860) are connected to the inputs of the power-amp sections for each channel of the T600-2, at the output sides of the final DC blocking caps (the input sides of the caps are cut in such a way that they may be reconnected if desired, leaving the input sides floating for now).
  • The pre-amp section of the amp (e.g. adjustable crossovers & gain) is completely bypassed.
  • The amp runs down to DC, even through the S/PDIF input -- a functionality which I used to verify the polarity of the the DAC connection with the amp.

Below, some padding around the DAC circuitry ...


Last pic: Amp reassembled showing optical S/PDIF input (just above the remote EQ input; analog inputs temporarily disabled, but available for reconnect if desired):

 

·
Banned
Joined
·
4,394 Posts
very nice post, good write up.

a good hypothesis on phase distortion, but the transient "hang-up" if measured in-car, is more likely due to large panel reverberations.

hate to see you go through all the work of implementing FIR filters and getting the phase corrected in the pre-amp and still not be able to control phase at the listening position, due to all the various resonant frequency tone generators that are hiding in plain sight.

I think a lot of people seek out the front end "fix" for the muddy mid bass, the parametric, the auto tune, and various wave generation/synth products, and as you ramp up volume you excite different panels at different volume levels, and it makes you think it's intermodulation, or it's transient filters ringing, but it's probably just the resonating car.
 

·
Registered
Joined
·
115 Posts
Discussion Starter · #4 ·
... getting the phase corrected in the pre-amp and still not be able to control phase at the listening position, due to all the various resonant frequency tone generators that are hiding in plain sight.

I think a lot of people seek out the front end "fix" for the muddy mid bass, the parametric, the auto tune, and various wave generation/synth products, and as you ramp up volume you excite different panels at different volume levels, and it makes you think it's intermodulation, or it's transient filters ringing, but it's probably just the resonating car.
^^^ Broadly speaking, I agree. What I bolded in the quote is my biggest concern. Basically what I'm working towards is band-limited impulse response correction. And it's not clear to me that anything other than arbitrary magnitude, arbitrary phase (AMAP) filters can do the job in general. In fact, I often wonder if problems encountered while equalizing with equipment without AMAP capabilities are sometimes erroneously ascribed to causes other than what I suspect is the most likely root cause -- lack of equipment capability.

I won't be using auto-tune, and I'm aware of the resonant issue, so I suspect the difficulty will boil down to whether I can detect the resonances in an impulse or frequency response, and if so, whether I can effectively remove their signatures from the measured responses.

I do intend to assess linearity by taking impulse measurements at multiple amplitudes. I don't think things will be easy, but I'd like to try. We'll have to see what happens when I get time to work on the car again (really busy right now).
 

·
Registered
Joined
·
19,897 Posts
Subd to read later
 

·
Registered
Joined
·
19,897 Posts
Still a little drunk but how exactly did you make the fir filters? I'd be very interested invlearbing how to do that
 

·
Registered
Joined
·
2,236 Posts
But back on track, that is pretty sick you where able to do that. My soldering is only good for 18 gauge wire plus lol.
 

·
Banned
Joined
·
4,394 Posts
^^^ Broadly speaking, I agree. What I bolded in the quote is my biggest concern. Basically what I'm working towards is band-limited impulse response correction. And it's not clear to me that anything other than arbitrary magnitude, arbitrary phase (AMAP) filters can do the job in general. In fact, I often wonder if problems encountered while equalizing with equipment without AMAP capabilities are sometimes erroneously ascribed to causes other than what I suspect is the most likely root cause -- lack of equipment capability.

I won't be using auto-tune, and I'm aware of the resonant issue, so I suspect the difficulty will boil down to whether I can detect the resonances in an impulse or frequency response, and if so, whether I can effectively remove their signatures from the measured responses.

I do intend to assess linearity by taking impulse measurements at multiple amplitudes. I don't think things will be easy, but I'd like to try. We'll have to see what happens when I get time to work on the car again (really busy right now).
I think Jon W.'s magic bus relies on passive absorbing of long-duration resonant modes using helmholtz tuned traps that are the frequency of the sides and top of his van, and the bottom probably doesn't resonate much due to the heavy ass sub box.

If you can get the major panels of your vehicle to stop their reverb using active cancellation with DSP, that would be another way.

The recent spate of OEM's using active noise control has made this avenue much more approachable since the homework built into such a system is already done, analyzing the settings of those DSP amplifiers or servo, would allow you to do corrections the same way using your home-brew DSP FIR filters.

Hard to say if you could apply the technology for reducing tire rumble, effectively to reducing a car's major resonant nodes.

I would think so, and starting off with a known quantity like an OEM noise control system to run with, might be much simpler than it would appear. Thankfully I'm not able to do the work you're doing, or I might have spent the time trying it myself.

the problem as I see it is the transmission of sound through various amplitudes, differs from the simple correction values applied for DSP filters like floor bounce or bass contouring, there may be some dynamic equalization required.

maybe just install a Bose, haha...
 

·
Registered
Joined
·
115 Posts
Discussion Starter · #10 ·
Still a little drunk but how exactly did you make the fir filters? I'd be very interested invlearbing how to do that
I soldered up some hardware to implement FIR filters as described on DIYMA here. That hardware is centered around Analog Devices' (AD) ADAU1442 IC, which can be rapidly programmed with AD's graphical development software called SigmaStudio. For automated control of sound measurement devices -- in my case a Cross-Spectrum Labs calibrated MIC with an M-Audio Fast Track -- and also for design & analysis of FIR filters, I use MATLAB from Mathworks.

ADAU1442's can be had for free as samples from AD, and luckily AD sampled me a SigmaDSP evaluation board with SigmStudio software -- but I think now a person needs to buy an evaluation board to obtain SigmaStudio software. I think MATLAB is $150.

An alternative to DIY construction of hardware for FIR filtering might be to use one of the many offerings from MiniDSP that I've seen referenced on this site, which, by the way, appear to be centered around the same SigmaDSP family of IC's that I've used in DIY applications, including the ADAU1401A (or older ADAU1701) and ADAU1442 -- all of which I've used (but only posted about ADAU1442). Additionally, it now appears that MiniDSP is offering products centered on AD's SHARC processors, such as MiniDSP's MiniSHARC, which I'm becoming increasingly interested in. Broadly speaking, MiniDSP offers as products hardware constructions that are similar to what I've described for DIY. (For some background, check the last post on page three of the DIYaudio here, where I [wachuku] asked in 2010 why MiniDSP wasn't using ADAU1442's; at the time they weren't interested (see top of page four), but I believe things have changed since then).

The only drawback I see to using MiniDSP is a loss of generality afforded by AD's SigmaStudio software: it's my understanding that a third party cannot sell a product with AD's SigmaStudio software; instead, they must write their own code that may (or may not) take advantage of SIgmaSudio, resulting for the end-user in a reduction in flexibility. For the details of FIR implementation with MiniDSP I'd defer to MiniDSP.
 

·
Registered
Joined
·
115 Posts
Discussion Starter · #11 ·
Interested with you impression of the pcm dad
I used Wolfson's WM8524's to drive the analogue (as they say) outputs (4) of the signal processor I built. The WM8524's sounded fine to me. I've only heard PCM5102A's on my subwoofer or on headphones during circuit testing (and they sounded fine there), but on paper the PCM5102A outspecs the WM8524 and is a similar class of DAC implementation (ground centered output with integrated charge pump).
 

·
Registered
Joined
·
115 Posts
Discussion Starter · #13 ·
I think Jon W.'s magic bus relies on passive absorbing of long-duration resonant modes using helmholtz tuned traps that are the frequency of the sides and top of his van, and the bottom probably doesn't resonate much due to the heavy ass sub box.

If you can get the major panels of your vehicle to stop their reverb using active cancellation with DSP, that would be another way.

The recent spate of OEM's using active noise control has made this avenue much more approachable since the homework built into such a system is already done, analyzing the settings of those DSP amplifiers or servo, would allow you to do corrections the same way using your home-brew DSP FIR filters.

Hard to say if you could apply the technology for reducing tire rumble, effectively to reducing a car's major resonant nodes.

I would think so, and starting off with a known quantity like an OEM noise control system to run with, might be much simpler than it would appear. Thankfully I'm not able to do the work you're doing, or I might have spent the time trying it myself.

the problem as I see it is the transmission of sound through various amplitudes, differs from the simple correction values applied for DSP filters like floor bounce or bass contouring, there may be some dynamic equalization required.

maybe just install a Bose, haha...
^^^ That is a dense post. For now, I'll simply say thank you for communicating all those ideas.

For a first pass with the new equipment, I don't intend to use DSP to actively cancel panel resonances or road noise. Instead, I'm hoping to be able to subtract resonant effects from response measurements and correct what remains. Presumably, the majority of what remains will be visible as peaks and valleys in the frequency magnitude response, and I would expect those peaks and troughs would be a consequence of cabin geometry (we shall see). Rather than correcting those distortions by adding complementary peaks and troughs, though -- i.e. by traditional "EQ-ing" -- I instead intend to remove those distortions by correcting the impulse response over the lower frequencies. In other words, I intend to correct both the magnitude and phase of the frequency response, not just the magnitude. I suspect that the approach I am taking has not been traditionally adopted in the past because it requires arbitrary-phase, arbitrary-magnitude filtering, which is best-implemented with digital FIR filters. I think, however, that many of the new-ish room correction devices -- as well as something that has been available for several years for car audio from Alpine -- already perform impulse response correction of some form. I'd just like to try it myself.

Ideally, I'd like to use mechanical, as opposed to acoustical, means to overcome resonances -- although I realize that there is a low likelihood of taming all resonances mechanically. (I've already been trying for years and still working on it).
 

·
Banned
Joined
·
4,394 Posts
^^^ That is a dense post. For now, I'll simply say thank you for communicating all those ideas.

For a first pass with the new equipment, I don't intend to use DSP to actively cancel panel resonances or road noise. Instead, I'm hoping to be able to subtract resonant effects from response measurements and correct what remains. Presumably, the majority of what remains will be visible as peaks and valleys in the frequency magnitude response, and I would expect those peaks and troughs would be a consequence of cabin geometry (we shall see). Rather than correcting those distortions by adding complementary peaks and troughs, though -- i.e. by traditional "EQ-ing" -- I instead intend to remove those distortions by correcting the impulse response over the lower frequencies. In other words, I intend to correct both the magnitude and phase of the frequency response, not just the magnitude. I suspect that the approach I am taking has not been traditionally adopted in the past because it requires arbitrary-phase, arbitrary-magnitude filtering, which is best-implemented with digital FIR filters. I think, however, that many of the new-ish room correction devices -- as well as something that has been available for several years for car audio from Alpine -- already perform impulse response correction of some form. I'd just like to try it myself.

Ideally, I'd like to use mechanical, as opposed to acoustical, means to overcome resonances -- although I realize that there is a low likelihood of taming all resonances mechanically. (I've already been trying for years and still working on it).
interesting, pretty much what I was saying. Bose uses a loudness contour called dynamic EQ, that is engineered into the specific set of driver/sub combination for use in the home. I think there's a "test" CD, I forget...


but Bose is way ahead on adaptive correction circuits, and it would probably be a safe bet to use some of that technology in a home-brew design that has as much power/control as one you've developed.

If by mechanical, you mean bracing, stuffing under dash pockets, filling the rear quarter panels, adding extra struts to the door or roof panels, etc. then that should help, but using acoustic, albeit passive and not active, media and filters in the empty spaces of the car's body, seems like it would help that along.

That's a little hard to do, when you don't have basically a cargo van on wheels, but being inventive and using the panel form of bass traps, might be feasible. I say this knowing that I haven't actually done it myself so I'm not able to really get behind the idea, compared to if I'd have proven it myself through experience.

Kudos, on the continued efforts to tame the car environment, maybe you could grasp the hard points of FIR filter implementation to a degree you only see pretty much, in big labs of audio research departments. I don't know how accessible the Sigma software is to mimic or flat out copy designs from B & W, or Bose, or JBL/Synthesis, or even Genelec, and recording studio design software, but it's all a little over my comfort level, all the way down to doing something like the Arduino and Raspberry Pi, stuff.

If Jon W. ever felt like letting go of his van's construction details, in a way that people could use as a template, it might make quicker work of any combined approach using corrective filters in the electrical domain, acting in concert with in-vehicle acoustic filters acting on various null points and bass contouring through absorption media.

I think a two-pronged approach would have to be the most effective, because if you do too much with the physical wave correction you get an unrealistic space vacuum, and if you do too much with the electronics, you get artifacts and reduce some of the impulse response that makes music sound real, or true to life. I think a responsible path to take would use a measure of both in synergy with each other's strengths and removing weaknesses.


Once you reach that point, I would imagine the only thing left to do use all that digital corrective power and optimized sound environment to actually recreate mapped reverb/reflection times of various venues renowned for sound... much more effective than the crude attempts by Sony Cinema or Yamaha's equalization features.

If a concert was recorded, say in Radio City Music Hall, and you had access to that venue's specific time or sound signature, you could implement it in the same way you calibrate a microphone, except it would recreate the space in your vehicle.

That would be pretty cool, flip the big LCD open and turn on a show at Red Rocks and listen in true Red Rocks acoustic environment.. what a ramble...
 
1 - 15 of 15 Posts
Top