25x6 LED array

Thread Starter

warr

Joined Jan 31, 2010
1
Let me just start off by saying I have never worked with microcontrollers before, so please bear with me. I do have some experience in designing circuits and intend to use a C compiler via MPLAB to program the microcontroller.

My objective is to build an LED array (25x6). I would like to be able to display various patterns on it. Can I do this with a single microcontroller? Is there any way to design it so that the LEDs will remain on? All the LED arrays I've looked up on the net take advantage of persistence of vision. These use outputs on the microcontroller for each column and row in the array. Even if I modelled my 25x6 as a 12x13, this would still require 25 outputs. So this design doesn't appear scale to larger arrays (if you are using a single microcontroller) since there wouldn't be enough time to go through every row/column before the human eye notices. Is the only solution for larger arrays to use multiple microcontrollers (basically 2 LED arrays)? Are there perhaps something like a memory array I could use to store high/low logic for individual rows 12 LEDs (ie microprocessor tells row1 memory bank: 010010100110) such that exploitation of persistence of vision would not required?
 

joeyla

Joined Nov 14, 2006
2
How about something like TPIC6C595. With just 3 io's you can cascade lots of them and latch the led's to remain on. These can sink about 100mA per channel.

You could even just use 74HC595 if you're only sinking 20mA per channel. Again you can cascade and latch as many as you want.
 

Art

Joined Sep 10, 2007
806
25x6 pixels is only 150 LEDs. I just did that with 144 LEDs and a pic 16F877.
http://www.youtube.com/watch?v=Q_pF8WSTVGU
http://www.youtube.com/watch?v=ICsi2mhrH94
The power LED at the bottom is another output that could have easily been
used for another row of 18, and there are still IO pins to spare for the joystick.

To answer your question there are port expanders from Dallas/Maxim that ( I believe) do that.
Also a shift register can translate a serial input to 8 LEDs.
An interupt driven microcontroller program (running on multiple microcontrollers) could be used.
I plan on making three of these units with routines to make them cooperate as a large 6 digit clock.
Art.
 

BMorse

Joined Sep 26, 2009
2,675
Let me just start off by saying I have never worked with microcontrollers before, so please bear with me. I do have some experience in designing circuits and intend to use a C compiler via MPLAB to program the microcontroller.

My objective is to build an LED array (25x6). I would like to be able to display various patterns on it. Can I do this with a single microcontroller? Is there any way to design it so that the LEDs will remain on? All the LED arrays I've looked up on the net take advantage of persistence of vision. These use outputs on the microcontroller for each column and row in the array. Even if I modelled my 25x6 as a 12x13, this would still require 25 outputs. So this design doesn't appear scale to larger arrays (if you are using a single microcontroller) since there wouldn't be enough time to go through every row/column before the human eye notices. Is the only solution for larger arrays to use multiple microcontrollers (basically 2 LED arrays)? Are there perhaps something like a memory array I could use to store high/low logic for individual rows 12 LEDs (ie microprocessor tells row1 memory bank: 010010100110) such that exploitation of persistence of vision would not required?

The whole reason behind why most people utilize POV (Persistence of Vision) is to save I/O's on a uc, and or save power.... and also to be able to "control" each LED's state..... check out this 8x8 LED Matrix I designed based around the PIC16F84A uc, and I only used 10 I/O's from the uc to control 64 LED's and with 1 more pin I can expand the display to 128, 2 more I/O's and I could easily expand it to 512 LED's......


View attachment 8x8_LED Matrix.pdf
 

Art

Joined Sep 10, 2007
806
I really like that one Brent.

I understand you just pulse portA.1 to turn on the next output.
What do you do with the line connected to portA.0?

EDIT,,, Ah I get it. You reset because you aren't using all 10 outputs of the 4017 :)

EDIT again,,,
I only used 10 I/O's from the uc to control 64 LED's and with 1 more pin I can expand the display to 128
So it seems you could have 80 LEDs instead of 64 using the same number of pic pins, but adding to the array by using
the other two outputs of the decade counter, then you could add another 80 LEDs for every pin of the microcontroller.
 
Last edited:

BMorse

Joined Sep 26, 2009
2,675
I really like that one Brent.

I understand you just pulse portA.1 to turn on the next output.
What do you do with the line connected to portA.0?

EDIT,,, Ah I get it. You reset because you aren't using all 10 outputs of the 4017 :)

EDIT again,,,

So it seems you could have 80 LEDs instead of 64 using the same number of pic pins, but adding to the array by using
the other two outputs of the decade counter, then you could add another 80 LEDs for every pin of the microcontroller.

Yes you are right Art, I am only using 8 out of 10 outputs on the 4017...... I also did another display that was 8 x 20 and another that was 5 x 25....

I had also made a 7x20 display using maxim's MAX6952 IC, it is only a 4 wire IC so I only used 4 pins on the uc to control 144 LED's...

 

