Help with curing the last little bit of noise

I've been working on a project for a little over a year now, and I am very very close to finishing; however, I can't seem to get rid of the last source of noise on my ADC lines.

Basically, the project is a pressure sensitive RGB monome built off an Arduino Mega (Using the TLC5940 ). It all works fine, except random brightness settings seem to introduce noise into the ADC lines when I turn on all the LEDs. Its different for every color, and not necessarily the brightest settings either. I have PDFs of the Schematics and PCBs for the button board and Shield. I know this is not a lot to work with, so please let me know what specific information would be helpful.

The biggest help so far has been adding a 1000uF across the power lines on the button board to smooth out the USB power. I've tried to add more caps, but it isn't really making a difference. I also added 680p filter caps at the ADC inputs to try and smooth things out as well.

Button pad
http://flipmu.noisepages.com/files/2011/04/ChronomeV2.pdf.zip

Mega Shield
http://flipmu.noisepages.com/files/2011/04/Chronome-Shield.pdf

Source code

Nice concept and well implemented.
The noise is coming from the LED PWM lines. There are two things you can do:-

  1. Small ceramic capacitors in the order order of 10nF on as much of the supply lines as you can get at.
  2. Even smaller surface mount ceramic capacitors on the LED cathodes, in the order of 100pF, at least one per column at the far end of the runs.
    I found in making my Hexome that there was some oscillations on the LED lines and this cured it. Get a scope on the lines and look for them.

Lines.jpg

Thanks for the help Mike,

I had a few questions about the caps

  1. A friend suggested adding more caps to the power lines (I had added the 1000uF Electrolytic already, which really seemed to smooth the USB power), and so I tried adding 330uF as well but it didn't really make a difference. Is there a difference between using the electrolytic caps and ceramic ones for power line filtering?
  2. My RGB LEDs are the sparkfun common Anode ones. If I'm understanding correctly, I should place three small 100pF ceramic caps on the cathodes of the last LED on each row, and the caps should go from the cathodes to.... the power rail, or could I just hook it up to the anode?

so I tried adding 330uF as well but it didn't really make a difference.

With 1000uF already on the line I wouldn't expect it to.

Is there a difference between using the electrolytic caps and ceramic ones for power line filtering?

Yes ceramic capacitors (even small ones) reduce the high frequency stuff that a large electrolytic can't touch because it has too much inductance. It is not a matter of filtering but decoupling the supply, that is removing noise put on it by the switching of the chips. The TLC5940 runs at high frequency so generates high frequency noise. Ceramic caps (10nF to 100nF) reduce that noise because they have a very low inductance.

and the caps should go from the cathodes to.

Ground

Hi Mike,

i gave your suggestions a try, but no luck. The bizarre thing is that the noise seems to pop up at random greyscale values? I would assume the noise would get worse in one direction (LEDs brighter or dimmer), but instead it seems to fix on certain "nodes" within the value range, i.e. 540, 1010, 2250, 3800, etc. I can't discern any pattern that makes sense yet... maybe its a firmware interrupt timing thing? I don't know, but I'm very confused by all of this.

Update

It looks like I fixed the noise. Turns out that when all 64 RGB LEDs turn the same color on, the chips compensate for the inrush of current by offsetting each pin 20nsecs; however, there is no compensation on the end of the greyscale cycle as this would be impossible to implement on the chip (since each pin is free to be its own duration). I added a cascading manual delay for each row (35 greyscale clock ticks), that is pretty invisible to the eye, but enough to smooth out the out rush of current. The whole thing is stable now, and aside form cleaning up the code, is good to go.