The TLC5940 is a 16 channel PWM unit with 12 bit duty cycle control (0 - 4095), 6 bit current limit control (0 - 63), and a daisy chainable serial interface. It is handy for expanding the number of PWM outputs available.
This skill defines how difficult the soldering is on a particular product. It might be a couple simple solder joints, or require special reflow tools.
Skill Level: Rookie - The number of pins increases, and you will have to determine polarity of components and some of the components might be a bit trickier or close together. You might need solder wick or flux.
See all skill levels
If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.
Skill Level: Rookie - You will need a better fundamental understand of what code is, and how it works. You will be using beginner-level software and development tools like Arduino. You will be dealing directly with code, but numerous examples and libraries are available. Sensors or shields will communicate with serial or TTL.
See all skill levels
If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.
Skill Level: Competent - You will be required to reference a datasheet or schematic to know how to use a component. Your knowledge of a datasheet will only require basic features like power requirements, pinouts, or communications type. Also, you may need a power supply that?s greater than 12V or more than 1A worth of current.
See all skill levels
We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.
Based on 2 ratings:
They shipped it out super fast and it arrived in only two business days. Also, they provided the best price I could find online from any source shipping it from inside the US!
It works as its supposed to but it's 4/5 because the pins are rather weak and if you're not careful they can break off easily.
did a sort of a beginner's approach type tutorial on this IC. Definitely not as good (or polished) as some of the written guides, but it could be supplementary: http://www.youtube.com/watch?v=FehBLNHMlfo
I wrote and published a free book that explains how to turn the datasheet and application notes for the TLC5940 into an unencumbered C library for use with an AVR microcontroller.
The library uses the CLKO pin of the AVR to drive the GSCLK pin of the TLC5940 at up to 20 MHz, which allows you to update the grayscale values at up to 4882.8125 Hz (or even higher if you operate the TLC5940 in 11, 10, 9, or 8-bit modes).
It also supports multiplexing common cathode (or common anode) RGB LEDs.
The book, source code, Makefiles, schematics, and example projects are available here: https://sites.google.com/site/artcfox/demystifying-the-tlc5940
Excellent resource, thanks!
I used your library to make a MIDI keyboard visualiser: http://mechinations.wordpress.com/2013/10/20/midi-keyboard-visualiser/
Thank you for posting this!! Very nice to have folks contributing to the community, I am currently de-mystifying the TLC5940 thanks to you. :)
Cheers,
Kris
I read your book with great interest, thank you for publishing it. Like everyone else who bites off more than they can chew, I'm trying to build an LED music display. I'm hoping to use common anode RGB LEDs and assume that I use the schematic "usart_mspim-no_border_multiple.pdf" and wire up each LED to consecutive outputs of the 5940 ie 28-R, 1-G and 2-B and so on. I also have a nice 12V 4A power supply and want to use 3 LEDs in parallel for each "line" is this too much for the 5940 and would I still set the current to 20mA or use 60mA. I have lots of N channel mosfets, could I use these to wire it up as per the common cathode schematic? Thank for helping a beginner.
I prefer the TLC 5952, it has an internal oscilator and 24 channels to boot.
Hi, just a tip: You can get this as free samples from Texas instruments, they will give you up to 5 of these, along with up to 5 of each of other 4 chips, each time!
no need to pay $6 for 1, even the shipping is free, and fast, for me it take 3 days, and I live in Mexico!
Thanks! I love getting 3x more than I need with the message "please do not attempt to provide payment."
I don't like how this chip cannot do PWM on its own. It doesn't have an oscillator, and when it counts to 0xFFF, it stops, shuts off outputs and needs to be reset via BLANK.
I got it working by using a TLC555 in 50% duty cycle configuration to provide GSCLK and capacitive coupling one of the outputs to BLANK to reset the counter. I used a 4.7 kohm pullup at the output, a 2.2 nF capacitor between the output and GSCLK, and a 100 kohm pulldown on GSCLK. I also added diodes to clip the signal at GSCLK to the power supply rails; those are probably unnecessary. It works reliably once started, but I'm not recommending this except as a temporary hack. I'm planning to use a microcontroller to generate the necessary signals.
I'm having trouble getting a sketch using the SparkFun_TLC5940 library to compile. Here's the error:
Arduino: 1.6.5 (Mac OS X), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"
In file included from /Users/NKH/Documents/Arduino/libraries/SparkFun_TLC5940/src/tlc_animations.h:30:0, from DisplayBoardTest.ino:2: /Users/NKH/Documents/Arduino/libraries/SparkFun_TLC5940/src/tlc_progmem_utils.h:32:27: error: variable or field 'tlc_setGSfromProgmem' declared void void tlc_setGSfromProgmem(prog_uint8_t *gsArray); ^ /Users/NKH/Documents/Arduino/libraries/SparkFun_TLC5940/src/tlc_progmem_utils.h:32:27: error: 'prog_uint8_t' was not declared in this scope /Users/NKH/Documents/Arduino/libraries/SparkFun_TLC5940/src/tlc_progmem_utils.h:32:41: error: 'gsArray' was not declared in this scope void tlc_setGSfromProgmem(prog_uint8_t *gsArray);
OK, this looks like a typedef got left out, so I added the line "typedef uint16_t prog_uint8_t;" to tlc_animations.h. Now I'm having no luck getting the library to recompile. Poking around on the internet, I found some suggestions to delete the .o file, but I can't find where that hides out.
Any ideas on the next step?
Is there a 12 bit pwm driver that's not a current sink?
From Arduino Site: This is a terrible gotcha that is not in the data sheet. Its so bad that I did not believe it until I verified it with TI support: If the chip does not have power, but the LED lines HAVE POWER, you WILL BLOW OUT OR DEGRADE THE CHIP!
I got 2 of these free from Texas Instruments samples, just found how good of a deal I got on them
Does anyone know if this is comparable to the A6276EA from Allegro Microsystems? My goal is to build a 8x8x8 led cube with an Uno. I guess I'm just wondering if this will do that. Do you have any docs or instructions from someone that's already tried it?
Thanks in advance, A fellow geek
I'm trying to comprehend the datasheeet, but there's on thing I can't figure out:
Does this IC have have a total max output current of 120mA, or is it 120mA per channel?
It is 120mA per channel with VCC > 3.6V and 60 mA per channel with VCC < 3.6 V. For larger currents, channels can be connected in parallel. There's also a power dissipation limit of 2456mW at TA < 25°C and less at higher temperatures.
You should check this out http://micromegacorp.com/umpwm1.html
8PWM in, 8PWM out!
RichardInVA: Is the serial protocol for this device proprietary? I'd like to use this with a PICAXE because I don't want to pot an Arduino, but I'm not sure the PICAXE would be able to generate the serial signal for it.
The protocol is fully documented in the datasheet.
Is the serial protocol for this device proprietary? I'd like to use this with a PICAXE because I don't want to pot an Arduino, but I'm not sure the PICAXE would be able to generate the serial signal for it.
The first micro project I built was 48ch led controller, used 3 of these and a Picaxe 28X1 so I know for fact that these work with Picaxe but I did need to uses a decade counter to generate all the necessary clocking signals because of the inability of the Picaxe to generate 2 different frequency of PWM.
Yay! I'm just getting started with physical computing stuff, and as such am doing a lot of LED-based projects. I have a few of these that I ordered from Mouser but their site assumes a lot of knowledge and is a bit intimidating (to me). I prefer to order from Sparkfun and Adafruit, so I'm glad to see these here!
Uh, how is ordering from Mouser or digi-key any harder than sparkfun? You just type in the part number, add it to your cart and check out... Just like here... I would say its nice to support sparkfun's other products by throwing a couple of these in my cart when ordering something else. That I can understand and use to justify the markup.
I don't think it's so much ordering the part as it is finding the part. Both Mouser and Digikey assume that you know the exact part you need and that you know the "industry" name of your part. Sparkfun assumes much less technical knowledge and is thus much more attractive for the hobbyist or someone who is still learning.
Awesome! Next step: Get the SMD version!
...please?
Great to see you carrying this sometimes-hard-to-get chip!
Why are these TLC5940NT chips hard to get, even sometimes? You can get some for free through TI's sampling program, and they're in abundance and substantially cheaper when buying them from the larger parts distributors like Mouser.
Agree with that. Free or $2 cheaper... But hey, people love to throw money away.
I admit it would be nice to see these at ~$5 but props to Sparkfun for carrying these and exposing peeps to them. Shipping costs are another factor so its not black n white as made out to be. Lastly, most people will only need one or two of these ICs I imagine.
These are a great IC, very simple to use with Arduino and can sink current from LEDs without each having their own resistor. More at http://wp.me/pQmjR-Ey
Yeah, but there is a problem with that. The more LEDs you turn on, the dimmer they will all be. Having all your LEDs connected with their own resistors means that the brightness will not be affected by the number of LEDs on at that moment.
Because of the current regulation, you don't need any external resistors. Each TLC5940 output has its own current regulation, so brightness won't depend on the number of LEDs that are on. The only things you need to consider are the per channel current limit and the per chip power dissipation limit.
You're right. I didn't realize that.