help regarding LED matrix project

Hello

I am trying to make a LED based lighting system (with varying brightness). Its something like this: I have a board measuring 68 cmX 42 cm and on that I intent to install or make this system. Since the board is a bit large, I thought of getting commercially available panels rather than constructing a LED matrix myself (dont even know whether thats possible on such a scale?). Now I searched for LED panels/matrices and came across these three:

Any other site to buy such panels?

So, the measurements indicate that I would have to get multiple panels and then connect them together. I have no idea how to do this.

I plan to use Arduino Mega and since I want varying levels of brightness, PWM is what I want. But since these boards dont have inbuilt PWM control, so I am not sure but, is it possible to use LED drivers having this PWM (12 bit resolution?).

So, to summarise, I need multiple LED matrices/panels and then connect them together with Arduino Mega and control their brightness using a LED driver. Eventually I would like to have different bitmap images being displayed on the matrix. Thats the end part. I am stuck in the initial phase now.

My question: Could anybody please help me here, as to how to go about this. I am researching on this, however being my first hand experience with a project like this, I am a bit confused and lost.

Would be grateful if anybody could offer some guidance.

Thanks a lot!

You are way out of your depth here, I would recommend doing a few tutorials first and getting the hang of electronics first.

The first thing you need to know is what size in terms of the number of LEDs you want on your matrix, that is the important measure, the physical size is not very important.

Should the LEDs be monochrome or multi colored?

What update frame rate do you want?
Where is the data going to come from?
Do you want the varying brightness on individual LEDs or on the over all display?

Hello Grumpy_Mike

Thanks for the reply.

I agree that my electronics knowledge is not adequate, working on that diligently. Actually this project I am talking about is a college project that I am working on. Its related to the lighting in cars. By lighting, I am mean interior.

They are supposed to be RGB leds (forgot to mention that) and regarding the size of the leds, its this: Its this board which represents some space in a car and thus should be be a part of LED lighting system. The area is given as above. Also, I am searching for led panels with 3-6 mm pitch. So is that enough or do I require any other info?

Update frame rate - no idea. Looking up on that.

I did some electronics and tinkered with Arduino (doing some small projects), but now I have to do this. Hoping to learn most of the things along the way.

And regarding your last question, - Either would do but i would prefer to have individual addressable leds. So each varying its brightness.

Can use these

WS2812B RGB LED with 8-bit PWM level per color.
Make your own boards, buy them on a board, on strips, etc.

Hello crossroads

Thanks for replying. I do have the possibility of making a board with individual LED but would be a bit too cumbersome (?) so i thought of buying commercially available panels. One option that I did not consider is using LED strips and using them to make a panel so as to cover the area I mentioned above. But wouldn't it be too many... As the area is large?

Also could you tell me if using multiple panels and connecting them and then using a LED driver with arduino would work or not?

They are supposed to be RGB leds (forgot to mention that) and regarding the size of the leds, ......

It is the NUMBER of LEDs that we need to know. However now we know it is not an LED display and a lighting project that is not so important.
Why RGB LEDs and not white ones? You need to know the light level over the area of the panel to plan it properly.

Also could you tell me if using multiple panels and connecting them and then using a LED driver with arduino would work or not?

Yes it would work but you would have to have the right driver and the right LEDs.

Grumpy_Mike:
It is the NUMBER of LEDs that we need to know. However now we know it is not an LED display and a lighting project that is not so important.

It has to be a LED display, I did not mention it but eventually I would like to have different displays based on a bitmap file.

I have an area that needs to covered with LEDs with a set resolution (which I could confirm to you by tom). The resolution has to be more for this, hence trying for the pitch I mentioned. Commercially available panels have 3mm-6mm pitch, that would be fine for me, regardless of the no of leds then. I am not able to follow as to why no of leds would matter incase of a fixed area and fixed pitch (or resolution)? sorry.

And in case of large areas (42 cmX69 cm), could you please tell me which one would be better and why - I make a board using strips or I use multiple panels and then connect them? Although the strips available on adafruit are spaced quite far apart - wont do. Manual construction of a board is a bit tough with so much area. hence avoiding that.

Why RGB? No reason as such ...just found them cool while reading other projects and hence decided to go with them....

