Go Down

### Topic: drive current of 5x5 RGB LED matrix—NEED URGENT HELP! (Read 4787 times)previous topic - next topic

#### ahhreeyell

##### Apr 30, 2011, 12:58 am
Hi everyone,

I have a project that's due on Tuesday. I was going to make a 5x5 RGB LED matrix powered by the arduino (and connect it to shift registers), but I just realized that I'm going to need something to drive the current to the LEDs. I tried using PNP transistors to do this (see the schematic I attached), but then the LEDs went really dim. I really don't know what to do. Please help me out--it's my final project and it's due Tuesday! Thanks!!

#1
##### Apr 30, 2011, 01:29 amLast Edit: Apr 30, 2011, 01:35 am by madworm Reason: 1
Did you measure your voltages/currents ?

I bet the RED ones were quite OK?

Don't use a common/shared current limiting resistor, you need one for each color and LED. If you multiplex per row, you can share the resistors between the rows, as only one is active at any given time. 15 resistors...

What is the voltage drop across your 10 Ohm resistor? If it is anywhere near or even above 2V, you have a problem.

#### ahhreeyell

#2
##### Apr 30, 2011, 01:51 am

- I had my LEDs powered by an external source of 6.4 V. I didn't measure the current. Where should I measure it on my circuit?
- No, they were all equally dim.
- I have one transistor for each color, but I have two LEDs connected to those transistors. It's all there in my schematic.
- I tried measuring the voltage across it. I took my multimeter and put the probes to the resistors while the circuit was being powered. Nothing happened. I tried taking out one leed of the resistor and sticking a wire in its place instead, then measuring the voltage between the two. The LEDs got really, really bright when I did that. Then once I took the probes away, the LEDs got even dimmer. They don't even light up now, except for when I touch one of the transistors or resistors. Then they get really, really bright.

I have no idea what's going on.
Could I use something like this to power my matrix instead? http://arduino.cc/en/Tutorial/RowColumnScanning or multiplexers or shift registers?

#3
##### Apr 30, 2011, 02:48 amLast Edit: Apr 30, 2011, 03:01 am by madworm Reason: 1
Using just shift registers with resistors will work, but it won't be very bright. Looking at the shortage of time, it may be the way to go. Wiring up the matrix will be unpleasant enough. Remember: one resistor for each color per led per row/column.

If you plan to use the pnp transistors and you have a decent electronics store in your town that is open on Saturdays, you should try getting common anode leds. You could ask for 8ch led drivers as well, but that might not be successful. Then you would be done with just 5 pnp transistors for the 5 rows and could use 3 shift registers for the 15 cathodes (and resistors, 20mA max.) (per row. but they are shared). That would be a bit brighter than just using shift registers for sourcing and sinking current. But be warned, that you cannot use anything else than 5V for the leds as well. If you need a higher supply voltage, you'll need npn-s to drive the pnp-s, otherwise they never turn off. The arduino would have to output more than 5V, which it can't.

It appears that you have built your circuit on breadboard. If you get strange behaviour, make sure that the wire's actually have good contact and are thick enough to make that happen. This is one short path to insanity.

Substituting the 10Ohm resistor with a wire is not a good idea. It would help if you made another drawing indicating where you put your volt-meter's leads.

But before you do that:

I bet 'Grumpy Mike' would probably use severe language for the schematic you've posted. With just one resistor per led it just can't work, you need 3 per led. It should be trashed. Also it doesn't make any sense to share the transistors across the leds, if you need individual color control (with the exception of shades of gray for all of them).

And regarding your other question: yes it is me. There can only be one  ]

Now I must go and travel to some of the still remaining parallel universes and eliminate the duplicates.

#### ahhreeyell

#4
##### Apr 30, 2011, 03:05 am
I can't get common anode LEDs; that isn't an option.

I'll put up another drawing once I get home.

What do you mean by three resistors per LED? I'm confused. Where on the schematic do they need to go? You mean that each anode pin on each LED needs a resistor?

Also, how much would the following ICs help with a project like this?
CD4067BE (http://www.alldatasheet.com/datasheet-pdf/pdf/157680/TI/CD4067BE.html)
74LS257 (http://www.datasheetcatalog.com/datasheets_pdf/7/4/L/S/74LS257.shtml)
74LS139 (http://www.alldatasheet.com/datasheet-pdf/pdf/8082/NSC/74LS139.html)
74LS251 (http://www.datasheetcatalog.com/datasheets_pdf/7/4/L/S/74LS251.shtml)

#5
##### Apr 30, 2011, 03:24 amLast Edit: Apr 30, 2011, 03:30 am by madworm Reason: 1

I can't get common anode LEDs; that isn't an option.

bummer... maybe that was an intentional decision by 'someone'.

Quote

I'll put up another drawing once I get home.

What do you mean by three resistors per LED? I'm confused. Where on the schematic do they need to go? You mean that each anode pin on each LED needs a resistor?

Oh yes... but you can share between the rows though (if you multiplex by rows).

Quote

Also, how much would the following ICs help with a project like this?
CD4067BE (http://www.alldatasheet.com/datasheet-pdf/pdf/157680/TI/CD4067BE.html)
74LS257 (http://www.datasheetcatalog.com/datasheets_pdf/7/4/L/S/74LS257.shtml)
74LS139 (http://www.alldatasheet.com/datasheet-pdf/pdf/8082/NSC/74LS139.html)
74LS251 (http://www.datasheetcatalog.com/datasheets_pdf/7/4/L/S/74LS251.shtml)

The current driving capabilities of these logic chips aren't any better than the plain 74HC595 shift registers (which are easy to use and known to work btw). If you could get hold of 'TPIC6C595' or similar, that could potentially be a massive improvement if used together with the PNP transistors. You'd still need current limiting resistors. These power-595-s can only sink current. Most (if not all) of the available led drivers can't be used with your common cathode leds...

If you only have the simple 595 chips and are desperate, you _can_ daisy-chain _and_ piggy-back these btw. (wire them up in parallel) to get more driving capability. It's not guaranteed to last forever, but I've done it. If you do that, make sure to de-activate the output drivers with the 'enable' pin until the new data has been shifted in. This should prevent short circuiting them. This assumes that the daisy-chained and paralleled ones get the same data of course. You don't want two paralleled pins to have different logic states.

#### ahhreeyell

#6
##### Apr 30, 2011, 03:34 am
What do you mean by daisy-chaining and piggy-backing, exactly?

Also, when you say "it's not guaranteed to last forever," what does that mean? How bright will it be?

What do you mean by "de-activating the output drivers"?

How would I wire all of this? Do you have a schematic? That would help IMMENSELY!

Remember that you're dealing with a real noob here. You're using a lot of terminology that is new to me. Having said that, I can't stress how grateful I am for your help. Thanks!

#### ahhreeyell

#7
##### Apr 30, 2011, 03:41 am
So I'm basically looking to do something like this, right? http://www.youtube.com/watch?v=R7xI-flj1Mw&feature=related

Will my LEDs be as bright as his if I use only shift registers and nothing else?

#8
##### Apr 30, 2011, 03:53 am
Per article in the playground, 595 chips can be wired such that they logically form a chain. Data is sent to the first chip and gets forwarded to the 2nd and so on. As per its datasheet the 595 can source 20mA or thereabouts and sink a bit more (per channel). If two or more channels are physically wired to act as one, this number can go up. Such an arrangement would live long enough to finish a presentation, possibly longer if not used abusively.

Brightness... if you plan to use your project in broad daylight, it won't be visible. If you're in a moderately lit room it will be clearly visible. If you're in a cave, you'll be fine.

On the 595 chips there's one pin that shuts off the power if it is connected to +5V (I think).

As I answered on instructables, my blog is your friend. It has everything (if you use shift registers only) you'll need. If you desire more information for a better way to do it, have a look at Grumpy Mike's website. He's built an RGB monome.

I don't know if I'm being helpful... in the right way...

#9
##### Apr 30, 2011, 04:30 amLast Edit: Apr 30, 2011, 04:49 am by madworm Reason: 1
I bet the person in the video has chosen the current limiting resistors a bit on the conservative side. Also he's not multiplexing at all, which makes it dimmer again.

How bright will it be... with the 595 chips you will definitely see it inside buildings, but not in direct sunlight. Maybe as bright as the LED of an optical mouse (in power save mode, not when it's scanning the surface). The human eye is quite adaptable. If you used more advanced chips (common anode leds...) you could go as far as hurting your eyes.

Regarding the video: I don't consider his leds as 'bright'. They are quite dim.

This is bright(er):

This is what you can expect to get whit 595 chips in a dim room:

It looks a lot brighter on the photo than what your eyes will tell you.

#### ahhreeyell

#10
##### Apr 30, 2011, 11:15 pm
Thanks so much! I figured out how to light up individual rows of LEDs using row-column scanning AND using shift registers. Both methods work. The brightness isn't an issue at all.

I think I'm going to make a 3x3x3 RGB LED cube instead. It'll utilize about the same amount of LEDs as a 5x5 matrix, so I figure it shouldn't be an issue. I'm already about a third finished with the construction of the cube. I just need to know though, how do I control the different levels of the cube? Do you have experience with those? I came across an Instructable that uses transistors for that, but the schematic/instructions were very unclear: http://www.instructables.com/id/LED-Cube-and-Arduino-Lib/step4/Using-the-Software/. Any ideas? Thanks!