I'm a total electronics noob- I've done a project where I put a Raspberry Pi into an old 80's boombox to offer streaming content. I used a cheap LM2596 buck step down converter to deliver the 5v needed for the Pi. I used this model because I plan to run the unit off batteries part of the time and don't want the inefficiency of a linear converter like a LM7805.
I have my wiring set up just like this (borrowed from another thread)
I'm having a big problem with noise in this system. There is a loud constant buzz (measured 240hz) and I'm also hearing a lot of noise from the computer activity (screechings, etc that time with wi-fi & disk read activity). This all goes away as soon as I remove the ground connection from the LM2596. I tested by using separate ac-dc power supplies for the boom box and the computer and all problems are eliminated. Another point of interest is that bypassing the built in linear PS, and using a 12v wall-wart, greatly reduces the volume of the loud buzz, however the computer noise is still present.
I've come across a couple of suggested remedies-
1) In the thread linked to above it is suggested to add a differential amplifier between the unbalanced audio connection from the Pi to the power amp. This seems to have worked for the OP. With my lack of knowledge in EE, I don't really understand what is going on here or what parts I'll need to build this.
2) Someone recommended I adjust my LM2596 to put out 7.5v and then run that to a LM7805 to minimize efficiency loses while reducing switching noise. I'm just not sure I'm experiencing switching noise so I don't know that this will remedy my problem
3) Use separate power supplies for the Pi and the amp. This is easy enough when connected to AC but much more complicated when running from batteries...I'm open to suggestions.
4) Use audio transformers between Pi and amp. Apparently I will be sacrificing a bit of fidelity and it's rather an expensive option so it would be a last resort.
Any and all ideas welcomed. I'd like to get this device up and running! Thanks