Driving a 5x7 LED Matrix

Hey everyone,

I'm having a little trouble figuring out how to drive a 5x7 matrix (row cathode, column anode) with as many digital and analog lines unused as possible. I was planning to use a 74HC595 to drive the columns, and a 74HC595 driving a ULN2803A for the rows. I was told that a 74HC595's recommended drive current was +/- 6 mA. That wouldn't work for my purpose. Now I'm stumped. I can't find an IC that can source 20mA on at least five outputs continuous. Someone mentioned using a transistor or a FET, but I have no idea how to wire up one of those to source current (I'm an electronics n00b). Does anyone know of an IC that can do what I need to and is readily available from Digikey or Mouser in a DIP package? Or a way to wire up a transistor or FET? Help would be appreciated.

Thanks!

A TPIC6B595 is a high-output version of the 595 and was made for applications like yours.

As I understand it, those can only sink current. I need something that can source current to drive the anodes of the LEDs.

Yes, by itself it is good for only one side of your matrix. I don't know of an integrated solution for the source-switching side.

Right, either that shift register or a ULN2803A can sink the current. I just can't figure out what to use for a source.

An integrated transistor array. Or discrete transistors?

I can't seem to figure out how that would work. Would I have to wire the collector to 5V and the emitter to the anodes via a 150ohm resistor?

I can't seem to figure out how that would work.

Use a PNP transistor. Emitter to + collector to your matrix, base to arduino pin through a 1K resistor.

Use a PNP transistor. Emitter to + collector to your matrix, base to arduino pin through a 1K resistor.

Like this?

Please excuse my horrible schematic drawing skills.

An ATmega328 will source 20mA per pin for fives pins and is usually
available from Digikey or Mouser :wink: Quite a bit more work to integrate
than transistors but could give you some additional benefits.

I would use P channel FETs or the PNP transistors that others have suggested.

(* jcl *)

I would use P channel FETs or the PNP transistors that others have suggested.

I wouldn't there is no need to here.

Yes that is it. Although I would put the current limiting LED in the column and not the row. The transistor normally supplies the current for the whole row with only one LED per column being on at any one time, so that is the place to put them.

I wouldn't there is no need to here.

Yes that is it. Although I would put the current limiting LED in the column and not the row. The transistor normally supplies the current for the whole row with only one LED per column being on at any one time, so that is the place to put them.

That clears things up. Thanks! Just one last question pertaining to the TPIC6C595. Those are open-drain shift registers right? So, would the FETs inside have a voltage drop over the drain and source like BJTs have over the collector and emitter? I probably need to take that into account while planning for the LED resistors. Oh, and what would be a good PNP transistor for the rows? I'm probably gonna have two of these matrices, so they should be able to withstand 200mA ea. Also, I've seen in many PNP circuits that there is also a resistor (normally labeled RC or RL to ground in parallel with the load. Is this necessary? Like this?

Thanks for everything!

would the FETs inside have a voltage drop over the drain and source like BJTs have over the collector and emitter?

No FETs don't have a voltage drop as such but they do have an "on resistance" and when current is flowing down them this produces a voltage drop. The good thing about FETs is that this on resistance is not very big. In the shift register however it is bigger than most FETs but still small compared with your current limiting resistor. From the data sheet the "static drain source on resistance" is quoted at around 12R maximum.

Also, I've seen in many PNP circuits that there is also a resistor (normally labeled RC or RL to ground in parallel with the load. Is this necessary?

No you have the LED, current limiting resistor and shift register as your load.

what would be a good PNP transistor for the rows

There are lots and lots, just go for a current rating of at least 400mA if you want to switch 200mA. Just looking through Farnell this looks good but it depends of if you supplier stocks it:-
http://uk.farnell.com/fairchild-semiconductor/2n3702/transistor-pnp-to-92/dp/1467861

There are lots and lots, just go for a current rating of at least 400mA if you want to switch 200mA. Just looking through Farnell this looks good but it depends of if you supplier stocks it:-
http://uk.farnell.com/fairchild-semiconductor/2n3702/transistor-pnp-to-92/dp/146...

Hmm... Well, Digikey doesn't stock 2n3702s, but they do have 2n4403s.

OK, now I'm confused. The datasheet lists a Vbe saturation voltage and a Vce saturation voltage. Which one do I take into account while planning for the LED resistors? My LED matrices have a 2.05V forward voltage at 20mA. So, I would use 150 ohm resistors if there wasn't a voltage drop on the transistors, but there looks to be a fair voltage drop for 200mA, about .5V on the CE and 1V or so on the BE.

The datasheet lists a Vbe saturation voltage and a Vce saturation voltage. Which one do I take into account while planning for the LED resistors?

The Vce as the emitter collector volts drop is in the current path you are interested in. You are not interested in the base emitter volts drop.

So if you have 2.05V on the LED and 0.5V on the transistor you have a total of 5 - (2.05 + 0.5) = 2.45 Volts to drop across your current limiting resistor.

The Vce as the emitter collector volts drop is in the current path you are interested in. You are not interested in the base emitter volts drop.

So if you have 2.05V on the LED and 0.5V on the transistor you have a total of 5 - (2.05 + 0.5) = 2.45 Volts to drop across your current limiting resistor.

OK, so I should use a 122 ohm resistor. Nearest standard is 150 ohm. 17mA through the LEDs is fine. Finally. I can place my order with Digikey. Thanks for all the help.

On the PNP transistors I found, the Emitter-Base Breakdown Voltage is listed to be 5V in the datasheet. Does this mean that If I apply 5V to the base, the transistor will blow up or something?
Datasheet: Intelligent Power and Sensing Technologies | onsemi

If the emitter is connected to 5V to get 5V between the base and emitter you have to apply 10V to the base. You can't get that much from an arduino.
The 1K base resistor will stop any more than -0.7V being applied to the base when the arduino's output is zero.

In other works its fine.

Ah, OK. I think I finally understand PNP transistors. :slight_smile: Thanks!