Simple 10 Bit DAC For The Arduino
Simple 10 Bit DAC For The Arduino
1. Intro
If you need a DAC for the Arduino, this 10 bit DAC is accurate, cheap and uses only few components. The Arduino
processor, the ATmega328 / Atmega168, has ADC inputs but unfortunately no DAC outputs. Although the internal ADC
contains a 10 bit DAC, this DAC can’t be used stand alone. Therefore I developed a 10 bit DAC, which is build with an
integrator. In contrast to a PWM DAC, there is no ripple.
For an even more simpler DAC, see Super simple 10 bit DAC for the Arduino.
2. Details
Uses 1 arbitrary digital I/O pin and 1 arbitrary analog I/O pin.
3. Hardware
The output voltage range is 5V * (R4 + R5) / R5 and can be changed by R4 and R5. The TLC272CN is a high input
impedance precision opamp.
Because the opamp output isn’t rail to rail, the supply voltage must be higher than the maximum DAC output voltage. For
an output voltage of 10V the supply voltage is 12V. We can use a single 5V power supply when it is no problem that the
maximum DAC output voltage is limited.
Simple 10 bit Arduino dac schematic
4. Libraries needed
Unzip the Dac library folder and place it in the standard Arduino library subfolder \libraries\. The libraries Streaming.h and
Flash.h from Mikal Hart should also be installed. Download these libraries here: http://arduiniana.org.
5. Test software
Unzip the DacDemoproject file. It contains three files. The DacDemo project tests the Dac application and shows how to
use the Dac. For troubleshooting see HERE.
6. Further improvements
Although the DAC works fine it should be possible to further improve it in size and speed. If you have any improvement
ideas, please put a reply here.
7. Dac.cpp