Flashy Flashy to get as many leds flashing individually,

Thread Starter

Kim Sleep

Joined Nov 6, 2014
391
Is there a way to get as many leds flashing individually, using as small a circuit as possible, at as low current as possible.
I would like a single chip, or close to it if possible (please no 7555s). I have a circuit that uses 5 transistors at 6v flashing individually, is that as good as I can get??.
Power supply will be 6-9v, I havnt decided what Ill use at this time for power, it may well depend on what gets offered up here for a circuit.

Thanks in advance guys

Kim, yup Im a guy
 
Last edited by a moderator:

Tonyr1084

Joined Sep 24, 2015
9,744
I can flash in sequence 100 LED's using one 555 timer and two CD4017 chips. That and 10 transistors. Since the only things running are the timer, the counter and only one LED at a time - that's going to be fairly low current. In the video below I only flash 30 LED's one at a time. Since a decade counter can flash only 10 LED's in sequence, use of the second 4017 is necessary to fire off transistors. Each transistor supplies ground path to one set of 10 LED's with common cathodes. This way as the second counter steps from group 1 (Q0) to group w (Q1) the second set of 10 will flash in sequence because group 1 is no longer grounded. The grounding transistor has been shut off. This repeats through all 10 groups of LED's.
How many LED's do you want to flash?
Do you want them ALL to be on at once? If so then that would require some consideration as to what the power source is and how much current you want to run through the LED's
Do you want all the same color?
Do you want different colors?
Do you want to use RGB LED's?
Do you want to use RGB to vary the color of the LED's?
We need a bit more information other than "Flashy Flashy".
 
Last edited:

SamR

Joined Mar 19, 2019
5,470
I have a "toy" that is a 3" disk with 32 RGB LEDs that semi randomly flash and change colors all driven by a nano Arduino. It uses a Fibonacci algorithm based on the design of the sunflower seed arrangement. It was made by Evil Genius Labs and called the Fibonacci32 THT Kit v0.1.
 

Thread Starter

Kim Sleep

Joined Nov 6, 2014
391
I can flash in sequence 100 LED's using one 555 timer and two CD4017 chips. That and 10 transistors. Since the only things running are the timer, the counter and only one LED at a time - that's going to be fairly low current. In the video below I only flash 30 LED's one at a time. Since a decade counter can flash only 10 LED's in sequence, use of the second 4017 is necessary to fire off transistors. Each transistor supplies ground path to one set of 10 LED's with common cathodes. This way as the second counter steps from group 1 (Q0) to group w (Q1) the second set of 10 will flash in sequence because group 1 is no longer grounded. The grounding transistor has been shut off. This repeats through all 10 groups of LED's.
How many LED's do you want to flash?as many as possible, but taking into consideration, the "smallness of the circuit
Do you want them ALL to be on at once? If so then that would require some consideration as to what the power source is and how much current you want to run through the LED's
Do you want all the same color?-no different colors
Do you want different colors?-Yes
Do you want to use RGB LED's?No
Do you want to use RGB to vary the color of the LED's?No
We need a bit more information other than "Flashy Flashy".
But to be practical, maybe 3 leds per channel, with 3 output channels, a total of 9 leds total. As I want battery life, and size is a ultimate matter, I will tone it down to this specification, rather than shooting for the moon
 

Tonyr1084

Joined Sep 24, 2015
9,744
OK, great.
1) What kind of LED's are you hoping to use?
2) How bright do you want them to shine?
3) Are they all the same color? Or different colors?
4) Three LED's per channel, three channels. Does this mean 3 LED's come on simultaneously when that channel is active?
5) Do you want only one channel on at a time?
6) Do you want them to fade on and off or snap on, snap off?
Let's start there. Six questions is a lot to ask - but depending on your answers I might have more.
 

WBahn

Joined Mar 31, 2012
32,702
Is there a way to get as many leds flashing individually, using as small a circuit as possible, at as low current as possible.
I would like a single chip, or close to it if possible (please no 7555s). I have a circuit that uses 5 transistors at 6v flashing individually, is that as good as I can get??.
Power supply will be 6-9v, I havnt decided what Ill use at this time for power, it may well depend on what gets offered up here for a circuit.

