# Led multiplexing at full brightness

Now i know this question has been asked a lot, but I feel like I never know what to do. So i basically want to build an led matrix (lets say 8 rows by 8colums). I want to multiplex it. The problem though is that each row is 1/8 of the time lit up. Now from what I've read from previous posts is to increment the led brightness 8 times more. But wouldn't that damage the led?

It could damage the LEDs if the matrixing stops for some reason.
LEDs have a continuous current rating and a peak current rating.
It should be in the datasheet.

A MAX7219 chip can matrix 64 LEDs, and has inbuild current limiting.
Leo..

If you want to do the multiplexing yourself (meaning you want to write code to get the Arduino to do it, for educational purposes) then there is a relatively safe way to do it.

To begin with, choose your led series resistors so that you do not exceed the max continuous current rating of the leds. That way, they will be dim, but if you make an error in your code, and the multiplexing does not work correctly, the leds will be protected.

Once you have finished writing your multiplexing code and tested it, and you are as certain as you can be that it is working correctly, then you can change the series resistors to a lower value, such that you are exceeding the max continuous current, but not exceeding the max peak current. This will restore the brightness, as far as is possible.

Even then, you will probably not be able to achieve quite as much brightness as when you do not use multiplexing. This is one of the downsides of multiplexing. As you say, you would need to increase the current to 8 x the previous current to achieve the same brightness. But most leds have a max peak current of only 4 x or 5 x the continuous current, at best.

Take care not to exceed the max current of your other components. There is a max current for individual Arduino pins, and an overall limit for the atmega chip (assuming you are using a regular Arduino). You can overcome those limits by adding extra transistors or high-current chips like uln2803 (a rather old and inefficient design, but still useful) or tpic6c595 (a little more modern).

I bought low quality leds for a very very low price, I dont i think ill worry to much about them. But imagine i had these spark fun leds (I included the datasheet). It says that the peak current is 30mA, but that the duty cycle should be 10 % at 10KHz? That means that I can only supply it 30ma if my PWM signal is of 10KHz and my duty cycle is 10%?

YSL-R596CR4G3B5W-F12.pdf (480 KB)

30mA peak seems very low.
Other (single colour) LED datasheets state a peak current of 120mA for <=10mSec for common 20mA LEDs.
Leo…

Kind of. At least that's the rating they give. Anything slower then 10kHz might be to long at 10% duty. They just don't spec it into more detail... But it's a pretty low number in general.

But you do know 20mA is a heck of a lot of light with a modern led?

icedgoal:
I bought low quality leds for a very very low price...

I think the brightness problem lies there.
leo..