The TLC 5940 is a superb PWM Controller that provides 16 PWM outputs which can be controlled individually over an serial interface using only 5 pins of an Arduino. Many people use it to control RGB LEDs, but it can also be used when controlling Motors, Servos and Solenoids.

The Chip can sink a current up to 120mA and has a build in DOT-correction, in case one wants to equal brightness variations of different light elements. The cheapest way to buy a TLC5490 is to get them at eBay, but you can also or order some free samples at TI
There is a greatArduino library by [acleone] which makes handling of the chip really easy. A big advantage when combining the Arduino with the TLC5940 is that you can realize LED-fading effects automatically – once the fade is triggered the loop of the Arduino can continue doing something else.
One disadvantage is that the total current supply of the whole IC (“all channels ON”) is limited to max. 120mA. This might be sufficient for a couple of small LEDs per channel, but once you try to drive 16 x 500mA LED-Chains, the Chip will overheat and die. [yopla] posted a circuit in the Arduino forums including a TIP122 transistor switch and a LM317 constant current supply to gain more power.The circuit can be used for LED-Chains, High Power RGB LEDs, but also Motors and Solenoids (interesting article by [Patrick Flanagan] about TLC5490 to drive solenoids). Be sure to add the protection diodes when driving inductivities! We use the circuit in our MR-808 automated drum robot installation to lighten 11 different cabins, in which robotic drum instruments are placed. As LEDs we use 500mA cold white LED chains by the German supplier Pollin.
The circuit is set up around the TLC5940. Serial data is coming in from the Arduino to Pin SIN, and is routed to one of the two shift registers controlled by SCLK. The generated PWM-Signal is then outputted to the 16 channels, and drives a TIP122 power transistor (100V/5A). A LM317-based current limiting circuit is added to each (!) chain, otherwise the maximum current can damage the LED. It is also very important to add some capacitors to the LM317 and also to the main supply, to prevent data-foo produced from to voltage drops when controlling.

SIN Arduino PIN 11 serial input line
SCLK Serial data shift clock
BLANK Turns all outputs off on “high” signal
XLAT Triggers write cycles between internal registers
GSCLK Reference clock for PWM

Despite all simplicity and usability one disadvantage of the circuit is that you don’t have a common anode / cathode anymore. This means that you have to connect every channel with two wires – no common ground for all chains allowed anymore.

UPDATE 17.07.2012: An eagle file is available now. Download eagle *.sch Here.


Tagged with →  
Share →

5 Responses to The PWM Controller TLC 5940, the Arduino and a high current output circuit

  1. paul klomp sagt:

    hi, it seems to me that you have wired the TIP122 the wrong way. Its emitter should be to GND, and the load (from + through LM317) is connected to the collector.
    I’ll give it a try, thanks for the idea. Paul Klomp

  2. moritz sagt:

    Thanks for the comment – you’re right, its wired the wrong way! I always build it right, but I should definitly fix the schematic 🙂

  3. Andor sagt:

    Does the TIP122 invert the PWM?

    • moritz sagt:

      Yes it does, so you do have to invert that in the code. The whole project (circuits and code) is a little outdated so be sure to double check everything for mistakes. Cheers, moritz

  4. […] output for the TLC 5940. The TLC can drive 130mA per channel. The 3W LED has 0.25A @ 12V. I blogged about this before and there are different […]

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.