# simple audio DAC

I was wondering if anyone could recommend a simple, low cost DAC chip that I could use for audio playback. I am not trying to achieve anything amazing or complicated, just throw some numbers into it and listen to the noises that it makes (I'll probably start by trying to play a sinewave) I've seen lots of complex SOC solutions, as well as lots of evaluation boards, but I prefer to start with a single IC and go from there. Any suggestions?

EDIT: My goal is to eventually move into more advanced DSP processing, and possibly synths, so I would prefer a chip based solution.

The MCP4922 is a single chip 12bit DAC with an SPI interface. It's cheap and available in hobbyist quantities. It's very simple to drive.

There's also a mono version, the MCP4921.

It's used in the Critter And Guitari Arduino synthesizer and there's source code available.

It can make sounds like this and this.

• A 12-bit ADC should be able to reproduce any old music waveforms, just with more background hiss than a CD. – endolith Mar 19 '11 at 5:29
• May also be worth noting that in many cases, you can get these type of IC's for free in 1-5 piece quantities as samples. In fact, I think I have a few DAC's at home that I got this way. I have tons of FRAM IC's that have been sent as samples. If you're just starting out, free samples is a good way to go. ;-) – cbmeeks Feb 11 '15 at 15:56

If you're looking for simple, you can use an R-2R resistor ladder. It takes a fair bit of DIO, but you give it a digital number, it gives you the proper analog level.

• DIO = digital I/O? (sorry, I'm a total noob). This looks pretty neat, I'll have to try it out, but I am still looking for a chip-based solution as I plan on moving to more advanced techniques later on. – A.R. Mar 18 '11 at 19:56
• Not so fast. While a R-2R ladder in theory does exactly what you want, and in fact this is what is inside many D/As, making one yourself is difficult. With 1% resistors there is no point going past 7 bits, for example, and 7 bits is really crappy audio. The R-2R ladder resistors in a D/A are all matched and trimmed, which is something you can't do. – Olin Lathrop Dec 1 '12 at 23:14
• @Olin Lathrop Interesting. Can you please elaborate more on 1%->7 bits math? And can we say the same thing for binary weighted resistor network DACs? – Zeta.Investigator Nov 19 '17 at 7:51
• @Zeta.Investigator roughly because 1/2⁷ < 0.01 or 1%. Whatever you're looking at depends on the tolerances (and how they stack up). – Nick T Nov 19 '17 at 9:26

This technique of Roman Black's is quite popular, and is very easy to implement.

• I'll have to check this out too... – A.R. Mar 18 '11 at 19:59
• Is this different from PWM? – endolith Mar 19 '11 at 5:27
• It is a form of delta modulation. – markrages Dec 1 '12 at 23:10

The computer you are using to post here probably has a decent-quality 16-bit DAC in it.

Seriously, for just messing around with DSP, the desktop is the best place to prototype. You can use nice high level language like Octave or Pylab. After you get your algorithm working, translate it to C. Only when it's working in C on the desktop should you think about implementing it on a microcontroller.

A very simple USB DAC (better and simpler than Resistor Ladder :) can be built using PCM2704 (better use PCM2704C if you can). It's a 16-Bit Delta-Sigma Stereo DAC with very good sound quality and it doesn't require drivers in most OSes.

Scheme is very simple and you can built it using point-to-point wiring or use PCB. Some instructions can be found here or here

Later you can build device with S/PDIF and TOSLINK outputs using this scheme if you want, but it's a little bit more complicated.

RB's has enough resistors to make a pain and you need precision. So I think you can get the circuit in an IC with laser trimed resistors for a few bucks which may be worth it. If it has some active components ( precision voltage on input to the ladder and buffer on the output ) so much the better http://www.national.com/mpf/DA/DAC0800.html#Overview

A stereo DAC that is pretty cheap and relatively simple to interface to microcontroller is NXP UDA1334ATS. It has on-board PLL to generate internal system clock; just clock in the audio bits. It is usable from 16 to 24 bit resolution, and $1.70 in single qty from Digi-Key. Comes in a tiny 16-SSOP package but SparkFun has the breakout board to DIP footprint for$2.95.