SparkFun LED Driver Breakout - TLC5940 (16 Channel)

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. This breakout board is a good way to take full advantage of this useful IC. All 16 PWM channels are broken out to standard 0.1" headers, which run alongside convenient voltage and ground rails. Also, because the TLC5940 can be daisy-chained, the breakout is designed to support that feature. On the left-hand side of the board all serial inputs are broken out to 0.1" headers and likewise with output on the right-hand side.

Use this board to increase the number of PWM pins available to your microcontroller for applications such as Monocolor, Multicolor or Full-Color LED Displays, LED Signboards, Display Backlighting, Servo control, or any other project where a large number of PWM drivers are necessary.

**Note: **While each 3-pin PWM header is 0.1" spaced, the space between each header is slightly larger in order to accommodate servo connections. In order to make this board suitable for use with servos, 2.2k pull-up resistors have been included on each output as well. Finally, the 2.2k resistor on the Iref pin sets the output current to 17.8mA but a parallel through-hole connection is provided for an additional resistor to increase the current if necessary. To determine the resistor value you need for a given output check the equations provided on the schematic.

SparkFun LED Driver Breakout - TLC5940 (16 Channel) Product Help and Resources

Interactive Hanging LED Array

April 10, 2014

Learn how we converted 72 lightbulbs into an interactive LED array for our conference room.

Core Skill: Soldering

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.

2 Soldering

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


Core Skill: Electrical Prototyping

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.

2 Electrical Prototyping

Skill Level: Rookie - You may be required to know a bit more about the component, such as orientation, or how to hook it up, in addition to power requirements. You will need to understand polarized components.
See all skill levels


