Leonardo Power Issue?

Not quite sure if this is the right forum, but I have a problem with a Leonardo. Could be my project, but I think it is an oddity with the Leon I don’t understand.

The Leonardo is connected to an LM567 based Tone Detector (TD) circuit as shown in the attached overview. The laptop generates tones, which the TD detects and raises a signal to the Leon.

The problem is that it doesn’t work if the USB cable is attached. If the Leon is externally powered, it works fine. If the USB cable and the external PSU are connected, or it is just powered by USB, it doesn’t.

I’m guessing it is some kind of interaction between the grounds in the USB and audio cables, but as I say, I’m guessing, and if it is that, I don’t know how to fix it.

All suggestions very welcome!

Cheers

Tim

Leon Problem.jpg