Our DSP project for the Raspberry Pi has reached the next milestone: hardware prototyping. The digital part of the circuits is working. There was still a minor bug (wrong pinout of a transistor) that was easy to correct by soldering the transistor on its back. The rest of the circuit worked well. As you can see on the picture, the analog part is not assembled yet. First I want to be able to upload the software to the chip.

Unfortunately, the simple approach to upload the program did not work. The chip simply did not acknowledge any I2S requests. Soldering some cables and connecting the I2S bus to the logic analyzer showed some unexpected behavior. While I2C read requests did not work, there was no problem with write requests. What happened? I had a look at the datasheet again and I think, I found the problem. Before every read request, the chip expects a write request with the address to read. However, both requests have to be in the same I2C transaction. The chip expects multiple start bits. Unfortunately, the Python I2C library that I wanted to use does not support multiple starts. It seems that I have to use the lower-level device driver of the operating system to upload the software to the chip.

Today I did some tests with the HiFiBerry Mini and RaspyFi. I replaced the kernel by the HiFiBerry enabled kernel – and it worked perfectly. The music was played from a cheap USB-Stick. But the most interesting part was the test with 192kHz/24bit FLAC files. And yes – it works! I think, this is the smallest Raspberry-based setup that is able to play 192kHz FLAC music.

It is also nice to see, that RaspyFi also plays MP3 files in 24bit resolution, which means potentially less distortions.

I did some measurements of the HiFiBerry DAC for the Raspberry Pi. Compared to the DAC in standalone mode, there was noticeable more noise when I connected the DAC to the Raspberry Pi. Ok, that was expected. There is a lot of digital switching on the Raspberry, this is not good for audio circuits. But then I noticed an interesting fact: Even if the Raspberry Pi was powered off, there was still some noise.

Where did it come from? The only cable that was still connected was the network cable. Hmm, what happens if I remove this cable?

Wow! Silence! The 750Hz peak was a problem in our measurement setup.

But where does this noise come from? When you connect the Raspberry Pi do an ethernet network, the data connection is galvanically decoupled using a transformer. However, if you use shielded Ethernet patch cables (STP), the ground of the Raspberry Pi (and your audio equipment) is connected to the Ethernet network. This is where all the noise comes from. The solution is simple: You should use unshielded twisted pair cables (UTP) to connect your Raspberry Pi to en Ethernet network or use WLAN.

It looks like a simple task – connect the Raspberry Pi with an external ADAU1701 DSP chip. Both features an I2S interface – just connect it. However, it is not that easy. The ADAU1701 can only work as a slave device on the I2S input. Why not just using the Raspberry Pi as the master? This also won’t work, because the Raspberry Pi can create the BCLK and LRCLK signal, but not a 256xFs master clock signal that is needed by the ADAU1701. Using a local master clock on the ADAU1701 and the I2S clock from the Raspberry Pi will also not work, because both clocks have to be synchronous. Looks like a bit more complexity is needed.

We use the following setup: An external frequency generator creates the 12.288 MHz master clock and a synchronous 3.072 MHz BCLK signal. This BCLK signal will be the master clock for the I2S output of the Raspberry Pi. From this clock signal, the Raspberry Pi creates the 48 kHz LRCLK signal. Why are we not creating this clock externally? Because we have only a 2 channel signal generator available in the lab. This needs some tweaking in the sound card driver.

For measurements I use a Rigol DS2072 DSO and a Intronix Logicport Logic analyzer. That’s a lot of equipment to connect two simple devices:

I had serious trouble to get this setup running. The reason for this was a simple mistake: I switched BCLK and LRCLK. But during debugging I had another idea. The output of the ADAU1701 is an I2S master. That means it can be used also as the master clock for the input. With this setup – output BCLK and LRCLK connected to input BCLK and LRCLK, there is no need for an external clock source. The ADAU1701 can create all the necessary clocks with the onboard resonator. This will simplify our DSP project a lot.

Finally when everything worked, it looked like this on the oscilloscope: a nice analog output from the ADAU1701.

Finally, the Quad volume control has passed the final tests. It is now available in our shop. The documentation will be updated in the next days. There are some minor differences from our prototype:

Control connection can be a 4- or 5- pin molex connector or a 2×3 or 2×5 pin connector.

The control connection now has a common anode connection. With this connection you need only 4 cables for the connection of a microcontroller board and this circuit. The common anode will be connected to +5V/+3.3V (depending on the voltage of your microcontroller board).

With the new common anode, the signals will not be inverted anymore.

The audio connectors were moved a bit.

Note that most documentation on our site still show the old version. This will be corrected in the next days. Also expect more pictures of the finished circuit in a nice acrylic case!

When connecting a MC or MM system with a phono stage, the most important things to consider are input capacitance (for MM systems) and input resistance (for MC systems). Usually this is done be DIP switches or external connected capacitors. That means you cannot do this from your listing position and it is not easy to hear the differences between different settings. This the following input stage, all switching is done by low-resistance analog switches. These switches can be controlled by a digital circuit (e.g. a microcontroller). That makes it easy to implement a switching of capacitance and resistance using a remote control.

The selected analog switch is the ADG1411 from ADI. It features 4 independent switches, can run at +/-15V 8 and has an Ron of only 1.5Ω.