Comments

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Member #1896627 / about 7 months ago / 1

    Unforunately the sparkfun tlc5940 library does not support ESP32 boards. Is there any support planned for ESP32? Would be really helpful when using ESP32s.

    Does anybody know if there is a library that enables the sparkfun TLC5940 pwm board with an ESP32?

  • Member #263600 / about a year ago / 1

    Can someone help me determine the resistor needed for 100mA? I cannot find it on the schematic like the description says. "Finally, the 2.2k resistor on the Iref pin sets the output current to 17.8mA but a parallel through-hole connection is provided for an additional resistor to increase the current if necessary. To determine the resistor value you need for a given output check the equations provided on the schematic."

  • Member #77306 / about 9 years ago / 1

    I have a 12 v common anode led that I have set up with the basic use example. I have noticed that while the blue line goes completely out, the red and green lines do not. This happens even on a line that is successfully sinking the blue led.

    I do need all three to be able to turn off, but not sure what I'm doing wrong. Any ideas?

  • Member #768055 / about 9 years ago / 1

    Hello, does anyone know which voltage regulator is used on the board or which input voltages it accepts? Just fund the information that it can supply a 150mA and that it is a "standard" LDO. Thanks for all help!

    • Member #77306 / about 9 years ago / 1

      The board only will take 6v max for power. But it can sink up to 17 volts,.

  • Member #749093 / about 9 years ago / 1

    Hello, I purchased a couple of these breakout boards and downloaded the SparkFun TLC5940 lib. However, when including <Tlc5940.h> header it also includes pinouts/chip_includes.h which then yields a compiile error for avr/io.h file not found. This is likely due to the fact I am compiling for the Intel Edison board. Is there any help you can give to get me started?

    Also, I hooked up the 5vdc/grnd but do not see any led turned lit from the board, is this expected?

  • Member #405641 / about 12 years ago * / 2

    Can I use one of these with a raspberry pi to control an electronic speed controller, ESC, for outrunner brushless motors? Sorry I don't have a lot of experience with electronics but it would seem that I can connect this to a raspberry pi and use it to generate 4 separate pwm signals for a quadcopter?? The ESCs take a hybrid PWM signal where the pulse width defines the throttle. 1ms = 0 throttle and 2ms = full throttle.

  • Auzal / about 12 years ago / 2

    Hi!

    When using this breakout and running the "sweep" example included in the TLC library, my servos only sweep 90 degrees (despite the fact that the code should sweep them 180 degrees).

    Looking at the code and video on the Bildr tutoria, I noticed that the same thing happens. Although the code cycles through the full 180 degrees, the servos in the video only sweep 90 degrees.

    Any ideas on why this may be and how to fix it?

    Thanks!

    • gdgt / about 12 years ago / 1

      Okay I emailed the guy who wrote the library and this is what he said.

      "I think it's probably the pulse width. It's easy to adjust: the default is 1ms to 2ms. Try different values for SERVO_MIN_WIDTH/SERVO_MAX_WIDTH. The defaults are 204 and 410.

      Here's how to change them for a sketch:

      define SERVO_MIN_WIDTH 204

      define SERVO_MAX_WIDTH 500

      include

      void setup() { ..."

      I changed the values of the two variables by editing the file tlc_servos.h instead of in the arduino sketch and I was able to get full range of motion. This is what I changed the values to:

      define SERVO_MIN_WIDTH 93

      define SERVO_MAX_WIDTH 439

      Its not perfect but does go from 0 to 180 degrees now. However 90 degrees looks more like 100-110 to me so I'll try playing around with it a little more later.

      Hope this helps!

    • gdgt / about 12 years ago / 1

      Yeah I just realized mine i doing that too and came here to ask. Any information would be greatly appreciated.

      • Kamiquasi / about 12 years ago / 1

        Are they 180 degree servos? The library seems to assume that they are (see tlc_servos.h, SERVO_MAX_ANGLE). If not, simply doubling that value might get you the desired behavior. If they are, then there's probably something wrong deeper down into the code (timing of pulses, perhaps), but doubling that value might still do the job.

        • gdgt / about 12 years ago / 1

          The servos I'm using are definitely 180 degrees and turn a half turn when using the arduino servo library. I played around with SERVO_MIN_WIDTH and SERVO_MAX_WIDTH a little but really don't have the knowledge to modify the library... I'll try again tomorrow and post if I make any progress.

          One thing I did notice was that even when setting a servo to 0 it doesn't go to the actual 0 position, so I dont think its a matter of multiplying by two (2*0 is still 0).

  • Member #248805 / about 12 years ago / 2

    I'm driving 12V strings of LEDs in series, about 100mA/PWM pin. Can I apply +12V to VCD, or do I have to use with MOSFETS?

  • Is it possible to drive mosfets with this board to control strings of 12v RGB LED's?

    • Bruce The Hoon / about 13 years ago / 2

      You can parallel the outputs as shown here:
      http://focus.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=slva253
      Or you can use mosfets as shown here:
      http://focus.tij.co.jp/jp/general/docs/lit/getliterature.tsp?literatureNumber=slva280&fileType=pdf

    • ClayBratt / about 13 years ago / 1

      I just use a mosfet as a low side switch and it seemed to work fine, it inverts the logic but you can deal with that however you want. Please correct me if Im wrong anyone.

  • Member #293701 / about 9 years ago / 1

    Hi!

    I've designed a board with 6 daisy-chained TLC5940 and 5 of them are working perfectly, but the second chip in the chain does not. When i connect the power supply the leds connected to the second one lights up (not happening for any of the leds connected to the other chips) and when i start sending data to control them the second chip's leds are turned off.

    I find this somewhat strange since all the TLC5940's are connected the same way, and there are 4 tlc5940's connected after the faulty one in the daisy chain so the serial so the SOUT is obviously working. Also the strange error mode of having them turn on when powered but then turn off when i ask them to actually do something confuses me.

    Any ideas? :) Is there any known mistake that might cause this kind of error mode?

  • rxcited / about 9 years ago * / 1

    I am a noob with a little arduino and a little pwm exprience. I wish to drive some RGB LEDs which have a common cathode. In looking at the basic use example for this breakout, it says to connect the anode to +5 and the cathode to the pwm outputs. I cannot do this with a common cathode LED, so will it work with the common cathode connected to the ground rail and then connecting the R, G, and B leads to the pwm outputs? I hope so! My plan is to hook up 5 of these using the first 15 channels to control the color and brightness of each independently. Am I on the right track?

    • rxcited / about 9 years ago / 2

      Guess this is too old and nobody is reading... I did a little more digging and determined that the chip is a current sink on the pwm out pins. It really only supports direct and simple operation with common anode RGB LEDs. So if you're trying to use this with RGB LEDs, do yourself a favor and go CA instead of CC!

  • Member #489404 / about 10 years ago / 1

    I'm assuming if I want to drive LEDs there is no easy way to get the pull-up resistors off the output lines?

  • Member #339043 / about 10 years ago / 1

    I think there is a small error in the schematics. The connections for the JP2 connector are different that for all the other connectors. If the board layout (I didn't check) is as the schematics indicate there is a short between VCC and the OUT4.

  • Member #463191 / about 11 years ago / 1

    Hi Can I use this board to control meanwell LDD drivers? I have too many to control just using the arduino by itself

  • Member #441853 / about 12 years ago / 1

    Could this be used to control steppers? Very new to electronics, incase my question didn't give that away already. I am trying to control 12 steppers without having to go the 12 or 6 drivers direction. If anyone feels like pointing me in the right direction that would be greatly appreciated! Email me if you'd like... holychachi at gmal dot com

    • Unless you are using extremely small steppers, this wouldn't be a good option for driving multiple steppers. This board can only supply a max of 120 mA, which is going to be well below what most stepper motors will draw. You could use something like the Quadstepper Motor Driver board, which can drive up to 4 motors. You could hook a few of these up to a single microcontroller.

  • Member #440993 / about 12 years ago / 1

    good

  • Member #393514 / about 12 years ago * / 1

    Ola

    I bought this interface. But I'm having trouble getting control servo individually.

    example: all in 0 1 goes to port 180, while at the same time the gate 7 goes to 90. When port 1 and port 7 return to the 0 º to 180 º too vain

    Can someone give me a hint.

    tks, for all.

    =====

    I have solution it is: http://4933journal.blogspot.com.br/2012/03/servo-testing-on-tlc5940-arduino.html

    I having error logic, it simple solution. :D

  • elementall / about 12 years ago / 1

    Hi I Have a Question.

    I want to drive 9 servo's with this breakout board.

    I provide the power external from a different power source.

    Do I have to do something to prevent the chip from burning out?

    and how does it work with teh arduino library to control more TLC breakoutboard daisy chained together?

    Thanks!

    • olivthill / about 11 years ago / 1

      I am asking myself the same questions. It would be great if somebody could answer them.

      Now, I am using a Pololu Mini Maestro. But I would consider using that Sparkfun breakout board instead if I'd know how to connect an external source of power that might deliver from 0 to 5 amps to a bunch of hungry servos, without burning the TLC5940.

  • Meff / about 12 years ago / 1

    Can you give an advise, please: I’ll use TLC5940 with mbed to drive 16x SSR relays. Can I connect SSR directly to my TLC5940' PWM-out? As I understand, just using mbed’s TLC5940-library I can limit a current by 20mA, and set voltage to 1,2V as shown in SSR’s DataSheet (S202S02F). Should I use driver circuit (with a transistor, a current limiting resistor, ...), or I can straightly connect PWM-out to the + of the SSR?

    Thanks in advance!

  • Member #368440 / about 12 years ago / 1

    Has anyone tried to use this with the IOIO? Im interested in getting a basic sample hookup with sample java code if anyone is up for the challenge. I need to drive 12 servos.

  • SynopticLabs / about 12 years ago / 1

    Ugh, as someone else mentioned, the 16 PWM headers are at a weird spacing (appears to be 2.625mm) making it impossible to connectorize multiple channels together. Buyer beware.

    • MikeGrusin / about 12 years ago / 2

      Sorry the layout isn't working for your application, the board is optimized for individual 3x0.1 connectors such as used for servos. There is a paragraph noting this in the description.

  • Member #141782 / about 12 years ago / 1

    Hey, does anyone have the Fritzing Library for this Breakout? Looking for TLC5940 Breakout just found the PWN shield version. Tnks!

  • Member #142301 / about 12 years ago / 1

    Recently bought a few of these and the quality control was terrible. The soldering on the boards was very dry and i think some of the joints were intermittent. I had a look through a microscope and it was most noticeable on the TLC5940 and the resistors. It must have been a bad batch. JH

  • Member #194484 / about 13 years ago / 1

    How do I "detach servo" so the servo is not always on, thanks

  • megaionstorm / about 13 years ago / 1

    There is no breakout board with the tlc5947 ?!?!? Ooops !!!

  • Member #34462 / about 13 years ago / 1

    Hi All,

    Any one know what the upper limit of the number of TLC5940 that can be daisy chained with this breakout board? I'm looking for hooking up at least 12 of them, if this is possible. Also would their need to be some power considerations for powering all those breakout boards. IN my case, i just want to use them to send PWM to some constant current circuits for high current leds. Thanks for any help with this.

    Steve

  • Eric Falsken / about 13 years ago / 1

    It appears that the breakout holes are not 0.100" apart. Does anyone know how far apart they are and WHY? I'd love to source a header for it and I just found out that the one I ordered doesn't fit.

    • JerZ / about 12 years ago / 1

      The spacing is to accommodate servo connectors. The headers should be 16 pieces of 3-pin, and everything should work out nicely. It really is a great breakout board IMO.

      • Eric Falsken / about 12 years ago / 1

        I ended up doing that with 16 pieces of 3-pin, but it's super-ugly.

    • Eric Falsken / about 13 years ago / 1

      Funny enough, the rows are 0.1" apart. But the columns are still some odd length. This is going to be ugly if I want this board to be reusable. I highly suggest anyone interested in this breakout to get themselves the TLC5940 DIP instead. Much easier to work with.

  • Lasrin / about 13 years ago / 1

    A variation of this board configured to handle RGB's with mosfets on board, and without the pull up resistors would sell. There are a lot of people that are doing DIY lighting, and it would address that demand.

  • lael / about 13 years ago / 1

    Is that a surface mount 5v voltage regulator on the board?

  • SlyVixsky / about 13 years ago / 1

    based ont he eagle files, the vcc and ground lines are the bottom two of the three. last i checked most servos and other pwm devices had the pwm signal on the middle pin, so what are the benefits of this board over designing your own?

    • olivthill / about 11 years ago / 1

      On most servos, the pwm signal is not on the middle pin. It is the VC which is on the middle pin. Fortunately, the design of the breakout board is correct regarding this issue.

  • Aditya / about 13 years ago / 1

    So I might be missing something, but I'm looking at the schematic and it looks like OUT4 is shorted to VCC. I guess Eagle thought you wanted to make a junction where you cross VCC over the OUT line.
    Just a heads up.

    • jimblom / about 13 years ago / 1

      Huh...weird. That little net junction node is supposed to be connecting OUT4 to the pull-up resistor.
      All is fine on the PCB, though. It's NOT actually connected on to VCC, and IS connected to the resistor. Eagle files verify.

      • Aditya / about 13 years ago / 1

        Sorry, was just checking out schematic and noticed. Didn't mean to make false accusations :P

  • IanM / about 13 years ago / 1

    I'm very stoked about this. Thanks!

  • nisep / about 13 years ago / 1

    What is the point of this breakout when there is a DIP package of the same IC available?

    • Mars Saxman / about 13 years ago / 1

      The DIP version of the TLC5940 can be a little difficult to source. I tried to order a dozen of them for a project last year, and it took Digikey so long to get them in stock that I ended up cancelling the order and picking them up in ones and twos on eBay.

      • BB / about 13 years ago / 1

        Digikey is hardly the only source for chips, and is actually my second choice to Mouser.com. In fact you can get the PDIP-28 chips at mouser here (1200+ in stock).

      • Bruce The Hoon / about 13 years ago / 1

        The trick is to go to TI.com and search for it there. They have a distributor search that you can use. For instance: http://avnetexpress.avnet.com/store/em/EMController?langId=-1&storeId=500201&catalogId=500201&action=products&N=0&mfr=TIS&hrf=http://focus.ti.com/general/docs/usercart.tsp&term=TLC5940NT
        almost 200 in stock. $2.21 :)

    • JoshFranz / about 13 years ago / 1

      I agree. Unless I'm missing some obvious advantage, this is actually more limiting than the DIP package (unless you are unsure as to how to use it, in which case you should learn :)).

      • Bruce The Hoon / about 13 years ago / 1

        I think the obvious advantage here is that, for nearly the first time, Sparkfun has decided that we like mounting things. The mounting holes mean I could picture actually DEPLOYING a sparkfun breakout board for the first time!
        (I just created a complete arduino board with a TLC5940 built in and completed it... Yesterday.)

        • DIY_007 / about 13 years ago / 1

          Hi. I understand this product uses a kind of serial interface from a microcontroller. Can it also be controlled by a RS232 port (from a PC)? If it can, do I need a MAX232? Tnx!

          • MikeGrusin / about 13 years ago / 2

            This board uses a synchronous serial interface (usually called SSI or SPI), which is common on microprocessors like the Arduino. SSI is different from an asynchronous serial interface like RS-232, so no, you can't control it with an RS-232 port, sorry.

        • jenesaisdiq / about 13 years ago / 1

          Hey Bruce, I was just about to do the same thing! Care to share? Hit me at dick[at]gra(dot)in (yes, Indian domain), would love to chat about it.

  • Aw man, I just spent the last couple of days makng this same board. $12.95 would have saved me alot of labor time. Oh well, It was a great expierence working with the tlc5940 on the bread.