Thanks in advance guys

Kim, yup Im a guy
You really need to learn to do a much better job of describing what it is you are trying to achieve.

What is "many" LEDs? Three? Thrity? Three hundred?

What does it mean for them to "flash"? Does a given LED turning on and off as a steady, unchanging rate count as "flashing". Or does it need to appear like random flickering? What kind of range of flash rates are you talking about?

What does it mean for them to flash "individually"? Does each need to be controllable separate from all of the others? Do they just need to not appear to be obviously synchronized to a casual observer?

What is "small"? What is "low current"? Never request anything to be as "fill in the blank" as possible? Whatever you end up with, it is almost guaranteed that it can be made more if you are willing to sink enough money into it. Instead, decide what the limit is on what you consider to be good enough. If you need the circuit to fit inside a tennis ball, but you only tell people that you need it to be as small as possible, then you risk people wasting a bunch of time and effort trying to come up with something that will fit inside a ping-pong ball, at substantially greater cost. If you need it to draw under 100 mA so that your 9 V battery will last a few hours, then you risk people wasting a bunch of time and effort trying to come up with something that will draw less than 5 mA -- especially when you haven't given any hint as to how much current your LEDs require?

You say you want a single chip, or close to it. But exclude consideration of a 7555. Why? What about other timer ICs? What about a 7556 dual timer IC? If you want a single-chip solution, why aren't you focusing your efforts on using a suitable microcontroller?

You say that you have a circuit that uses five transistors at 6V and ask if that's as good as you can get? Why won't you show us this circuit so that people can have a change of evaluating it? How many LEDs does this five transistor circuit flash? Two? Five?Twenty? What other components does it have? Nothing besides transistors and, presumably, some LEDs? Does it have resistors? Capacitors? What? Why the secrecy? How can people determine if it is as "good" as you can get unless you define the metric by which you determine whether any alternatives are better or not? Does an alternative that takes up more space but draws less current qualify as better?
 

Thread Starter

Kim Sleep

Joined Nov 6, 2014
391
You really need to learn to do a much better job of describing what it is you are trying to achieve.

What is "many" LEDs? Three? Thrity? Three hundred?

What does it mean for them to "flash"? Does a given LED turning on and off as a steady, unchanging rate count as "flashing". Or does it need to appear like random flickering? What kind of range of flash rates are you talking about?

What does it mean for them to flash "individually"? Does each need to be controllable separate from all of the others? Do they just need to not appear to be obviously synchronized to a casual observer?

What is "small"? What is "low current"? Never request anything to be as "fill in the blank" as possible? Whatever you end up with, it is almost guaranteed that it can be made more if you are willing to sink enough money into it. Instead, decide what the limit is on what you consider to be good enough. If you need the circuit to fit inside a tennis ball, but you only tell people that you need it to be as small as possible, then you risk people wasting a bunch of time and effort trying to come up with something that will fit inside a ping-pong ball, at substantially greater cost. If you need it to draw under 100 mA so that your 9 V battery will last a few hours, then you risk people wasting a bunch of time and effort trying to come up with something that will draw less than 5 mA -- especially when you haven't given any hint as to how much current your LEDs require?

You say you want a single chip, or close to it. But exclude consideration of a 7555. Why? What about other timer ICs? What about a 7556 dual timer IC? If you want a single-chip solution, why aren't you focusing your efforts on using a suitable microcontroller?

You say that you have a circuit that uses five transistors at 6V and ask if that's as good as you can get? Why won't you show us this circuit so that people can have a change of evaluating it? How many LEDs does this five transistor circuit flash? Two? Five?Twenty? What other components does it have? Nothing besides transistors and, presumably, some LEDs? Does it have resistors? Capacitors? What? Why the secrecy? How can people determine if it is as "good" as you can get unless you define the metric by which you determine whether any alternatives are better or not? Does an alternative that takes up more space but draws less current qualify as better?
You are quite correct in all the ways you have mentioned. As for me, Im always thinking as simple as possible, and therefore my specs are that way too. Everyone here, besides myself are all classically trained designers with many years of exacting design specifications. I, on the other hand, a long term putzer, with more zeal than knowledge, that never quite seems to have all the many thoughts that I should have in place. I truly try to think out all the many questions that a project may hold, but never seems to get them. All I can do is apologize, and attempt to do better in the future. Again, my expertise is building from someone else's designs, not actually designing from scratch. Im going to go with some simple transistor oscillator circuits, basically offered in an earlier answer, and go from there. Please stay away from answering my design requirements, unless you wish to be driven clinically insane by my lack of knowledge, and my obsession with buying faulty components from Ali Express. Ask Sghioto....he'll tell ya!...he has pulled my supple, yet firm buttocks out of the fire by endlessly troubleshooting something I built!!
 

