Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

8x8 RGB LED Brightness

Status
Not open for further replies.

beakie

New Member
I have an RGB LED matrix (though I am currently only using the red LEDs).

I am using two 4051s with an arduino and it all works fine.

All I am doing is iterating through each LED and turning it on and off with no delay to create the appearance they are all on at the same time.

For some reason the LEDs don't all have the same brightness. The ones along the bottom and right are the brightest and the ones along the top and the left are the least bright.

When I change the 32 LEDs on left side of the matrix with blue LEDs it still does the same... but the brighter right and bottom are now relative to the rectangles created by each colour on each side.
IE, both red and blue now have their own brighter edge and bottom.

Why is this happening please? :confused: I want to use PWM next to create blending colours but it will look rubbish if the brightness isn't precise... I am currently using digital high and low to turn them on/off.

THANKS! :eek:
 
Last edited:
Only using RED LEDs
Array2.png

Using 32 Blue and 32 Red LEDS
Array.png


Its more gradual than this. Top left is darkest, bottom right is brightest... with a graduation across the matrix between the two.
 
Last edited:
Circuit diagram please.
 
I have one of the 4051s connected to ground (Z) with Y0-Y7 connected to each of the cathodes of the LED array. VCC is connected to 5V and the rest of the pins are connected to ground.

The other 4051 is connected to 5v (via resistor) (Z) with Y0-Y7 connected to each of the red anodes of the LED array. VCC is connected to 5V and the rest of the pins are connected to ground.

The 3 pins of each multiplexer that control which pins are in use are connected to my arduino...

That's it :D
 
Last edited:
Per the data sheet, the 4051 mux "on" resistance can vary 440Ω to 2500Ω from unit-to-unit variations. That could be causing the variation in brightness.

Measure the "on" voltage drop across each mux channel to see if there's a variation in that.
 
I just noticed that you have one mux connected opposite from the other. The "on' resistance in one direction can be different from the "on" resistance in the other. That could also contribute to the difference in brightness.
 
A CD4051 is supposed to switch low current signals, not the high operating current of LEDs.
The max current is higher in one direction.
When it has a supply of only 5V then its max current is low and its minimum current is much lower.

Maxim make some Cmos MUX ICs with much lower on-resistance.
 
I just noticed that you have one mux connected opposite from the other. The "on' resistance in one direction can be different from the "on" resistance in the other. That could also contribute to the difference in brightness.

Please excuse my ignorance but I don't understand. :eek:

How can 2 pins (one from each of the multiplexers) when used together have a different resistance than 2 other pins used together on the same 2 multiplexers?

Surely all pins on a single multiplexer have the same resistance??? :confused:
 
You said one mux is connected to the cathode end of the LEDs and one mux is connected to the anode end of the LEDs. Thus is would seem that one mux is connecting current at the plus rail and the other is conducting current at the ground rail. The "on" impedance can be different for those two conditions.

Also you don't mention a resistor for the mux connected to the cathodes of the LEDs. Is there one? If not that certainly would make a difference in the brightness. (That's why it's good to show a schematic. It's difficult with words to fully explain the circuit.)
 
I discovered my array had a dodgy led. Assuming this was therefore the problem, I switched to another LED array I had.

I ran the same code as before and the issue still occurred.

If I put a delay of 1ms between each LED turning on/off, they light up normally and more importantly with equal brightness.


I think the issue might be to do with the amount of time the pins are turned on for. If I turn on pin 8, I need to set 3 pins high. To turn on pin 1, I don't need to turn on any pins so the amount of time that loop in my code lasts for will be less (because it doesnt have to run the "turn on" function 3 times)... Failings within my code, basically.



Will do some tests and let you know. Cheers for your messages. I appreciate your help.
 
Also you don't mention a resistor for the mux connected to the cathodes of the LEDs. Is there one? If not that certainly would make a difference in the brightness.

Actually, there wasn't one connected to the cathodes, just the one connected to the anodes. Is this bad practise? When I normally light an LED I only use 1 resistor between the 5v and the anode of the LED so I figured it would be the same....
 
Actually, there wasn't one connected to the cathodes, just the one connected to the anodes. Is this bad practise? When I normally light an LED I only use 1 resistor between the 5v and the anode of the LED so I figured it would be the same....

nope ... isolated high current commons and resistors to the other side. say high side drive transistors and low side resistors to lower current drivers. normally you would be driving each led with 40-80mA adding up to 640mA on the transistors (8x80)

even at 20mA you are well beyond the 50mA VCC pin rating of a 74HC chip, never mind a cd4xxx one (you did not specify)

dan
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top