The number of LEDs is important because of the refresh rate, that is how quickly you can change the pattern. But most of all because of the memory requirements for the display. If you have a pattern and an RGB LED matrix then you need three bytes to store each LED's information in each pattern. So for a 64 by 32 panel you need 64 X 32 X 3 = 6144 bytes for each pattern. This puts a severe limitation on what you can display with an Arduino controller.

Having one of these panels for illumination and as a pattern display is not going to work very well.

However all these panels have built in refreshing capabilities, otherwise you have to get the Arduino to do this, like this:-
http://www.thebox.myzen.co.uk/Workshop/LED_Matrix.html

Ahhh..I see now. Good point, that I missed completely. I thought using Mega would help, but I can understand how still it will limit the project. Thanks!

Ok, I just remembered that I had read your page a few weeks ago when reading on LED Matrices. I will go through it once again.

So, although I am still reading up on this, but just to conclude sort of - Memory being the primary problem for such a large display, if I end up reducing the no of LEDs by a good amount (going for a larger pitch matrix maybe or reducing the effective area), then using Mega would be fine with a LED driver for PWM control (since these panels as you have mentioned have refreshing capabilities, I guess then i dont need an external chip like you mentioned on your page?)

I really cant see another way frankly.....making matrix by strips....ummm..not sure..and I am trying to avoid manual matrix construction.

and yes, could you please tell me this - like its mentioned on adafruit website that the panels I was referring to don't have PWM control -- that means there is no internal PWM driver and hence external driver is required? Am i right? And I guess I read somewhere that these multiple panels can be connected to each other to form a bigger display (daisy chain?)??

Hope you could clarify this.

Thanks a ton!

If your panel does the refreshing then you can not dim it with PWM. A matrix scans and so turns the LEDs on and off, PWM turns the LEDs on and off, you can't do both. A multiplexed display will be dimmer than the LEDs being on all the time because the LEDs are being turned on and off.

If the matrix can display more than 7 colours then it has the capability of dimming the display simply by defining the brightness of each colour.

Hope this is the appropriate place and time to ask (first time on forum ) ;
I'm interested in building a LED matrix , 4 x 7 , where I can turn on/off any one LED.
Specifically, 4 different times per day of the week.
What Arduino board and switching device can I use ?
Any simple LED would do , no High Output LEDs.
Any suggestion ?

LED matrix.

You do not have to use all of it. Or you can construct your own matrix and use just the board shown as a convenient way to construct it.

An Arduino Nano (clone) can control it.

If you want it to function as a clock, you need a RTC.

Plenty of libraries for these for the Arduino.

slap2stick:
Hope this is the appropriate place and time to ask (first time on forum ) ;

No it is not. It breaks the rules please read them How to use this forum and start your own thread.

Hello

In continuation with the above project/mail, I have done the following, wanted some advise.

I got this panel from Adafruit - https://www.adafruit.com/products/420 and got it working with Arduino Uno and did some experiments sort of with it.

Now, since I was a bit clear with this, I thought of going back to the main project - taking 4-6 such panels and then setting them up. For this, I would have to choose a higher board -

Any tips on which one go for - Mega or Due? Due doesnt have much support (libraries) for LED matrix daisy chaining as far as I could find out, so was a bit inclined for Mega, however wanted to consult before buying. Not a hardcore programmer, hence writing a library for Due would be a humongous task for me :stuck_out_tongue:

Also, since I want PWM for my project, I was planning to buy a LED driver (with PWM), though yet to decide on that.

Any help would be nice.

Thanks!

For this, I would have to choose a higher board -

That link says:-

Keep in mind that these displays are designed to be driven by FPGAs or other high speed processors: they do not have built in PWM control of any kind. Instead, you're supposed to redraw the screen over and over to 'manually' PWM the whole thing.

Each panel takes 1536 bytes to store the state, so the SRAM on a Mega would allow you to have just about 5 panels. But it is the same speed as the Uno, so not very fast.

The Due looks a better bet but this is a 3V3 system and the pins can not supply very much current, some pins are as low as 3mA so you have to be a lot more careful as they are much easier to damage than a Uno.

Grumpy_Mike:
That link says:-Each panel takes 1536 bytes to store the state, so the SRAM on a Mega would allow you to have just about 5 panels. But it is the same speed as the Uno, so not very fast.

The Due looks a better bet but this is a 3V3 system and the pins can not supply very much current, some pins are as low as 3mA so you have to be a lot more careful as they are much easier to damage than a Uno.

