Driving 4 8x8 RGB led matrices with Nano

Hello!

Sorry if the questions seems asinine, but as I'm relatively inexperienced with hardware, I'm not sure how to tackle this problem and how feasible is this task.

Basically I would like to create a clock by using 4 RGB LED 8x8 matrices( such as http://www.ebay.com/itm/Matrix-8x8-RGB-LED-Full-Color-Dot-Square-Display-Common-Anode-Arduino-60x60mm-/380944937099?pt=AU_B_I_Electrical_Test_Equipment&hash=item58b216708b ) and an Arduino Nano. The problem is that the solutions I found are either expensive (Colorduino) or not really applicable like the led matrix driver shields, which are meant for a single matrix.

So my question is if somehow doing this, for example, with shift registers (with whom I have no experience yet), is really feasible? Does the Nano even have enough pinouts for this task? Would there be power supply problems with this many LEDs?

The problem with shift registers is that really you are not going to be able to take advantage of PWM dimming of the LEDs so you will end up with one of eight colors - black, white, Red, Green, Blue, R+G, R+B, B+G, which is not very satisfying. The way most people here solve this problem is by using a many-channel PWM controller like the Texas Instruments TLC5940 which is a 16 channel controller. Your matrix has 24 channels, so you need one and a half ICs for each matrix. So you need 6 ICs for this application. You also need something to select the row and source a lot of current into the selected row (the TLC5940 will sink this current). The way most people here solve this problem is by using a high-side switch like a PNP transistor or p-channel MOSFET. You will need 8 pins to control the rows (or 3 if you multiplex it) and 5 pins to control the TLC5940 driver chain. This architecture will scale out to a lot more than 4 RGB displays if you choose to make a bigger one someday.

If you search TLC5940 here and on the web you will find a lot of projects that will give you a good start on this. This is an advanced project for someone who doesn't understand shift registers yet,

There are some sellers selling this IC unbelievably cheaply these days. This is well less than TI's advertised by-the-reel prices.

http://www.ebay.com/itm/10PCS-IC-LED-DRIVER-PWM-CONTROL-28-DIP-TLC5940NT-TLC5940-NEW-GOOD-QUALITY-/290742857279

Hi,

I would buy a 2 or 3 metre strip of the 96 or 144 leds-per-metre ws2812b strips. Cut 8 lengths of 32 and stick down to a board. Connect up the strips and arduino. Simples! No extra driver chips required. Use NeoPixel or FastLED library to drive. You will need a 5V supply with quite a few amps!

http://www.ebay.co.uk/itm/1m-DC5V-WS2812B-led-pixel-srip-non-waterproof-96pcs-WS2812B-M-with-96pixels-/121376951161?pt=UK_Garden_Lighting&hash=item1c42a14b79

Paul

growqx:
The problem is that the solutions I found are either expensive (Colorduino) or ...

There is a very good reason for that. Can you guess what it is?

JoeN:
The problem with shift registers is that really you are not going to be able to take advantage of PWM dimming of the LEDs so you will end up with one of eight colors - black, white, Red, Green, Blue, R+G, R+B, B+G, which is not very satisfying. The way most people here solve this problem is by using a many-channel PWM controller like the Texas Instruments TLC5940 which is a 16 channel controller. Your matrix has 24 channels, so you need one and a half ICs for each matrix. So you need 6 ICs for this application. You also need something to select the row and source a lot of current into the selected row (the TLC5940 will sink this current). The way most people here solve this problem is by using a high-side switch like a PNP transistor or p-channel MOSFET. You will need 8 pins to control the rows (or 3 if you multiplex it) and 5 pins to control the TLC5940 driver chain. This architecture will scale out to a lot more than 4 RGB displays if you choose to make a bigger one someday.

If you search TLC5940 here and on the web you will find a lot of projects that will give you a good start on this. This is an advanced project for someone who doesn't understand shift registers yet,

There are some sellers selling this IC unbelievably cheaply these days. This is well less than TI's advertised by-the-reel prices.

http://www.ebay.com/itm/10PCS-IC-LED-DRIVER-PWM-CONTROL-28-DIP-TLC5940NT-TLC5940-NEW-GOOD-QUALITY-/290742857279

Thanks for your detailed solution, seems like the best bet for now. I have a question though - wouldn't there at any point be problems with PWM and the processor speed of the Arduino or do the PWM controllers resolve this issue?

growqx:
Thanks for your detailed solution, seems like the best bet for now.

All due respect to JoeN, but did you seriously consider my suggestion? It will do what you want and be about 20 times simpler.

growqx:

JoeN:
The problem with shift registers is that really you are not going to be able to take advantage of PWM dimming of the LEDs so you will end up with one of eight colors - black, white, Red, Green, Blue, R+G, R+B, B+G, which is not very satisfying. The way most people here solve this problem is by using a many-channel PWM controller like the Texas Instruments TLC5940 which is a 16 channel controller. Your matrix has 24 channels, so you need one and a half ICs for each matrix. So you need 6 ICs for this application. You also need something to select the row and source a lot of current into the selected row (the TLC5940 will sink this current). The way most people here solve this problem is by using a high-side switch like a PNP transistor or p-channel MOSFET. You will need 8 pins to control the rows (or 3 if you multiplex it) and 5 pins to control the TLC5940 driver chain. This architecture will scale out to a lot more than 4 RGB displays if you choose to make a bigger one someday.

If you search TLC5940 here and on the web you will find a lot of projects that will give you a good start on this. This is an advanced project for someone who doesn't understand shift registers yet,

There are some sellers selling this IC unbelievably cheaply these days. This is well less than TI's advertised by-the-reel prices.

http://www.ebay.com/itm/10PCS-IC-LED-DRIVER-PWM-CONTROL-28-DIP-TLC5940NT-TLC5940-NEW-GOOD-QUALITY-/290742857279

Thanks for your detailed solution, seems like the best bet for now. I have a question though - wouldn't there at any point be problems with PWM and the processor speed of the Arduino or do the PWM controllers resolve this issue?

Are you asking if increasing the PWM "speed" (really, duty cycle) requires increased performance or speed from the MCU? The answer is no. If you look at what is going on in this solution, the MCU is providing a fixed clock to the driver chips and then they take care of the PWM rate, you are just setting a duty cycle on each of the 16 channels on each chip by means of what is actually a shift register itself on the driver. However, the provided libraries hide this detail and also hide the detail of how that clock is provided too. The MCU has to provide something like 192 bits of data to each driver each time you update the channels, so if you had an insane number of drivers your refresh rate for changing the data might slow down at some point, and this does matter since you are multiplexing the rows in this solution (do you see that? in the end, this is the hard part). So you probably want to keep your refresh rate at 100Hz or maybe even faster for best results. Still, 16,000,000 MCU cycles per second divided by 100 refresh cycles per second means 160,000 instructions to provide 768 bits of data, which should work fine. I haven't benchmarked that library, but it works for me.

PaulRB:

growqx:
Thanks for your detailed solution, seems like the best bet for now.

All due respect to JoeN, but did you seriously consider my suggestion? It will do what you want and be about 20 times simpler.

I should say, I do like what PaulRB has to say on this and it looks like something I would like to try at some point. I do like the 8x8 matrices though, I have used them, they produce good results. In addition, using the TLC5970s might provide a learning experience, though I have some fears this experience may be a hard climb for you. I will give PaulRB the benefit of the doubt that it produces an aesthetically pleasing product also. Another LED matrix that I have seen that also is very pretty and now very reasonably priced is this one, also a pain to drive unless you buy a driver board:

I have only come here seeking knowledge. Things they would not teach me of in college.

The Police!

PaulRB:

I have only come here seeking knowledge. Things they would not teach me of in college.

The Police!

I have appreciated that line ever since my chemistry professor wouldn't help me to synthesize RDX. Jerk! :grin: Seriously, though, for anyone who has been through college, you know that your best learning always occurred somewhere else. This forum is surely one of those places.

I built a monochrome (red) scrolling clock using 6 super cheap Maxim MAX7219 + 8x8 LED matrix kits I bought off eBay for less than $2 each. I used an Arduino Pro Mini instead of a Nano. For the clock, I used a Maxim DS3231 temperature-compensated clock chip with battery backup. Very cheap (around $3 on eBay), and very accurate. I also added temperature and humidity to the display using an Aosong DHT22 sensor. I’d prefer to buy American (e.g. from Adafruit, SparkFun, etc.), but usually I go cheap and buy from Chinese outfits off eBay to save a buck. Note that a display with (6) 8x8 matrixes contains 384 individual LEDs. If you want RGB and variable brightness on top of that, you’re talking about a LOT of bits, buddy…

For RGB, you’d have to either find a comparable card with 3 SMD MAX7219 chips, or roll your own (homebrew). Note that the MAX7219 only allows brightness control for all LEDs in the matrix at once. If you want to use PWM to control brightness of individual LEDs, have a look at the Texas Instruments TLC5940, which has 16 channels of 12-bit brightness control.

Seriously consider using WS2812 RGB matrixes. Not cheap, but super easy to program using the Adafruit NeoPixels library. I just found an 8x8 RGB matrix on eBay for $18 (Adafruit has it for $35: http://www.adafruit.com/products/1487).
Remember: You often get what you pay for, and caveat emptor. Buy American, unless (like me) you have big ideas and a small treasure.

Cheers,
NV1Tango