MisterBill2

Joined Jan 23, 2018
27,159
One option not yet suggested is a UNIJUNCTION transistor relaxation oscillator scheme, sharing series resistors to allow different time intervals. One cap and one resistor per LED group. NO, I can not provide any more details or a circuit.
 

panic mode

Joined Oct 10, 2011
4,864
problem with UJT or reverse biased BJT relaxation oscillator is size of capacitors. i would say define what you want... all leds flashing at random? flashing in sequence? both? what is the available power source? how many LEDs? how about wiring? is it one mega circuit or bunch of separate circuits, perhaps only sharing power? for trinkets or Christmas decoration, one can make tree ornaments using cheap LEDs (could be Charlieplexed) and a cheap and small MCU like PMS150C-U06 ($0.04 in small quantity). add coin cell batteries to each unit or simply hang bunch of units on same two wires for power and you are done. single current limiting resistor 150-220 Ohm in Vcc line is enough if using coin cell battery. average draw 4mA from pair of CR2032 will last long.

Code:
// PMS150C-U06 Christmas Star 2025 – 12 LEDs, 15 patterns
// Pins: PA0, PA3, PA4, PA5 → 4-pin Charlie-plexing = 12 LEDs
#include "PMS150C.c"          // Free PDK style header

// Charlieplex pin order (must match your PCB!)
#define P0 0    // PA0
#define P1 3    // PA3
#define P2 4    // PA4
#define P3 5    // PA5

const uint8_t pin[4] = {P0,P1,P2,P3};

void light(uint8_t hi, uint8_t lo) {
    PA  = 0;
    PAC = 0xFF;       // all input
    PAO = 0xFF;       // all open-drain
    PAC = ~(1<<pin[hi]) & ~(1<<pin[lo]);
    PA  = (1<<pin[hi]);
    PAO = (1<<pin[lo]);  // lo pin = strong low
    __asm("nop\nnop\nnop\nnop");  // ~3-4 µs brightness
    PA = 0;
}

void all_off() { PA = 0; PAC = 0xFF; }

// 12-LED table: hi-pin index, lo-pin index
const uint8_t led[12][2] = {
    {0,1},{1,0}, {0,2},{2,0}, {0,3},{3,0},
    {1,2},{2,1}, {1,3},{3,1}, {2,3},{3,2}
};

void delay(uint8_t d) { while(d--); }

void main() {
    uint8_t pattern = 0;
    uint16_t cnt = 0;

    while(1) {
        cnt++;
        switch(pattern) {
            case 0:  // All slow twinkle
                for(uint8_t i=0;i<12;i++) { light(led[i][0],led[i][1]); }
                break;
            case 1:  // Fast sparkle
                if(cnt&1) light(led[cnt%12][0],led[cnt%12][1]);
                break;
            case 2:  // Candle flicker (warm white/orange)
                if((cnt&0x1F)==0) light(led[10][0],led[10][1]); // slow big flicker
                if((cnt&0x07)==0) light(led[11][0],led[11][1]);
                break;
            case 3:  // Running red-green chase
                light(led[(cnt/3)%12][0],led[(cnt/3)%12][1]);
                break;
            case 4:  // Heartbeat (red)
                if((cnt&0xFF)<40 || (cnt&0xFF)>45 && (cnt&0xFF)<55) {
                    light(led[0][0],led[0][1]); light(led[1][0],led[1][1]);
                }
                break;
            case 5:  // Meteor rain
                uint8_t p = (cnt>>3)%16;
                if(p<12) light(led[p][0],led[p][1]);
                break;
            case 6:  // All red → all green → all white
                if(cnt<200) for(uint8_t i=0;i<6;i++) light(led[i][0],led[i][1]);
                else if(cnt<400) for(uint8_t i=6;i<12;i++) light(led[i][0],led[i][1]);
                else for(uint8_t i=0;i<12;i++) light(led[i][0],led[i][1]);
                if(cnt>600) cnt=0;
                break;
            case 7:  // Random single LED sparkle
                if((cnt&0x1F)==0) light(led[random()&0x0F][0],led[random()&0x0F][1]);
                break;
            // 8–14: more patterns, just keep adding…
            case 14: // Slow breathing (all LEDs)
                uint8_t br = (cnt>>3)&0xFF;
                if(br<128) for(uint8_t i=0;i<12;i++) light(led[i][0],led[i][1]);
                break;
        }

        // Change pattern every ~30–90 seconds
        if(cnt == 0) pattern = (pattern + 1) % 15;

        // Tiny delay to reduce current & make patterns visible
        delay(30);
        all_off();
        delay(20);
    }
}
 
