LED driver chip(s) discussion

Hey gang-

not looking for any specific code.. or specific 'spec'...etc..

Im looking for feedback/discussion from people who are experienced with these chips..etc

One of the first things a beginner Arduino user, like myself, finds out is that you out grow most of the default Arduino capabilities.. and look to expand using other IC chips..

usually one of the first chips people seek are ones that help in driving more LEDS than the Arduino can handle (either because of I/O pins or total current needs..etc)

from searching/reading posts at many different outlets (here, adafruit, sparkfun, instructables..etc) I have gathered a list of what I believe are the most used in our scene..

my question(s) are, more about the DIFFERENCES, and why one would, or should, choose a specific chip over another... and maybe some real world uses..etc to help make things clearer..

TLC5940:
Output Channels: 16
PWM/Steps: 4096 (12-bit)
Drive per channel: 80mA
Vin Min: 3v
Vin Max: 5.5v
Interface Protocol: Serial Data Interface
Library(s): Arduino Playground - HomePage

TLC5945:
Output Channels: 16
PWM/Steps: 4096 (12-bit)
Drive per channel: 120mA
Vin Min: 3v
Vin Max: 5.5v
Interface Protocol: Serial Data Interface
Library(s): Arduino Playground - HomePage // not sure if it works the same for this chip as the 5940

MAX7219/7221:
Output Channels: 64 leds/8 x 7-segment displays
PWM/Steps: (11-15 steps)?
Drive per channel: 40mA (max) per segment
Vin Min: 4v
Vin Max: 5.v
Interface Protocol: Serial (SPI)

-Datasheet:
http://pdfserv.maxim-ic.com/en/ds/MAX7219-MAX7221.pdf

-Wiring:
http://arduino.cc/playground/Main/MAX72XXHardware

-Articles/Playground:
http://arduino.cc/playground/Main/MAX72XXHardware
http://arduino.cc/playground/Main/MultiplexMAX72xx
http://www.arduino.cc/playground/Main/LEDMatrix

-Library(s):
8x8 Matrix controlled by a max7219
Matrix-library
LedControl-library
MAX7219-Library

-NOTES:
mA set by rSet resistor
common cathode

WS2803:
Output Channels: 18
PWM/Steps: (8-bit) 256-greyscale
Drive per channel: 30mA
Vin Min: 3.3v
Vin Max: 5.5v
Interface Protocol:

I think most relevant is how many leds the chip can drive..

ie: 16 vs 18 vs 64..etc

thanks!

MAX7219 is only suitable for driving single colour LED's (not RGB) and the 16 level PWM effects all 64 at the same time, you cannot dim individual LED's. They also daisy chain together.

WS2803 can PWM each channel separately and because it has 18 channels it is ideal for RGB LED's (6x RGB LED's per chip) It also daisy chains.

I have not used the other chips yet.

