0
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ If the driver is not designed for dimming, it may prove very difficult to dim it effectively. Part of the problem is that the driver is a black-box. You don't really no how it works or how it will respond to your efforts to dim it. So your best bet is probably to replace the driver with a dimmable one. The only thing I can think of that is more or less sure to work is to essentially add variable current bypass. In other words, you put a circuit in parallel with the LED that shunts a variable amount of the CC current. \$\endgroup\$ – mkeith Jan 24 at 20:46
  • \$\begingroup\$ A current bypass may work but it will prevent any power saving. It will use as much power as in full capacity. Thought I don't think power saving in normal PWN dimming is that extravagant. \$\endgroup\$ – Fredled Jan 24 at 20:56
  • \$\begingroup\$ @fredled, I basically agree with you. There will be a tiny power savings because it will lower Vf slightly (due to less current going through LED). But PWM may not work at all or may cause eratic behavior since the driver expects there to be an LED attached, not a PWM circuit. At least the shunt current regulator will work. \$\endgroup\$ – mkeith Jan 24 at 21:35
  • \$\begingroup\$ @mkeith, Take a look at the datasheet for the IC used in my led driver \$\endgroup\$ – Electric_90 Jan 25 at 13:44
  • 1
    \$\begingroup\$ I looked at the data sheet. If you want to modify the circuit to make dimming work, you can probably inject current into the feedback pin of the IC to trick it into dimming. This IC implements a non-isolated switching supply, so it would be potentially hazardous to modify and test (you could receive a severe electric shock). It is also probably not particularly safe to handle the LED lamp wiring itself during operation for the same reason. You really should get a good driver (maybe look at meanwell products). \$\endgroup\$ – mkeith Jan 25 at 16:56
1
\$\begingroup\$

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.

\$\endgroup\$
0
\$\begingroup\$

The constant current supply tries to compensate for the lack of current when the led is dimming. The PWM turn the led on and off at a high frequency invisible to humans, The lower the frequency the lower the light output. The power supply readjust the voltage every time there is less current through the led. It has no time to detect the switching from on and off states because the PWM frequency is too high. Then it's like it was making an average and see less current than normal thought the current is normal when the led is ON for a millisecond. Then the PWM unit tries to compensate the readjusted current by lowering the blink rate. As a result of these two conficting adjustments, the blink rate of the PWM is so slow that it becomes visible. Try to find a power supply PWM compatible. Second solution: try with an adjustable constant voltage supply but it has to match the typical voltage of the led at least in its adjustable range. Then adjust the voltage just a little bit under the typical voltage to prevent the led to take too much current.

\$\endgroup\$
  • \$\begingroup\$ Weird answer. It's trivial to PWM a current-controlled LED just like it is with a voltage coltrolled LED. You just need to short out the LED instead of breaking the connection. Same thing. \$\endgroup\$ – pipe Jan 25 at 13:52
  • \$\begingroup\$ @pipe You absolutely CANNOT short out the LED to do PWM dimming. At least not with conventional CC modules, they detect both shorted LED string and open circuit. \$\endgroup\$ – Jack Creasey Jan 25 at 21:51
  • \$\begingroup\$ @JackCreasey Perhaps. You can with a normal current source. When I wrote this I didn't see that OP had edited in his driver already. \$\endgroup\$ – pipe Jan 26 at 5:38
  • \$\begingroup\$ @pipe Depends on what you consider 'normal CC'. I can think of no commercial CC LED driver that supports a short without shutting down. If you can find one I'll be impressed. \$\endgroup\$ – Jack Creasey Jan 26 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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