Esp32 + PWM voltage converter to dimmer led

Hello, i would like to dimmert my cob led using my led driver mean well xlg-75-h-ab with 3 in 1 dimming function (0~10Vdc, 10V PWM signal and resistance). I have bought 3.3V PWM Signal to 0-10V Voltage Converter Modulo di conversione PLC digitale-analogico D/A, and esp32 mini kit but i doesn’t have idea to connect voltage converter to esp32 and finally to implement it in my home assistant. I would like to creare a slider to increase and dicrease intensisty of cob led in home assistan. Thanks a lot for help

@ThomDietrich you create a simple function to control fan, can you help me? Thanks a lot

Did you get a look at esphome documentation about PWM ? ESP8266 Software PWM Output — ESPHome it explains you basics on how it works and way to code it :wink:
Which board did you buy for the PWM → 0-10V conversion ?

Thanks so much for feedback. I’ve just bought this PWM board: https://www.amazon.it/gp/product/B08FML66WW/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
and this esp32: MH-ET LIVE MiniKit for ESP32 | MH-ET LIVE.

Thanks for the link and yep should be pretty straightforward :wink: Careful that the PWM module needs 12V for power supply !
You wire a GPIO of the ESP on the input of the PWM module (ground common between both boards) and then code it as indicated in ESPHome documentation and it should work !
Feel free to share your wiring diagram before doing it if you are not sure :wink:

Thanks a lot for feedback, tomorrow morning i share my wiring diagram for help. Thanks for support

Hello @vincen, sorry for delay. I have just connect properly my esp32 and PWM module but now i have problem to compile ESP32 firmware to control PWM module. Can you help me please?

Well I’m not a soothsayer so without sketch impossible to help you !

Hello @vincen, thanks a lot for feedback. Sorry for request but i have experience on electronics but not in software. I have read guide and i would like to flash this script on my esp32 with esphome
output:

  • platform: ledc
    pin: GPIO4
    id: gpio_4

But i don’t konw to do this, can you help me? Thanks a lot