Electronic – how to control constant current led driver output with pwm

currentdriverledpwm

i want to control brightness of led series with constant current power supply.
but when i connect the power supply output to pwm controller and led series, i cant control the brightness because power supply has not fix voltage on output.
while pwm output is 255 (high) led work fine, but when the pwm output is 200 or less (low) my led start to blinking.

i think conversion constant current to constant voltage led driver for pwm control, but i haven't any info for this.

my driver detail: input:220-240V AC /output:54-108V DC- 300mA

please help me

thanks for your help

best regards, amin

my schematic:

enter image description here

my driver pic:

enter image description here

Best Answer

please help me

I have some concerns about the current limit circuit (based around the BC337 / R2) and its ability to work with PWM - every time the pulse goes high from U3 (initiating a current flow through the MOSFET), the voltage developed across R2 will activate the BC337 and clamp the drive voltage to the MOSFET. This means the MOSFET will get quite warm because it is operating as a current limit device.

Added to this you are trying to control the LED current via PWM BUT the BC337 circuit is also trying to limit the current. It doesn't look like it should work as you expect.

When you say the LED starts blinking, what is your PWM frequency?

Given the circuit you have I also have concerns about possible high voltages from the LED string being capacitively coupled (through the MOSFET) back to an IO pin on your MCU. Maybe protection diodes would help.