8x8 two colour LED matrix maths ...

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Some basic electronics questions ... I've made lots of LEDs flash on the STK500, but now I thought I'd graduate to an 8x8 matrix... and a two colour one at that, just to make it difficult.

The data sheet for the matrix says max continuous current is 30mA per LED, peak current is 150 mA for 0.1 mS @ 1KHz. (it's a two colour 8x8 matrix from SparkFun. Common cathode. Data sheet http://tinyurl.com/FYM-12881A).

So, I intend to use PORT A & PORT B to drive the 16 columns. Then PORT C to select which row is on. The code will loop 1,2,4,8,16, etc, on PORT C selecting each row in turn. The two 8 bit words on PORT A & PORT B will turn on the appropriate columns.

Lets assume I start debugging my code with "always on" LEDs (i.e. not pulsing at 0.1 mS) and don't want to blow them. The common ground rail per row has to sink the current of potentially 16 "on" LEDs. At 30mA per LED that's 480 mA. The data sheet on the Darlington driver (ULN2803A) says it will sink 500 mA per pair. So I'm just in range.

However, as I increase the refresh rate, I need to increase the current to maintain a perceived brightness. As I approach 0.1 mS pulses, I need to sink up to 2.4 A for a fraction of a second. Will the Darlington driver support this ? Are these figures in the data sheet continuous or average ? Will the device support higher currently for short periods of time ? If not, what else should I use ?

Lets assume I use an ATmega8515 (as I have one on my STK500). The data sheet says "absolute maximum current per IO pin is 40 mA" it also says "The sum for all ports, should not exceed 300 mA". So I need the Darlington drivers on the column lines too, even at 30 mA, as the total current may peak at 480 mA on all ports ?

Am I correct in my understanding that the Darlington pair will have a CE drop of 1.4v ? So for each LED there is 2 x 1.4v drops for the row and column Darlington pairs. Assuming 5v source, this leaves only 2.2v across the LED. So, 2.2v @ 30 mA = 75 ohm resistors. As the refresh rate increases, the resistors drop to 15 ohms for 150 mA ?

Finally, the data sheet for the 8x8 matrix actually says "Pulse Current Ipeak : Duty = 0.1mS / 1KHz : 150 mA". Am I right in thinking that means I can send each LED a 0.1 mS pulse of 150 mA every 1 mS. What refresh rate should I use for a basic LED matrix with uC ? 1 KHz seems a bit high ?

Then, just to curve ball me, there is this guy (http://tinyurl.com/Puzzlemation) featured on the home page of SparkFun. Very cool little project. He's using what seems to be very similar LED matrix displays, but he has no drivers on the column lines at all ? (http://tinyurl.com/PuzzlemationSchematic page 4) and his LEDs seems to work fine (albeit using a PIC, but I'm sure it has similar restrictions on max current ?) and they aren't dim ? Can't explain why he hasn't blown his uC or why the LEDs don't look dim ?

Thanks.

Jon.
(trying to graduate from noob ... :-))

Attachment(s): 

Jon Russell

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'd suggest you read the data on the uln2803 carefully - it will answer your questions. Whilst you can pull 500ma per output, the device is thermally limited.

http://www.allegromicro.com/en/P...

since you're multiplexing, you decide how many leds can be on at once. If you do one row at a time then you only need to cope with the max current of 8 leds. Assuming you have 16 rows, it takes 16ms to update the whole display assuming a 1ms tick which is 62.5hz update. You wouldn't want to go any slower. The duty cycle in this instance would be 1:16 or around 6%.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try them at a lower current (whatever per-port current your AVR can supply), with the 2803 drivers for the cathodes, and you may find you get plenty of brightness. 30mA is a maximum, but that doesn't mean they may not be plenty bright at 10mA average or even less. I have multiplexed 7-segment displays that were rated 20mA max per segment at about 2mA per segment and they were plenty bright enough, and I didn't have to use drivers for either digits or segments.