How do I interface an external DAC

Hello All,
I need to put out an analog voltage, since there only digital pins for output, I was considering using a external DAC.

Problem is I am not sure how to go about that. I am not sure which chip would be a good choice, and also how to program in the software to do this.

Please Help,

I have an Arduino almost ready to install. I need to modify and small voltage and add some to it. It will be around .5 volts incoming to an anlog in. I was hoping to just add a couple of lines to make .5 say 1.0. Then fire that information back out into the real world, through a DAC.

I basically want to modify the voltage coming out of the O2 sensor. I already have the Arduino ready for Hydoxy production, Check out Stan Meyers, and a thermostat for my Electric fan. I am hoping for an easy way to modify that voltage without using a bunch of external components.

Seems like a simple op amp might be a better solution. Thanks.

Why can't you use PWM and a low pass filter?

Part like this might be good

Serial input, so not a lot of IO pins tied up 5V operation 12 bit resolution (not too big, not too small) Fast Voltage output - but only mAs of current capability, so you may need a buffer op-amp after it if you need more current capability. Browse the DACs at, there are a wide variety of parts.

This one is similar but with higher current driving capability, so maybe you could skip the extra op-amp buffer.


Why can't you use PWM and a low pass filter?

Yes that is a good solution for some applications. But that filter pins you between the problems of ripple at one end and slow speed at the other end.

Then you need to work out a few requirements before selecting a DAC (there are thousands of types available...). Important ones are supply-voltage, number of channels, output impedance, number of bits, precision, bandwidth (samples per second), uController interface (I2C, SPI, I2S, parallel, etc), package style (DIP / SMT). Also output voltage range (not the same as supply), whether it has onchip reference voltage (or needs an off-chip reference)...

Also there are ones with current outputs rather than voltage outputs, ones with differential outputs... Some even remember the last output value in an EEPROM across power-down!

I am guessing a 5V supply, 8 to 12 bits or so, low frequency (no need for audio bandwidth) and I2C/SPI interface is a likely spec (parallel interface uses a LOT of pins!)

My box of bits has a couple of MCP4822's which are labelled as 'dual 12bit SPI DAC' - I think these do 0--2.048V or 0--4.096V software selectable.