5
\$\begingroup\$

I have a problem with my led strip starting to flicker/flash when I send a low pwm signal from my arduino (analogWrite 1-79). Here's a video: https://www.youtube.com/watch?v=X8wHzEQ4Wvw

I'm using a 12v 2A external power supply and a logic level mosfet to regulate the led brightness. I really have no idea why it's starting to flash like that.

I've tried with multiple different led strips with varied length, but with no different results. I have also tried using resistors in different places with lots of different resistance, this can remove the flicker, but the brightness of the led's is greatly reduced.

Here's my current schematics (might not be 100% accurate, dimming etc. works): enter image description here

\$\endgroup\$
11
  • \$\begingroup\$ What frequency do you have the PWM set to? \$\endgroup\$
    – Adam
    Commented Oct 20, 2015 at 19:17
  • \$\begingroup\$ I think I remember this episode of spongebob. \$\endgroup\$
    – Andy aka
    Commented Oct 20, 2015 at 19:19
  • 1
    \$\begingroup\$ -1 for the diagram (come on, is it that hard to make actual schematic?). \$\endgroup\$
    – venny
    Commented Oct 20, 2015 at 19:20
  • 1
    \$\begingroup\$ that's infinitely better than no diagram at all! Flicker, try altering the PWM frame rate. The one thing you haven't tried yet. \$\endgroup\$
    – Neil_UK
    Commented Oct 20, 2015 at 19:21
  • \$\begingroup\$ The diagram is accurate, I just didn't add the resistors I'm currently using because I'm testing new things all the time. @Adam Regarding the frequency it should be about 500Hz according to the arduino page (source arduino.cc/en/Reference/AnalogWrite). \$\endgroup\$
    – Nohac
    Commented Oct 20, 2015 at 19:24

3 Answers 3

4
\$\begingroup\$

I had a flickering issue with LED strips and I solved it by adding a 1000uf capacitor between positive and negative as close to the LEDs as I could, in your case you want it close to the transistor. This may not be your issue, but it is a good practice anyway. Not all power supplies respond to changes in current draw quickly and the capacitor acts as a buffer.

I would put the negative side of the capacitor where the transistor is connected to ground and the positive side where the LED is connected to positive. Make sure the capacitor is rated for the voltage you are using.

In the diagram above placing it on the two power rails next to the LED should be good.

These capacitors are polarized, make sure the negative side goes to negative and not the other way around.

\$\endgroup\$
8
  • \$\begingroup\$ Thanks for answering. Could you pleas point out on my schematics where exactly to place the capacitor? \$\endgroup\$
    – Nohac
    Commented Oct 20, 2015 at 21:06
  • \$\begingroup\$ @HighInBC Do you mean across the lower power rows in column 20 on the OP's picture? \$\endgroup\$ Commented Oct 20, 2015 at 21:23
  • \$\begingroup\$ First off, I may or may not have blown up a cap right in my face (even though the cap was rated 16v, it wasn't 1000uF though, i don't have that) ... The good news is that the flickering disappeared for a few seconds while the cap was alive. I don't think I should touch this again until I really figure out what to do.. Here's a schematics of what I did (which went horribly wrong) schematic. \$\endgroup\$
    – Nohac
    Commented Oct 20, 2015 at 21:49
  • \$\begingroup\$ The only reason I think it may have blown up is if you got the polarity backwards. The side with the stripe must be connected to negative. If it was a 16V capacitor it should have no problem with 12V. A 220uf capacitor like in your schematic should still have worked, but not as well as the 1000uf. \$\endgroup\$
    – HighInBC
    Commented Oct 20, 2015 at 22:31
  • \$\begingroup\$ Your probably right, thanks a lot for helping though. Will try again tomorrow (this time using safety goggles). Did you see if I placed the cap correctly in the schematic I linked btw? Anyways, I'm accepting your answer for now. Will report back tomorrow with result. \$\endgroup\$
    – Nohac
    Commented Oct 20, 2015 at 22:51
3
\$\begingroup\$

I finally figured out what caused the issue! Adding a capacitor to the circuit, as user HighInBC suggested reduced the flickering significantly, but not enough to be usable in my project. Here's the diagram that reduced the flickering using a capacitor: Using a cap to reduce flicker, works better with 1000uF cap and up

Regardless, the problem turned out to be not drawing enough power from the 12v power supply for it to be stable, by just adding a led strip outside of the dimmer circuit removed the flickering completely. Here's the circuit that fixed the problem: enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ This answer isn't perfect, adding the additional led strip is just a dirty hack I came up with, I might try out other power supplies to see if it helps. If someone know of a better solution, pleas feel free to edit the answer or post a comment! \$\endgroup\$
    – Nohac
    Commented Oct 22, 2015 at 21:38
  • \$\begingroup\$ A minimum load for stability is an issue in many supplies. This type of hack is common. \$\endgroup\$
    – Passerby
    Commented Dec 17, 2016 at 14:59
  • \$\begingroup\$ @Nohac Computer PSU are often converted to bench power supplies, the usually need a minimum load on one or more power rails to give stable output. Cement power resistors of suitable resistance and power rating are often used to provide such dummy loads. For troubleshooting supply-related issues, it's nice to have a small motorcycle lead-acid 12V battery. \$\endgroup\$
    – Gene Pauly
    Commented Jan 16, 2021 at 23:49
2
\$\begingroup\$

If you added another led strip outside the dimmer and the flickering was removed, I guess your problem is the transient response of your power supply.

One of the testings that can be done in a power supply is to change abruptly the load from 10 to 90% and observe the shape of the voltage output using an oscilloscope.

You won't like what you will find.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.