A few hobbies I’ve been getting into recently are saltwater reef aquariums and home automation. This little project was a bit of both. I bought 2x 165W LED lights off of facebook marketplace for pretty cheap. These are the “black box LEDs” mentioned on a lot of forums. They’re sold under several brand names with small variations.

I decided to modify and upgrade them. The goals were…

  1. Simplify the wiring
    1. These lights have independent power connections for the white channel and the blue channel. They can also be daisy chained together. This means wiring both lights requires 4 power cables – even though the combined max power is ~300W. With all 4 cables connected it’s a bit of a mess.
    2. I modified them so that there is only one power in for each light, one switch for each light, and no daisy chain outlet.
  2. Add WiFi control so I can setup automation routines
    1. e.g. Turn on/off at sunrise/sunset. Gradually increase/decrease intensity to emulate sunrise/sunset, etc.

Hardware

Each LED light has two channels (blue and white) each with its own power supply / driver. Each driver has a 4-wire connector going to a potentiometer PCB to control on/off and intensity. I poked around with a multimeter and tested some things on a breadboard and figured out that one pin on the connector is pulled high to turn on the light while another pin is a 0-10V analog signal to control brightness (the potentiometer). So I prototyped a circuit on a breadboard that uses 3.3V digital outputs to achieve those two functions. The analog control uses an RC circuit feeding into a non inverting amplifier to turn 3.3V PWM into 0-10V analog. I put this together into a little PCB that I ordered from OSH Park. PCB files are in the github linked below.

Software

I used ESPhome for the firmware since I have a Home Assistant server running at my house. This makes developing the firmware incredibly simple. ESPhome has a “power supply” configuration where it will turn a specific pin on when it turns on a dimmable light. This makes the interfacing very simple. The YAML configuration is in the github link below.

Github – PCB files and esphome configuration

Areas of Improvement

This modification is working well – however, my implementation is far from perfect. Here are some issues with my design…

Loss of functionality

While I added WiFi function, I dropped the potentiometer controls. For many people this would probably be a no-go. These lights can now only be turned on/off and adjusted via WiFi – there is no manual control. At first I tried to wire my controller in parallel to the potentiometer control circuit. The potentiometer PCB even had an unpopulated connector footprint right next to the populated one. In the process of trying this I killed two of the potentiometer controls – probably as simple as frying a diode on the potentiometer PCB.

These two control circuits probably need to be combined in a smarter way – some diodes added to the on/off control and maybe diodes for the analog signals as well. If I were to work on a second revision, this would be at the top of the list for improvements

Extra component/cost

I included a $5 12V PSU in there to power the esp8266. The LED power supplies have a connector I interfaced with that include a 12V pin and should make the 12V PSU I added unnecessary. In my testing I tried using it and had some success, but it wasn’t very stable. This was mostly a problem at low LED power output. The 12V pin would measure 12V if I applied no load (disconnect esp8266) but then if I plugged in the esp8266 it would drop to 6V. At higher LED power outputs everything worked well.

Adding some capacitors didn’t help – maybe this pin can’t supply enough current @ 12V for the esp8266.