Shop OBEX P1 Docs P2 Docs Learn Events
24 Bit R-2R Ladder For Audio Use Required Resistor Specs — Parallax Forums

24 Bit R-2R Ladder For Audio Use Required Resistor Specs

Jack ScarletJack Scarlet Posts: 15
edited 2013-04-09 20:58 in General Discussion
G'Day

Im interested in building an R-2R ladder with 24 bit resolution driven by 24 Pins on a Prop chip. regardless of cost what would be the ideal specs for the resistors required? Also, any ideas for a suitable opamp to return a line level signal?

Cheers
Jack
«1

Comments

  • LeonLeon Posts: 7,620
    edited 2012-10-20 22:39
    You won't be able to make a 24 bit R-2R DAC that works properly. Use an audio DAC or a codec.
  • Jack ScarletJack Scarlet Posts: 15
    edited 2012-10-20 22:59
    Leon wrote: »
    You won't be able to make a 24 bit R-2R DAC that works properly. Use a codec.

    Why not, is it imposible?
  • LeonLeon Posts: 7,620
    edited 2012-10-20 23:23
    Yes, using discrete resistors.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-10-20 23:31
    A 24-bit R-2R ladder would, indeed, be extravagant. With a 5V reference, the LSB would represent 1.16 nano-volt. Seriously?

    -Phil
  • Jack ScarletJack Scarlet Posts: 15
    edited 2012-10-20 23:52
    A 24-bit R-2R ladder would, indeed, be extravagant. With a 5V reference, the LSB would represent 1.16 nano-volt. Seriously?

    -Phil

    Seems it can be done, though very exspensive

    http://www.msbtech.com/products/dac4.php?Page=platinumHome
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-10-21 00:03
    Jack,

    Anytime "platinum" and "audiophile" are combined in the same blurb, you would be well-advised to cover your pockets and run.

    -Phil
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-10-21 00:27
    No offense but

    "The Platinum lacks the standard digital byproducts that have become a staple of "digital sound" and by disposing of those artifacts has ended up sounding more analog-like than many turntables people listen to"

    that line seriously makes me want to IDK do something horrible to the person that said that after refusing to do any kind of blind listening test against digital equitment and then clamed the resistor DAC setup is so great it sounds more analog than something analog. Cassettes with stretched tape inside from being eaten are analog, maybe thats what the benchmark for this rediclous piece of audiophile equitment is.

    I built a few different headamps a while back and did alot of reading at a http://nwavguy.blogspot.com/ who is just great when it comes to calling out things like this product above, anyways the point is before id read this guys blog I had designed the most electrically ineffiecent poor quality excuse for an amp becuase I bought in to all the audio phile virtual ground BS. The truth was I just needed to split the signal between two 9 volts put some nice sized electro caps in parallel with the batteries and I had a much better amp with less problems that achieved higher gain than i did with all these exotic power supplies i made using op amps to split rails or dedicated ti chips.

    The problem with the audio community is its hard to figure out how to build something in my mind I know how to do it I know the rules and it seems traight forward, thats not always the case as sometimes im wrong and it gets pointed out to me that I could do things better. I always open to doing things better but the difference is when im told how to do something better on the forums here I can totally see why whatever im doing isnt the most effiecent way. When im told theres a better way on an audio forum its becuase the that way helps smooth out the hi's and puts a punch in the lows with a mellow midtone, with no reference to any electical laws, proper grounding and pcb layout techniques. In the end a I cant tell the difference from non polarized electro or 5 dollar film cap for AC decoupling, but I can tell a virtual ground makes my batteries drain quick and my speakers get distorted at a much lower gain. Also all this audiophile crud is very contradicteve, example virtual ground vs well established mono block amp design. BAHHHH BAHHHHH EVIIIILLLLLLLLLLLL please order a sample of a 24bit ti DAC ADS1210U there 20 dollars and can be had for free from T! An r2r ladder over a dac i dont get it
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-10-21 01:28
    Jack,

    You could make a pretty nice R-2R ladder with Z-foil networks from Vishay Precision, these perhaps, available from Mouser at US$32 per section. Even better if you dial Vishay Precision and work out a deal for a matched set. But even at a matching tolerance of 0.01% and tracking of 0.1ppm/°C, it is not good enough for one part in 16 million as is implied by the MSB claims. But it would probably sound pretty good.

    The MSB site has an "explanation" of how their DAC works and what makes it so special.Their cartoon shows a guy next to a conveyer belt, filling fast-moving (48k per second) gallon jugs, each to a precise level from cups in sizes from 1/2 gallon down to .... ahhh, what would that be, let's see... about 0.23 microliters. Sorry about the change of units. But it is an awfully small quantity. Wet the head of a pin. Is the cartoon guy going to be able to fill that initial 1/2 gallon to +/- one tiny dot? There is not a scale available that can do that. The innovation? Don't be thrown off by the further claim, " We process that data with our own digital filter, at 80 bit resolution with code written in-house to optimize the incredible capability of the MSB DAC modules. " Huh?

    Real DACs suffer from exactly that problem as they move to higher resolutions. Mismatch of resistors causes jumps in the graph of output vs binary code. Especially mismatch in the resistors that determine the most significant bits. Now, if this were for real, the cartoon guy would be replaced by graphs that are commonly found in data sheets for DACs, showing its linearity, monotonicity, all manner of honest to gosh specs.

    The cartoon also lampoons the delta-sigma approach. Disingenuous I think. Delta-sigma sampling rate is far higher than the 48k he asserts, and it achieves its accuracy due to the capability of technology to slice up time into incredibly small parcels.
  • LeonLeon Posts: 7,620
    edited 2012-10-21 02:05
    That whole MSB Technology web site is hilarious! I especially liked the Femtosecond Galaxy Clock:

    http://www.msbtech.com/products/galaxy.php?Page=platinumHome

    It costs $9950.

    Here is their price list:

    http://www.msbtech.com/products/platinumHome.php

    The saying "A fool and his money are soon parted" comes to mind!
  • Heater.Heater. Posts: 21,230
    edited 2012-10-21 04:41
    If you want to build a 24 bit R-2R DAC you are looking at 2 to the power 24 possible output levels i.e. each step in output is about one sixteen millionth of the total range. So you can see that you will need resistors matched to 0.00001 percent. (Forgive any missing or extra zeros here, you can check the maths yourself). Of course the voltages driving the resistors of he DAC will have to be stable and accuratley matched to similar accuracy. Then you are looking that noise in your circuilt being about the same as your LSB, so for a one volt range that's about 0.001uV. Again check the math but you get the idea. This is not simple, if possible at all.
  • Heater.Heater. Posts: 21,230
    edited 2012-10-21 05:04
    The only thing you need to know about "audio phile" is that you should only ever use tubes, tapes and vinyl, speakers should be made in England.
    Don't go spending a fortune on "audio phile" components just use whetever you can salvage here and there. Chineese tubes are OK. Lashing the thing up with bell wire is quite acceptable.

    If you find anything wrong with the resulting sound, hiss, scratches, hum, limited tonal range, whatever, then you are listening it it incorrectly. Your attitude needs realigning with reality, your expectations are not physically realizable. Whithout thearapy you will be forever disapointed with the experience provided by your sound reproduction system no matter how much you spend on it. As you know many before you have squandered their life savings in search of the "perfect sound" which is of course unobtainable. Analysts have likened this mental condition to alcholism or addiction to gambling.

    Luckily for you I am working with renound psycholigsts from top universities around the world to provide such a course of rehabilitation for those who have fallen victim to this debilitating condition. A simple series of challenging but also relaxing sessions will reinvigorate your sense of joy at listening to almost anything. Specifically you will be again be able to hear the music through your sound system, whatever it is, and not be disturbed by the sound system itself, you will be free of the nagging doubt that someone, somewhere may have a better sounding system than yours.

    (Course are expected to be a series of one hour sessions over twelve weeks at 1000 dollars per session).
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-10-21 09:07
    @
    Jack, i just realized that you only have 3 posts and i would like to apologize if you took my comment personally of felt i was makimg fun, i realized i have probably stirred alot of audio phile mockery. The truth is that i meant everything I said but do not let that discourage you from building whatever it is your building im sure it will be a very educational experince. Im hoping after youve spent way to much to build a 24bit r2r with bad results that you will learn alot of the same lessons i did over engineering a a virtual ground system with an over priced opamp that wouldnt stop osicillating becuase I chpose a bad boy audio phile 33mhz opamp with superior power smoothing capabilities. I would like to say once i just hooked up two 9 volts and threw some electrolytic caps on for ac decoupling my project turned out great my earbuds can go so loud without distortion you can hear them 3 rooms away. May i ask why you want to build a dac this way? maybe by answering that question you will start realize that your answer is probably based on goobalty gok, i.e. you have no objective numbers to hit your only striving for adjectives. please go to nwavguy and read his article subjective vs objective. i belive these methods are superior for desiging audio equitment, the rason i dont is lack of tools i dont own enough test gear to do solid amp and dac designs, you may just realize you like thid guys open dac alot better.

    that being said i had to look at this rediculous clock i figured with a 10 thousand dollar price tag it could make a good reference clock for test and measurement, the claimed jitter in the femento range is pretty good :) but i refuse to spend 10k before i understand what a sonic vector acually is

    "The problem in quantifying the sound is that the sonic impact is on a different vector than for example DAC level. There are two sonic vectors that are 90 degrees apart. One has to do with timing and one with accuracy. They are completely unrelated. Digital filters, upsamplers and clocks all have to do with timing."

    that also begs the question what does quantifying the sound even mean? gull this guy must be super smart i never read any of this stuff in the analog or digital electronics books i have read
  • LeonLeon Posts: 7,620
    edited 2012-10-21 09:56
    There is no such thing as a "sonic vector", AFAIK!
  • kwinnkwinn Posts: 8,697
    edited 2012-10-21 13:10
    Lots of buzz words and meaningless phrases on that site. Might be better to describe it as an Audio Pile site, and I think everyone knows what the pile consists of.
  • jmgjmg Posts: 15,173
    edited 2012-10-21 15:06
    Im interested in building an R-2R ladder with 24 bit resolution driven by 24 Pins on a Prop chip. regardless of cost what would be the ideal specs for the resistors required?

    The ideal specs for the resistors required are easy : 1/2^24 is ~ 60ppb (part per billion) so you need that matching precision/tracking level.

    Moving back into the practical realm, one limiting factor, even with ideal spec'd resistors, is the drive miss-match on a Prop pin.
    A 1 ohm driver impedance skew, with an example 10k resistor, is about 13 bits.
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-10-21 15:20
    In my fun with adc thread, my reconstructed waveform was from a 12 bit r2r into a nte single supply op amp. Tried to match the resistors as closely as i could from a pile of them. Just to see what i was capturing with a mcp3201. 24 bit would be pointless just due to the inaccuracies introduced the variations of the resistor values. The DAC was an ugly throw together and nothing else until I could order better to work with.
  • Mark_TMark_T Posts: 1,981
    edited 2012-10-21 15:48
    Also all this audiophile crud is very contradicteve, example virtual ground vs well established mono block amp design. BAHHHH BAHHHHH EVIIIILLLLLLLLLLLL please order a sample of a 24bit ti DAC ADS1210U there 20 dollars and can be had for free from T! An r2r ladder over a dac i dont get it

    $20? You was robbed! That chip can only do 1 channel at 16kSPS! Stereo audio sigma-delta ADCs and DACs come a lot cheaper than that, WM8524, WM8782, WM8783 and friends I've used quite happily with 3 or 4 pins committed (48, 96 or 192kSPS) - and the analog power rails are entirely separate from the Prop's digital supply.

    Which is an important point - an R-2R network is only as good as the voltage rail stability at each bit-driver (well for the MSBs) - the voltage droop between separate Prop pin drivers will be rather more than 1 part in 16 million. Probably more like 1 part in a few 1000 if driving any significant current. You'll get 12 bits, perhaps even 14, but the supply rails on-chip are not superconducting! Then there's power rail noise...
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-10-21 16:17
    What!? Not if you have the $3500 power cord to go with it!!
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2012-10-21 16:50
    Nobody has mentioned thermal noise problems.... at that resolution, breathing in the wrong direction might have an adverse effect on the DAC. :-)

    I do understand from an audiophile's perspective that the difference between vinyl versus some other medium such as CD, there IS a difference... Quite frankly I don't hear the difference, but I understand how some people can. It has to do with heterodyning ... even though there are higher frequency components that we can't hear ( <- it is impossible because they are to high for humans to detect) ... there are however harmonics of those high frequencies that we can hear as a result of heterodyning. With a CD the higher frequencies are truncated, but with vinyl some of those higher frequencies are preserved giving an added quality to the sound experience.
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-10-21 18:20
    What may also make a difference somewhat related to Beau's post may be the effect of the sampling process. Vinyl and audiotape are continuous analog signals input to output. If a CD was sampled at 44kHz, then it could reproduce a 22 kHz frequency. But it would be pretty ugly with only two samples per period. Since instruments and voices are combinations of harmonics, this sampling could degrade the quality of the sampled signal by capturing a less true image than with continuous recording. That is why I would agree with some (who may actually be able to hear the difference) that there is a significant quality difference between analog and digital recording.
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-10-21 18:39
    Seems it can be done, though very exspensive

    http://www.msbtech.com/products/dac4.php?Page=platinumHome

    Perhaps I am audiophilically challenged, but I find the technology to filter, fold, spindle, and mutilate a signal that was probably sampled at 44ksps and turn it into a signal that seems the near equivalent of pure analog quality quite astonishing.
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2012-10-21 18:58
    The only way I might think that a 24 bit R2R with discrete components would even be remotely plausible was if literally the R2R was composed of a straight piece of wire with 'taps' ... The wire itself IS the resistor. By simple geometry of where the taps are could get ridiculous accuracy, but even then there are enough losses in the connection of the taps, that you would be out the window again on accuracy... not only that, the voltage levels, unless you were at resonance, would be so low, that it wouldn't be practical.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-10-21 20:23
    What!? Not if you have the $3500 power cord to go with it!!
    And I thought "platinum" was a warning sign. That's nothing compared to "Valhalla!" Just grab onto the 24K gold-plated wire ends, and you'll be transported instantly to Viking heaven!

    -Phil
  • W9GFOW9GFO Posts: 4,010
    edited 2012-10-21 20:47
    If a CD was sampled at 44kHz, then it could reproduce a 22 kHz frequency. But it would be pretty ugly with only two samples per period.

    Aren't CDs created from digital sources that are much higher sampling rate? My little Sony recorder can record at 96kHz, 16 or 24 bits - I know there are units that sample much higher than that. When it is reduced to 44.1kHz doesn't the conversion preserve that 22 kHz freq?
  • Peter KG6LSEPeter KG6LSE Posts: 1,383
    edited 2012-10-21 21:07
    W9GFO wrote: »
    Aren't CDs created from digital sources that are much higher sampling rate? My little Sony recorder can record at 96kHz, 16 or 24 bits - I know there are units that sample much higher than that. When it is reduced to 44.1kHz doesn't the conversion preserve that 22 kHz freq?

    sadly no .. as soon as you down sample you can have Nyquest issues .. and for a Longgg time DAT at 48 KHZ was the norm ,. sadly Like on a LCD screen and Res . you cant just take 48 in to 44.1 .. now if it was 88.2 then Yea easy math .


    same with 24 FPS film and normal 60 I 30 P NTSC .... 3/2 Pull down ..

    to get a some what quasi sine wave as dirty as a "modified sine wave" inverter you can do a max Freq of 11 ish KHz . this gets ya 4 samples to work with
    with some LRC filter Love to smooooth it then I bet it might Be ok ..


    I had a VERY interisting Idea Years ago ,.,. why not just have ONE bit depth , and just run a uber high sample rate and treat the entire system as a PWM


    I mean its crude but Meh you shove 500 K on any audio , its gonna sound good .

    BTW this Idea is NOT new , some AM stations are doing this as ya all know MOSFETS do much better at on or off ,
    Harris I think was the builder .. dx 50 ?


    http://www.msbtech.com/support/How_DACs_Work.php?Page=../products/dac4
    has a for a site that sells gear that is Well Yea , has a rather good intro in to how ADC works ..
  • Clock LoopClock Loop Posts: 2,069
    edited 2012-10-21 21:49
    Heh, good luck find a REAL source sound for the bitspace.
    GCI/PC generated is the only source. (electronica music)

    The programmer/music designer would need to design for that bitspace inside their actual devices.

    So for a device I made, the sound engine would need to be changed to "generate" that extra bit detail.
    So this thing has SPDIF output, the source audio engine does have tweaks available to increase bitspace, so does the spdif engine....
    http://forums.parallax.com/showthread.php?115258-TheBlackBox-Release-v2.0-Propeller-HSS-FX-Sequencer-with-Digital-Audio-SPDIF


    So without the complete line of equitpment from recording/generation to processing to production to package to playback to amplification to speaker re-production,
    it usually hits a bottle neck in the recording/generation stage, off the bat.

    99% of music out there is UPSAMPLED to that bit detail and sold as HD....

    NEW HD!

    yes.jpg
    720 x 451 - 80K
    yes.jpg 80.1K
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-10-21 21:52
    W9GFO wrote: »
    Aren't CDs created from digital sources that are much higher sampling rate? My little Sony recorder can record at 96kHz, 16 or 24 bits - I know there are units that sample much higher than that. When it is reduced to 44.1kHz doesn't the conversion preserve that 22 kHz freq?

    Yes, the freq should be preserved, but try this:
    Set up your preferred ADC with say 50 or 100 ksps, input filter Fco=(sample rate/2) and loop output from prop direct to whatever DAC you choose to use. I did this with an mcp3201 and a homebuilt 12 bit r2r DAC. Set function generator to sin wave from whatever to the filter cutoff in and the scope ch1 from input, ch2 from output of DAC. Watch the wave that is output from the DAC.

    I found this to be a very interesting exercise after dealing with many different sampling applications, mostly in video systems at the theoretical and trouble shooting of existing imaging hardware. It is quite interesting to observe just how far the output waveform fidelity degrades as the input frequency approaches 1/2(sample rate). Once you have finished playing below this frequency, bypass the filter and start going up from there to the actual sample rate. You may find these observations rather interesting as well.

    As to the digital sources being mastered at a higher sample rate, a CD player will still only play back at a. 44kHz rate. MP3s may be higher. But they are all limited by the sample tate of the slowest device in question whether it is the acquisition device or the reconstruction device. Some of my reference material comes from the book "Realtime Programming":Caxton Foster, other web sites and observations. Others on this site can probably sling the underlying math far better than I can.
  • jmgjmg Posts: 15,173
    edited 2012-10-23 20:44
    On the topic of DACs I see a new opamp from TI
    http://www.ti.com/ww/en/analog/soundplus-audio-op-amp-opa1664/index.shtml?DCMP=hpa_amp_opa1664_en&HQS=opa166x-pr

    suggests this DAC

    http://www.ti.com/product/pcm1792a

    which claims a 132dB SNR and 192KHz sampling.
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-10-24 16:15
    I had a VERY interisting Idea Years ago ,.,. why not just have ONE bit depth , and just run a uber high sample rate and treat the entire system as a PWM


    I mean its crude but Meh you shove 500 K on any audio , its gonna sound good .
    http://en.wikipedia.org/wiki/Direct_Stream_Digital
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-10-24 16:20
    That's basically how the Prop's DUTY mode DAC output works.

    -Phil
Sign In or Register to comment.