Customer Reviews

4.3 out of 5

Based on 3 ratings:

Currently viewing all customer reviews.

1 of 1 found this helpful:

Traces...

I've bought 4 of these and the traces of VCC have fallen off two of the modules Edit: once we got the problem solved it worked perfectly for my chandelier.

Sorry to hear that. We haven't seen this before. I'll be contacting you directly to take care of this for you.

1 of 1 found this helpful:

General purpose extended PWM device.

Great Stuff this board is. Took a bit of research to discover just the coding-detail necessary to accomplish daisy-chaining multiple boards, but of course, once obtained, that was finally easy. I use this multi-channel device to drive many tricolor LEDs, Galvanometer Gauges, and Solid State Relays, all in the same application, and with fine control. Users should be aware: the many-device daisy-chain application required a separate power supply to the TLC5940, and the LEDs must be Anode. Be aware of your polarity requirements.

1 of 1 found this helpful:

May need resistor inline with SCLK with Teensy 4.0 or other very fast hardware

This product works well, but might need a resistor added in some cases.

Turns out TLC5940's SCLK pin is sensitive to signal overshoot which happens when long wires are used, especially with faster hardware like Teensy 4.0. Test results can be found on this forum message. Scroll up a few messages for discussion of the issue.

https://forum.pjrc.com/threads/71009-Sparkfun-Tlc5940-and-Teensy-4-0?p=323766&viewfull=1#post323766

Traditional Arduino boards which run at speeds from 16 to 120 MHz probably never need this. But as faster hardware becomes more common, if your TLC5940 is mostly working but occasionally flickers or acts flaky, it's probably not defective but just needs a resistor added in series with the SCLK signal.