Home > DIY HiFi > Arduino Audio Controller

Arduino Audio Controller

November 1, 2010 Leave a comment Go to comments

Here is the latest version of the Arduino Controller for Buffalo II DAC. This configuration does not have hardware debouncing and implements debouncing in software by using the code specified in the previous post. It actually works well. I have implemented several new features and I am currently testing and cleaning up the code before I post it.

Current set of features:

  • (Previously implemented): volume control, reading of sample rate
  • LCD brightness adjusted by a jfet transistor on back-light ground line and controlled in software by using one of the analog (PWM) pins in Arduino
  • Selection of the PCM digital filter between sharp roll-off and slow roll-off
  • Jitter Reduction: Enable/Disable
  • Selection of DPLL Bandwidth (haven’t tested this yet, so I don’t know what it does)
  • Click and select: the rotary encoder is used to make all selections, including adjusting the brightness

  1. Spirit
    November 2, 2010 at 14:07

    Hi glt,

    Is it possible to hook up two devices to an arduino board?
    I guess what I’m most interested in is reading volume from the BuffII (am using volumite for this), and track details/selection (from onboard storage) from TPA’s new usb transport.

    Is this feasible, or do you have a better suggestion?


  2. Spirit
    November 2, 2010 at 14:10

    Also, love the work you’ve outlined in your blogs (both current and old)🙂

    • Hifiduino
      November 2, 2010 at 17:34

      Hi Spirit, thanks!
      You can hook up as many devices as you wish. It is only limited by the number of available pins. But if all of your devices have an I2C interface, then you can daisy chain them all without using any additional pins. But even if you run out of pins, you can buy a bigger Arduino with many more pins.

  3. Spirit
    November 3, 2010 at 05:55


    You’re welcome.

    Cheers mate🙂

  4. Branko
    December 18, 2010 at 20:01


    after reading quite a lot here and at diyaudio.com i wonder if i can use this to control a dual mono buffalo dac. how would i have to connect it to the two dac boards (just dasychain?) is there any firmware modification necessary (like for the voulmite from TPA where I have to remove the firmware chips from each dac and use the one at the volumite) or have i to use it together with the volumite?

    thx a lot

    • Hifiduino
      December 20, 2010 at 08:21

      No. The software only works for stereo. Dual mono would require new software. Since I don’t have a dual mono setup, I cannot test it. But if you get a hold of the data sheet, you can start with the code here and make the modifications. The registers have to be configured for mono operation, and then one for right channel and one for left channel. Then for volume adjustment and any other kind of adjustment you will need to access both sets of registers. So for example to change the volume you will write the value for the 8 registers in Dac1 and then write to the 8 registers in Dac2. There will be quite a lot of changes.

  5. Chang LH
    February 2, 2011 at 15:09

    I bought the Buffalo II dac from TPA and built the LCD display/controller according to your information and thanks to your instruction and codes the controller/LCD works well on its own. The Buffalo also tested well on its own. So, I tried to interface the 2 via the SCL/SDA lines. There is no more sound when using the Arduino controller: –
    1) The Buffalo is then always muted (the LED is always on) and hence no sound output.
    2) The SR=35276 is understandable since the new Buffalo is 100Mhz instead of 80MHz in your example, and the division factor should now be 17179 instead of 21475.
    3) The display also shows “LOCK”
    The above is when playing cd input via the SPDIF. Why is the dac always muted? The change in volume has no effect. Before I connect the SCL/SDA, I pulled out the stock 8pin IC controller of the dac. After the testing, I replaced the original controller and the dac works normally again. Thanks again for your wonderful work and I hope you can assist. Thanks

    • BlogGeanDo
      February 2, 2011 at 17:21

      Hi Chang LH,

      For starter, the I2C connection is working well because it is accurately reading the status register of the Sabre chip. Since the ration of 80/100 MHz is .8, then 35276/.8=44,097 which is the exact sample frequency (within tolerances). The “Lock” indicator I believe is also from the status register.

      I suppose you are also using GND in addition to SCL/SDA…
      Register 10 sets mute/unmute. the code writes 0xCE into that register which means 32-bit I2S, Use jitter reduction, bypass deemphasis filter and unmute all DACs

      I don’t have a good answer right now, but try pressing the reset button in Arduino after you power everything on. It should reload all the registers with the default values. I’ll check the datasheet some more and get back…

  6. Chang LH
    February 3, 2011 at 23:26

    Thanks for all your help. I was advised to modify the code to turn the automute off:

    and to insert the following:

    writeSabreReg(0x08,0xFF); // Reg 8: Enable SPDIF input, -127db automute level
    writeSabreReg(0x09,0x00); // Reg 9: Longer time for automute

    ….. and everything works fine now. With the 100MHz clock Buffalo II, I used a divisor of 17178 instead of 21475 for SR calculation and on playing cds the SR reads exactly 44100. Thanks again for the wonderful effort and blog.

  7. September 14, 2016 at 16:32

    mark cobb

  8. September 14, 2016 at 19:06

    Day of wedding coordinators located in decatur IL

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s