Re: Multiplex question for multiple RGB LEDs
- From: Fred Bloggs <nospam@xxxxxxxxxx>
- Date: Thu, 03 Apr 2008 10:26:12 -0400
Mike G wrote:
I have previously used PWM for colour mixing single RGB LEDs (purely
for hobby purposes if anyone from Philips IP Department is watching).
I'm trying to scale this approach to achieve individual control of 80
RGB LEDs (common anode) but I'm having problems.
I was proposing to use the following hardware method:
Tie all the Red cathodes to a MOSFET or NPN transistor, ditto Green &
Blue. Scan these at 300Hz (to get a 100Hz overall refresh) and drive
the 80 anodes from transistors using latched data from 74HC595s.
The problem comes in (my understanding of?) the method of PWM dimming.
In the single working prototype, I used a microcontroller with each
RGB tied to individual port pins. A timer interrupt occurred at approx
25,500Hz (to give 255 levels @ 100Hz) and within this an 8 bit
variable "gate" was decremented. If this result was less than the
value of either R, G or B, the respective LED was switched on, if it
was greater, it was switched off.
This has worked fine but trying to scan 3 columns requires an
interrupt at 76,500 Hz which is proving problematic. I have access to
AVRs or PICs.
Any advice appreciated.
Actually if you simply toggle the clock output for every interrupt at 25500Hz, that gives you 12750Hz, and the ring counter partitions the LED anode drives at 33% anyway. This makes things easier for the LEDs, because you have to drive them with 3x the current, or more, for same brightness as steady state, and the 12750Hz higher frequency means a pulse duration of only 78us at this elevated instantaneous power dissipation versus 3.3ms with the 300Hz. Transistor switching losses increase, but these can be made negligible at that frequency.
View in a fixed-width font such as Courier.
..
.. V+
.. |
.. .-------+------.
.. | | |
.. | | |
.. __ | | |
.. R>---------------| \ | | |<
.. | o-----|-------|----|
.. .---------|__/ | | |\
.. | | | |
.. | | | |
.. 100Hz | __ | | |
.. G>-----|---------| \ | |< |
.. update | | o-----|-----| |
.. | .------|__/ | |\ |
.. | | | | |
.. | | | | |
.. | | __ | | |
.. B>-----|--|------| \ |< | |
.. | | | o---| | |
.. | | .---|__/ |\ | |
.. | | | | | |
.. | | | | | |
.. | | | B-anode G-anode R-anode
.. | | |
.. | | |
.. -----------
.. | Q0 Q1 Q2 |
.. 12750Hz>---> |
.. | 4017 |
.. -----------
.. ring counter
..
..
..
..
.
- Follow-Ups:
- Re: Multiplex question for multiple RGB LEDs
- From: Mike G
- Re: Multiplex question for multiple RGB LEDs
- References:
- Multiplex question for multiple RGB LEDs
- From: Mike G
- Multiplex question for multiple RGB LEDs
- Prev by Date: Re: ECO board mod spec?
- Next by Date: Re: Vacuum Cleaners from Outer Space
- Previous by thread: Re: Multiplex question for multiple RGB LEDs
- Next by thread: Re: Multiplex question for multiple RGB LEDs
- Index(es):
Relevant Pages
|