Why do my LED's dim and voltage drop when flashing at high speed?

Hello community, this is my first time here so i apologize if i do anything incorrectly. Any and all help is greatly appreciated.

Firstly when it comes to Arduino and electronics in general there is still a lot i don't understand but the projects i work on i try my best to learn as much as i can on my own. That being said, i have hit a wall of sorts and don't understand what exactly is happening.

GOAL: My ultimate goal is to power multiple home made LED strips that will stay lit for a full 24 hours running off of as small a battery that i can use. Eventually it will be used to light up plants i'll be growing indoors. I understand it would be a lot easier to just buy led lamps, plug it in and call it a day but i enjoy solving problems too much to do that :p

Parts: Arduino UNO 2k resistors (x8) S8050 NPN transistors (x4) 3.3v 20mA SMD 3528 white LED (x20) DC-DC Step-down Constant Current Regulator Module

What i'm trying to do: I currently have 20 LED's set up in a strip i made and wired together in groups of five. For the time being i'm using a laptop power supply that puts out 19.5v at 3.6 amps. That is being pushed through the current regulator to put out a steady 16v at 20mA. At 16v and 20mA i can power 5 LED at a time in series but that's not enough to power the eventual 80 LED strips that will be used. The conclusion that i came to in the end was, I didn't need to power them all at the same time. I could keep the output the same but switch from LED group to LED group really fast to the point they all seemed to be on at the same time so only one group of 5 LED is ever powered on at a time. This way i get the most light usage possible from the least amount of power possible(again my goal is to make this all use as little power as possible).

My problem: MY current set up, if it's not clear from the pictures, has positive power coming from the regulator into all the positive wires at the same time then through the LED strips and back out into a transistors Collector. The Arduino outputs a 5v signal through two 2k resistors(all i have for now) into the transistors base. The Emitter is then connected to ground and the circuit is complete. This set up works great at slow blinking speeds or constant on for a single set at a time. When i start blinking the sets faster to the point they all look to be on solid(a "delay(5);" for my eyes) i notice that all the LED's are dimmer. I don't have a scope just yet, i only just ordered one tonight. The best i can do is use a DMM. Using this when i read the voltage at one of the LED groups i measure around 10v when flashing quickly. I thought at first this was due to the DMM not reading it fast enough because it's switching on/off and settling at that voltage but then realized that wouldn't make sense because then the LED's wouldn't be dim. When fully on i measure 15.8v at a group and obviously those LED's are brighter.

My Thoughts: I read somewhere that LED's have a certain amount of time they need in order to reach full brightness and that switching them on/off too fast they can't reach full brightness. This makes sense for now until i get my scope and see what voltage is really coming out of the transistor.

Another thought i had was maybe The transistor was having problems because its rated for a max voltage of 20v through Collector-Emitter and i was close to that limit so i substituted those for "2N4401" transistors with a higher max of 40v but got the exact same results.

If with a scope i'm not getting full voltage out of the transistor at this switching speed i assume ill have to do some research into other better transistors?

If i am getting full voltage out of the transistor then to me that means the LED's don't have enough time to fully light up before they are turned off again then before they go out they turn back on and so on so they get stuck in this middle area where they are lit but not fully. Are there LED's specially made with faster on times? If so can someone point me in the right direction that would be most helpful. If i can't get faster "on" LED's then what if i attach a coil in the circuit to help keep the LED's on just long enough for the circuit to come back to it and "top it off" to keep it at full brightness. If i did that then maybe i could elongate the delay between the groups so they have enough time to fully light up and stay on just long enough so i don't notice the blinking.(unless that't not how coils work, i'm just throwing this out there as I've only just last night started research on how coils work and are used in circuits)

***Quick note though. I noticed when i had a delay of 5 in the Arduino coding i would get an average voltage per group of about 9.9v but when i removed the delay all together and it was just straight on/off i got a higher DMM measured reading of 11.6v. If i could switch these on and off even faster using "true coding" or something like that from the little research found online would i measure a higher voltage closer to 15.8v? Would the LED's get brighter then? I'll look into this separately.

For easy visualization i only took a close up picture of a single group wiring but normally it would be times 4

P.S. I realize i could have made this strip differently and saved time and materials but the only time i had to make this was the other night around 1 am so i was tired and wasn't thinking clearly. Next version will have a smaller footprint ;)

Arduino code used for those that care(it's real basic though)

void setup() {
  
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  
}

void loop() {
  digitalWrite(8, HIGH);
  delay(5);
  digitalWrite(8, LOW);
  digitalWrite(9, HIGH);
  delay(5);
  digitalWrite(9, LOW);
  digitalWrite(10, HIGH);
  delay(5);
  digitalWrite(10, LOW);
  digitalWrite(11, HIGH);
  delay(5);
  digitalWrite(11, LOW);
  
}

Related Pictures

When i start blinking the sets faster to the point they all look to be on solid(a "delay(5);" for my eyes) i notice that all the LED's are dimmer.

Yes that is what is supposed to happen. As the LEDs are only on a portion of the time they do not look as bright. Your eyes integrate the light flashes and you perceive the average brightness not the peak brightness.

In fact that is how you dim LEDs, turn them on and off rapidly and vary the on to off time ratio, this is also known as the duty cycle.

My Thoughts: I read somewhere that LED's have a certain amount of time they need in order to reach full brightness and that switching them on/off too fast they can't reach full brightness. This makes sense for now until i get my scope and see what voltage is really coming out of the transistor.

Like Mike says... LEDs are fast and it's your eyes that aren't "fast enough".

And if you think about it a little more... If it's off half the time that's half the total energy, and "there's no such thing as a free lunch".

Incandescent ligh bubs do respond more-slowly and regular light dimmers work by chopping-off part of the AC cycle so it's really dimming. PWM motor speed control works the same way... By reducing the average voltage and total energy..

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html .

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png? Please include power supply and pin labels.

A schematic will make sure we are all on the same page, a picture is worth a thousand words?

Tom... :)

