• Home
  • Back to Sonic Robots Main page
  • About
  • Contact

Recital

  • Learning
    • MR 808 Technique – Acoustics
    • MR-808 Technique – IT & Interaction
    • Browse all
    • Electronics
    • 3D-Printing
    • Modding
    • Arduino
    • Technical practice
    • Sensors
  • Music robots list
    • Browse all
    • Autonomous
    • Experimental
    • Glockenspiel & mallet
    • Floppy & retro
    • Piano robots
    • Robot bands
    • Robotic drum
    • String robots
  • Research
    • Lectures
Home 2012 April 24 The PWM Controller TLC 5940, the Arduino and a high current output circuit

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

THERE IS AN UPDATE TO THIS ARTICLE

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.

Links

  • The TLC5940 manual at Ti.com
  • Free samples
  • Arduino Library Samples from [acleone]
  • Further reading: [Matt Pandina] wrote a deep insight guide
  • Other project that use the TLC5940 to control solenoids: [Jazari]
  • Eagle *.sch file of the circuit here.
Apr 24, 2012moritz
A not so complete list of robot music instruments and automated instrumentsA latency control concept for midi driven mechanic robotic instruments
Comments: 4
  1. paul klomp
    8 years ago

    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

    ReplyCancel
  2. moritz
    8 years ago

    Thanks for the comment - you're right, its wired the wrong way! I always build it right, but I should definitly fix the schematic :)

    ReplyCancel
  3. Andor
    7 years ago

    Does the TIP122 invert the PWM?

    ReplyCancel
    • moritz
      7 years ago

      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

      ReplyCancel

Leave a Reply Cancel reply

moritz
10 years ago 4 Comments Allgemein, Arduino, Electronicsarduino, electronics, LED, solenoid, tlc5490
Recent Posts
  • Popcorn Drums Piezo Midi Controller
  • Touch Piano with MIDI USB on Arduino Leonardo
  • Volca Korg External Power DC Plug
  • How to Build Techno Music Robots
  • Stephan Eicher und die Automaten
Recent Comments
  • Brynjulf Blix on Midi-in Pitchbend with an Arduino
  • Nick Patel on Spotify and the native windows 7 firewall
  • jhon on Problem with network printer not printing through windows firewall
  • Luqman on M@P Group – Robot Guitar
  • Arne on External power for the Korg Monotron and the Stylophone
Imprint
Impressum
Contact

Love or hate? Get in touch!

Email: contact@sonicrobots.com

2016 © Sonic Robots - Learning