Arduino Library for Analog Devices, Inc. AD5724/AD5734/AD5754 QUAD DAC 0-10V UNIPOLAR-BI-POLAR
Please visit the Arduino DAC project page for more information on this project and for links to download the library.
Arduino with a DAC
I needed a DAC [Digital to Analog Converter] for a project I’m working on that includes an Arduino board, but I quickly realized that no such shield, nor library, exists for this function. A few people have some ideas about using the PWM outputs of the Arduino and then either a transformer, a RC filter, or a OP-Amp to smooth out the signal, but my project requires more precision and flexibility than any of these methods could achieve.
The requirements I have for the DAC are:
- The DAC needs to use a SPI [Serial Peripheral Interface] so that the Arduino could communicate with the DAC with as few digital lines as possible.
- The DAC needs to have the capability to operate from a singly supply voltage.
- The DAC needs to provide a unipolar output [from 0-10V].
- I need four [Quad] DACs on one chip.
- The DAC needs a settling time of 10uS or less.
For my project, I’ll be using the 16-bit version of the Analog Devices chip, which is part number AD5754 [Digikey: AD5754], but the library will work with all three of the AD5724 [12-bit], AD5734 [14-bit] and AD5754 [16-bit] chips as the lower-resolution chips will simply ignore the lower bits when setting the DACs.
One of the great things about these DACs is their ability to be configured for various outputs. If I needed a 0-5V DAC then I could use this chip; if I needed a -10-10V DAC then I could use this chip. There are actually six different power output configurations that the DAC could be setup to use. Note, however, that in order to achieve the configured output, one must provide the chip with adequate power overhead in order for the chip to be as precise as possible and operate properly. The library currently only supports unipolar output at 0-10V, but this can change if there’s demand for other outputs.
I did find other chips which exceed my expectations, but they are significantly higher in cost than the AD5754 so if my plan is to create a DAC shield to sell to other hobbyists then I should watch the costs as much as I can.
I have yet to receive my AD5754 chip so I have not tested this library in the real world. I have, however, verified that all of the data sent to the DAC will be correct. The only question I have left is whether or not I need to use the SYNC pin and, if so, then that will need to be accounted for in the library. Presently, the library only requires the SCLK, SS, and MOSI Arduino pins to operate, which is apparently the bare minimum according to the AD5754 Datasheet.
Please visit the Arduino DAC project page for further information and the link to download the library.