Art

Joined Sep 10, 2007
806
One day it would be nice to make a bigger one, and it would be nice to steal borrow that idea.
It's not how I would have gone about it. I was thinking shift registers.
Suddenly serial communication seems inelegant.
 

atferrari

Joined Jan 6, 2004
4,766
Hola Brent,

Few questions:

a) You choose the 4017 amongst others? If so, which ones and why did you preferred it?

b) What is the reason / justification for not using resistors at the base of the PNP transistors? I wonder how safe is it.
 

BMorse

Joined Sep 26, 2009
2,675
Hola Brent,

Few questions:

a) You choose the 4017 amongst others? If so, which ones and why did you preferred it?

b) What is the reason / justification for not using resistors at the base of the PNP transistors? I wonder how safe is it.

A) I chose the 4017 Johnson Counter since that is what I had on hand....

B) The LED's are only on for a fraction of a second, doesn't seem to affect the PNP much.... I have had my 8x8 LED display running for a couple of years now and it is still going...... so I would assume it is pretty safe for the transistors.... if the LED rows where to be kept "on" longer than a split second, I would suggest using 100 or 200 ohms at the base of each 3906...
 

Art

Joined Sep 10, 2007
806
I saw that one, and I don't imagine it would be safe if your program accidentally stopped,
or you made a mistake with the 4017.
 

BMorse

Joined Sep 26, 2009
2,675
I saw that one, and I don't imagine it would be safe if your program accidentally stopped,
or you made a mistake with the 4017.

Thats why I keep the watchdog timer running in case the program does stop.... which I am pretty confident it won't....

Make a mistake ????:eek: I use the 4017 in other circuits and applications, I can also read datasheets pretty well, so a mistake in hooking up an IC would be highly unlikely (but if I did, it would be just another learning experience :rolleyes:), but for some others who are unsure of their programming/circuit building abilities or "newbies", I recommend for them to add those resistors.....
 

Art

Joined Sep 10, 2007
806
I meant someone else make a mistake, like me perhaps ;)
I just completed a pic programmer kit and fried it with too high supply voltage, so it happens.
I also had a look at the other Maxim-Dallas device you mentioned.
Nice that it includes a built in font. That was a painfully long and boring thing to do.
 

BMorse

Joined Sep 26, 2009
2,675
I meant someone else make a mistake, like me perhaps ;)
I just completed a pic programmer kit and fried it with too high supply voltage, so it happens.
I also had a look at the other Maxim-Dallas device you mentioned.
Nice that it includes a built in font. That was a painfully long and boring thing to do.
Yeah, built in fonts are very handy, there were plenty of times where I had to create my own fonts, but for these LED based message displays I had created an "LED Font Creator" to help in designing fonts and other graphics for POV displays....



the app can be downloaded here >> http://www.morse-code.com/id45.htm
 

Art

Joined Sep 10, 2007
806
I just had another thought... can you turn off all 10 outputs on the 4017?
If not, you could only use 9 outputs if you were using multiple 4017 counters.
Otherwise one output is always going to be on, and if you're using two of them,
two outputs are always going to be on, which means two columns of the display
are always going to be on, which means you can't address every column uniquely.
 

BMorse

Joined Sep 26, 2009
2,675
I just had another thought... can you turn off all 10 outputs on the 4017?
If not, you could only use 9 outputs if you were using multiple 4017 counters.
Otherwise one output is always going to be on, and if you're using two of them,
two outputs are always going to be on, which means two columns of the display
are always going to be on, which means you can't address every column uniquely.

only one output of the 4017 is on at a time, but unfortunately 1 always stays on :(, that's why I only use 8 (or 9) out of the 10 outputs, I also forgot to mention that in my 8 x 20 display I used another IC also similar to the maxim one that I mentioned :rolleyes:..... the only display I have ever used the 4017 on is the 8x8 LED matrix....
 

atomo2

Joined Jun 3, 2010
1
I made my own 8x8 matrix-but i don't know how to expand it using 4017. I cascaded 2 4017s but it doesn't work. Do I program the clock and reset individually and connect to the second one? Help me please
 

MMcLaren

Joined Feb 14, 2010
861
The only problem I see using 4017's is that as you add another 8 columns you will be decreasing the duty cycle. The 1/8th duty cycle of an 8x8 matrix will decrease to 1/16th duty cycle on an 8x16 matrix or to 1/24th on an 8x24 matrix.

If you want to maintain the same LED brightness that you would get with 10-ma "average" current you would need about 80-ma "peak" current per LED with a 1/8th duty cycle matrix or about 160-ma "peak" current per LED with a 1/16th duty cycle matrix. Many LEDs only have a "peak" current rating of 100-ma or less.

Better to scan "rows" instead of "columns" to maintain a nice managable 1/8th duty cycle that doesn't change as you add columns to the matrix.

Cheerful regards, Mike
 

Attachments

Last edited:
Top