Hi Mr. Fields - I'd like to control as many at a time as possible. My plan
was to control one column at a time, and cycle through each column about
100 times per second. Does this seem like a good path to take, or is there
a better way to accomplish this? I thought that this method would allow the
board to be fairly simple (anode traces on the top of the board, cathode
traces on the bottom), and would be fairly easy to control (just 16 control
lines). Thanks,
-Michael. J Noone
---
If we set up a 4X4 array for the sake of simplicity, then using your
row-column scheme with common anode rows would yield this:
+--------+--------+--------+----C1
A| A| A| A|
[LED] [LED] [LED] [LED]
| | | |
+---+ +---+ +---+ +---+
| | | |
| +----|---+----|---+----|---+----C2
| A| | A| | A| | A|
| [LED] | [LED] | [LED] | [LED]
| | | | | | | |
+---+ +---+ +---+ +---+
| | | |
| +----|---+----|---+----|---+----C3
| A| | A| | A| | A|
| [LED] | [LED] | [LED] | [LED]
| | | | | | | |
+---+ +---+ +---+ +---+
| | | |
| +----|---+----|---+----|---+----C4
| A| | A| | A| | A|
| [LED] | [LED] | [LED] | [LED]
| | | | | | | |
+---+ +---+ +---+ +---+
| | | |
C1 C2 C3 C4
Then, adding the drivers:
V+
2N4403 |
+--------+--------+--------+----C E--[R]--+
A| A| A| A| B |
[LED] [LED] [LED] [LED] | | _
1,1| 1,2| 1,3| 1,4| +----[R]--|---<R1
+---+ +---+ +---+ +---+ |
| | | | 2N4403 |
| +----|---+----|---+----|---+----C E--[R]--+
| A| | A| | A| | A| B |
| [LED] | [LED] | [LED] | [LED] | | _
|2,1| |2,2| |2,3| |2,4| +----[R]--|---<R2
+---+ +---+ +---+ +---+ |
| | | | 2N4403 |
| +----|---+----|---+----|---+----C E--[R]--+
| A| | A| | A| | A| B |
| [LED] | [LED] | [LED] | [LED] | | _
|3,1| |3,2| |3,3| |3,4| +----[R]--|---<R3
+---+ +---+ +---+ +---+ |
| | | | 2N4403 |
| +----|---+----|---+----|---+----C E--[R]--+
| A| | A| | A| | A| B
| [LED] | [LED] | [LED] | [LED] | _
|4,1| |4,2| |4,3| |4,4| +----[R]------<R4
+---+ +---+ +---+ +---+
| | | |
|2N4401 |2N4401 |2N4401 |2N4401
C E-+ C E-+ C E-+ C E-+
B | B | B | B |
| | | | | | | |
| +----|---+----|---+----|---+
| | | | +-------------[R]------<C4
| GND | |
| | +----------------------[R]------<C3
| |
| +-------------------------------[R]------<C2
|
+----------------------------------------[R]------<C1
Now, if you wanted to illuminate the LED at 1,1 what you would do
would be to pull R1 low and C1 high. Likewise, for any LED in the
matrix you'd have to pull the row at its location low and the column
at its location high.
The display will need to be multiplexed, and the most efficient way to
do that would be to broadside data, a byte at a time, into the row
drivers and then to scan the columns. If you want to make a
non-flickering display, then the pixel update rate should be somewhat
higher than 30Hz, say 50Hz just to make sure. That means that since
you have eight columns an you have to refresh every pixel 50 times per
second, you'll be scanning columns eight times faster than that, or at
400Hz. Duck soup. However, it also means that since each LED will
only be illuminated for 1/8 of the time it will have to be made 8
times brighter for it to seem to be as bright as if it were on all the
time. If you use 20mA LEDs with 2N4401s and 2N4403s for drivers that
won't be a problem, but driving the LEDs with 160mA might be. You
need to look at the LED duty cycle amd maximum input current spec's to
be sure.
Assuming a 5V supply and 2V LEDs, the current limiting resistors come
out to be:
(V+) - Vled 2V
R = ------------- = ------- = 12.5 ohms
Iled 0.16A
The next higher closest standard 5% value is 13 ohms, so with 2 volts
across it it'll allow:
2V
I = ----- ~0.154 amperes
13R
Since all the lamps in a row could be on, one at a time with no
off-time between them, that means the resistor would be passing 154mA
all of the time, so it would be dissipating:
P = IE = 0.154A * 2V ~ 0.308 watts
So a half-watt resistor would be OK.
I don't know how much current you have available from your micro's
I/Os, but assuming you ran the drivers with a forced beta of 50, for a
maximum collector current of 154mA, your base current would be about
3mA, so with a 0.7V drop across the base-to-emitter junction you could
use:
0.7V
R = -------- ~ 233 ohms,
0.003A
the next lower standard 5% value, 220 ohms, would be fine if your
micro could supply 3.18mA.
The goal is to get as much current as you can out of the I/O in order
to make sure the transistors go into saturation so that you get the
smallest possible voltage drop across their collector-to-emitter
junctions.