I am working on a “big” LED Matrix project. I’m saying big because the maximum size I tend to see in tutorials is 10 by 10 or 16 by 16, for DIY Matrix (i’m not talking about the ones you can buy on adafruit and such, 32x32 and such).
I need to make my LED Matrix myself because I need it to be of a specific size. The pixels will be 5cm by 5cm squares, and the matrix will be 20 pixels high and 20 pixels wide, so 1 meter by 1 meter. The LEDs will be addressable LEDs.
Some more information, I will not use the LED Matrix as an actual secondary display (though why not in the future), but as a unit by itself. It will not reproduce a part of my computer screen, but will generate its own images. The images are really simple, and will change in color and size depending on some variables the user inputs. Here is an example of a typical image that will be generated by the Matrix.
The way this will work is: the user will input his/her variables in a program on a computer, and the computer will analyze the variables, generate the code for the image (probably in python fyi), and send it to the arduino/microcontroller, the Matrix unit.
I am looking for the appropriate micro controller that’s arduino compatible, and the adequate library too. Which equipment would you recommend?
Any help is greatly appreciated, thanks in advance.
So you need to control 20x20 = 400 RGB LEDs, assuming each LED could provide the brightness needed for the 5cm x 5cm square.
Or perhaps 4 RGB LEDs/square.
I would make up a string, or strings, of WS2812B RGB LEDs, then entire string can be controlled by a Single Arduino, or perhaps a '1284P based Arduino derivative so you have more SRAM (16K) to play with for setting up the data to send to the WS2812Bs.
Alternatively, you could have individual RGB LEDs and 1200 LED drivers, that'd be a lot of hardware. I offer a board with 96 LED drivers from 12 high current output shift registers you could daisy chain 13 of them together.
And it may come down to that if the WS2812s are not bright enough for your needs. Pick up a couple from Adafruit or Sparkfun and try them out, with 1 per square, 4 per square, 16 per square? I could design a board that you could assemble as 5cm x5cm block into your larger display, or perhaps 10cm x 10cm, with however many LEDs you end up per square that could be easily daisychainable, or controllable individually, using the FastLed.H or the Adafruit Neopixel libraries.
400 pixels x 1, 4, 16, 15 LEDs/pixel = 400, 1600, 6400, 10000 LEDs, each LED needs 3 bytes for it's color info. May even need to add external SRAM to hold all the data to send to the displays.
I don't know what the Library limits are. Certainly more LEDs slows the refresh rate down and increases the power supply demands. 60mA/LED when on full white needs a lot of current at the higher LED quantities, so multiple power supplies could be needed.
Another option might be larger diameter LEDs, like a 10 or 15mm RGB LED. I see some on Google, have not played with them myself.
Thank you very much for you detailed answer, it is greatly appreciated.
I don't need a very intense brightness, so unless the WS2812Bs are really low in brightness, I should be fine with that. I am french citizen, here is the article I found on ebay.fr, is this the right model?
This model is used in this DIY Matrix video, which is essentially what I want to do, only bigger.
In this video: How to Easily create Animations for your LED Matrix - YouTube the guy explains how to load up animation on your matrix, and he does say that unless you use some software to generate your animation script, addressing the LEDs one by one with FastLed.h is going to be really time consuming.
In fact, I am surprised I would not need a controller to control my matrix, other than the arduino. The generated image is simple but updates every time the variables get modified by the user. How do we go from this:
to this:
With possibly a cool fading animation in between?
The way I'm thinking of doing this is, have a python script run through each pixel of the grid of the image every time the image is updated, generate an array of 400 rgb values (in the case of 20x20 matrix) to send to the LEDs. Send that array to the arduino, which will run through it and address each LED at once. Would that be a good way of doing it?
"The way I'm thinking of doing this is, have a python script run through each pixel of the grid of the image every time the image is updated, generate an array of 400 rgb values (in the case of 20x20 matrix) to send to the LEDs. Send that array to the arduino, which will run through it and address each LED at once. Would that be a good way of doing it?"
Yes, have something create and the 1200 bytes of data (3 bytes per RGB LED) everytime you want ANY pixel to change. If only one changes, the others get the same data they already had.
1200 bytes from PC to Arduino at 250000 baud will go fast, as will sending out 1200 bytes at the 800 Kbps rate that I think FastLed.h uses. (1200 bytes x 8 bits/byte)/800000bits/sec = 12ms.
If you have multiple strings of LEDs, like 1 string per row or per column, then you could just update that one row or column. I did a project recently where I sent single colors to 4 strings of 43 LEDs each, changing on a button press, the output seemed to update instantly. I don't imagine sending out groups of up to 6 colors would be that hard, the Fastled.h author is online and could also answer questions as to how to send out an array of data.
That may be correct for the library, assuming you have setup somewhere that there is 1 string of 400 LEDs. The library should be sending out 1200 bytes even tho just 6 are changing for the 2 LEDs. Do you have a 'scope or logic analyzer to confirm?
I just used one of the examples and tweaked it just enough to create 4 strings of 43 and then sent out the same color to all LEDs in a string using 4 different pins. I didn't dig into it enough to try changing just some of the bytes.
Python, not familiar with it. I do recall hearing that Python 2 was easier to figure out for sending serial data than Python 3.