Non-linear resistor ladder DAC?

Help Support GroupDIY:

Consul

Well-known member
Joined
Jun 3, 2004
Messages
1,653
Location
Port Huron, Michigan, USA
It's been a long time since I've been here, but I'm motivated by something fascinating.

Apparently, one of the neater tricks used to get more dynamic range out of early digital telephone systems was to use non-linear resistor ladder DACs. These would essentially cluster the voltage levels toward the lower signals thus spreading the quantization noise out more evenly through the entire volume range.

I'm sitting here thinking I'd like to play around with the idea, and that the values of the resistors in an R2R DAC (just 8 bits) can be modified to fit a mu-law or A-law curve, but every time I think about doing the math to figure it out, my mind reels and I go back to watching old game shows and eating sunflower seeds.

I'm wondering if anyone has any information they can share or point me to on the matter. I've already exhausted Google about as far as I can. The only thing I found of any use was a chapter from a book on digital systems from Analog Semi, and it still left me more confused than informed.

Thank you for your help!
 

Monte McGuire

Well-known member
Joined
Jul 26, 2013
Messages
357
You can use something other than the standard R-2R ladder, but there are drawbacks. The reason R-2R is such a win is that instead of having to assemble a wide range of accurate resistor values, each trimmed to meet some logarithmic current per step spec, the R-2R ladder only needs to have two values: R and 2R, and the 2R can be made of one R and another R in series. In short, all you need is to be able to make one resistor repeatably, with a value somewhat close to what you really want, maybe ±20%.

This is why PMI's DAC-08 chip of the late 70s was able to be fabricated cheaply on an ancient monolithic process and still have excellent monotonicity, despite the difficulty of implanting a precise resistor onto an IC. The ladder accuracy was not dependent on the deposition of the resistor, which determines its absolute value, but instead upon the accuracy of the lithography, which determines the resistor ratio accuracy. So, while the DAC-08's ladder might have resistors whose absolute value ranged around ±20%, their ratio accuracy was around 1 part in 1000, enough for 1/4 bit of an 8 bit DAC.

I suppose that modern lithography could make some fairly precise "special" ratios on a modern chip, so that one could implement a log current per switch code ladder, but given a resistor implantation, the values can't have too wide of a range without making some resistors really large and some really small. This would make the small resistors less accurate, and the big ones too expensive in terms of die area.

Finally, dividing up a large problem into a logarithmic problem, which is basically what an R-2R ladder does, tends to make the circuit smaller and more minimal.

So... one can still have a logarithmic switch code with an R-2R ladder, as long as you add a layer of logic to translate the logarithmic input code to the native linear code used by the actual ladder. IIRC, Analog Devices made some LogDACs in the 80s that were just that - a competent R-2R ladder (or a few of them), connected with logic to achieve a dB per step code.

To this day, monolithic R-2R ladders seem to be limited to around 12, maybe 13 bits per ladder, and if you want more bits than that, several of these ladders can be lashed together, perhaps with calibration or trimming to get the commercially available "wide" multiplying DACs. You can buy precision resistor arrays however and do your own DAC switching, and in that world, the sky's the limit for accuracy and price.

I'm not trying to poo-poo the idea of a log ladder, but in practice, it's a real pain to get that right, especially compared to a straight, linear, R-2R ladder. The expense is basically the resistors, and having to trim a huge pile of values to get a log ladder is expensive and hard to stabilize. If you spent the same money on a pile of "one value" resistors, they might actually track over temperature and time, and would be cheaper overall, despite the fact that you'd need more of them.
 

JohnRoberts

Well-known member
Staff member
Moderator
Joined
Nov 30, 2006
Messages
21,826
Location
Hickory, MS
https://en.wikipedia.org/wiki/Μ-law_algorithm

There is no free lunch and mu-law companding was good for reducing data bandwidth for early digital voice grade communication, but telephone audio was never considered Hifi.

IIRC these were sampled at 8kHz or so, so an audio passband well less than 4 kHz (they also rolled off low bass to make it sound more natural). 

This is interesting in that it reduces LSB step size down around zero so low level audio signals don't suffer audible quantization distortion (small sine waves would literally turn into square waves with linear quantization). Of course we end up with higher distortion at high levels that is less objectionable especially for speech.

