Tag Archives: diy

Build your Squeezebox client with piCorePlayer

Steen Pedersen has updated his piCorePlayer to support our HiFiBerry DAC. piCorePlayer is a Squeezebox client based on a minimal Linux system. It boots from the SD card, but runs completely in the RAM after booting. It also supports WiFi dongles. We tested it with the small Raspberry Pi Model A, that has only a single USB port and used a small LogiLink USB WiFi adapter – it worked very well.


We can recommend piCorePlayer for all Squeezebox fans!


LabtoolTo debug digital circuits (mostly I2C, I2S and SPI communications between chips), I still use my old LogicPort 34-channel logic analyzer. When I bought it several years ago, it was a real bargain. There where no comparable logic analyzer available in this price range. However today, there are alternatives. One that I found today is LabTool from Embedded artists. It is not only a logic analyzer, but also features an oscilloscope, a logic level signal generator, and an analog signal generator.

The specs are not very impressive: 100MHz samples rate only with 2 channels used, only 20MSamples/s per channel with all 11 channels used. Also the integrated oscilloscope has a bandwidth of 6MHz and a max. sample rate of 60Ms/s – even cheap DSOs have much more impressive specs. However, I like this board. First it is inexpensive: €99 for a device with so many used is a very attractive price point. Also the software is open source. If I look at the software of my LogicPort, there are so many things I would like to change. However, the vendor does not seem to be interested in further development. With an open-source software there is at least a chance, that people from the community will expand the software.

This is not a top-notch device for professional use, but I is interesting for hackers and makers that do not want to spend too much money and want to use it to design digital circuits. I’m not sure about the analog part. 6MHz bandwidth  should be enough to debug audio circuits. I’m interested if somebody is using it for audio – leave a comment about your experiences if you do.

HiFIBerry DSP Light – progress report


There was still a minor bug in the input section of the HiFiBerry DSP Light prototype. It was just a resistor that was soldered only on one side. After fixing this bug, the board it now working correctly. That means we have a DSP board that can be programmed from the Raspberry Pi and has analog inputs and outputs. I usually do the basic tests using a signal generator and the oscilloscope. However, a simple sine wave is a boring subject for a DSP. Simple biquad filters do not modify the waveform. But let’s see, what happens if we use the abs() function on a sine wave:


Oops, the signal is inverted. But this is not an issue, inverting a signal in the DSP is a trivial function.

That means we can now focus on the software development. The first step is the EEPROM functionality. With the onboard EEPROM the DSP works even without the Raspberry Pi (however without the option to control it over the network).

The next step will be a universal filter designer that can be used for crossovers, equalizing and even room equalization. The software will be open source. Are you interested to join the software development team? Contact us!


The first signal generated from our DSP board

After some hours of debugging and fixing a hardware problem, the DSP hardware seems to work now.


There are still cables soldered for I2C debugging purposes, but writing to the DSP works without problems now. I still have to work on reading data back from the DSP. Therefore the debug cables are still soldered. You also see, that the voltage regulator at the bottom is not used yet. I will do some comparison tests with a separate voltage regulator for the analog circuit.

I created a simple DSP program that generated different waveforms on the different output. Let’s see what happens on the output:


Looks good! The DSP now runs at 48kHz, therefore the triangle waveform is not exactly a triangle. But that’s what you would expect.


HiFiBerry DSP Light: Prototyping started

hifiberry-dsp-debuggingOur 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.

HiFiBerry Mini – distortion and noise measurements

Here are some noise and distortion measurements of the HiFiBerry Mini DAC. Without the ethernet connected, noise is practically non-existing. But also distortions look good. D2 has the highest level and higher-order noise is decreasing with each order. This is really a nice chip.


At 1kHz we see 0.0037% THD+N (distortions alone only 0.003%). However, the measurement equipment itself (an EMU0404) itself has a THD+N level of 0.002% at this frequency (in- and output together). Therefore the real noise and distortion figure might even be a bit smaller.

We also did tests at other frequencies and they look similar:


Note, that these measurements are a bit flawed, because at higher frequencies there are less harmonics within the measurement frequency range than at lower frequencies. Therefore the distortions go down. Unfortunately I was not able the extract the D2 and D3 levels alone.

There are more good news. The voltage regulation on the board works great. Even with the worst power supply I could find (a Nokia charger), the figures did not change much. THD+N went up from 0.0037% to 0.004% at 1kHz. That means there is no urgent need to upgrade the power supply of your Raspberry Pi.

 Update 1.12.2013: We did some THD+N measurements of our production version. They were even lover than the values show here.

hifiberry-mini-proto-4-3Just a quick update: I did the first tests with HiFiBerry Mini – our high-resolution DAC for the Raspberry Pi. The card is working, sine waves look great on the oscilloscope. More tests have to be done. I will be interesting to see what will be the highest sample rate that I get running on the Raspberry – the DAC supports up to 384kHz!