Last edited:

WBahn

Joined Mar 31, 2012
32,702
You are quite correct in all the ways you have mentioned. As for me, Im always thinking as simple as possible, and therefore my specs are that way too. Everyone here, besides myself are all classically trained designers with many years of exacting design specifications. I, on the other hand, a long term putzer, with more zeal than knowledge, that never quite seems to have all the many thoughts that I should have in place. I truly try to think out all the many questions that a project may hold, but never seems to get them. All I can do is apologize, and attempt to do better in the future. Again, my expertise is building from someone else's designs, not actually designing from scratch. Im going to go with some simple transistor oscillator circuits, basically offered in an earlier answer, and go from there. Please stay away from answering my design requirements, unless you wish to be driven clinically insane by my lack of knowledge, and my obsession with buying faulty components from Ali Express. Ask Sghioto....he'll tell ya!...he has pulled my supple, yet firm buttocks out of the fire by endlessly troubleshooting something I built!!
Okay.. but could you at least TRY to give us something to work with?

Could you at least TRY to answer some of the questions we are asking you?

Could you at least TRY to provide us with a sketch of the circuits you are asking us to evaluate or compare to?
 

Thread Starter

Kim Sleep

Joined Nov 6, 2014
391
problem with UJT or reverse biased BJT relaxation oscillator is size of capacitors. i would say define what you want... all leds flashing at random? flashing in sequence? both? what is the available power source? how many LEDs? how about wiring? is it one mega circuit or bunch of separate circuits, perhaps only sharing power? for trinkets or Christmas decoration, one can make tree ornaments using cheap LEDs (could be Charlieplexed) and a cheap and small MCU like PMS150C-U06 ($0.04 in small quantity). add coin cell batteries to each unit or simply hang bunch of units on same two wires for power and you are done. single current limiting resistor 150-220 Ohm in Vcc line is enough if using coin cell battery. average draw 4mA from pair of CR2032 will last long.

Code:
// PMS150C-U06 Christmas Star 2025 – 12 LEDs, 15 patterns
// Pins: PA0, PA3, PA4, PA5 → 4-pin Charlie-plexing = 12 LEDs
#include "PMS150C.c"          // Free PDK style header

// Charlieplex pin order (must match your PCB!)
#define P0 0    // PA0
#define P1 3    // PA3
#define P2 4    // PA4
#define P3 5    // PA5

const uint8_t pin[4] = {P0,P1,P2,P3};

void light(uint8_t hi, uint8_t lo) {
    PA  = 0;
    PAC = 0xFF;       // all input
    PAO = 0xFF;       // all open-drain
    PAC = ~(1<<pin[hi]) & ~(1<<pin[lo]);
    PA  = (1<<pin[hi]);
    PAO = (1<<pin[lo]);  // lo pin = strong low
    __asm("nop\nnop\nnop\nnop");  // ~3-4 µs brightness
    PA = 0;
}

void all_off() { PA = 0; PAC = 0xFF; }

// 12-LED table: hi-pin index, lo-pin index
const uint8_t led[12][2] = {
    {0,1},{1,0}, {0,2},{2,0}, {0,3},{3,0},
    {1,2},{2,1}, {1,3},{3,1}, {2,3},{3,2}
};

