Arduino Audio DAC Options

Posted on Feb 5, 2014

DAC is short for Digital to Analog Converter. In this article we play around the code Michael Smith created for a PWM based DAC. I modified his code so that other DAC options could be tried. I compare the 8-Bit PWM DAC with the R2R DAC at various numbers of bits. You might be surprised at how well a 4-bit DAC sounds. This article includes several

Arduino Audio DAC Options
Click here to download the full size of the above Circuit.

sound samples for the various DAC options and demonstrates some software abstraction that allows for multiple DAC options. This article is part of the series on Arduino Sound Generation. I decided to drop the Part 1, 2, 3 distinction as much of the content is not dependent on the previous articles. Of all the various methods of sound generation the DAC method seems most versatile to me. As mentioned before DAC is a common short name for Digital to Analog Converter. Basically a binary/digital value is converted to an analog/voltage value. An 8-Bit DAC would convert a binary value in the range of 0 to 255 into an analog voltage from 0 to 5V. The exact voltage range of the conversion is dependent on the DAC configuration but for most things we will play with, 0 to 5V will work. Since analog signals, especially sound, needs to swing plus and minus around 0V we often bias the DAC so that mid scale is considered 0V. If the DAC outputs from 0 to 5V then we usually bias the signals so that 2. 5V is translated to 0V. If we generate our output signals so that half scale is 2. 5V then we can AC couple the output to get a +/- 2. 5V swing. The half scale biasing may be a bit confusing but really it`s easy once you get the general idea. We just call 1/2 scale zero so that any numbers above 1/2 are positive and below are negative. For an 8 bit converter we can use the MSB as a sign bit to make this happen. Consider that decimal 128 is...

Leave Comment

characters left:

Related Circuits

  • New Circuits



    Popular Circuits

    Wireless Data Communication system
    Overvoltage protection for logic
    Current Loop
    Ultrasonic Cleaner Circuit
    Adjustable Power Supply
    high-quality 2.3 GHz Amateur Radio Transceiver
    Spectrum 128 Keypad
    8-bit Digital to Analog converter (DAC)
    Marx Generators
    8 NC temperature adjustment