Interference from multiplexed LEDs to audio signal

Hi!

I'm making some LEDs move to the rythm of the music (soon to be published :) ). I basically take the audio signal from the computer (3.5mm cable) and read it over the analog in. I then activate some TLC5941 LED driver.

Apparently, the driver chips are causing interference with the audio signal, because if I crank up my amplifier, I can hear a high pitched noise as soon as the chip's PWM kicks in. Also, sometimes when it's quiet, one LED will go on, it will interfere with the audio line, creating more noise, lighting more LEDs, and so on.

Question: How do I isolate my audio signal from something like that? Is the interference coming from the Arduino pin itself, or is it EM waves in the air around the driver chips? Could I use some kind of decoupling cap? Wrap the cable in aluminium foil? Any ideas? As I said, right now the audio goes directly into the analog port, nothing inbetween. Loooking forward to some answers!

How do I isolate my audio signal from something like that?

First of all make sure you circuit is fully decoupled. http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

The you could try and isolate the arduino circuit from your audio circuit. This mainly involves not connecting the grounds together so the way into the arduino for the audio could be by using a small coupling transformer. Try and maximise the distance between the audio circuits and the arduino and LEDs. Try lowering the input impedance of the audio amplifier (resistor to ground) as this reduces pickup as well.

Thanks!

The you could try and isolate the arduino circuit from your audio circuit. This mainly involves not connecting the grounds together so the way into the arduino for the audio could be by using a small coupling transformer.

Could you maybe draw a little schematic or link me to some good page? I can't quite see how I would go about separating the grounds, and cannot visualize the transformer.

Try lowering the input impedance of the audio amplifier (resistor to ground) as this reduces pickup as well.

You mean, kind of a pulldown from the analog input to ground? What value would you recomment? Would that alter the signal my stereo is receiving? (I've split the signal coming from my computer so that it goes both into the arduino for visualization, as well as into the stereo for the sound)

Thanks!

and cannot visualize the transformer.

A transformer is just two coils wound together. You connect your audio input to one coil and the arduino analogue input and ground to the other. That way you don't have to connect the arduino's ground to the digital ground. You will need a series diode between the coil and the arduino to prevent any negative voltages getting in to the analogue input. This is a link to a 1:1 (turns ratio of one to one) transformer. http://uk.farnell.com/neutrik/nte1/transformer-audio-1-1/dp/724592

kind of a pulldown from the analog input to ground?

Yes, start with 10K or so. The lower it is the less it will pick up but also the more it will affect your audio signal level. Experiment and see what values give the best results.

EMI from the LED(s) being switched is definitely a likely culprit, because that's where a lot of current is being switched on and off. Especially if you have long unshielded wires connecting the LEDs and the TLC5491s to make good transmitting antennas.

As Mike has pointed out, decoupling is very important here. You should have both "bulk" (high capacitance, like a fat electrolytic) and "speed" (like a mono for its low ESR) to help keep the surges in current from turning into noise spikes on the power supply. And those capacitors need to be close to the driver chips, not just back at the Arduino. Again, long wires supplying power to the LED assemblies will exacerbate the problem.

It's even possible that the serial data going to the TLC5491s is being broadcast as noise.

You can help pinpoint the source by running the system with the LEDs disconnected: if you're still getting noise, it's almost certainly the serial data. If not, it's probably either EMI from the LED wires or inadequate decoupling.

Your audio connections should definitely be shielded. The longer the wires, the greater the odds that they're acting like antennas sucking noise into the system.

You should also "over-do" the power supply: make sure it's capable of supplying more current than you estimate the system is using. The closer it gets to its limits, the more likely it'll be noisy when the LED current spikes. This could become a much bigger problem if you're powering the audio amp and the LEDs from the same supply.

Ran