SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By TChap
#176303
Hello. I just got in the sparkfun breakout board for the TLC5940. I haven't connected it to the propeller yet but plan on it this weekend. I had someone tell me that is not familiar with the 5940 that I should look at the Neopixel concept. I need to connect 48 RGB leds, the preferred LED will be SMT on my own board layout. The 5940 allows daisy chaining chips as well as the Neopixel drivers IC wmxxxx and both allow independent LED color control. This is a pretty simple project to color code some buttons. I have code snips for the Propeller for both ideas. Does anyone with experience with each have an opinion on which path to take? I like the 5940 since it is 16 outputs on one IC, so I can drive 6 RGB led's on one IC. 8 IC's will drive the 48 buttons LED's. Not sure about the Neopixel, but the 5949 allows to adjust brightness by adjusting all values up or down.
By Mee_n_Mac
#176319
TChap wrote: I like the 5940 since it is 16 outputs on one IC, so I can drive 6 RGB led's on one IC. 8 IC's will drive the 48 buttons LED's. Not sure about the Neopixel, but the 5949 allows to adjust brightness by adjusting all values up or down.
16 channels will only drive 5.3333 RGB LEDs so 48 LEDs will require 9 ICs. So 1 big difference is cost. If your not buying strips of Neopixels, then it's perhaps a 2:1 disadvantage for the 5940. It's larger if you use strips. It's also more wiring to go the 5940 route. Two things in favor of the 5940 would be it's PWM depth (12 vs 8 bits) leading to more subtly different colors and potentially PWM speed. Neopixels run a PWM cycle at ~400 Hz. The PWM clock is potentially as high as 30 MHz giving a PWM cycle of ~7 kHz. That's useful when doing POV devices. Of course you need better than Arduino Uno HW to drive it at those speeds. The update rate (write new data to all 48 LEDs) is faster (25x) at the 30 MHz clock, and even at more commonly used data clock rates, so I'll grant the 5940 the win there.
5940 - 48 LEDs * 3 colors * 12 bits/color = 1728 bits ; @ 30 MHz -> ~60 usec. @ 4 MHz -> ~0.44 msec.
Neopixels - 48 LEDs * 3 colors * 8 bits/color = 1152 bits ; @ 800 kHz -> ~1.5 msec.
By TChap
#176325
Thanks for that write up. I tested the TLF5940 today with the propeller and it works great. But comparing the simplicity of the WS2812B and the cost, for my purposes the WS2812B is a better option.
By zeighty
#182537
Mee_n_Mac wrote:
TChap wrote: I like the 5940 since it is 16 outputs on one IC, so I can drive 6 RGB led's on one IC. 8 IC's will drive the 48 buttons LED's. Not sure about the Neopixel, but the 5949 allows to adjust brightness by adjusting all values up or down.
16 channels will only drive 5.3333 RGB LEDs so 48 LEDs will require 9 ICs. So 1 big difference is cost. If your not buying strips of Neopixels, then it's perhaps a 2:1 disadvantage for the 5940. It's larger if you use strips. It's also more wiring to go the 5940 route. Two things in favor of the 5940 would be it's PWM depth (12 vs 8 bits) leading to more subtly different colors and potentially PWM speed. Neopixels run a PWM cycle at ~400 Hz. The PWM clock is potentially as high as 30 MHz giving a PWM cycle of ~7 kHz. That's useful when doing POV devices. Of course you need better than Arduino Uno HW to drive it at those speeds. The update rate (write new data to all 48 LEDs) is faster (25x) at the 30 MHz clock, and even at more commonly used data clock rates, so I'll grant the 5940 the win there.
5940 - 48 LEDs * 3 colors * 12 bits/color = 1728 bits ; @ 30 MHz -> ~60 usec. @ 4 MHz -> ~0.44 msec.
Neopixels - 48 LEDs * 3 colors * 8 bits/color = 1152 bits ; @ 800 kHz -> ~1.5 msec.
I know this post is a bit old. But thought I would chime in anyway. Why would you not multiplex? I am using an Arduino for a very specific commercial project and have 4 5940s running 16 LEDs each. Use 3 ADCs for RGB. Code has been a challenge, but I have to keep private as this is a commercial project. Hard to get help when you cannot share your code.
It appears that the timing is the stickler for you, so I don't know if multiplexing would work for your implementation.
Hope you found an answer. Oh yea, I did try engineering WS2812s in, but there were some physical limits and though timing is not as critical for my project, I believe it may have been as the specifications change over the life of the project. I did not consider Neopixels as the cost was way too high.