Tracking down noise sources on a Raspberry Pi

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.

rpi-noise-with-ethernetWhere did it come from? The only cable that was still connected was the network cable. Hmm, what happens if I remove this cable?

rpi-noise-wo-ethernet

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.

 

31 thoughts on “Tracking down noise sources on a Raspberry Pi

  1. Pingback: Raspberry Pi – power supply noise on the 5V rails | Crazy Audio

    1. matuschd Post author

      That is an option. However that means a seperate power supply. Also high-speed optocouplers are necessary,because the bit clock can go up to 12.288 MHz.

      Reply
  2. Jean-Pierre Le Heiget

    Hello,
    Could you make a HiFiBerry with no DAC but a Toslink output, so that It would be possible to use an existing DAC ? At the same time, you would isolate analog circuits from noise induced by Ethernet.

    Reply
  3. matuschd Post author

    Ji Jean-Pierre,

    I’m working on a Toslink output, check out the HiFiBerry Digi project. However, this project is still in development…

    Best regards
    Daniel

    Reply
  4. Pascal

    Ethernet is made over USB internally. So will this noise be also present if we connect an USB device like harddrive?

    Reply
  5. Daniel Post author

    Most USB devices should be no problem. The problem is not the USB controller, but the noise introduced over the ground connection of the Ethernet cable.

    Reply
  6. Daniel Post author

    Yes, wireless works well, because there is no noise introduced in the ground shielding – as there is no ethernet shielding connected in this case.

    Reply
  7. Daniel Post author

    There is no need for external Ethernet interfaces. The easiest way to solve the problem of ground noise is using an unshielded (UTP) ethernet patch cable.

    Reply
    1. palmito

      I misunderstood and thought the ground noise was from the rj45’s pin 7, the common signal ground. The noise is coming from the shielding and the shielding is also connected to the common ground in shielded ethernet cables? Thanks.

      Reply
  8. Francis

    Great article!
    – Do you have tested (i.e. make measurements) with an unshielded (UTP) ethernet patch cable ?
    – Do you have a ref/link for this unshielded (UTP) ethernet patch cable ?

    Thanks

    F

    Reply
  9. Stef

    Is this a problem for the digi as well? And does it make a difference if one connects a DAC via optical or electrical output?

    Reply
    1. bgeneto

      No, I don’t think this ethernet noise problem is present in the digi version, please Daniel comment if I am wrong here because you don’t say if measurements you’ve made/published with the digi was with or without ethernet (I suppose it was not even in the presence of a RPi), you also forgot to mention the output used (optical or electrical). Maybe there is a subtle difference between optical and electrical outputs since there is a full galvanic isolated and therefore improved version of the digi for using the electrical output. Note also that UTP is the most common ethernet cable used worldwide and interesting, if I got it right, the unshielded cable (UTP) avoids the ground noise issue.

      Reply
      1. Daniel Post author

        No, this is not an issue with the Digi board. However depending on the design of the DAC is is still possible that some noise can be seen when using the electrical output.

        Reply
  10. Daniel Post author

    Dear Pascal,

    this is not planned. As the basic design hasn’t changed I expect the same behaviour.

    Regards, Daniel

    Reply
  11. Vincent

    Stumbled upon this article today while testing my new RPi 2 coupled with the Digi+ (with output transformer). First switched my no-name power supply with an Apple 10W. Then, still not satisfied, switched from ethernet to wifi. That did the trick: much darker background and more clarity as well. I’ll be testing a real-time kernel and linear PSU when I get the chance, but so far the sound quality is excellent! Thanks for the tip!

    Reply
  12. Pingback: Raspberry Pi add on DACs

    1. Vincent

      Yes I think so, but the biggest difference is caused by the power supply. The linear PSU I’m using now is really great. Still waiting for a stable version of the RT-kernel on the RPi 2, but I don’t expect major improvement anymore. The sound as it is right now is really great.

      Reply
        1. Vincent

          I’m using an Sbooster, which I had used before on my USB-S/PDIF converter, see squeeze-upgrade.com. I only needed to convert to micro-USB.

          Reply
  13. OMar

    You show the noise with the R-Pi off (wired) then again with the R-Pi off (wifi). Is it possible that once turned on, the actual noise of the wired version improve, because some otherwise floating connections become grounded and the results improve?

    Reply
  14. tribon

    Hello,
    Please update above article. A lot of people are linking this text and shows that Ethernet connection is a source of noise in raspberry Pi. While in comments we can see that properly done connection with UTP cable is not creating noise…
    I think it would be the best to add two test screens: one with UTP cable and second with WiFi on. Than rename first screen to clearly state FTP cable…

    Reply
    1. Daniel Post author

      You’re right. I have clearly stated now that this is a problem of the shielding.

      Reply
  15. Quy

    Hello, I prefer Ethernet as its more stable, I’m using USB DAC and I’m wondering if isolating red wire (positive wire) of the USB cable (to the DAC) would help?

    Thanks
    Q

    Reply

Leave a Reply