There are many such tradeoffs in audio design (like HF pre/de-emphasis for several audio mediums), while less now than in the bad old days.

JR
 

Consul

Well-known member
Joined
Jun 3, 2004
Messages
1,653
Location
Port Huron, Michigan, USA
@Monte:

Okay, I see where you're going with that. Basically, put in some logic to convert the numbers from linear to whatever log law I want, then run into a standard DAC. Of course, now my mind is going to the idea of doing it with discrete logic or some kind of PLD, but honestly, a microcontroller would be easiest.

@John:

Of course everything's a tradeoff. But part of the fun for me is to play around with ideas that were never meant for what I might use them for.

Really, I had just read somewhere that the DACs in the LinnDrum were 8-bit non- linear and that prompted a search. Then I decided I wanted to look further.
 

JohnRoberts

Well-known member
Staff member
Moderator
Joined
Nov 30, 2006
Messages
21,826
Location
Hickory, MS
In the early days of digital audio, memory and bandwidth were expensive.

mu law codecs developed for the telephone industry were available and used for some early audio stuff... One of my jobs back in the early '70s was a speech processor that shifted the pitch of speeded up tape recordings. My company used  analog BBD to perform the pitch shift, but a digital competitor used 8 but mu-law codecs for their digital path pitch shifter.

Another early digital approach (trade-off) that might be of interest is delta-modulation, a one bit digital encoding that trades improved LF resolution for less HF resolution that worked pretty well for audio that has more energy at LF. ... That said delta-mod could sound really nasty if pushed too hard at HF.

JR 
 

Consul

Well-known member
Joined
Jun 3, 2004
Messages
1,653
Location
Port Huron, Michigan, USA
I seem to remember Jeri Ellsworth did a video on delta modulation, which was used in early 80s digital pinball machines. She had a machine where the decoder chip had blown with no replacements to be found, so she made one from an FPGA and a few other parts. It's an interesting method, to be sure.
 

gyraf

Well-known member
Staff member
Moderator
Joined
Jun 4, 2004
Messages
10,478
Location
Aarhus, Denmark
Don't underestimate delta modulation: TC's legendary 2290 delay was based on just that, and sounded better than anything available until recently..

Jakob E.
 

JohnRoberts

Well-known member
Staff member
Moderator
Joined
Nov 30, 2006
Messages
21,826
Location
Hickory, MS
gyraf said:
Don't underestimate delta modulation: TC's legendary 2290 delay was based on just that, and sounded better than anything available until recently..

Jakob E.
Delta mod is quite  respectable if you throw enough samples at it (clock rate). Back in the day when memory was expensive delta mod delay lines would test the limits of slew overload at long delays. PCM without enough bits turns sine waves into square waves at low level. Delta mod without enough clocks turns HF sine waves into triangle waves. Different stokes.

If you think about it modern delta sigma conversion is a glorified delta mod variant...

JR 

PS: Delta mod is not as information dense as PCM... One word of PCM provides absolute level information. Delta mod depends on what came before .
 

gyraf

Well-known member
Staff member
Moderator
Joined
Jun 4, 2004
Messages
10,478
Location
Aarhus, Denmark
JohnRoberts said:
Delta mod is not as information dense as PCM... One word of PCM provides absolute level information. Delta mod depends on what came before .

