Pages: [1]   Go Down
Author Topic: drive current of 5x5 RGB LED matrix—NEED URGENT HELP!  (Read 2415 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 158
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!!


* Photo on 2011-04-29 at 18.56.jpg (55.62 KB, 640x480 - viewed 30 times.)
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: April 29, 2011, 06:35:28 pm by madworm » Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Offline Offline
Full Member
***
Karma: 0
Posts: 158
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh hey madworm, are you the same madworm who made that RGB LED matrix on Instructables? I'm the one who posted that question about whether you had any schematics or photos of the circuit before you had your PCB made. lol.

To answer your questions:
- 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?
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-twist

Now I must go and travel to some of the still remaining parallel universes and eliminate the duplicates.
« Last Edit: April 29, 2011, 08:01:59 pm by madworm » Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Offline Offline
Full Member
***
Karma: 0
Posts: 158
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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.
« Last Edit: April 29, 2011, 08:30:56 pm by madworm » Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Offline Offline
Full Member
***
Karma: 0
Posts: 158
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 158
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I'm basically looking to do something like this, right?

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

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: April 29, 2011, 09:49:40 pm by madworm » Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Offline Offline
Full Member
***
Karma: 0
Posts: 158
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I haven't dealt with cubes so far - and I never will.

Dealing with an NxN rgb matrix properly is all the complexity I can tolerate. If you build your circuitry to do 8x8, you can sub-divide that into 3 layers of 3x3. 1/8 multiplexing should be a bit brighter than 1/9.
Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Pages: [1]   Go Up
Jump to: