R2R Ladder DAC Help


Just started getting into Arduino programming in the hope of doing a bit of audio experimentation.

I've lashed up an 8 bit R2R DAC (20/10k) and I'm using PORTD to write to it. I can get audio out of it but it looks on the scope like it's just a single bit in action (it also sounds like it).

I've played around disconnecting the various output pins from the R2R ladder to try and work out what's going on and I can disconnect the 7 least significant bits without the audio changing at all which seems to confirm my one bit theory.

Thinking that maybe I'm not writing all the bits of the port correctly I hooked up LEDs to each bit and a button which stepped through the sample data so I could see the sample represented in binary on the LEDs. This worked fine so the data is getting to the port ok.

So now I'm confused! It would seem the software is doing its job and the data is reaching the output pins ok which leaves the R2R circuit. I've triple-checked this and it looks good (not sure how I could screw it up?!) so I really don't know what's going on!

Any ideas would be most gratefully received!

Many thanks,


You've done most of the standard debugging work so now I would suggest posting schematics and your sketch to see if we can find that "a-ha" thing you may have overlooked.

-- The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected

Hi, strange enough if it fails whereas the bit stream seems to work. I've done this R2R DAC tutorial if it helps : http://fullmaj.rd-h.fr/wiki/doku.php?id=diy_spi_dac

Simple question : did you plug the resistor in the right way? (R in parallel, and 2xR in serial of the outputs ?) Plugin it the opposite shall lead to a result close to the one you're mentionning.

I haven’t seen your schematics posted, so I have some (hopefully) probing questions and (hopefully useful) suggestions:
Did you use discretes to implement your design, or off-the-shelf arrays? The latter chips from MuRata are SIP, are low wattage (1/32 W per resistor for the MuRata chips) and absolute R tolerance is 2%. Which doesn’t sound that great, but overall tolerance is not as important in R/2R as agreement of R values among the individual resistors in an array. Usually, this particular tolerance figure is much better than overall resistance; but the MuRata specs don’t include these figures. I don’t know why, so caveat emptor. IRC and Bourne also make arrays, and relative R tolerances are available. Mouser ships the Bourne arrays also - in smt packages. The MuRata SIPs have been discontinued, so order now if you want these. Arrays of discretes with higher power specs can be made, of course, but you might have to select these by hand to get good matches.
What was the reference voltage for the array? There are maximum absolute voltages, depending on power ratings for the individual resistors.According to MuRata, Vmax = Sqrt( watts * “nominal” resistance value). I’m not sure I know what they mean by “nominal”. Perhaps the Vmax is calculated separately for both R and 2R, in which I would use the Vref of the whole circuit to be safe. There are model schematics out there that include op amp outputs. Probably better to use these to output higher voltages.
I haven’t tried this yet, but from the schematics, it looks like you could cascade multiple network chips to get higher resolutions. But if you do so, you need to parallel the 2R resistor between the chips with an external resistor of equal value. Since this resistor becomes part of the network, it needs to agree with the others within the rest of it. Same goes for the agreement between overall R of both chips.

Hi there, I know this is an old post, and what I'm asking isn't to do with the original posters question, but it made sense to put it in this thread for a centralised r2r help page.

I have just knocked up an 8 bit ladder DAC, but don't have a resistor that's exactly twice the ohm-ige of another resister. I also don't have enough of the same resistor to put two in series to make up the 2r part. What I've gone for is 330ohms for R and 680ohms for 2R. Does it make much difference if it's a llittle more than twice the resistance? It's the closest to a match I have to hand anyway.

I have a two more questions, not exactly about the R2R ladder DAC. I'm wiring up a stereo mini jack to the DAC's output. I read an instructable that suggested putting a 10k resistor between the arduino output and the jack, but they were wiring directly from a single digital pin. Will I need to add an extra resistor between the DAC and the jack socket?

Last question, is it ok to wire the DAC output to both the jack's left and right (it's a stereo jack)? Can that cause any complications?

Cheers in advance,