To both Grumpy_Mike and DVDdoug thank you for helping me. I did a bit of research and now have a better understanding of what’s going on. Thanks to that i realized what i needed to do to get the results i wanted. I ended up using a capacitor on each group to keep the LED’s powered just long enough so when the cycle came back around they already were on. The result was a higher overall brightness and much less obvious flashing at longer delay times.

Different sized capacitors yielded varying results:
No capacitor install- max/min of 16/0 volts
50v 100uf capacitor- max/min of 16/12.5 volts
16v 330uf capacitor- max/min of 16/13.5 volts
16v 470uf capacitor- max/min of 16/14.8 volts

I’ve also ordered some higher voltage and capacitance capacitors to give me more headroom so i’m not running the capacitors at their limit and for better results.

Attached are pictures and a .gif from a cheap oscilloscope i got so i could visualize what was going on as well as a circuit schematic i drew up for better visualization, the old version simply didn’t have the capacitor in the circuit. There will eventually be about 16 of these circuit groups but i didn’t draw those in because they are all the same and it’s easier to see whats going on with just 1. This was honestly my first time drawing up a circuit so forgive me if it looks weird or non standard(if that’s a thing idk).

Here is a link to a .gif of two LED groups in action in slow motion running the code shown below. One has the a 470uf capacitor installed the other does not.
https://gph.is/g/4DLeBGw

Edit
To clarify there are no resistors on the LED’s in the schematic because my power source is voltage and current controlled to output 16v at 20mA.

void setup() {

  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
}

void loop() {
  digitalWrite(8, HIGH);
  delay(25);
  digitalWrite(8, LOW);
  digitalWrite(9, HIGH);
  delay(25);
  digitalWrite(9, LOW);
}

330uf.jpg

Hi,
Thanks for the information.


What are you using as the supply for the constant current LED supply.
From your info, it sounds like it is AC to DC supply with no DC filtering.

Tom... :slight_smile:

What i'm trying to do: I currently have 20 LED's set up in a strip i made and wired together in groups of five. For the time being i'm using a laptop power supply that puts out 19.5v at 3.6 amps. That is being pushed through the current regulator to put out a steady 16v at 20mA. At 16v and 20mA i can power 5 LED at a time in series but that's not enough to power the eventual 80 LED strips that will be used. The conclusion that i came to in the end was, I didn't need to power them all at the same time. I could keep the output the same but switch from LED group to LED group really fast to the point they all seemed to be on at the same time so only one group of 5 LED is ever powered on at a time. This way i get the most light usage possible from the least amount of power possible(again my goal is to make this all use as little power as possible).

Your explanation of what you are attempting to do is a bit confusing. From the description, it sounds as if you want all the LEDs on at full brightness all the time (or at least the same brightness all the time), but don't want to supply the necessary power to do this, so you think by switching among different groups of LEDs that somehow the single power supply will give you full brightness on all the LEDs while only consuming the power needed for a single group. It just doesn't work that way - if you only have two strips of LEDs, and alternate the power supply between the two strips, then each strip will only get half the power it would if it had its own power supply. Three strips, and each strips averages a third of full power, four strips is a quarter of the power, etc. You will always get a dimmer LED when powering it less than 100% of the time, unless you increase the current above 20mA for the time it is powered (not an uncommon technique in scanned displays).

This way i get the most light usage possible from the least amount of power possible(again my goal is to make this all use as little power as possible).

No sorry but life doesn’t work like that. By flashing the light you get less light because it is in less of the time. That a 50% duty cycle you get exactly half the light. It might not look to you that it is half the light because the response of your eye is logarithmic, but a plant will get half the light.

What you are doing with the capacitors is just increasing the current from your power supply during the on time to compensate for the off time. So overall you use just the same current, and hence the power as you would have used if you just set the duty cycle to give you the same brightness. You save nothing.

To clarify there are no resistors on the LED’s in the schematic because my power source is voltage and current controlled to output 16v at 20mA.

So what actually happens is the voltage output is reduced until the current is 20mA. So charging your capacitor is going to take more current so the voltage is dropping. But when the LEDs are off there is nothing limiting the current from the discharging capacitor and your LEDs will get more current than the maximum. This damages them by reducing the light output they produce over time. It might take a year to be noticeable but the light output will slowly decline from the off. You could measure this with the right equipment and probably see the light reduction after a week.

I read somewhere that LED's have a certain amount of time they need in order to reach full brightness and that switching them on/off too fast they can't reach full brightness

Yes, but its measured in nanoseconds or microseconds, not relevant here as we are dealing with kHz switching rates. It is very relevant to transmitting digital data optically along fibreoptic links, where you want MHz or GHz rates - specialized devices are used for that.

You retina collects photons and its the average rate of arrival of photons that determines brightness if the flickering is too fast to perceive.