About   5 comments

Code repository for www.hifiduino.blogspot.com and www.hifiduino.wordpress.com

This code is published in the spirit of the Arduino community. This means “open source”. If you improve the code, please share it.

Posted April 6, 2009 by BlgGear

5 responses to “About

Subscribe to comments with RSS.

  1. Hello,

    I have a question regarding the Buffalo II and Arduino. I myself have build similar system with Buffalo32s and Arduino (duemilanove). Its also using my custom source code for the I2C, IR and display. I am using the device as digital preamp.

    The problem I am having is that by default the Buffalo board can reset itself without Arduino knowing. This can happen for instance if i accidently (de)connect the spdif while the preamp is or if the usb-spdif transport gets deconnected from PC. Or there is some other sudden change in the spdif line (grounding changes for some reason, etc). The problem is that Buffalo after reset sets the volume to 0db and if music is playing that can be very scary. The problem almost never occures, but i’d like to get rid of it completely.

    Currently, I have solved this problem by polling the volume register base+0 from Buffalo once in a while and comparing it with the software side volume. If those do not match, the logic resets Buffalo’s settings. The downside of this is that if poll the volume register, say every 100ms, the buffalo starts to lose lock with spdif once in a while. Safe settings seems to be 500ms or 1000ms, which still can be quite loud for a split second. I have disabled the pull up resistors in the Wire API for 3.3V but have not implemented any sort of regulation in the i2c connection.

    Do you know a better solution for this? Any ideas or suggestions?

    I did not see a fix for this problem in your current BII sources. I thought maybe you have addressed this problem differently.

    -eero

  2. Hello, thanks for sharing your experiences. I have never seen the DAC reset, so I don’t have a “solution” in my code. I suppose the “only” solution is to detect something outside fo the DAC, for example if your crossover has a pad resistor, you can measure the voltage there or you you look into sound pressure measuring devices. Loosing the spdif signal should not reset the DAC.

    Also, what do you mean you disabled the resistors in the wire API for 3.3v?

  3. Here is another idea: there is status register that tells you whether the spdif signal is valid or not, or whether the dpll has locked into the signal. You can detect a loss of signal and for the next few seconds you could repeatedly program the volume levels…

  4. Thanks for your reply.

    >I suppose the “only” solution is to detect something outside fo the DAC, for example if your crossover has a pad resistor,
    >you can measure the voltage there or you you look into sound pressure measuring devices.
    > Loosing the spdif signal should not reset the DAC.

    I suspecting that the real problem is the grounding. I don’t know, if its something i have done, or is it a feature of the dac board. Anyways, I might need to wire a proper star grounding between all the modules in the device. I am not sure that will help tho, since there it still a PC in the other end of s/pdif and my transport (hiface) supposedly does not have galvanic isolation in the output.

    If you want to test if your Buffalo resets :), take scissors with plastic handle and touch the ground of the s/spdif connector (with or without s/pdif connected) with the tip of scissors (not connecting anywhere else). All the registers should reset, well, thats what mine does. This is not a problem with conventional Buffalo, since all the settings come from the firmware chip that “reboots” with the dac.

    Sound pressure measurement sounds like too far fetched solution. I was thinking of some sort of partly hardware solution to detect if the dac goes down from the dac pins (resets Arduino with the dac) or use a custom firmware that resets with the dac like the on board firmware and sets the initial register values during boot…basically just mute it and let Arduino handle the rest.

    >Also, what do you mean you disabled the resistors in the wire API for 3.3v?

    I might have understood this part wrong, but i read in Arduino dev section that you can recompile the Wire API without the pull-up resistor flags set and that should result in not enabling the 5V for i2c. I was assuming this leaves the i2c voltage to 3.3V.

    Source:
    http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1275422099/0

    > Here is another idea: there is status register that tells you whether the spdif signal is valid or not

    Yes, i know the status register. But, that won’t work, since if the dac resets, it does it in a split second and if Arduino is not polling at the same exact time, it will miss the dac not having lock. Also when the Dac resets the i2c is also down until the dac is up and running again, so Arduino would probably miss the status change all together.

  5. Hmmm, that is very interesting in the conventional Buffalo. It seems that whatever is causing the power glitch, it also reboots the on-board microprocessor. if this is the case, and if you can isolate which line is changing during the reset, you can wire that to an Arduino interrupt. Suppose the power line is momentarily pull down by the glitch, you sense the power line with pin 2 or 3 and then handle the interrupt.

    Regarding disabling the pull up, I understand now. So you are pulling up from the 3.3v. I don’t want to go as far as recompiling the source (that would be too complicated for me :-))

    Also there is a reset pin in the chip. I wonder how it is wired… Perhaps you can sense changes in this pin and generate an interrupt in Arduino.

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

%d bloggers like this: