Can I replacing a built in controller for my ring light with ESP32

No. See the example circuit in wiki link I posted. The ESP signals the transistor to turn on, which grounds the LED cathode.

If you hooked up the ESP32 directly to the X or Y inputs you may get some light.
The ESP32 is capable of driving some 20 or so milliamps through a White strip.
That might be enough to dimly light up something but it’s not how you need to drive the strip and control it’s brightness.

From what I can tell in your ring light, the two different white strips X and Y will generate full brightness when you apply 5V to one or the other (or both). When you do that, the strip will probably draw some hundreds of mA. As I said, the ESP32 can’t supply that much so you use the transistor in a sort of relay fashion. When the ESP32 turns on the Mosfet, the part of the strip that’s attached to the Drain will be effectively tied to ground through the Source pin. So when the ESP32 turns on it’s pin, the strip turns on.

I usually end up wiring a Mosfet in a little test rig and apply the gate voltage via an extra 1K resistor. The nice thing about Mosfets is they’re voltage controlled (versus current controlled bi-polars) so they don’t need much current to turn them on.

Now to vary the brightness of the strip, the WLED software will toggle the pin on and off at a few Khz and vary the duty cycle. At 99% on vs off the strip looks like full brightness while at 10% on vs off it will be very dim. Since your eyes can’t react as fast as the oscillations, they average the effect and you see varying brightness. The transistor just follows the switching rate of the ESP32 and delivers the current the strip requires.

Just occurred to me…

All this discussion about a Mosfet controlling the W or Y strings has been using the diagrams from the WLED Wiki showing a switch from the LED to ground (common Anode). You say in playing with the ring light that tying the “W” wire to +5 lights the strip. That implies the other end of the strip is tied to ground (common Cathode). So the Wiki diagram is “backwards” we need our “power relay” between +5v and the strip.

For Mosfets that means a “P-Channel” device versus the “N-Channel” IRLZ44N. What device you need depends immensely on the maximum current you need to drive the strip. You can either measure it directly or make some fair guesses based on the rated current capacity of your wall Wart power supply.

Now that we’re talking P-Channel devices that opens the can of worms about how the whole relay analogy falls apart in some scenarios. We’re into transistor design for 3.3V logic level and I’ll point you off to other discussions: try this one.

1 Like

Thanks for the link that has a bunch of helpful information.

I was incorrect in remembering how I turned them on. I grounded them to turn them on I think.

Not sure if this is helpful information but measuring the voltage from ground to the Y or W pin results in 2.8v will the lights are off. And 0v if the lights are on.

I got the RGB side working last night but I will have to wait for the transistor for the white side.

Also, will I be able to turn on and off the RGB and White lights independently with one ESP?
Thanks for all the knowledge and help.

These are my voltage observations when measuring from gnd, this may help define what behavior is being used:

       |  Off       |    W On         |     Y On
_____________________________________________________
5v+    |   5v       |      4v         |      4v  
Y      |  2.8v      |      1v         |      0v
W      |  2.8v      |      0v         |      1v

p.s. The forum keeps putting me in time out because I am new here. So my replies could be very delayed. It keeps putting me in 1hr timeout and after so many posts the forum puts me in a 12hr timeout.

This is an excellent sign you can use the “easy” N-Channel solution.
As a matter of fact, looking at your photo of the PCB again, I see two SMD (Q4, Q6) devices that look suspiciously like Mosfets with 10K resistors (R1, R7) wired from what should be Gate to Source and Source to ground. A super simple test would be to cut one of the traces driving the non-ground end of the resistors and then tie that through a 1K to +5V.
The strip should come on.
If that works, connect to 3V through a resistor and see if the strip comes on at full brightness and also check the voltage drop from Source to Drain. If the Mosfet is fully on, the drop should be very small (10’s of mV) and the Mosfet will remain cool and all’s good. If it’s too large, the Mosfet is not fully on and will be acting as a significant inline resistor and dissipate heat - too much and it burns up.

You may be able to just use the devices built into the original strip…

As far as multiple strips on on WLED device, absolutely.
When you setup “LED Preferences” you have the option of adding multiple strips on different pins of the ESP32.
You choose the type of strip and total count of LED’s for each pin separately.
So the RGB strip would be WS281x with 48(?) leds on whatever pin.
The Y strip would be PWMW with 1 LED on a different pin.
The W strip would be PWMW with 1 LED on a 3rd different pin.

When setting colours, brightness, etc within WLED, the LEDs are treated as one big “virtual strip” numbered from 0 to the total LED’s -1.
Assuming you start with RGB and it’s count is 48 (my guess) LED # 47 is the last RGB, 48 is the Y strip and 49 is the W strip.

Obviously, the only thing you can set for 48 and 49 is their brightness, but 0-47 is fair game.
You turn them on and off independently by changing different parts (segments) of the whole WLED “virtual strip”

Awesome, I have not messed with segments yet so I will look into that. I removed the default controller and have it wired to the esp now. I am working on building me a nice replacement module with a power button. I will figure out how the transistor works and fit them in soon.

Thanks for your help. Ill post back here when I get the transistor.