M
Mike Garner
Guest
I am at the design stage of a visual effect which will comprise 25
squares, each with a red, green & blue LED, driven by a
microcontroller to achieve different colour mixes.
Initially, I am thinking of connecting the LEDs in a "row/column"
arrangement, using 3 power MOSFETs to drive the anodes of the
red/green/blue "rows" and driving the cathodes of each square
("column") through a 74HC595/ULN2803 combination (with appropriate
resistors for each LED). The idea is to load the data serially to the
HC595s, light up that row, then onto the next etc.
I was thinking of a scan frequency of 70Hz to prevent visible flicker
but this is where I'd appreciate your comments.
My initial thought is to use an 8 bit counter, counting down from 255
to 0 and comparing this to a preprogrammed value for each LED. If the
value is <= the count then we light up that LED. I've prototyped this
for 1 "square" (using 1x red, 1x green & 1x blue LED) and it works
well.
If I scale this up to 25 squares, I get the following result - 70Hz
scan x 3 colours = 210Hz row scan frequency. If each colour has 256
possible brightness settings, this equals 53,760 shift register
"loads" per second (which is quite high but not unachievable).
1. Is this calculation correct?
2. Do I need to scan at 70Hz?
3. Is there a better way of doing it?
Thanks,
Mike
squares, each with a red, green & blue LED, driven by a
microcontroller to achieve different colour mixes.
Initially, I am thinking of connecting the LEDs in a "row/column"
arrangement, using 3 power MOSFETs to drive the anodes of the
red/green/blue "rows" and driving the cathodes of each square
("column") through a 74HC595/ULN2803 combination (with appropriate
resistors for each LED). The idea is to load the data serially to the
HC595s, light up that row, then onto the next etc.
I was thinking of a scan frequency of 70Hz to prevent visible flicker
but this is where I'd appreciate your comments.
My initial thought is to use an 8 bit counter, counting down from 255
to 0 and comparing this to a preprogrammed value for each LED. If the
value is <= the count then we light up that LED. I've prototyped this
for 1 "square" (using 1x red, 1x green & 1x blue LED) and it works
well.
If I scale this up to 25 squares, I get the following result - 70Hz
scan x 3 colours = 210Hz row scan frequency. If each colour has 256
possible brightness settings, this equals 53,760 shift register
"loads" per second (which is quite high but not unachievable).
1. Is this calculation correct?
2. Do I need to scan at 70Hz?
3. Is there a better way of doing it?
Thanks,
Mike