0
\$\begingroup\$

I've looked around for examples but I keep finding single color LEDs or in best case a two color LED but I have yet to see how to hook up a true 8x8 RGB LED matrix up to Arduino, is this even possible?

Where I'm confused is that there are more pins on the 8x8 then there is from Arduino, how can I control each individual light? I'm fine with the programming, just not with the connections.

I've attached the datasheet for those who are curious.

enter image description here

\$\endgroup\$
2
\$\begingroup\$

You could use shift registers, however if you want to control the leds other than on/off, it is more convenient to have an IC with integrated PWM controller for all the LEDs.

For exapmle you could use TLC5947 or a similar IC. You can send serial information to it and the IC will PWM the LEDs to any intensity you like. It can also drive your leds with constant current, so no external transistors (or series resistors) are needed.

If you don't like making a PCB for such an IC, Adafruit even sells breakoutboards for this particular IC.

You'll still need a shift register to control the rows however.

\$\endgroup\$
1
\$\begingroup\$

I would recommend using a demultiplexer on one side and possibly a shift register on the other side. The idea with these matrix displays is you light up one row at a time, then cycle through the rows at a high frequency. Using a multiplexer to select the row is a good tradeoff for pin count reduction - you only need 3 I/O pins to select which row you want on an 8x8 display. On the other side, you need to be able to address all of the pins, so a demux is not sufficient. Instead, either connect the pins directly (if there are enough free pins) or use a shift register and load one row at a time. This actually works out quite nicely if you get a shift register with a latch as you can shift in a whole row while the previous row is lit up, rolling the delay required for persistence of vision in with the time required to load up the shift registers. You'll need 3 8-bit shift registers in series to get all three colors in each column. Actually, they don't need to be in series - you can have a separate data line for each color if you want, though this isn't really necessary for an 8x8 display.

\$\endgroup\$
1
\$\begingroup\$

You can regard the matrix as three 8x8 matrices which share the row pins (common anode). To drive 1 matrix you would use a 3-to-8 demultiplexer to drive one row, and pull the cathodes low for the LEDs in that row you want to light up. Note that the outputs of the demultiplexer have to drive up to 8 LEDs in one matrix, and even up to 24 LEDs in an RGB matrix. They can't supply the required current, so you'll need transistors to boost the current.
For one matrix this would require 3 + 8 pins, which is well within the Arduino's capabilities. For 3 matrices, however, you would need 3 + 3 * 8 = 27 pins, and that's too many.
Solution: instead of connecting the 8 cathodes directly to the Arduino, use a latched shift register like the 74HC595. It only requires 3 pins (data, clock and latch) and you can cascade them, so that you only need 3 + 3 pins from Arduino.

Algorithm:
- shift 24 "1"s in the HC595s to turn the LEDs off
- latch the HC595s
- select next row (next binary value to demultiplexer
- shift the 24 bits for the new row (8 red, 8 green, 8 blue) into the HC595s
- latch the HC595s to activate the LEDs
- wait for next scan line, 1ms is a good time

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.