Maker Pro
Maker Pro

Can I use BP2857 constant current LED driver IC with a PWM-controlled MOSFET for dimming and turning the lights on or off with an ESP8266/Arduino?

ISHRAQ6251

Feb 12, 2024
1
Joined
Feb 12, 2024
Messages
1
I am trying to build a remotely controllable aquarium LED light. I live in a country where DigiKey and Mouser are not a thing. Electronic components are hard or impossible to find in this country. So I'm limited to the parts shown in the schematic. And my skills are not yet adequate for designing something more complex.

Here I want to control the LEDs with a PWM signal from an Arduino or ESP8266. I need this functionality to dim the LEDs and to also control when they turn on and off during the day. The constant current source I want to use is a commercially available mains voltage LED driver module. So, my questions are:

1. I think the LED driver module gets to its maximum voltage (≈311VDC) whenever the PWM signal is at its low stage and the MOSFET is off. Is this gonna create any problem with the PWM dimming function?

2. Should I separate the 12V (MOSFET gate driver) and High-voltage grounds?

3. Is it a good idea to use an optocoupler between the Arduino/ESP and the MOSFET gate driver IC?

4. Is this work or something's gonna explode as soon as I connect the power?!


The PDF file is the schematic.

This is the constant current driver:
20796193902091436204.jpg
 

Attachments

  • Schematic_Aquarium-Light-Example-Circuit_2024-02-12.pdf
    139.8 KB · Views: 2

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,728
Joined
Nov 17, 2011
Messages
13,728
1. I think the LED driver module gets to its maximum voltage (≈311VDC) whenever the PWM signal is at its low stage and the MOSFET is off. Is this gonna create any problem with the PWM dimming function?
How's that to happen with specs stating output voltage DC 108 - 160 V?
Of course, the output voltage will rise to max, but not 311 V.
The correct way to "turn off" a current source is by shorting it (MOSFET across the LEDs), not to have it open circuit (NOSFET in series with the LEDs). The specs tell us nothing about the behavior of the driver with shorted outputs, so this is a risky option.

2. Should I separate the 12V (MOSFET gate driver) and High-voltage grounds?
On the contrary: you need the grounds connected. And this is where this circuit becomes dangerous as the whole circuit is now connected to mains. Not a good idea, especially not in the wet environment of an aquarium.

3. Is it a good idea to use an optocoupler between the Arduino/ESP and the MOSFET gate driver IC?
Definitely, but still the MOSFET driver, the MOSFET and the LEDs are all connected to mains, see above.

4. Is this work or something's gonna explode as soon as I connect the power?!
Depends on how the LED driver behaves without load (MOSFET off), see above.

Better get an LED driver with an integrated brightness control and isolated control input.
 
Top