Thanks for the reply mike, however quite ambiguous. :stuck_out_tongue:

I am not sure whether I could even write a library for daisy chaining for all the panels..don't know why so less documentation or support for Due. That is restricting me to go for Due and yes, that voltage problem is also there.

How about going for 4 panels only, with a TLC5940 (just had a look on it....seems quite popular and has support libraries too) for PWM and with Arduino mega? That seems fine? I will prefer to go to less no of panels than to write a library, especially when I am not a programmer :wink: Maybe, my project can be expanded by a programmer as a next part.

Let me know plz.

Thank you!

I am not sure whether I could even write a library for daisy chaining for all the panels.

You don't have to write a library, just the code.

The Due has a totally different timer architecture, that is why all the libraries that use timers will not work on the Due.

How about going for 4 panels only, with a TLC5940

You can't drive those panels with a TLC5940.

Those panels already have the equivalent of a shift register built into them so it is a matter of feeding them chained as opposed to just a single one. The big downside is that each LED can only be on or off, so the colours you can get from them are very limited ( just 7 in fact ).

Do you have to use this type of panel? If you want lots of LEDs with PWM control then you are better going for the individual addressable type of LED strip like a neopixel or DotStars. You can always make a matrix by cutting up strips.

Hi again…

Continuing with this post rather than creating a new thread as the project is the same…

With reference to the above mail:

I finally decided to go for the led strips after discussing with my guide and all, and now I have started with the coding part with Arduino, facing some problems. Any help would be damn awesome!

I got the APA102c based led strips and facing this issue: The strip is behaving weirdly - when I plug it in and connect everything - random LEDs light up as I vary the voltage (within the safe limit). I am not able to follow this.

Secondly, now I tried to individually address the leds, however after a lot of efforts, I simply cannot fathom as to why the second leds and onwards are not being addressed. A few leds are on (randomly) along the strip but the behaviour is confusing…

Not able to make head or tail of this, I decided to test the simplest code using the Adafruit lib for Dotstar and Pololu library for APA102c based led strips. In both the cases, the same behaviour.

The following is the code for Adafruit library:

#include <Adafruit_DotStar.h>

#include <SPI.h>

const uint8_t numled =2;

const uint8_t datapin = 2;

const uint8_t  clockpin =3;

Adafruit_DotStar ledstrip = Adafruit_DotStar(numled,datapin,clockpin, DOTSTAR_GBR);


void setup() {
  ledstrip.begin();
  ledstrip.show();

}

void loop() {
  for(byte x=0;x<2;x++)
{
ledstrip.setPixelColor(x,0, 255, 255);    
}
ledstrip.show(); 
}

Is the above code correct for just testing 2 leds at a time. Only the first one is responding - and the second one is constant blue. Not reacting to any changes. Also, how do you “Address” a led - for eg, the 8th one? The indexing is possible through the color array but led addressing i cannot figure out. I did follow the strand test example, based on that only I wrote…but neither the example, nor this is working…

Please let me know if the code is correct and where I am going wrong…Any help would be great

Thanks a ton!

Is the above code correct for just testing 2 leds at a time.

Not really no. It will set two LEDs to yellow, that is all. And it sends it so fast that it exceeds the refresh rate of the strip.

when I plug it in and connect everything

How is that then?
What Arduino did you end up using and how did you wire it up to the LEDs?
A schematic would be good.

Also, how do you "Address" a led - for eg, the 8th one?

ledstrip.setPixelColor(7,0, 255, 255);

Hi Mike

For this project, I am using Arduino Uno, right now (although plan to use Due or maybe Mega in the end, if required). As far as the wiring is concerned, I think its simple - the strip is being powered through Arduino (5v and Gnd pins) and the remaining two pins (DI and CI) are connected to Arduino I/O pins (as mentioned in the code). I also powered the strip through a Digital Power supply (5v limit) and in both of the cases, the lighting is random.

And I was right there then, the way to address these LEDs is through that setPixel function only - however it is not working and thats why ended up asking...

Ummm..regarding the code...on using this code - only the first led takes on cyan color while the second is constant blue no matter what you do with the strip...and then there is this 15th led which is also Blue constantly......Its not behaving as you told..although i want it to....

Any changes in the color through the code is reflected only to the first led and nothing happens to the second one...i can just control the first one........

Totally perplexed! :confused: