RGB LED and PWM Colour Questions

Hi All,
I was wondering if anyone could shed some light on a question I have regarding different colours I can achieve with RGB LEDs on a LED Matrix.

I have 3 LED drivers(HT1632C) controlling Red,Green and Blue respectively, each with 16 levels of PWM, so I can generate a good array of colours if all the Matrix LEDs are the same colour.

Now what happens if I want many colours on the Matrix at the same time?
What are the limitations?
I'm pretty sure I will be unable to control an individual LEDs colour as the PWM is applied across the whole matrix for one LED driver. Is there anyway around this?

Cheers.

Hi,

You are correct. You will only be able to get 7 colours, plus black, on the matrix at any time. Those 7 colours will depend on the 3 intensity levels you have set on the 3 HT chips.

If intensity is set to maximum on all 3 HC chips, the colours available will be red, green, blue, yellow, cyan, magenta and white.

If intenstity it set to 50% on the red chip and 100% on the green and blue chips, then the green, blue and cyan colours will be unaffected, but red will be dimmer, and yellow will change to more of a green/yellow and magenta will be more of a purple/violet. White will change to a sort of "pastel-cyan".

If you want to have more than 7 colours at any time, you need to start over and re-think your design. I would suggest ws2812b leds. Each has a built-in controller and they can be connected as a single continuous chain back to a single Arduino pin.

Paul

Thanks for the reply.

Just to clarify something, when you say 7 colours at any time, do you mean the entire matrix will be one of the colours or can I get each Row to be a different colour (but still limited to those colours defined by my intensity levels)? And any change in an intensity level of a chip would effect a previous colour I had on the matrix. :frowning:

Thanks for the suggestion on those LEDs, unfortunately the matrix is a small bit to large for an Uno. 32 x 8. Maybe a Mega would work?

A quick search for a driver that could work would be TLC59731 in place of my HT1632Cs - albeit I’d need 32 of them and an Arduino Mega. Current sink/source chips were included for the HT1632Cs so I’d be ok there.

Can you make any recommendations of a driver that would work better in place of a TLC59731?

tlc59731.pdf (368 KB)

Ravenerabnorm:
Just to clarify something, when you say 7 colours at any time, do you mean the entire matrix will be one of the colours or can I get each Row to be a different colour (but still limited to those colours defined by my intensity levels)? And any change in an intensity level of a chip would effect a previous colour I had on the matrix. :frowning:

You can set each individual led in the matrix independently to any one of the 7 colours (or black/off). If you change one of the chip's intensity level, it could affect some or all of the leds. For example if you change the red chip's intensity from 100% to 50%, it would affect the colour of any leds set to red, yellow, magenta or white, but green, blue & cyan leds would not be affected.

Ravenerabnorm:
Thanks for the suggestion on those LEDs, unfortunately the matrix is a small bit to large for an Uno. 32 x 8. Maybe a Mega would work?

Do you mean because of the Uno's RAM memory? 32x8 would need 768 bytes and Uno has 2KB, so you might actually be OK depending on how much RAM memory your sketch needed for other things.

Ravenerabnorm:
Can you make any recommendations of a driver that would work better in place of a TLC59731?

I already did, but your HT chips will still be able to display text and graphics and make colourful patterns and transition effects. Why do you need full individual colour control? To display photos on a 32x8 matrix?

You can set each individual led in the matrix independently to any one of the 7 colours (or black/off). If you change one of the chip's intensity level, it could affect some or all of the leds. For example if you change the red chip's intensity from 100% to 50%, it would affect the colour of any leds set to red, yellow, magenta or white, but green, blue & cyan leds would not be affected

Understood. Thanks for the clarification.

Do you mean because of the Uno's RAM memory?

I meant in terms of outputs from an Arduino. With a 32x8 Matrix of ws2812b LEDs would I not require a 40 outputs from an arduino? Or would shift registers or another driver be necessary?

Why do you need full individual colour control?

Its not totally necessary but 7 colours at any one time seems somewhat limited to the spectrum of colours that could be achieved if the HT1632C could provide a PWM to individual LEDs

With a 32x8 Matrix of ws2812b LEDs would I not require a 40 outputs from an arduino?

No you would require just one Arduino output to drive that directly, no drivers.

Grumpy_Mike:
No you would require just one Arduino output to drive that directly, no drivers.

@Ravenerabnorm: now do you believe me?

Look here.

I didn't say I didn't believe you, I was just not aware that these LEDs can be connected in series. Wow these seem so much simpler than my current design. Do these LEDs have any disadvantages?

Only the price.

You can get them as surface mount or a normal 5mm LED casing.

When it comes to projects they are a game changer.

If I were making a large matrix I would use the flexible strip type cut up into lengths. You can get the strips in various led densities of 120 60 or 30 LEDs per meter.

Ravenerabnorm:
I didn’t say I didn’t believe you, I was just not aware that these LEDs can be connected in series.

So when I said, back in my first reply…

PaulRB:
I would suggest ws2812b leds. Each has a built-in controller and they can be connected as a single continuous chain back to a single Arduino pin.

…what did you think I meant?

Ravenerabnorm:
Do these LEDs have any disadvantages?

Their current consumption will be, or could be, much higher than your current matrix. Because the HT chips are multiplexing, the current is shared between the leds. With the 2812’s, they are not multiplexed and so can use more if you turn the brightness up to max. 60mA per led, which is a whopping 15A for an 8x32 matrix. In return for all that current, they will be very much brighter than your current matrix. Keep the brightness low and they will use far less and you can get away with a smaller power supply, but there is a danger that errors in your sketch could cause the brightness to go higher than you intended and overload your power supply.

Each has a built-in controller and they can be connected as a single continuous chain back to a single Arduino pin.

I interpreted that incorrectly as that I would need an arduino pin for each row or column as a single continuous chain. I had multiplexing on my mind again I guess.

Hummm so to run from a 2A supply (I intend on using a power bank for these LEDs), 2A/768 Leds gives roughly 3mA per LED. I might do some testing and see what level of brightness this would produce and see if its acceptable. Most likely I'll need a better power supply.