10x3 led matrix with max7219

Hi all,

My first post. Please be gentle haha.
I've tried researching, but haven't had any specific luck.

What I'm trying to do is illuminate 10x RGB leds using an arduino nano. I obviously do not want to tie up 30 pins (which the arduino boards don't have anyway!) for 10 leds. I've looked into led matrices which use a MAX7219 led driver. There are plenty of examples where 8x8 dot matrices have been made.

However, I'm curious whether I can use the same MAX7219 chip (as it only requires a few input connections) to custom make a 10x3 matrix? I.e 10 leds with RGB...

I don't want a mix of red, green or blue for a single led, but I want either of the colours on their own. That way, a single led will be either red, green or blue, but not a combination between.

Any thoughts or examples?

Thanks.

Sure, wire them up like this, then send data with just 1 bit high for each RGB to turn on 1 color.

Some use the LED.h library, I prefer to use SPI.h and just send SPI.transfer() commands.
You need to send 5 command in setup() to tell the chip how many columns, the brightness, no decode mode, normal mode (vs shutdown), and not display test mode:

digitalWrite (ssPin, LOW);
SPI.transfer (registerAddress);
SPI.transfer (dataToSend);
digitalWrite (ssPin, HIGH);

Then use the same to send data to registers 1 to 8, each register will be one digit or column.
Sending 0b00100001 would turn on upper Blue and lower Green in a column for example.
00(100)(001) you can see how the bits represent the two groups of LEDs in a column with the two upper bits not used.

The datasheet for the MAX7219, page 8, shows the data register is actually set up as DP-A-B-C-D-E-F-G, so you may want to connect to B-C-D-E-F-G to use the lower 6 bits like I did above.

Thank you,

I will experiment this weekend and will post back :slight_smile:

Ok, good luck.