Using TLC5940 to control many LEDs

Hey guys,
I have a big-ish project involving controlling ~250 all white LEDs. I need to be able to address them individually, turn them on and off, dim, make them flicker and so forth.
I figured I'd use a bunch of TLC5940 in series. But before I even dream of getting there I'm at a pretty annoying roadblock: I got an elegoo mega R3 board with ATmega 2560, I wired up a sparkfun TLC5940 breakout according to the "BasicUse" example of the TLC5940 library itself and uploaded the sketch to the board. All I got was all 16 LEDs just staying on, kind of flickering, whilst it was supposed to do the knight rider strobo thing.

I have now tried the exact same with 4/5 of these breakout boards to the same result and even purchased some barebone TLC5940NT to do the wiring as accurately as possible taking care of adding all the correct resistors and so forth.
Same result on all the breakouts and, if I remember well, I got nothing at all from the only NT I tested before I had to give myself a week of meditation away from this project.

This was my first wiring, as BasicUse.pde suggested:



GSCLK -> green wire -> pin 3 Arduino Mega
XLAT -> white wire -> pin 9 Arduino Mega
BLANK -> yellow wire -> pin 10 Arduino Mega
SIN -> brown wire -> pin 11 Arduino Mega
SCLK -> blue wire -> pin 13 Arduino Mega
VCC -> red wire -> 5V
GND -> black wire -> GND

After that someone on Discord suggested that this wiring was incorrect, and according to Arduino_Mega.h in the library the correct wiring is

/** VPRG (Mega pin 50) -> VPRG (TLC pin 27) */
/** XERR (Mega pin 10) -> XERR (TLC pin 16) */
/** SIN (Mega pin 51) -> SIN (TLC pin 26) */
/** SCLK (Mega pin 52) -> SCLK (TLC pin 25) */
/** MOSI (Mega pin 51) -> SIN (TLC pin 26) */
/** SCK (Mega pin 52) -> SCLK (TLC pin 25) */
// SS (Mega pin 53)
/** OC1A (Mega pin 11) -> XLAT (TLC pin 24) */
/** OC1B (Mega pin 12) -> BLANK (TLC pin 23) */
/** OC2B (Mega pin 9) -> GSCLK (TLC pin 18) */

So I've done that, but all that changed was that the 16 LEDs now light up in this pattern 1010101101011011, but nothing else happens: no animation, no flickering, nothing at all.

Please help! :sob:

These days, most people would use ws2812 LEDs. They are RGB, but you don't have to use any colour other than white if you don't want to.

Hello and thanks for your reply.
Unfortunately there are 3 major problems with WS2812:

  1. it's a mostly plastic SMD and I wouldn't wish soldering 250+ of those by hand on a ceiling panel to my worst enemy.
  2. if one of them fails every single one of them afterwards in the chain will be inoperable and I need to replace the single led in the middle of the panel to restore functionality. With the TLC5940 the failure of a single LED will have no impact on the others, so it can be left to later if I want. The TLC5940 can also be positioned in an easier to reach place that doesn't require me to disassemble a ceiling, in case one of those fails.
  3. they have no error signalling.

Up?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.