8
\$\begingroup\$

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.

\$\endgroup\$
7
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ A 12-bit ADC should be able to reproduce any old music waveforms, just with more background hiss than a CD. \$\endgroup\$ – endolith Mar 19 '11 at 5:29
  • \$\begingroup\$ 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. ;-) \$\endgroup\$ – cbmeeks Feb 11 '15 at 15:56
5
\$\begingroup\$

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.

Blockquote

From Resistor Ladder, Wikipedia

\$\endgroup\$
  • 2
    \$\begingroup\$ 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. \$\endgroup\$ – A.R. Mar 18 '11 at 19:56
  • 2
    \$\begingroup\$ 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. \$\endgroup\$ – Olin Lathrop Dec 1 '12 at 23:14
  • \$\begingroup\$ @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? \$\endgroup\$ – Zeta.Investigator Nov 19 '17 at 7:51
  • \$\begingroup\$ @Zeta.Investigator roughly because 1/2⁷ < 0.01 or 1%. Whatever you're looking at depends on the tolerances (and how they stack up). \$\endgroup\$ – Nick T Nov 19 '17 at 9:26
4
\$\begingroup\$

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

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

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.

\$\endgroup\$
1
\$\begingroup\$

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.

\$\endgroup\$
0
\$\begingroup\$

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

\$\endgroup\$
0
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.