Electronic – Noise canceling while recording from mobile on PC

audionoise

I have a setup in which I have to control mobile Android device from the PC and record the outgoing sounds of it.
The control is done by a USB cable. For audio recording I use a headphones which I cutted off and have soldered a 3.5 mm plug instead.
Each cable functions great by itself – when I connect the audio cable without the USB cable and operate the device and the recording manually, I get clean audio. The problems start when connecting both cables together to the PC – the sound is very noisy and not useable. The strangest thing is that the noise is not consistent – I can get an hour or two of noise free recording, and then it starts.
I've soldered another wire to the audio's plug ground pin and connected it to the PC's schasis, but it doesn't make any difference.
A friend that had a similar problem in the past suggested to use 2 PCs – one for controlling the device and the other for audio recording, but I cannot do it.
I've thought of applying some signal proccesing method to try to eliminate the noise, like recording short time of noise and then use it as a reference, but it looks like an overkill to me.
Is there any simple solution?

Best Answer

I think what you're hearing is a ground loop. An isolation transformer should fix the problem.

Here's one on amazon.

audio isolation transformer