Controlling LED Light Intensity with ESP32

Might be normal. Take your multimeter and measure the converter output voltage 40% and 100%. Is it 4V and 10V? Probably not. You can compare that to voltage of the “manual” dimming, what voltage levels you read when it turns off?

Also, while common Gnd works here, ideally you take benefit of optoisolator and have local gnd between Esp and converter.

You can also try adjusting the frequency and setting gamma correction to 0

output:
  - platform: ledc
    pin: GPIO18
    id: gpio_18
    frequency: 1220Hz

# Example usage in a light
light:
  - platform: monochromatic
    output: gpio_18
    name: "Lumii Black LED"
    gamma_correct: 0
1 Like

I’ve done what you recommended, thanks. I connected the ESP and Converter so, that they have local ground now.

I also did some measurements with the manual dimm controller. Here are my results:

OFF: 0V
25%: 2.66V
50%: 5.21V
75%: 7.31V
100%: 10.14V

From the 12V+ I get 12.03V, which is expected I think.

@Mikefila: I’ve implemented your recommendation as well and added frequency and gamma_correct. I’ve played around with it a little and found out, when I put the gamma_correct to “0.5”, I can go down to 1% and the light doesn’t turn off.

I’ll go on Vacation in a few days, so I can’t make anymore tests in the next month. But as soon as I’m back, I’ll test the initial setup with the buck converter. My goal is to not have an additional power supply to power the ESP. But if this doesn’t work out, I’ll have to power it with an additional power supply then.

So far I want to thank everyone in this thread :heart:. I’ve learned a lot on this little journey and I’m glad that we have this helpful community. My next project will be speed controlling a PWM Inline Duct Fan with ESP hehe.

So those are spot on. I meant to compare it to converter voltage output with same dimming levels.