Yup, this also it's problem: As there's no real absolute information, there's no (easy) way of interpreting the numbers, so DSP won't really work. For a long time I was dreaming about a TC reverb on this technology until their Ivar Iversen explained me that the 2290 was actually only quasi-digital..  :(

Jakob E.
 

joaquins

Well-known member
Joined
Feb 25, 2012
Messages
1,927
Location
Argentina
  Been there, made with some processing tool, call it Matlab or something. Separate the signal in abs and sign, keep the sign, log the abs, cut down the number of bits. Then reconstruct the signal.

  With 4 or 5 bits you already have acceptable reconstruction. I took a sample of this to my mastering course and played it, of course quality wasn't great but when I said it used to be a 5 bit format opinions changed...

  While very nice exercise, as mentioned here, little practical application as there are no standard software or hardware available to work this way. It could make sense to mount something like this to get to higher resolutions conversion and then convert to work with floating point in software, but you could just mount a floating point converter, being the exponent the reference voltage and work from there. Much easier to work it for a DAC as there are hardware available to do so and you know before hand the exponent, using two DACs, exponent as a reference and the second as MDAC. There are also ADCs with a similar approach doing one 4 bit conversion and then a second in reference to the DA reference of the first conversion.

  Doing 2nd or 3rd order approaches to the true log could be a good compromise, but again, backwards compatibility ain't on your side.

  All this would make sense if we actually needed more bits than what we have, for simple task simpler converters do the trick, for heavier task we have linear converters that go deep into the noise level. With 32 bits ADCs coming in the horizon with the firsts few metrology converters in that area things are getting darker for non linear converters. I love the concept but I guess it's just not practical.

JS
 

living sounds

Well-known member
Joined
Jul 26, 2006
Messages
3,013
Location
Cologne, Germany
Yup, this also it's problem: As there's no real absolute information, there's no (easy) way of interpreting the numbers, so DSP won't really work. For a long time I was dreaming about a TC reverb on this technology until their Ivar Iversen explained me that the 2290 was actually only quasi-digital.. :(

Jakob E.
Hey Jakob,

I've got a 2290 on its way to me and am intrigued by the design. Can you elaborate on what you (or rather Ivar) mean by "quasi-digital" in the context of that unit?

Thanks!
 

JohnRoberts

Well-known member
Staff member
Moderator
Joined
Nov 30, 2006
Messages
21,826
Location
Hickory, MS
Delta modulation was popular as a poor man's digital. The simplest delta modulation encode/decode circuit is basically an up/down integrator with a voltage comparator that compares the audio input to that up/down integrator. If the signal is still above the digital output is 1 for up, when the integrator rises above the audio input the digital bit is 0 for down. This one bit data stream can be stored in conventional digital memory for later recovery. For playback feeding this one bit up/down data to a similar integrator generates a fair sonic reproduction when using a high enough clock/sample rate. Inexpensive digital delta modulation based delays can get raspy sounding if clock/sample rates are too low. As has been already shared this simple up/down data stream does not contain absolute level information like PCM so was limited to delays or storage. There was a some respectable efforts into delta modulation based tape recording. But that too got eclipsed by PCM data formats.

Delta modulation studio delay lines were the bee's knees back in the late 70s. They spanked my BBD based studio dealy efx.

JR
 

Bo Deadly

Well-known member
Joined
Dec 22, 2015
Messages
2,779
Location
New Jersey, USA
Delta modulation delay sounds very interesting. I think sometimes old techniques are worth re-exploring when the technology behind them improves dramatically. The problem with digital delay is the conversion time. If you can make a delay without any conversion delay, you can do a lot of stuff from effects to filters. With a variable delay of at most 50us you can make a tunable filter of just about any sort. In theory.
 

zmix

Well-known member
Joined
Dec 3, 2004
Messages
144
Location
New York, New York
Delta modulation studio delay lines were the bee's knees back in the late 70s. They spanked my BBD based studio dealy efx.

JR
I have 2 Delta Labs Effectrons in my studio, they have a very different texture than a PCM based delay. They have a pre-emphasis / de-emphasis curve, sloping from 1kHz to 10kHz and about +10dB in and -10dB out Due to the high clock rate they don't seem to alias, but as John mentioned they do get a little strange at low sample rates.


I use them in my mix room and control the delay times remotely via a 0-5V CV signal sent from my (PCM) audio interface using a plugin I wrote to send modulatable and automatable DC voltages.

View attachment CZ Effecron II Minilogue CZ.mp3
 

tinn

Member
Joined
Feb 6, 2012
Messages
18
COMDAC Converter

Linn, SCI and Oberheim used 8 bit DATA and the COMDAC converters (PMI) for a dynamic range of 12 bit.
I attach a spec sheet of the PMI COMDAC Converters
SCI was using the COMDAC 86 in their Drumtraks machine.

Tinn
 

Attachments

  • 1986_PMI_COMDAC.pdf
    6.8 MB · Views: 6
Last edited:

Latest posts

Top