Author Options:

How would one use flashing LEDs in a multiplexed array? Answered

I'm trying to setup a 2x6 multiplexed LED array using a 595 and an Arduino. I've got the circuit wired with 12 standard LEDs and it's working fine but I'd like to replace a couple of the LEDs with on/off flashing LEDs. The problem is that since it's multiplexed the LEDs are not receiving a constant current and this means the flashing LEDs never turn off because they don't have enough time to cycle to the off state.

My initial, and only, thought at this point is to put a small capacitor in front of the flashing LEDs. The hope being that while the pin is being addressed it would maintain at least a small amount of current through the LED and allow it to cycle on/off.

Does anyone have any issues or suggestions (cap size, type) about this plan? Is there something else that works or will this damage something or cause weird effects? I'm really quite rusty with the RC stuff I learned back in college so I really don't know how the cap will behave with non-constant source.


Why not just address the matrix to turn them on and off ?

That would entail pulsing power, slowly, to the row with the LED you want to flash. This causes two issues: the other row won't be lit while you hold the first row on, and all of the addressed columns in the flashing row will flash.

No it doesn't - at least not in any matrix I've ever worked with. I just send two frames, one for the LED that's on, one for the LED that's on.

Write 000001111100000
Write 000001111100000
Write 000001111100000
Write 000000111000000
Write 000000111000000
Write 000000111000000

Do that at many frames a second, and you can actually selectively dim and brighten certain LEDs.


I see now, you're not using a flashing LED but making a standard one flash. Do you have any thoughts on using a cap though? Putting in a static component and using the flashing LEDs will be much easier for my application then coding special functions for the times when I need a single LED to flash.

I have done similar tricks in the past, when I was driving a huge bank of mains filament lamps from a microcontroller. I used a blocking diode and a capacitor to supply the LED in an optoisolator. It worked, but it was a big compromise.

Honestly, the software isn't that hard ! Especially if you only have 12 LEDs.

All you need is your original LED words, and a word that contains the LEDs that you want to flash. When you AND the LED word against the flash word, lights without a 1 in the corresponding flashword go out.

Individually address the flashing LEDs.

That only works if you aren't using an array. With an array you have to switch back and forth between the two rows to address all of the leds. This is the problem. If the flashing led is in row 2 when the 595 switches to address row 1 you loose power to row 2. Now it's very brief but long enough to prevent the led from flashing.