20x20 LED Matrix

Hey everyone,

I need some help with building a 20x20 led matrix.
Warning, I'm a noob, so please be patient :slight_smile:

For a project kind of similar to a word clock, I need a 20x20 led matrix with white led's. I was planning to use multiplexing but while reading up on it a bit just now, I realized, that my matrix might be to big for it. Am I right?
I already have a Mega 2560, so I would like to use that for my project. Also, price does matter, so I'd lke to keep it as cheap as possible.

I'd be happy if you could point me in the right direction as to what aproach I should use.

Thanks in advance

Emiqa:
Hey everyone,

I need some help with building a 20x20 led matrix.
Warning, I'm a noob, so please be patient :slight_smile:

For a project kind of similar to a word clock, I need a 20x20 led matrix with white led's. I was planning to use multiplexing but while reading up on it a bit just now, I realized, that my matrix might be to big for it. Am I right?
I already have a Mega 2560, so I would like to use that for my project. Also, price does matter, so I'd lke to keep it as cheap as possible.

I'd be happy if you could point me in the right direction as to what aproach I should use.

Thanks in advance

You are using an Arduino MEga2560.
Which version of Arduino IDE are you using?
What operating system are you using?
Linux, MacOSX, Windows, other
What type of LED are you using?

Describe exactly what it is you are attempting to do.

I think you and I have very different understanding of what a "word clock" is.
That is what caused me to look at your posting.

That is probably not what you mean.

This is what I think of as a word clock and I guess that is what the OP thinks as well. Word clock

The problem with driving a 20 by 20 matrix conventionally is that that any LED is only on for 1/20th of the time and this makes the LEDs a bit dim.
I would break things up and use a MAX7219 chip to drive 8 by 8 sections of the required 20 by 20 matrix. Chain them together to control the lot from one SIP set of pins. This also gives you the advantage of not having to do the multiplexing in software.

An other way to do this would be to use a strip of addressable white LEDs, or even RGB ones and make a matrix from the strip.

No matrix is too big to multiplex. Look at an OLED TV screen. A vast number of LEDs to multiplex, but they are still bright and flicker-free. It's a matter of getting the multiplexing strategy right.

When you multiplex, you organise the matrix into groups of LEDs. All the LEDs in a group are (or can be, depending on the pattern to be displayed) lit together. Each group is lit in turn. Just because a matrix is 20x20 does not mean that you must use 20 groups of 20 LEDs. You could use 10 groups of 40 LEDs, 5 groups of 80, 40 groups of 10 and so on. In general, the circuit is simpler, requiring fewest components, if it is closest to that "square" format, where the number of lines in a group and the number of groups is around the same number. As you move away from that, the number of components grows. But sometimes you have to accept that because circuit complexity is not the only design factor.

Another design factor is brightness. If the matrix needs to be viewed outdoors in bright sunlight, you need lots of brightness. Less for indoors. Brightness is determined by how bright each individual led is, and what percentage of the time it is lit for. That percentage is determined by the number of led groups. If you have 20 groups, for example, each led can only be lit for 5% of the time. The brightness of each led depends on how much current flows through it, and how efficient it is at turning that energy into light. Modern LEDs are much more efficient than they were 20 years ago, so much less current is needed to achieve a certain level of brightness. But there are still limits to how much current each led can handle without being damaged, and the circuits driving the LEDs may limit the maximum current to less than what the LEDs can handle.

A third design factor is refresh rate. For a static image, the refresh rate needs to be high enough that it does not appear to flicker to the human eye. If a 16MHz Arduino is performing the multiplexing, rather than relying on external components to do that, then the more led groups your matrix has, the more of the Arduino's time will be taken up doing that, and the less it will have to do other tasks. If your code is not efficient, it might perform the multiplexing so slowly that it flickers visibly.

For moving images, like an action movie or sports, you need an even higher refresh rate because otherwise the motion won't look smooth to the eye. But fast moving images are not normally Arduino projects!