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

LED matrix with less pins?

Status
Not open for further replies.

edeca

Active Member
I'm sure I've seen somewhere an LED matrix with minimum pins. I was going to pick up one of these:

LED Matrix - LEDM88G

Which looks perfect for use with Nigel's tutorial. However I'm sure I've seen a few really good circuits that use less port pins by implementing row/column driver ICs.

I've also seen Mike's excellent PWM version of a similar thing, but I assume that would need all the pins too.

Can anybody suggest what other components/ICs I should buy at the same time so that I can try it?
 

3v0

Coop Build Coordinator
Forum Supporter
Choose from the menu. If you have trouble understanding any of this pick the first option.

Use a processor with enough pins.

Use shift registers, 74hc595s work well. 3 pins per register chain. With some work you can get that down to 2 pins.

Buy a IC designed to do the work. Depends on the interface, SPI will be 3 pins.
 

Mike - K8LH

Well-Known Member
Consider using 8 bit or 16 bit serial-to-parallel "sinking" or "sourcing" driver ICs.

Example 9 pin design below can drive one to fourteen 8x8 modules. It uses 9 pins forming a high current display module bus which is also used as a 7 channel SPI interface to load the shift register of the source driver ICs on each module in parallel during display "off" time.

Similar designs using 9 or 10 pins can use "sinking" or "sourcing" driver ICs.

Other designs might use 3 pins (Data, Clock, and Latch or PWM) and an additional serial-to-parallel driver IC.

Mike
 

Attachments

Last edited:

edeca

Active Member
Thanks for both your replies. My futurlec order just arrived and I've got some 74HC595s and a matrix. I assume I can use these for the anodes fine.

For the cathodes, the datasheet suggests they can sink or source 25mA, so could I use another 74HC595 as a column driver? Or would transistors be a better solution?
 

krazy

New Member
I'm working on a project with an LED matrix that requires alot of power (each matrix element is 4 LEDs). I am doing exactly what 3v0 suggested... 74HC595s. They are chainable to a disgusting number of outputs and fairly fast (~20MHz, IIRC).

If you need to switch alot of power, throw in some Darlington Transistor Arrays - ULN2068B.
 

Russ Hensel

New Member
I'm sure I've seen somewhere an LED matrix with minimum pins. I was going to pick up one of these:

LED Matrix - LEDM88G

Which looks perfect for use with Nigel's tutorial. However I'm sure I've seen a few really good circuits that use less port pins by implementing row/column driver ICs.

I've also seen Mike's excellent PWM version of a similar thing, but I assume that would need all the pins too.

Can anybody suggest what other components/ICs I should buy at the same time so that I can try it?
This may be of use:

http://www.opencircuits.com/PointLess_LED_Array

uses a high and low side driver, but high pinout pic, so no port expansion.
Think it is the same led array you just got.
 

edeca

Active Member
Thanks, they are two useful links. However the PointLess one sure uses a lot of pins, surely the PIC could drive the array without the external ICs!

I guess my question really was: are the 74HC595s suitable for sinking & sourcing which would be a 6 pin interface to the 8x8 array.. Or am I going to have to use one 74HC595 to drive and 8 transistors which would use 11 pins?

I'm slightly confused how the 74HC595 sinks current rather than sources it, i.e. how it becomes an "input" rather than an "output".
 

Russ Hensel

New Member
Thanks, they are two useful links. However the PointLess one sure uses a lot of pins, surely the PIC could drive the array without the external ICs!

I guess my question really was: are the 74HC595s suitable for sinking & sourcing which would be a 6 pin interface to the 8x8 array.. Or am I going to have to use one 74HC595 to drive and 8 transistors which would use 11 pins?

I'm slightly confused how the 74HC595 sinks current rather than sources it, i.e. how it becomes an "input" rather than an "output".
the pointless does use a lot of pins, but current output is still limited. the dirvers are I think good for 500 ma per pin, with a total device current of a couple of times that. it is a very conservative design, but could be made very bright
 

edeca

Active Member
I'm slightly confused how the 74HC595 sinks current rather than sources it, i.e. how it becomes an "input" rather than an "output".
Ah, so it appears the OE pin on the 74HC595 controls this. I'll have a play and see if I can get normal output onto 8 LEDs first (via sinking & sourcing), then play with the 8x8 matrix.
 

Mike - K8LH

Well-Known Member
I guess my question really was: are the 74HC595s suitable for sinking & sourcing which would be a 6 pin interface to the 8x8 array.. Or am I going to have to use one 74HC595 to drive and 8 transistors which would use 11 pins?
Directly driving columns and rows from the 74HC595 outputs at a 1/8th or 12.5% duty cycle will not provide enough 'peak' current for a full brightness display.

If 10 ma forward current through an individual LED provides full brightness then you would need approximately 80 ma forward current or 'peak' current at your 1/8th duty cycle to provide 10 ma 'average' current and to perceive the same brightness level.

You need to provide 80 ma 'peak' current per LED at 1/8th duty cycle and you need to provide for up to 8 LEDs lighted at one time in a column or row, depending on which way you're multiplexing the display. That's 640 ma 'peak' current on your column or row drivers and that's why I use N-FET (sinking) or P-FET (sourcing) drivers on the rows in my design examples.

Good luck with your project.

Mike
 

3v0

Coop Build Coordinator
Forum Supporter
The concept of sinking and sourcing is simple.

A chip that is providing the GND for a LED is sinking the current. So a chip connected to the cathod (-) side of a LED will need to go low for the LED to light.

