I am very new to electronics, to electronics.SE.com and this is my very first project, so bear with me if my question misses some key-information (in such case, just leave a comment and I will try to add the missing bits).

I have built a device that control about 500 LED's over 106 different channels. Substantially the design is:

  • 1 switched 24V 3A power supply
  • 1 voltage regulator that outputs 5V
  • 1 control board running an AVR ATmega168 (connected to the voltage regulator)
  • 106 LED strings (connected to the 24V power rail)
  • 7 TLC5940 (16 channels each) sink drivers for the LED strings (these sink the remaining of the 24V from the LED's, but their logic is powered from the 5V regulator).

Everything work-ish but I am experiencing heavy problems with noise that sometimes triggers an unexpected reset of my device.

Thanks to a friend that has a DSO, I have been able to investigate the matter and these are my findings...

The noise is on 5V power rail and it is quite big, the overall swing being 2.55V. The SPI channels are all relatively unaffected:

Noise shape and amplitude

The noise seems to be generated by the LED's, not by the SPI transmitting data (there is no obvious correlation between any of the SPI channels and the noise). In this video (sorry, couldn't find a way to embed it here) you can see that the number of LED's that are ON influence the amplitude of the noise, while their intensity (controlled via PWM) influences the length of the noise "burst" [more details on the video description on youtube].

The frequency of the noise is ~8MHz, which is a frequency I don't use (at least not explicitly), given that my controller board runs at 16MHz and my SPI at 250KHz.

noise frequency

While doing my experiments, I realised that the the DSO picked up the noise even when only the ground terminal of the probe was connected. I interpret this as a sign that the noise is not due to an instability of the 5V feed, but to an oscillating potential of the ground level. Am I right?

Being totally new to electronics and lacking formal knowledge in the field I tried a number of solutions "from the Internet", admittedly without being 100% they made complete sense in my scenario. Amongst others I tried:

  • to build a low-pass filter using a 1Kohm resistor and a 100nF capacitor and place it on the 5V power rail, but the noise did not changed much in amplitude.
  • to decouple the 5V rail with a variety of different capacitors including some tantalum ones [various ratings] (no visible effect)
  • to decouple the ground line (made the DSO go bananas)
  • to ground the LED's, the TLC board and the DSO to different parts of my circuitry, including as "far back" as possible (i.e. connecting them with separate wires to the ground port of the 24V PSU to avoid ground loops)... but also in this case I had no luck.

It might well be that I did the above in the wrong way (i.e. that the solution is one of the above, but that I implemented it wrong) so - if you feel the solution is one of the above, don't hesitate to tell it, maybe giving me some direction on how to implement it "right".

Final note: because of the physical size of my project, I performed all the tests using only one of my TLC boards that I carefully removed from the rig and used some individual test LED's powered by a 5V source. However less accurate tests on the full rig shows that the behaviour in the "real thing" is consistent with the test readings.

Thanks in advance for your time and support!


The culprit is not the LEDs themselves, they're harmless, but the TLC5940s, which switch at high frequency to control LED brightness through PWM. You can't filter the PWM outputs (you can, but then the brightness control doesn't work properly anymore), so that's out, but you can try to do something about decoupling power supplies. Not guaranteed to work, the fact that the scope's probe picks up the signal unconnected indicates that it's probably radiated, but it's worth trying.
Decouple the TLC5940s properly. They have to provide a lot of power, so that means 100\$\mu\$F, 1\$\mu\$F and 100nF all parallel on the power supply for each device, the smallest value closest to the pins.
Decouple your 5V power to the microcontroller properly: 100nF close to the pins.

  • 1
    \$\begingroup\$ Thank you for this answer. Some reactions: the controller board (AVR) should be decoupled properly, but the next time I am at my friend's will check with the scope there too. Will try your suggestion to decouple the TLC power input too. Yet I have been surprised by your remark "they have to provide a lot of power" as indeed their typical power drain is 16mA [they just sink the 24V]... did I misunderstand what you were trying to tell me? Will report back on the outcome of this but it might take a couple of weeks before I can get back to my friend's scope. For now: tnx for your quick reply! :) \$\endgroup\$ – mac Jul 10 '11 at 15:51
  • 3
    \$\begingroup\$ @mac - about the TLC's power: my bad, I must have misinterpreted the datasheet and thought it sourced the LEDs current. Anyway, PWM controlling 500 LEDs is heavy on the power supply (the 24V) So it's actually this which needs to be decoupled well. Sorry for the confusion. \$\endgroup\$ – stevenvh Jul 10 '11 at 16:00
  • \$\begingroup\$ Ok, now it's clear. I still don't understand though (any pointer to some page on the intertubes?) why decoupling the LED feed (24V) will reduce the noise on the TLC feed (5V). Given that the 5V comes from a switched regulation of the 24V, I would have expected that with 19V of headroom, the 5V would have been guaranteed to be "stable" even with considerable swings in the 24V rail... or did I misunderstood how the decoupling should help the chip? \$\endgroup\$ – mac Jul 11 '11 at 9:28
  • 3
    \$\begingroup\$ @mac - Simon told about the long cable between 24V PS and LEDs. Given that the LEDs are switched at high frequency you built a beautiful antenna to transmit this high frequency and that's probably what the 5V PS picked up, so radiated, not conducted. But even radiated EMI can be suppressed with decoupling capacitors, except in cases where you can't decouple, like inside analog ICs, for instance. \$\endgroup\$ – stevenvh Jul 11 '11 at 9:51
  • \$\begingroup\$ Thank you for this. Now I begin to understand the issue and I realise decoupling each string individually is going to be a hell of a job. :( I will do it of course if this is the only way to rescue my project, but I was wondering... Given that I have 106 active channels but only 7 TLC boards, is there a way to prevent the boards to "pick up" the signal instead of preventing the strings to "broadcast" it? I'm asking because it's 85% less work to modify the boards than the strings... Again: many thanks for all the time and expertise you are dedicating to this answer! :) \$\endgroup\$ – mac Jul 11 '11 at 11:20

