LED Matrix Dimming

So I have put together a circuit with two 8x8 LED Matricies (http://www.oomlout.co.uk/8-x-8-bicolour-led-matrix-p-233.html) powered by 4 daisy changed (74HC595) shift registers. At the moment I am only using the red LEDs in the matrices. I am row scanning and have implemented a basic text scrolling program.

This working well but I have noticed that when a large number of LEDs in a single row are lit they are noticably dimmer. I am guessing this is because either the Arduino or the shift registers are unable to deliver enough current.

My question is how do I go about diagnosing this problem? I want to understand what is going wrong so I can fix it rather than just fixing it without understanding why anything has changed.

Any tips welcome.

Thanks

"I am guessing this is because either the Arduino or the shift registers are unable to deliver enough current."
You are correct. Neither part is proper for 8 or 16 LEDs requiring up to 20mA each.

More help can be suggested once you post a schematic of the parts are connected.
Which parts are sourcing the current and which parts are sinking the current?

Also, describe "row scanning" as this might mean something different to different people.
Looks like a common Anode part,
http://oomlout.com/DATASHEETS/LED-8X8M-03.pdf
so I would imagine driving all the anodes at once, then sinking a cathode at a time working your way across the anodes.
In which case the arduino driving resistors into anodes, with 74HC595 & ULN2803 as current sink on the cathodes would be a good combination (or a TPIC6B595 in place of the HC595/ULN2803).

Thanks for the quick reply. I can't post a schematic becuase I have no method of drawing one (other than paint which I feel would be painful) can you suggest something???

Each of the four shift registers is controlling the pins on one side of one matrix, this means that each registers controls 4 columns and 4 rows of one of the matrices. I did it this way to keep the wiring simple but I am now thinking that this is not a great idea because it means the current isnt being spread out amoung the registers.

As for understanding data sheets, I am guessing forward current is the value I am interested in and so to control 8 LEDs I will need 160ma.

Which value from the http://oomlout.com/products/DATASHEETS/IC-74HC595.pdf datasheet should I be looking at to see how much current they can drive.

By Row scanning I mean.
Apply a "HIGH" voltage a row pin and apply "LOW" voltage to each output pin corresponding to the LEDs we want to light. The two matrices are controlled independantly.

Thanks

I can't post a schematic becuase I have no method of drawing one (

The technique is to use something called a pen onto a flat sheet of what is known as paper.
Then photograph the result and post it.
How on earth you managed to make anything without a schematic I do not know.

www.expresspcb.com, easy to use & learn schematic softare. I use it all the time for posting stuff here.
I have also done stuff up in powerpoint when desperate/bored.

Unless your code is multiplexing thru all 64 LEDs and only allowing 1 to turn on at a time, those parts are not up to the task.
If you are turning on a whole row or a whole column at once, those parts are not up to the task of sinking or sourcing 8 LEDs worth of current.

Thanks for the software, I have drawn my schematic and hopefully it will help you to see where I am going wrong.

I havent had a chance to change anything yet from the comments raised so far. But I think I would re wire it so a single shift reg controls all the rows through transistors and the other shift registers control the columns. Does this sound right? Do I need to change anything else?

Thanks again.

Picture is not opening for me (site might be blocked at my end).

Method 1
control the anodes from shift registers and control the cathodes from transistors/ULN2803, or TPIC6B595.
If only one color or the other, anodes can be driven from Arduino pins.

Drive anodes, drive 1 cathode, pause, turn cathode off.
Repeat for next cathode.
If you want Red & Green on at same time (to get Amber kind of color), then need to drive cathodes in pairs, which means twice the anode current. In that case, use a part like UDN2981 to provide the anode current.

Method 2:
Drive 1 anode at a time from UDN2981, and sink all cathodes together, either from Arduino pins directly, or from HC595/ULN2803, or from TPIC6B595. All need current limit resistor.
Sink cathodes, drive anode, slight pause, turn off anode.
Repeat for next anode.

I'll see if I can open your drawing when I get home.

Yeah, that drawing doesn't help as you don't show which pins are anode & which are cathodes.

Otherwise, you are on the right track, need transistors in there for current sourcing or sinking.

Yeah, that drawing doesn't help as you don't show which pins are anode & which are cathodes.

Ah yea thats me being lazy... The anodes are the pins with the resistors connected into them and correspond to the matrix rows.

Otherwise, you are on the right track, need transistors in there for current sourcing or sinking.

I will draw up another schematic later with the transistors.

So this is how I am planning to re design my circuit: I have changed it so a single shift register controls the anode rows on both matrices, and the other four shift registers sink the cathode side of the matrix there are 16 green columns and 16 red columns across the 2 matrices.

Do you think this will work?

TIA

I will draw up another schematic later with the transistors.

Do you think this will work?

Not without transistors it won’t.

The ULN2803A is a transistor array...

Yes but they only sink not source.
You have nothing to source current.

Add pullup resistors to the outputs of the ULN2803 and you will be all set.
Shift out the cathode info to the the 4 Sink shift registers.
Then shift out 1 anode driver, pause then clear the anode driver.
Shift out next set of cathodes. Shift out 1 anode driver, pause then clear the anode driver.
Repeat for the next 6 rows.

If you decide that you would rather control the display in columns, add ULN2803's to the other shift registers as well.
Then, drive all the anodes high low as needed, sink 1 cathode, pause, turn the cathode off.
Drive the anodes, sink next cathode, pause, turn the cathode off.
Repeat for the next 14 sets.

Thanks for all the help, I will order the parts I need and let you know how I get on :slight_smile:

Yes pull up resistors on the ULN2803, so outputs aren't floating and kept high when the transistors are off.

Grumpy_Mike:
Yes but they only sink not source.
You have nothing to source current.

This would only be an issue if it was multiplexed by columns. If he multiplexed them by row, as CrossRoads's first example describes, then each channel on the 959s will only ever have to illuminate 1 LED at a time. If it was done by columns then each channel could potentially have to power up to 8 LEDs at once. Multiplexing by rows would be a better choice in my opinion. Plus the code will be easier to modify should he ever want to add more LED matrices.

so outputs aren't floating and kept high when the transistors are off

Outputs do not float, only inputs.
These are open collector outputs, they only pull down. Any source current has to be obtained through a pull up resistor.