Go Down

Topic: I think I've got a ground loop messing up my audio. Help! (Read 4 times) previous topic - next topic

scswift

I had someone else suggest on another site that I put several small caps on the amp's input instead of the LED modules.  So I had my friend try a 220uF cap that he had on hand, which worked quite well, though not perfectly, and oddly it worked even when only the negative lead attached.

I was wondering what you would suggest as far as capacitor sizes and numbers if you wanted to filter the noise at the amp?   Filtering at the amp's power supply is vastly preferable in my setup to modifying all the LED modules.

scswift

So it turns out a ground loop was the problem after all. 

As soon as my friend plugged this thing in, all the buzzing went away:
http://www.amazon.com/gp/product/B002ZRQ3PW/ref=oh_details_o00_s01_i00?ie=UTF8&psc=1&tag=gbfans-20&camp=1789&creative=390957

All that is is a 1:1 transformer. 

I still have no idea why simply disconnecting the ground on the RCA cable didn't work if that works.

Btw, he'd also hooked up an iPod to the amp yesterday with the Mighty going but no RCA cable to it, and there was no noise.  That seems to confirm that the issue wasn't (purely) a voltage drop at the battery caused by the LED drivers.  It may be they are still injecting noise into the line of course but the amp is capable of filtering it without the ground loop there.  I don't know.

dc42

No, the problem wasn't a ground loop (although you did have one), it was noise on the ground line to the microcontroller (and hence on the output to the amplifier) caused by the LED switching current. Inserting the transformer between the output and the amplifier means that it is of little consequence if the amplifier and microcontroller grounds are at different potentials.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

scswift


No, the problem wasn't a ground loop (although you did have one), it was noise on the ground line to the microcontroller (and hence on the output to the amplifier) caused by the LED switching current. Inserting the transformer between the output and the amplifier means that it is of little consequence if the amplifier and microcontroller grounds are at different potentials.


I understand that the design of my LED modules could be better.  I don't disagree with you that the noise is originating from them.  And I'm sure your suggestion would help mitigate the issue.  But the boards have already been made. I would have had to modify 300 PCBs to solve the problem your way, and the design of the boards, with surface mount parts on one side, and the pads for my through hole pins for power and data on the other, would not have made it an easy task to stick an inductor on there.  Also my customers are getting impatient.  They'd rather buy a ground loop isolator than wait another week for me to fix the boards.

I do appreciate the suggestions.  And I will have to order a new batch of boards in a couple months if these things continue to sell.  So I may redesign the boards at that point to include your suggested changes.  (Note to self: Add a 10K pulldown to prevent them from lighting up for a moment when I apply power, as well.) 

But I'm not sure I agree with you that the problem is the LED modules.

While it's true they generate the noise I'm hearing, the real problem is that I'm hearing that noise.  The noise itself would not be an issue if I couldn't hear it.  The noise doesn't affect the function of the board in any other way that I can tell.

And the fact of the matter is, that even if I got the LED modules to be whisper quiet, I'd still have noise problems.  My board is designed to drive servos as well.  Those generate 10x as much noise as the LED modules do.

So what makes more sense?  To redesign my audio circuit to have ground loop breaking circuitry, so that it doesn't matter if the amplifier and microcontroller grounds are at different potentials, or to stick capacitors all over the board to try and remove every possible source of noise from whatever might be attached to the board?  One solution might require a single tiny op-amp.  The other might require several large capacitors which may not fit within the 2x2" footprint I have to work with.  I was barely able to fit everything on the board as it was.


Quote
Inserting the transformer between the output and the amplifier means that it is of little consequence if the amplifier and microcontroller grounds are at different potentials.


Unfortunately, I still don't have a good picture in my head of what is going on here.  I get the idea of amplifier and microcontroller being at different potentials.  You can be standing on the ground at sea level, or on a mountain, and your feet won't be at the same height.  0V at the amp may not be the same as 0V at the microcontroller.  But I don't get how that leads to noise on the amp.  And I don't get how breaking the ground loop solves the problem.  I would think that the amp would measure the voltage of the positive line on the RCA cable relative to the negative line on the RCA cable and use that to determine the output at the speakers.  Since those would be both originating at the Mighty it shouldn't matter if 5V and 0V there are at a higher potential than the 5V and 0V on the amp.  But it seems that the amp instead assumes the two grounds are the same, and just connects its ground to the RCA ground.  That seems like a bad assumption to make to me.  I made that assumption in my design because I didn't know any better.  I just looked at 20 different schematics showing how to add a line out in an audio circuit, and implemented something similar after simulating the circuit to make sure it functioned as I expected.

Anyway, I'm just glad the issue is resolved now.  Now I just gotta resolve that damn bootloader issue again.  The fix that I thought worked only worked with one particular SD card.  Since I have no idea how the hell I would add a diode to my circuit with the card slot being surface mount and the pins being on the front where the card is inserted, and I really don't want to modify 200 boards, I've decided to try a different bootloader.  Hopefully it won't have the same issues.   (It should be noted that even puling up that pin I shouldn't did not correct the issue with the new cards, leading me to believe there may be a bug in the previous bootloader.)

SirNickity

Quote
But it seems that the amp instead assumes the two grounds are the same, and just connects its ground to the RCA ground.  That seems like a bad assumption to make to me.

No, that's how it's done.  A common mantra around here is "tie ALL grounds together" because everything needs to know what +5v is in relation to (for example.)  Same goes for audio.  If you lift the ground of the RCA, you no longer have a circuit.  It's just a spurious input with no reference.

Now, in your case, the RCA shield and the PSU ground come from the same place -- your power supply.  So, it would in theory still work.  Also, in theory, you do have a ground loop between the amp and Mighty.  One path is from the RCA shield output on the Mighty to the amp input.  The other is from the Mighty to the PSU to the amp power input.  This is unavoidable, because if we assume the amp PSU ground is the same as the RCA shield ground, and don't tie them together at the amp, then what happens when you plug your amp in to a PSU, and feed audio from a battery-powered iPod instead of the Mighty?  There's no path from the iPod ground to the amp.

If all your grounds are firm and low-impedance, there will be little potential voltage difference between the audio and PSU grounds, so the loop "shouldn't" cause a problem.  What you're dealing with isn't necessarily a ground issue.  These things can be tricky.  I'm fighting a similar issue on a plate amp I built for a powered speaker with a microcontroller for inactivity power-off.  Very faint high-pitched "bzzzzzzzzzzzz".  Annoying.

Go Up