How to calculate voltage drop across a resistor?

I have a project where I have some LEDs being dimmed with PWM (using a TLC5947) and an amplifier playing music from an MP3 module (WT5001 I think is the part number), and I get noise from the PWM on the amplifier.

I had a similar problem in the past and a few solutions were offered:
http://forum.arduino.cc/index.php?PHPSESSID=jgjq3gtpp7sttahf5le3f4tgl0&topic=150336.30

It was suggested I add a capacitor for decoupling. I have done this. A 220uf capacitor only reduced the noise a bit. And a huge 4700uf capacitor I had laying around only did a slightly better job. So obviously I need something other than just a capacitor on those LED modules.

In the old thread it was suggested I use an inductor. I don't have one laying around, but I might try that.

Another suggestion though was to just use a resistor to get the current flowing around the capacitor. But DC42 said that that would only work if the voltage drop that would result would be acceptable.

The thing is, I don't know how to compute that voltage drop. I know it's a really simple thing, but I can't figure it out after looking at several tutorials.

My input to the TLC5947 is 5V. I'm not sure off the top of my head what the minimum voltage they can run on is, but it's probably not an issue. I do however know that the voltage needs to be higher than my LEDs require, so we should probably assume that we don't want less than say 3.5v.

I also know that I have 12 leds attached and they may draw up to 20ma each. So that's 240ma max current draw.

And then this is where I get lost.

P = E x I, and 5v is flowing into the resistor, so presumably P = 5v * 240ma, which is 1.2 watts. But how do I calculate the voltage drop from the resistor? No matter how I rearrange the terms I get 5V. And if I reduce the current as it would be when the leds are being dimmed the voltage actually goes up when I do my calculations based on the resistor I selected. It really doesn't make any sense to me.

The only thing I can think of to do differently is maybe I should be taking the LED voltage drop into account here. So 2.2v drop, leaving 3.8v the resistor has to dissipate (but not really because the TLC5947 is a constant current driver so the resistor doesn't need to dissipate anything to safely drive the led) which reduces the watts going through the resistor which is helpful since it doesn't need to be as large but... I'm still lost and have no idea what I'm doing. I also can't even assume that 2.2v drop for the LED because I have like 12 of them connected to this LED driver so who knows what the hell the voltage drop from the leds actually is.

Maybe I should just take the current I know the LEDs are going to draw and then use the resistance and calculate for voltage? There I get 4.8V for a 20ohm resistor and 240ma of current. That seems like a sane result. But if I up the ohms to 40 now I get 9.6v, which doesn't make sense. Well maybe it means with a 40ohm resistor there I need 9.6v in to get 240ma out? I guess that makes sense. So is the voltage drop in the first example then 0.2V? And so the power the resistor has to dissipate with 240ma going through the 20ohm resistance is .048W?

Maybe that's right but the way I arrived at it is really confusing. I'm not sure what the straightforward way to go at finding this voltage drop is. And I assume I need to know that to know what wattage resistor I need, and what the maximum ohms I can use is so as to minimize that wattage rating.

Isn't the PWM being done at a high frequency?
The part has a 4 MHz internal oscillator, 24 channels.
Can you put a scope on it and determine the noise frequency?

I don't own a scope and can't afford one at this time. I've just been listening to how the noise changes on the speaker when I try different things to see what works and what doesn't.

The PWM frequency according to DC42 is on the TLC5947 is around 1khz.

I think the PWM frequency of the TLC5947 should be around 1kHz (based on 4MHz nominal internal clock and 4096 clocks per PWM cycle).

Are you using shielded audio wires grounded at one end? Could be the wires are just acting like antennas picking up noise from the LED transmitter wires.

No, they're not grounded. At least, not at the end attached to the mp3 module. I don't know if the other end is grounded at the amp somehow.

Shield doesn't do much good if it is not grounded.

Is everything using a common ground?

Yes, it's all running off a 12v wall adapter.

To reduce the noise input you need to reduce the input impedance of the amplifier. A simple way is to put a resistor to ground on the input at the amplifier right at the amplifier, that is as cloce to the input pin as you can.
It worked for me with the very bad multiplexing noise from this project.

Its also vital that you don't share ground wires between LED PWM circuitry and the audio
circuitry - no current from the LEDs should flow along any audio ground or supply wire
or else its IR voltage drop will just be superimposed on the signal.

So what you must have is a star-ground arrangement - each separate piece of circuitry
brings its ground and power wires to a central place to join up. For the ground
the Arduino groundplane can be that common place (use different gnd pins for LED stuff
and audio stuff, no sharing wires).

(In fact the contact resistance of a wire going into a header socket can be upto an
ohm or so with oxidation, enough to cause the problem all by itself).

True but I had a star ground wiring in that project linked above and it didn't stop the pickup.

Grumpy_Mike:
To reduce the noise input you need to reduce the input impedance of the amplifier. A simple way is to put a resistor to ground on the input at the amplifier right at the amplifier, that is as cloce to the input pin as you can.
It worked for me with the very bad multiplexing noise from this project.
http://youtu.be/pL0pMAPkkVw

When you say the input to the amplifier, do you mean on the line in? And which side should this resistor be on? One wire on the line in seems to go to ground already, the other seems to go to a capacitor based on the readings I'm getting on my multimeter.

Also how does adding a resistor to ground reduce the input impedance?

And what size resistor would you suggest? I assume not one too small. 1K? 10K?

Btw in case you didn't read my other post where I was discussing this same project, I ended up frying the mp3 module, so I cannot perform any more tests at the moment with that, though I do have some other sound boards with leds that I can try this technique with.

I don't know how I fired the mp3 module. It seems like I put 12v into it somehow but I can't for the life of me figure out how. Fired the Arduino Micro I was using too. Using a spare Nano I had now.

The line in is normally a phono connector, ground on the outer connector, signal
on inner. So you connect between inner and outer.

When you add a resistor like this it is in parallel with the amplifier input circuitry,
and adding a resistor in parallel always decreases (the magnitude of) impedance.

(In the same way adding a resistor in series always increases it)

High impedance signals are more sensitive to capacitive pickup, since there is
a voltage divider formed between the circuit in question and the capacitive impedance
to the source of the pick-up. Shielding and lower the impedance, as well as moving
the source of interference further away should all help.

But what would a good value for this resistor be? My intuition tells me that in doing this I will be creating a voltage divider that reduces the input voltage. As the input voltage determines the volume of the output, I probably don't want to reduce it too much. (though if the amplifier has some gain it can overcome this) I have no idea what the resistance on the positive side is though. So I'm not sure how to calculate this voltage drop.

Your intuition is mixing up a seriese resistor with a parallel one. There is no potential divider.
Your source may not be able to deliver the full voltage into a low impedance but that does not matter the noise is attenuated more than the wanted signal so your signal to noise ratio improves. Start with a 2K resistor and go down.