void delay(uint8_t d) { while(d--); }

void main() {
    uint8_t pattern = 0;
    uint16_t cnt = 0;

    while(1) {
        cnt++;
        switch(pattern) {
            case 0:  // All slow twinkle
                for(uint8_t i=0;i<12;i++) { light(led[i][0],led[i][1]); }
                break;
            case 1:  // Fast sparkle
                if(cnt&1) light(led[cnt%12][0],led[cnt%12][1]);
                break;
            case 2:  // Candle flicker (warm white/orange)
                if((cnt&0x1F)==0) light(led[10][0],led[10][1]); // slow big flicker
                if((cnt&0x07)==0) light(led[11][0],led[11][1]);
                break;
            case 3:  // Running red-green chase
                light(led[(cnt/3)%12][0],led[(cnt/3)%12][1]);
                break;
            case 4:  // Heartbeat (red)
                if((cnt&0xFF)<40 || (cnt&0xFF)>45 && (cnt&0xFF)<55) {
                    light(led[0][0],led[0][1]); light(led[1][0],led[1][1]);
                }
                break;
            case 5:  // Meteor rain
                uint8_t p = (cnt>>3)%16;
                if(p<12) light(led[p][0],led[p][1]);
                break;
            case 6:  // All red → all green → all white
                if(cnt<200) for(uint8_t i=0;i<6;i++) light(led[i][0],led[i][1]);
                else if(cnt<400) for(uint8_t i=6;i<12;i++) light(led[i][0],led[i][1]);
                else for(uint8_t i=0;i<12;i++) light(led[i][0],led[i][1]);
                if(cnt>600) cnt=0;
                break;
            case 7:  // Random single LED sparkle
                if((cnt&0x1F)==0) light(led[random()&0x0F][0],led[random()&0x0F][1]);
                break;
            // 8–14: more patterns, just keep adding…
            case 14: // Slow breathing (all LEDs)
                uint8_t br = (cnt>>3)&0xFF;
                if(br<128) for(uint8_t i=0;i<12;i++) light(led[i][0],led[i][1]);
                break;
        }

        // Change pattern every ~30–90 seconds
        if(cnt == 0) pattern = (pattern + 1) % 15;

        // Tiny delay to reduce current & make patterns visible
        delay(30);
        all_off();
        delay(20);
    }
}
Im amazed you can do this at the drop of a hat!!
 

Thread Starter

Kim Sleep

Joined Nov 6, 2014
391
Okay.. but could you at least TRY to give us something to work with?

Could you at least TRY to answer some of the questions we are asking you?

Could you at least TRY to provide us with a sketch of the circuits you are asking us to evaluate or compare to?
Ok, Ok, Ok, you are absolutely correct, Im not giving you guys something to work with. I will attempt to do a better job at it the on my next post, honest.
 

MisterBill2

Joined Jan 23, 2018
27,159
Consider that each UJT could flash a dozen LEDs, and if the RC time constant was a higher R then the c could be smaller. and sharing the resistors could make it a bit more random, Also, there is the option of multiple ring counters as well.
 

BobTPH

Joined Jun 5, 2013
11,463
Okay, once again, why can you not sinply use blinking LEDs? They look just like normal 3mm, but blink when you apply power. You can’t get any simpler than that!

I have now, for the second time, given you the simplest solution possible. Please have the courtesy to explain why this dos not meet your specifications.
 

Thread Starter

Kim Sleep

Joined Nov 6, 2014
391
Okay, once again, why can you not sinply use blinking LEDs? They look just like normal 3mm, but blink when you apply power. You can’t get any simpler than that!

I have now, for the second time, given you the simplest solution possible. Please have the courtesy to explain why this dos not meet your specifications.
You are correct, I have been busy today, and did not see your post, I apologize. Im using 3mm leds, or even smaller than that, and I dont think self flashing ones come in that size.
 

Thread Starter

Kim Sleep

Joined Nov 6, 2014
391
Consider that each UJT could flash a dozen LEDs, and if the RC time constant was a higher R then the c could be smaller. and sharing the resistors could make it a bit more random, Also, there is the option of multiple ring counters as well.
UJT..im not certain what that is
 
Top