[sdiy] Teensy 3.6 180MHz ARM Cortex M4F with 6 in, 8 out audio CODEC

Richie Burnett rburnett at richieburnett.co.uk
Thu Jan 4 15:09:51 CET 2018


A few brief comments:

1. The wrap-around thing is (in my opinion) an unbelievable bug in an ADC 
intended for audio applications, because of the extremely offensive 
distortion that results from numerical overflow.

2. The sigma-delta modulation trickery used in modern audio ADC and DAC 
chips is very clever, and does achieve outstanding audio performance 
compared to older technologies.  It doesn't result in a converter with the 
performance figures you'd expect for a perfect 24-bit ADC, but it's still 
damn impressive.  Even if the noise floor is a lot higher than what you 
would expect with 24-bits, you have to remember that the signal is hopefully 
still quantised to 24-bits, and hopefully the noise will be natural sounding 
additive white gaussian noise, or even better, noise that is shaped to 
psychoacoustic ally sound even less obtrusive.  Unfortunately some of the 
earlier implementations of sigma-delta had less than perfect noise floor, or 
one that became correlated with the audio and produced all manner of 
distortions, limit-cycles, pips, bleeps and blops when the analogue input 
signal decayed away to zero.  I suspect that the details of modern 
sigma-delta converters that are at the cutting edge of this technology are a 
closely guarded secret though.

3. I agree that a sigma-delta converter theoretically shouldn't be able to 
track a signal that changes instantaneously, like a pulse waveform or a 
sawtooth reset.  However, the reality is that it doesn't have to.  If the 
oversampling rate is high enough then the output will be a ramp, but it only 
has to ramp fast enough to achieve a flat response over the audio bandwidth. 
Or to put it another way, a pulse or sawtooth that is band-limited to 20kHz 
doesn't have instantaneous transitions it has finite slopes.

-Richie,


-----Original Message----- 
From: Robin Whittle
Sent: Thursday, January 04, 2018 1:04 PM
To: synth-diy at synth-diy.org
Subject: Re: [sdiy] Teensy 3.6 180MHz ARM Cortex M4F with 6 in, 8 out audio 
CODEC

Hi Mattias,

Thanks for your reply in which you wrote, in part:

> Did you also discover this "the hard way", or have they documented this
> flaw in recent years? :-)

I don't yet have one of these chips.  The datasheet, on page 27, states
that "For single-ended inputs, the analog input level must remain at or
below full scale to avoid wraparound of the resulting ADC codes."

For 4 bits, I envisage the situation like this.  With both inputs being
driven in opposite direction, the ADC clips positively and negatively at:

  0111
  1000

When one input is AC grounded (big capacitor to ground), and only the
other is working, with the input signal going precisely to its maximimum
allowed positive and negative voltages on the other pin, the ACD outputs
numbers between:

  0011
  1100

and (in software mode, with this single-ended mode enabled) these are
output to the I2S port with a one bit shift to the left, as:

  011x
  100x

where I don't know the state of the x bit.

Now say the input goes somewhat (1/8 or so is sufficient in this
example, but only a tiny step for real 16 or 24 bit conversion) above
its allowed positive range.  The ADC goes from:

0011  when the signal was just below maximum allowed

to:

0100  when the signal somewhat exceeds this maximum

The bit shifting process then sends:

100x

to the I2S port, which is the same, to the user of this data, as the
signal wrapping instantly from the most positive possible numeric value
to the most negative.  I attest that the sound of this is disastrous to
ears and speakers - I have heard it.


Regarding understanding sigma-delta ADCs, I broadly understand the idea
of down-filtering a fast sampling 1 bit converter, and how this can be
extended to fast 2 bit converters, which I think are used in some such
ADCs.  I just never really understood, to my satisfaction, how 6 or so
octaves of decimation filtering could build up the signal to noise ratio
from something really low, to the extreme levels of these 16 and 24 bit
ADCs (though the actual SNR is likely to be equivalent to 15 to 18 or so
bits, I understand).   I know the sigma-delta modulator is a trickier
thing than a 1 bit ADC.  I guess I could understand it all if I tried a
lot harder.

I wrote this more to say that these devices, which I think involve no
trimmers or other calibration, achieve absolutely extraordinary results
in terms of signal-to-noise ratio, low distortion, flat frequency
response and good phase response.  I think the real details of how they
work are difficult to understand, and reflect a great deal of ingenuity
and teamwork with the original designers at Crystal, I think, who worked
with AKM, pioneering these designs.  It takes a special combination of
mathematics, vision and both analogue and digital circuit design and
fabrication to make a device unlike any other chip which ever existed,
as far as I know.  For years - late 70s and into the 1980s - it was
really difficult to do good ADC in all these respects.  It was probably
impossible without double-oversampling successive approximation ADCs
preceded by a carefully designed anti-alias filter, and followed by a
carefully designed digital decimation filter.  Then these externally
simple chips started turning up in DAT recorders, such as the Tascam
DA-30 and they sounded fantastic.

With my limited understanding of sigma delta modulators, I think they
would be incapable of exactly tracking a signal with a large
perpendicular voltage change - but they are clearly capable of
accurately tracking most the music signals.  This raises an interesting
question of how they cope with extremely impulsive or complex signals.
Do they really track them properly?  There must be some point at which
they can't track properly, but that subtle loss would probably be
difficult to hear in the din or the rest of the signal.

A few years ago I had an example of a sigma-delta ADC failing to cope.
I was using a Sony TCD-D8 DAT recorder with a special microphone setup
which happened to really boost the midrange.  I was recording a jazz
band, and the whole recording sounded great (after filtering in the
computer to flatten out the boost) except for a few moments when the
trombonist let rip.  The signal did not exceed the voltage range of the
ADC, but its edge was too sharp, and there were ugly transitions and
full-scale overflow or whatever from the ADC for some audio cycles.   I
have never tried putting a hot square wave into these things, but I
can't imagine it would track it as well as a successive approximation
ADD, which creates each sample without any internal memory of the
previous state of the audio signal.


> The codecs do get quite hot. I feel sorry for the poor little
> accompanying electrolytic caps that often end up not very far away.

OK - this is a lot of action jammed into one device, and it seems some
trouble with cooling will keep the whole circuit board cooler.

It is good to know that the chips work well and are, I assume, generally
reliable over the years.

- Robin
_______________________________________________
Synth-diy mailing list
Synth-diy at synth-diy.org
http://synth-diy.org/mailman/listinfo/synth-diy

---
This email has been checked for viruses by AVG.
http://www.avg.com 




More information about the Synth-diy mailing list