Need help with an analog output

Hello. I want to control an LED Grow light with esphome. I have attempted the pwm to mosfet board and it does not work due to the light needing an analog input.

Is there a way to get an analog output on an esp8266 or esp32 that can control voltage?

Or is there an analog board I can take the pwm into and get an analog output?

You can low-pass filter the PWM output - link.

Check the maximum input voltage possible on the control terminal. If it’s higher than 3.3V you will need to use another FET or transistor to increase the PWM voltage to whatever your LED driver needs.

Another option would be to bypass their PWM/analogue front end and drive their MOSFET directly from your microcontroller. Hopefully it has a logic level gate. Still, you might need another MOSFET or gate driver to make that work.

Thank you.

I have a 10vdc power supply that I was cutting with the mosfet board. It worked just fine. 50% was giving me 5vdc etc. When I hooked the light to the output of the mosfet board, the output stayed at 10vdc no matter where the brightness slider was.

I have multiple mosfet boards. I am unsure how to achieve what you are trying to tell me I can do. Looking at the link, it shows working off of the 3.3vdc power the board can give out. How do I do this with an external power supply?

Sorry if you have answered these questions and I am not skilled enough to have understood the instructions.

Typicaly, driver boards will only ever output two voltages - 0V and the supply voltage (in your case 10V). The way you get dimming is by very quickly switching the output on and off. explanation

Your multimeter is probably averaging this switching to give you a 5V reading at 50%.

Now, this is also how the analog output on an ESP works - so the word “analog” is a bit of a misnomer. But your driver board is expecting a steady DC voltage (from a pot/slider) not rapidly switching PWM.

A low-pass filter will do the same thing as your multimeter: averaging out the switching to a steady DC voltage.

If you can provide some pictures/model numbers/etc it will help for sure.

EDIT: Sorry, I just realised I didn’t explain that very well in either post! I am proposing to filter the PWM between the ESP and your existing LED driver, like this

Thank you for your assistance