A chip that is providing the +V for a LED is sourcing the current. So a chip connected to the annode (+) side of a LED will need to go high for the LED to light.

The OE on the 75xx595 will cause the output pins to be tristated. Think of this a high impedance state, much like disconnected from the circuit.

OE is an active low input. For the chip to have hi or lo voltages on the output pins the OE must be at 0 volts.

Mike suggestion about using FETs is a good idea.

There are a number of chips that have the same logic as the 595 but provide more current. That allows you to have full brightness without the FETs. If you are interested I can see if I can find the numbers.
 

edeca

Active Member
That's really interesting, thanks both Mike and 3v0. I see now why you use FETs there and how the tri-state works.

Unfortunately I can also now see that the 74HC595s wouldn't manage to light an entire row at all. The pins can only sink or source 20mA, which is only enough to light one at a time (I hope my understanding is correct here). So the only way to drive an entire row at a time (with less pins) would be to combine it with an IC like the one used in the PointLess LED Array and use the 595s to drive the transistor array. Or use a different shift register like 3v0 suggested, if you have any suggestions that would be great.

I'm not sure how well it would display even a static image with 1 brightness level if I had to scan all 64 LEDs :)

I do have a bag of mixed transistors but I don't know if it will have anything suitable. So for the minute I'll try and get the shift register working (an exercise on its own) then consider other ones that can source more current, and maybe a bunch of FETs (or even a transistor array as it's only 8 columns) for the ground. That will still be 3 + 8 pins, which is very reasonable on a small PIC.

I am assuming that your code Mike lights (up to) one entire column at a time, e.g.:

- choose column
- turn on the required FETs to light those which should be ON
- (turn off all FETs again to stop ghosting?)
- next column

Thanks again for all your help. It seems designing the circuit is 90% of the work!
 

Mike - K8LH

Well-Known Member
I am assuming that your code Mike lights (up to) one entire column at a time, e.g.:

- choose column
- turn on the required FETs to light those which should be ON
- (turn off all FETs again to stop ghosting?)
- next column
I suppose it depends on your design. I normally scan rows so that's where I use the high current (5 amp) FETs and I only drive one row at a time. Here's the procedure I use;

1 - blank the display (take OE high on the driver IC)
2 - select new row (power up only one of the FETs)
3 - load the column shift register
4 - latch shift register data onto driver IC outputs
5 - display new row (take OE low on the driver IC)

Now I should probably point out that I connect the <LAT> and <OE> pins together and drive them with the PIC PWM signal line. This effectively performs steps 1, 4, and 5 for me automatically. All I do in my ISR is select the new row and load shift register data. The PWM signal also provides full "fade to black" display brightness control.

There's a relatively simple 7x8 prototype and software listing in this thread; 8x8 matrix proto' notes.

That example uses a serial-to-parallel sourcing driver IC. If you need to sink common cathode columns then you would probably want to use P-FET row drivers and a serial-to-parallel sinking driver IC as shown in the attached drawing.

<added>

Also wanted to mention that Russ's "pointless" design is very similar to the second design in my earlier post. Both designs use 500 ma sinking and sourcing driver ICs but my design only uses 3 pins because it's using serial-to-parallel ICs.
 

Attachments

Last edited:

srikanthsamaga

New Member
I'm sure I've seen somewhere an LED matrix with minimum pins. I was going to pick up one of these:

LED Matrix - LEDM88G

Which looks perfect for use with Nigel's tutorial. However I'm sure I've seen a few really good circuits that use less port pins by implementing row/column driver ICs.

I've also seen Mike's excellent PWM version of a similar thing, but I assume that would need all the pins too.

Can anybody suggest what other components/ICs I should buy at the same time so that I can try it?
You can also use 4094 with transistors...
:eek:
 

edeca

Active Member
You need to provide 80 ma 'peak' current per LED at 1/8th duty cycle and you need to provide for up to 8 LEDs lighted at one time in a column or row, depending on which way you're multiplexing the display. That's 640 ma 'peak' current on your column or row drivers and that's why I use N-FET (sinking) or P-FET (sourcing) drivers on the rows in my design examples.
Got it, thanks Mike. Just looked and I can only find the Si2323DS or Si2312BDS in SMD packages, which makes it much more difficult as I don't have any way to make PCBs.

However, the MIC5891 and MIC5821 pair in your earlier post look good as I only want 8x8. I could combine this with a suitable resistor pack (e.g. 47Ω) and column/row scan. I assume that this design was designed for 1/8 (not 1/64) duty cycle?

This seems much simpler than combining shift registers with a transistor array (e.g. ULN2803), if my assumptions are correct.
 

Mike - K8LH

Well-Known Member
Yeah, the Si2323DS is SMD. They do solder up quite nicely onto prototype board pads with 100th inch spacing.

Yeah, 1/8th or 12.5% duty cycle.

Regards, Mike
 

edeca

Active Member
Got it, I'll order the bits tonight and have a go. Thanks for all your help, I think I finally understand some more about how it works :)
 

cutemanikutti

New Member
Hi please any one would you able to help me to build the LED Matrix project? i have already designed it for 10x7 matrix. it's working nicely. but if i extend this to 20x7 then it s running and blinking fastly. i think the delay wil b a problem. now i want some guidelines from u. please it's urgent. help me. [email protected]. mail me the code in c
 
Status
Not open for further replies.

EE World Online Articles

Loading
Top