Electrical – Constant current led dimming

arduinoconstant-currentledmosfetpwm

I have a few panel lights which come with normal non-dimmable constant current drivers.

I want to add a dimming feature to them, please suggest me a circuit that I can use with Arduino/ESP8266 to control the brightness of the leds.

I tried using circuits provided for controlling 12V led strips with an Arduino but they didn't work. My led blinks when at lower brightness levels and gets stable only when it reaches almost the full brightness.

My problem is similar to the one mentioned here: how to control constant current led driver output with pwm?

OEM LED Driver ratings: 32Vdc, 130mA, CC.

The IC used in my led driver is BP2327. Here is the datasheet for it.

Best Answer

Yes you CAN PWM a CC module that does not support dimming natively.
The difficulty you have is that the CC driver is itself an SMPS power supply with it's own switching frequency, voltage control and current control. Many of the CC drivers measure the output voltage to shutdown for a short circuit or an open string of LEDs. The blinking is the response of the CC driver resetting when it senses an open circuit when your PWM is OFF.

To achieve PWM control but keep the CC driver 'happy' that it is in its voltage range you have to emulate the voltage drop of your LED string.

Initially you need to know what the voltage across your series LEDs is. From this voltage value you can work out the power rating.

You have not provided details, so as an example let's assume that the your panel consist of 8 LEDs(with a Vf in the 3.1 - 3.4V range) so requires a maximum of about 27V @130mA from the CC driver. This equates to about 3.5W dissipated by your LEDs.

Whatever solution you use to make the CC driver happy has to dissipate the same power by lowering the voltage to the LED string and sinking the current.

Something like this may work for you:

schematic

simulate this circuit – Schematic created using CircuitLab

While I've shown an 8 LED string in the example above, the circuit should work for anything from 2 - 8 series LEDs.

Be aware that Q1 will dissipate the same as the LED string when on. Depending on the range of dimming you want you will need to use a least a small flag heatsink on Q1.

Update:

Since you have now added more information on your CC driver, please note that any PWM solution you add to this would NOT be isolated from the AC mains supply. I'd suggest that the only viable configuration of a wireless control would be an Arduino (or ATTiny) with an NRF2401+.

Powering a wireless solution from the CC controller by a vampire off the LED drive can be done but be careful working with non-isolated products. I'd suggest that the least power hungry wireless solution would be an ATTiny85 and NRF2401+ at a peak of about 14mA @3.3V, which is less than 50mW peak. If you use Shockburst you could get down in an average 5mW range from the vampire.

If you look at the datasheet for your BP2327 you notice they already typically vampire off the LEDs to power the chip (about 0.5mA):

![enter image description here
NOTE There is an error in the schematic marked in Red.

This vampire power explains why you cannot short the CC driver (you lose VCC and the chip resets then softstarts). There is also a maximum off time specified, so if you have an open circuit LED string you'll get a reset (though I don't see that specified. They don't do voltage detection on the LED drive directly because they support a huge range.