So I am working on a low cost ham radio beacon using my Baofeng UV-5R radio because it is easy to use and portable. I built a simple PTT interface for a Raspberry Pi and wrote some python to transmit the information I want. However, there is one problem. I want the option to have to radio plugged in to its charger to be able to transmit for long periods of time without dying but when I plug the radio into the wall and use Raspberry Pi to transmit audio it produces a very loud hum over the radio signal and it is completely unusable. This does not happen when I plug a battery operated audio source (such as a phone) into the radio, only when I use a wall powered source such as the Pi or a computer. it also does no occur when the radio is using battery power and the Pi is plugged into the wall. It does happen when using a simple male to male aux cable and VOX PTT. I can't seem to find the problem however I suspect it to be an issue with common grounds or something of the like but I have no idea how to solve it if that is the case. Please help!