Tag Archives: oscilloscope

Raspberry Pi – power supply noise on the 5V rails

We are developing audio hardware for the Raspberry Pi. One issue here is the quality of the power supply on the 5V and 3.3V voltage rails. A high quality power supply is a critical aspect in audio circuits. The Raspberry Pi hardware is quite challenging for a power supply, let’s see what happens with different power supplies.

We will look at 3 different 5V power supplies. We use a cheap Nokia AC-10E 5V/1.2A switching mode power supply, an Apple 10W USB power adapter and an inexpensive Manson NSP3630 lab power supply. There are much better lab power supplies available than the Manson, but for our tests this will be good enough. If the Raspberry Pi is just powered on and booted, the 5V rails looks like this:

ps-nokia-load ps-apple-noload ps-manson-noload
Nokia: 4.90-5.54V (0.64V pp)
Noise average: 265mV
Apple: 4.67-4.81V (0.14V pp)
Noise average: 71mV
Manson: 4.94-5.05V (0.11V pp)
Noise average: 62.5mV

You can easily see, that the quality of the Nokia power supply is really bad. The Apple power supplies have a good reputation and looking at the oscilloscope picture you can see, that the signal is a lot cleaner. The Quality of an external lab power supply is still better – but it is also much more expensive and very bulky. Also the voltage is different. But this is not a problem, if the voltage itself is stable.

But what happens, if the Raspberry really runs under load. To stress the system, we transferred files to the Raspberry using SSH. This brings load to the CPU, the network controller and the SD card.

ps-nokia-load ps-apple-load ps-manson-load
Nokia: 4.63-5.42V (0.79V pp)
Noise average: 266mV
Apple: 4.60-4.82V (0.22V pp)
Noise average: 80mV
Manson: 4.94-5.05V (0.11V pp)
Noise average: 66.1mV

The cheap Nokia adapter is worse than before, the voltage drops and peak-to-peak swing further increases. The Apple power supply looks good. But having a closing look at the data, you can see, that the voltage dropped a bit. The Manson lab power supply have no problems at all driving this load.

Conclusion: If you want to produce high quality sound on the Raspberry Pi, you should not use a cheap 5V/1A power supply.

Update 14.10.: We did some more research on noise sources. Check out what we found out about networking.

Adventures in I2S country

After getting I2S sound output running on the Raspberry Pi, I started communications with an ADAU1701. The chip has no sample rate converter (ASRC) integrated, therefore I had to configure the Raspberry Pi to output 48kHz I2S with BCLK=64*FS. I used the TDA1541A module, because it did exactly what I was looking for – at least at 44.1kHz.

raspberry_i2s-44

However, when I switched to 48kHz, the I2S output changed. What happend? At 48kHz, the I2S bit clock was only 32*FS, not 64*FS anymore. It looks like a feature of the driver. This needs further investigations. I might have to create a special driver, that only enables 48kHz with BCLK=64*FS.

raspberry_i2s-48

Update: I had a look in the driver code. Looks like there is a bug in the driver. I did a short hack to fix this temporarily, now it looks good:

raspberry_i2s-48-fixed

Unfortunately the ADC produces only noise. I have to investigate if there is a problem with the I2S data stream or if the signal quality is to poor to interpret the data correctly.

 

Raspberry Pi I2S output working

After some work and helpful web resources, one of our Raspberry Pi’s is now generating I2S signals.

DS2_QuickPrint1

You can see, that this is a 44.1kHz playback, the LRCLK frequency is 44.17kHz, the bit clock frequency is 2.778MHz which is about 64x LRCLK (almost, the frequency counter on the oscilloscope is not extremely accurate).

Having a look at the signal curves, you can see that there is a lot of noise and ringing on the signals. However, this is no problem, the voltages are never in the forbidden area.

DS2_QuickPrint2Another interesting question is: How much jitter do we see on both clock signals? Using the statistics functions on the oscilloscope (which are not the best method to measure jitter) we see a jitter on the clock signal of about 800 ps. On the lower frequency LRCLK, the jitter can’t be measured with my oscilloscope anymore. It is too low – which is a good sign for a high quality sound reproduction.

Many thanks to Koalo and  Noise if good for the helpful guide to compile a new kernel with I2S support.

Are you looking for a Raspberry Pi I2S sound interface? Check out our HiFiBerry Mini!

Entry level oscilloscopes – what can you expect

You can buy 1Gsamples/s oscilloscopes now for a few hundred euros. But there are also entry-level scopes available in the range of 800-1000€. Does it make sense to invest in the more expensive devices? Check out this comparison of two Rigol devices:

There is another interesting thing about the Rigol DS2000 series featured in this video: there is a key generator out that allows you to use the features of the expensive devices even with the base device. All features are enabled and disabled just by software. Is it legal? We don’t know? But a more interesting question is: What will Rigol do about it? My guess is, that Rigol is aware of the issue and is happy about it. It’s great marketing: Sell the same product at different price points depending on the willingness to pay.