Charlieplexing a 8x8 LED Matrix ? (How Do I)
Areal Person
Posts: 197
Hi,
·
How is everyone doing ?
·
QUESTION #1
·
It’s my understanding that I can use 16 pins of a Propeller to
drive 8 columns and 8 rows of standard 5mm LEDs at 3.3 vdc
(Only one LED would be on at any given time).
·
Is this true ?
·
QUESTION #2
·
Can I use Charlieplexing to reduce the number of pins required to drive
the same number of LEDs ?
·
If so, Could someone please help me figure out a simple schematic diagram
for Charlieplexing a standard group of 8x8 LEDs that are in a row & column
configuration ? I want to use a propeller chip to do this, but I need some help.
I’ve read documents on Charlieplexing, but I don’t understand how to do the
Charlieplexing wiring diagram for a simple 8x8 led matrix.
·
Here’s the wiki on Charlieplexing.
http://en.wikipedia.org/wiki/Charlieplexing
Maybe someone knows of a good url that will show me how to do it ?
·
Thanks for all the help,
-Areal
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a tree growing out of my head, but
what do you expect ? I'm a programmer.
·
How is everyone doing ?
·
QUESTION #1
·
It’s my understanding that I can use 16 pins of a Propeller to
drive 8 columns and 8 rows of standard 5mm LEDs at 3.3 vdc
(Only one LED would be on at any given time).
·
Is this true ?
·
QUESTION #2
·
Can I use Charlieplexing to reduce the number of pins required to drive
the same number of LEDs ?
·
If so, Could someone please help me figure out a simple schematic diagram
for Charlieplexing a standard group of 8x8 LEDs that are in a row & column
configuration ? I want to use a propeller chip to do this, but I need some help.
I’ve read documents on Charlieplexing, but I don’t understand how to do the
Charlieplexing wiring diagram for a simple 8x8 led matrix.
·
Here’s the wiki on Charlieplexing.
http://en.wikipedia.org/wiki/Charlieplexing
Maybe someone knows of a good url that will show me how to do it ?
·
Thanks for all the help,
-Areal
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a tree growing out of my head, but
what do you expect ? I'm a programmer.
Comments
Drive N * (N - 1) LEDs, so for 32 I/O pins thats...
32 * (32 - 1) = 32 * 31 = 992 LEDs....wow!
Is that right ?
And how would I calculate the max fixed frequency·so I can determine
the ratio of the ON time to the total pulse time to better understand how my Duty Cycles
will function ?
Remember, I'm a total newbe
Thanks,
-Areal
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a tree growing out of my head, but
what do you expect ? I'm a programmer.
Post Edited (Areal Person) : 8/13/2007 7:58:31 PM GMT
Question one, yes and one at a time.
Question two, www.maxim-ic.com/appnotes.cfm/appnote_number/1880 the fact that these are segmented makes no difference they are just 8 leds with a common cathode. You just need to treat each row of your 8X8 as one of these segmented displays by commoning their cathodes.
Graham
What are you thinking in use this method for ?
If it is, about your LED screen idea....forget it.
I think, this method is intended to be used with "segments displays" only... and such a quantity of leds that you name, will not have any bright at all.
You would need a very high current pulse to do that (impossible for leds)... and a very high multiplexing frequency... that is not viable (my opinion)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.
Alberto.
BTW: I think everyone of us has used "Two-wire-Charlieplexing" at least once in his electronic life - but not beeing aware of its name and its potentiallities...
Post Edited (deSilva) : 8/14/2007 1:59:39 AM GMT
To do what you say you want to do, you would need at least 9 pins.
1st row: connect pin 0 to all cathodes and pins 1-8 to anodes of each LED
2nd row: connect pin 1 to all cathodes and pins 0 and 2-8 to the anodes
3rd row: connect pin 2 to all cathodes and pins 0-1 and 3-8 to the anodes
You should see the pattern now.
for your software:
1st row: bring 0 low, bring all others high, and set DDR for output for the anodes corresponding to the LEDs you want lit
2nd row: bring 1 low, bring all others high, with DDR set for output on the ones you want lit
again...you should see the pattern
Hope this helps.
Ken
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
----
The more I know, the more I know I don't know.· Is this what they call Wisdom?
I continue thinking, that with such·short pulse needed to multiplex 992 LEDs, it is not possible to get some bright, without draining a significant curent through them (in that short time), I think it is the same as have a PWM signal driving one LED, with a "almost zero" duty cycle for each of them.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.
Alberto.
these two pictures from the Maxim app-note show the detailed current flow as each digit is illuminated. Looks like all eight elements of a digit can be lit at once. The software to drive it would be interesting though.
Edit: Looks like a fairly fancy output driver is needed on the driving chip for optimal performance.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Lunch cures all problems! have you had lunch?
Post Edited (Lawson) : 8/14/2007 6:13:41 AM GMT
Looking at the links, I noticed some guys selling kits based on this principle.· They hooked up 19 Bright Blue LEDS, 1 IR LED, a button, and 1 IR Reciever to an 8-pin pic.
http://www.2dkits.com/zencart/index.php?main_page=product_info&cPath=1&products_id=6
Here is an animation of the 'blinky' running one of it's patterns.
Here is the schematic for thier circuit:
http://www.2dkits.com/kits/19stick/19stick.pdf
Get a proper LED driver IC instead.
http://para.maxim-ic.com/cache/en/results/39553.html
Lots of ICs that works well on 3.3V...
They even have watchdog and LED-fault detection.
(Some have PWM brightness or daisy-chaining, too)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...
Read post number 2, he is talking about 992 leds and it doesn't matter if they are charlieplexed or multiplexed they would be on for 0.1% of the time.
Graham
It gives 16 channels of 12-bit PWM dimming, with dot correction if you need it, and it has a current limit of upto 120mA per channel. It will run on 3.3 or 5 volts and only uses 5 data lines plus 2 or 3 power lines (depends on wether you are using separate logic and LED power sources). The only other components you'll need are a 100nF decoupling capacitor and a current-limiting resistor.
Edit : I'm currently using BTXs code (thanks for that) to test my setup.
I guess I didn't see the 32 x 32 part.· I thought Areal was talking about 8 x 8.· Perhaps you can use latches for your columns and decoders for your rows.· You can even put decoders on your latches to reduce required pin count on the propeller.· I would take Gadgetman's advice and research what kind of drivers you can find too.
Ken
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
----
The more I know, the more I know I don't know.· Is this what they call Wisdom?
http://forums.parallax.com/showthread.php?p=651690
http://forums.parallax.com/showthread.php?p=658966
I am always astonished, that people try to use some fancy MSI chips for things the Prop can easily do by himself (or at least with a little help from some 74HC595 for 20 cents)
To my puristic opinion, there should be nothing connected to a Prop but resistors and caps
But we Germans have also funny attitudes wrt to beer...
Post Edited (deSilva) : 8/14/2007 8:34:34 PM GMT
I want to say thanks to everyone for all the help !!
I've been working with a LM317 as a current regulator and I've tested a single 3.8 fV
LED successfully with 12vdc if I use a 410ohm resistor. I'm not sure how high I can raise the voltage.
I think Thats...
I=(1.25 / 410ohm = 0.01)
Because of everyones help, I think I will be successful with this project (even if I do haft to change some things around).
I'll post some pictures real soon of my progress.
Actualy, I'm working on a 12x12inch PCB that holds 768 led's (19mm dot pitch)
I'm going to use the propeller proto board for the controller.
I just thought...
1) if I could regulate the current and raise the voltage high enough for PWM & duty cycle of 768 led's
2) and if I could use Charlieplexing to reduce the amount of required pins that
I would be able to drive a 12x12 inch RGB led panel with just the propeller
chip, using PWM and duty cycles, I know that may be pushing it.
But...
Can the propeller do it ?
I love my propeller chip !
Thanks,
-Areal
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a tree growing out of my head, but
what do you expect ? I'm a programmer.
(1) we can provide nearly 40 mA according to the newest datasheet = 100 uA per LED.
The LEDs are assumed to shine with 2.000 mcd @ 20 mA, which means 10 mcd @ 100uA , thats nearly bright
A refresh of 100 Hz will suffice, thus we need a 40 mA pulse of 10 us. But there is a not negligeable capacitance to drive! A gross calculation (400 x 5 pF x 100 Ohm = 200 ns) however shows it's not yet in the order of a lowpass nuissance.
(2) But we can do much better! We can choose a refresh scheme lighting LEDs in more than one "row" at the same time! This needs some calculations, as we have to omit the LEDs the "other" pin of which are needed for another LED to shine,
and come back to them later:
(3) A similiar but much easier scheme will allow you to shine the display with always the same brightness of "one super bright LED equivalent": You have just to sort out the LEDS to shine and cycle through them. This is no advantage when half of the display or more is on anyway...
DeSilva, I don't understand your 3)
Graham