help for controlling power leds (10*1 w) brightness with pwm and UNO

hi every one
first of all sorry for my bad English ::slight_smile:
i made a array of power leds (10 1 W) in series then drive them with a constant current driver 13-181w...

now i want it to controlling the led brightness with PWM and arduino Uno...
i have tried mosfet (IRF512) and transistor (TIP122) every thing is OK till the duty cycle drop to approximately 80+-5% or 20+-5% then the leds starts to flashing on and of (something like rapidly on band off)
if needed i can take a video from what happening :cry:
were is the problem ?
please help
thanks to all :wink:


Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Also can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Until we have this information, we can’t really advise you.

A link or data/specs on you constant current driver will help.

Thanks… Tom… :slight_smile:

hello Tom and thank you for your advice
here is my overall setup for both IRF and TIP
also image of my Driver…
the code i used is basic Fade in Arduino Example but delays are changed to 1000 so I am able to see the fade effect step by step…
I hop these are helpful to solve the problem
again sorry for my English and really thank you :slight_smile:


IRF512 is not a logic level MOSFET, so 5V from the arduino will not turn the MOSFET fully ON.

The other problem could be that you are trying to PWM a current source, not a voltage source.
The supply will try to provide constant current no matter what the PWM.
The current source is basically a PWM supply, so you may have some switching resonances between the two.

Tom... :slight_smile:

thank you so much Tom ,you saved me a lot of time to experience wrong way…
my project is to simulating sun rise and sun set in such setup of leds (1w*10) for my vivarium tank but i cant find any thing else…
unfortunately i paid for those driver …
is there other ways to use these driver for pwm controlling?
totally new setup but working one?

Any idea??

The “correct” solution is a [u]DIMMABLE constant current LED power supply[/u].*

The industry standard for these things is a 0-10VDC dimming signal or 10V PWM. So, you need a 10V source and a low-power transistor or MOSFET to “boost” the Arduino’s PWM.

  • Technically, they are controlled-variable current since the current depends on the dimming control signal.

Can every power LED be dimmed? As Tom mentioned, some built-in circuit in these LEDs may not work well with PWM.

Thank you all for participate
DVDdoug again thanks for your recommend driver but i need something DIY and PWM ready ...
As i mentioned above unfortunately i paid for those driver and i prefer a way to using those driver with my uno...
Please help me ...

You'll have bad luck if your constant current driver is not adjustable by PWM or other means. Do you have a data sheet of the driver?

I’m affraid previous posters could be right.
Mains powered constant current LED drivers are not designed to be PWM-ed.

I assume you’re using an Uno.
If you’re using PWM pin 5 or 6, switch to another PWM pin.
Pin 5 and 6 have a higher PWM frequency than the other PWM pins.
If that doesn’t work, try a lower PWM frequency.

DrDiettrich the label attached on the driver is the only thing i have...
Wawa thanks for your advice but i tried other pins but result is the same...
I try to post a video if allowed to see setup in action...
Again thanks for your guidence my friends: )

My crystal ball cannot show the label on your driver :frowning:

Another thing you could try is a 10-100uF/64volt low ESR cap across the +/- terminals of that supply.
Take care, open voltage (no LEDs) could be >64volt.

DrDiettrich i have attached that label in second post...
Wawa im planing to test it and report the result...

You only have shown your added circuit. What matters is the controller built into the LEDs, that obviously interferes with your PWM driver. As already mentioned, it's not clear whether your LEDs can be controlled by PWM, and it looks like they don't like that. I'd think that you need "naked" LEDs, with no further controller or current source built in, which can be dimmed by one of the available adjustable current sources.

Leo i have tested with a 470uF 200wv placed before my Tip122 and between + & - driver…
It slows the blinking (it’s now a little smoother )
But still annoying…
Other option my friends ?

DrDiettrich here is led and the setup…
I think these are simple leds as you mentioned…

If these are really simple LEDs, you need an adjustable current source. A FET or transistor by itself, driven by PWM, will not act as a current source. But at least simple LEDs should not flicker when dimmed, except with the PWM frequency (480 or 960Hz). If you observe different flicker, the LEDs are not as simple as required.

Please mention that it start flashing when i use 0-16 from 255 for PWM and nothing else is wrong for values more than 16 for PWM i hope it could solved by your help ...