Are you really using a 24 V power supply with the TLC5940, when the first page of the TLC5940 datasheet clearly states the absolute maximum voltage on the output pins is rated at +18 V?

2.55 Vpp noise on your 5 V power rail? That's so bad that it makes me suspect that perhaps it's not real -- perhaps your 5 V power rail is fine, but something is producing magnetic fields so strong that the wire from your 'scope probe to your 'scope, acting like an antenna, is picking up 2.55 Vpp of noise.

If I were you, my next steps would be:

  1. Use a power supply less than the "17 V MAX Vo" mentioned on page 3 of the TLC5940 datasheet -- 12 VDC and 15 VDC power supplies are pretty common.
  2. try reducing magnetic noise by rearranging wires
  3. add more filtering to the 5V regulator
  4. carefully read and try to apply the Avoiding Noise tips.

magnetic noise

Your high-current loop runs from the +12 VDC power supply, to one end of the LED chains, through the LED chain, to the TLC input pins, out the TLC ground pins, back to the GND connector of the power supply, and out the +12 VDC connector again. The magnetic field generated by this loop is the area of this loop (which you can control by arranging wires differently) multiplied by the current of this loop (which you have little control over).

Try to minimize the area of this loop. Consider breaking this loop into 2 parts:

The low frequency loop: a pair of conductors, in a cable running from the power supply, to a big capacitor near the TLC chip, more or less directly connecting that capacitor to the +12 VDC and GND connectors on the power supply. The GND of the TLC chip also connected to one end of that capacitor. (perhaps a big 470 uF cap in parallel with a 10 uF ceramic cap).

The high frequency loop: a twisted pair of conductors, in a cable that runs from the TLC chip to the LED chain. Connect the TLC chip output to a small resistor (perhaps 10 Ohm?), and connect the other end of that resistor to one conductor of the twisted pair. Connect the other conductor of the pair the +12 VDC side of the big capacitor near the TLC chip.

As Rocket Surgeon surgeon pointed out, a low-pass filter might help:

  • RC low-pass filter: a very small capacitor from the cable side of that small resistor to GND might help, but a too-big capacitor there will mess up the PWM modulation
  • ferrite low-pass filter: A ferrite choke around the whole cable, or 2 ferrite beads, one around each conductor of the twisted pair, or both, might help.

Since it may seem that the TLC doesn't need to be connected to +12 VDC, it's all to easy to wire things in a way that produces the worst possible loop: A discrete "+12 VDC wire" from the 12 VDC power supply to the top of the LED chain, with enough room for a man to stand between that wire and the return path (the return path through the LED chain, then from the bottom of the LED chain to the TLC, and then from the TLC's ground pin back to the power supply), with over a square meter of loop area, producing lots of magnetic noise.

(perhaps a diagram here would make this clearer ...)

regulator filtering

Is the power supply really capable of handling this much current? Is maybe the long cables between the power supply and the rest of the system not capable of supporting the fast surge pulses?

Is maybe large swings on the +12 VDC line perhaps being coupled through the 5V regulator because of insufficient CMRR, or perhaps even the +12 VDC line being pulled so low that the the 5V regulator "drops out" low enough to reset your other devices?

I would go for a quick test first: drive your +5V regulator from a second power supply (say, a +10 V power supply) completely independent from the +12 V power supply driving your LEDs, except for the GND connecting the power supplies.

If a second power supply seems to fix the problem, perhaps more regulator filtering would allow the system to run off a single power supply: perhaps you only need to add a small resistor and diode in the path from +12 VDC to the regulator's Vin pin. Perhaps also add more or bigger capacitors from the regulator's Vin pin to GND.

best decoupling caps

If you know exactly what the noise frequencies are, the best decoupling caps to suppress that are the caps with the lowest impedance at those frequencies. (The actual impedance of the physical capacitors at those frequencies, not the theoretical impedance calculated by 1/jwC). You use an "impedance vs frequency chart" that looks something like this:

example impedance vs frequency chart

(from Tamara Schmitz and Mike Wong. "Choosing and Using Bypass Capacitors". )

Such charts always show that, at very low frequencies, big capacitance values are best; at very high frequencies, physically small packages are best.

A real impedance-vs-frequency chart is on page 61 of the Murata Chip Monolithic Ceramic Capacitors catalog.


Your noise is not random, and looks like ringing.

  • Effectively the circuit is a high frequincy pulse source with sharp rise/fall loaded to inductive cable with capacitance of closed LEDs on the end.

  • The cable has inductance in nanohenry, microhenry range

  • Capacitance is about few pF per LED

So the suggestion, answer, can be to add Low-Pass filter between PWM output and load.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.