good point about the MAX's only being good for single color..

  • (and the TLC's lacking enough support for 6 x RGB)

Riva:
MAX7219 is only suitable for driving single colour LED's (not RGB)

Why? What's the difference between an RGB LED and three separate LEDs?

I need to go back to look at the datasheets for the other chips, I know the MAX uses 1 resistor to set the current for ALL (64) of the (multiplexed?) leds...(wouldnt reds need a separate/lower value?) do the others set current a similar way? or does each LED need a resistor for these other chips?

another point could be that if there is only 16 steps in PWM for the MAX chips.. probably not the best for color mixing?? since all 'fade' the same amount, not individually?

What's the difference between an RGB LED and three separate LEDs?

Normally the fact that there is a common anode or common cathode. This messes up some types of driving chips.
I know you can get surface mount LEDs with separate connections to both ends of each diode bit they are not common.

xl97:
I need to go back to look at the datasheets for the other chips, I know the MAX uses 1 resistor to set the current for ALL (64) of the (multiplexed?) leds...(wouldnt reds need a separate/lower value?)

The resistor sets the current, not the voltage.

xl97:
do the others set current a similar way?

Yes.

xl97:
another point could be that if there is only 16 steps in PWM for the MAX chips.. probably not the best for color mixing?? since all 'fade' the same amount, not individually?

It's not good for fading individual LEDs, no, but it could certainly drive RGB LEDs.

Grumpy_Mike:

What's the difference between an RGB LED and three separate LEDs?

Normally the fact that there is a common anode or common cathode. This messes up some types of driving chips.
I know you can get surface mount LEDs with separate connections to both ends of each diode bit they are not common.

I don't see any reason why you couldn't connect three MAX7219 source pins to a common anode LED (or three sink pins to a common cathode).

nb. I haven't tried it...

doh.. you are right.. has a lower vF (not current) lol.. sorry.

@GrumpyMike-

yeah the RGB 5050 leds are like that (all separate pads for each color, 6 in total.. so they can be common 'anything' in the end application I suppose.

all good point...thanks guys.

(note to self: )
for 'color mixing' the MAX's are not a good choice,....just as a general piece of knowledge to take away from this as well. :slight_smile:

Some more LED controllers I've used which are cheap and easy to get on eBay:

TLC5916 - 8 channel constant current sink. 16-pin DIP, serial port, no PWM.

TLC5925 - 16 channel constant current sink. 24-pin DIP, serial port, no PWM.

AN6884 - 5 LED bar graph controller in 9-pin SIP package - an easy way to get 5 constant current sinks
with no CPU/serial port input needed. Just tie the input to Vcc and all the channels will turn on.

LM3914 - 10 LED bar graph controller, 18-pin DIP package ... use like AN6884 but for 10 LEDs.

fungus:

Grumpy_Mike:

What's the difference between an RGB LED and three separate LEDs?

Normally the fact that there is a common anode or common cathode. This messes up some types of driving chips.
I know you can get surface mount LEDs with separate connections to both ends of each diode bit they are not common.

I don't see any reason why you couldn't connect three MAX7219 source pins to a common anode LED (or three sink pins to a common cathode).

nb. I haven't tried it...

The way the MAX 7219 works is it selects one of the eight cathodes to sink the current and provides current to zero to eight of the anodes for the segments that need to be lit on the currently selected "device" (or row or column if you are using a matrix). It cycles through this refresh cycle at 800Hz. So it is not possible to use two or more of these on one matrix at the same time because they will not be synchronized correctly. For example, MAX 1 could be sourcing current for columns 1,2,3 (red) and sinking it on row 1 while MAX 2 could be sourcing current for columns 1,4,5 (blue) while sinking it on row 2. The net effect is you have 6 columns on 2 rows lit instead of the 6 you intended and maybe some other unintended electrical issues. The way you get around this is to disable one MAX while the other is working and give them 50% duty cyles (which they reduce to 1/8 duty cycles for each chip's connected devices/columns/rows). Too much trouble for me. The MAX7219 is not set up right for multicolor displays, MAXIM has other solutions for that.

P.S. I love these chips. Very easy to use. But only for up to 8 anodes per cathode or you are not going to be happy.

fungus:
TLC5916 - 8 channel constant current sink. 16-pin DIP, serial port, no PWM.

You can use ShiftPWM library for the 5916 to get PWM on all channels..

MAX6954: Hard to interface with Arduino
Drives Up to 16 Digits 7-Segment, 8 Digits 14-Segment, 8 Digits 16-Segment, 128 Discrete LEDs, or a Combination of Digit Types
4-wire interface
Built-In ASCII 104-Character Font for 14-Segment and 16-Segment Digits and Hexadecimal Font for 7-Segment Digits
16-Step Digit-by-Digit Digital Brightness Control
and a ton more...

MAX6966:
10 Channel LED
Individual 8-Bit PWM Intensity Control for Each LED
SPI interface

codlink:
MAX6954: Hard to interface with Arduino

I'm wondering if this is really the case. The complaints seem to be that the programming sequence is incompatible with the way Atmel processors do SPI in hardware:

That the SPI library takes CLK low before you can take CS high. This is inconvenient, but hardly a show-stopper. Read the datasheet, send the bits yourself.

fungus:

Riva:
MAX7219 is only suitable for driving single colour LED's (not RGB)

Why? What's the difference between an RGB LED and three separate LEDs?

You could use RGB leds but lack of individual channel PWM means you can only turn a channel on or off. This limits the useful range of RGB colours to 7 (8 if you include all off) unless you device some fast switching to sudo PMW by turning a channel on/off quickly.

JoeN:

fungus:
I don't see any reason why you couldn't connect three MAX7219 source pins to a common anode LED (or three sink pins to a common cathode).

nb. I haven't tried it...

The way the MAX 7219 works is it selects one of the eight cathodes to sink the current and provides current to zero to eight of the anodes for the segments that need to be lit on the currently selected "device" (or row or column if you are using a matrix). It cycles through this refresh cycle at 800Hz. So it is not possible to use two or more of these on one matrix at the same time because they will not be synchronized correctly.

I meant three source pins from the same MAX 7219. With one MAX 7219 you should be able to do a 2x8 matrix of RGB LEDs.

Riva:
You could use RGB leds but lack of individual channel PWM means you can only turn a channel on or off. This limits the useful range of RGB colours to 7 (8 if you include all off) unless you device some fast switching to sudo PMW by turning a channel on/off quickly.

Soft PWM would be very difficult on a MAX2719 because there's no way to sync to the internal multiplexor. You could detect voltage on the outputs but getting it glitch-free would be a big problem.

All I meant was you could connect up RGB LEDs, not that you could do full 24-bit color displays. There's plenty of signs out there which are just red/green. Why not have blue/cyan/magenta/yellow as well...?

fungus:

JoeN:

fungus:
I don't see any reason why you couldn't connect three MAX7219 source pins to a common anode LED (or three sink pins to a common cathode).

nb. I haven't tried it...

The way the MAX 7219 works is it selects one of the eight cathodes to sink the current and provides current to zero to eight of the anodes for the segments that need to be lit on the currently selected "device" (or row or column if you are using a matrix). It cycles through this refresh cycle at 800Hz. So it is not possible to use two or more of these on one matrix at the same time because they will not be synchronized correctly.

I meant three source pins from the same MAX 7219. With one MAX 7219 you should be able to do a 2x8 matrix of RGB LEDs.

Anything less than 8x8 it works well, in monochrome. I use it on another project on some 5x8 matrices.

ok.. lets discuss the communication format/protocol they all use..

When I messed with the MAX7221 a 'little' bit..

the LedControl lib (for MAX72xx chips) is pretty easy/nice.. but someone showed me some SPI code to work with it as well..
(passing in binary 10011000 to create the 'pattern' I want to have on the led matrix/segment..etc..

one of my future projects is to try and mimic these animation effects:

(they are using .net arduino (netduino) variant and a MAX chip I believe)..

(in the end I have questions about adding this type of functionality to my project as it basically is a nArduino & Waveshield.. which uses SPI /timers to play audio..etc)

anyways.. so I have a bit (tiny amount) of familiarity with workign with the MAX chip.. are there pre-made libraries for these other chips as well? and since they didnt note as being SPI format.. how do you control the chip? bring some pin hi/low.. write/edit some values..then bring the pin back hi/low so it 'upates' this data?

(sounds like SPI to my noob mind?)

thanks

Only other one I know of is for the TLC5940

http://www.arduino.cc/playground/learning/TLC5940

nice...

probably works equally as well for the 5945 then too? (from what "I" could see only difference was the total mA/current available?)

I updated first post with link to this.. as well as links to the libraries and datasheet for the MAX chips..

just so Im clear on 'terminology' here.. when people say 'ShiftRegister' these are the (type) of chips they are talking about..yes?
I see it used commonly.. (mostly with this chip: 74HC164).. but others as well..

thanks