Page 1 of 1

Can I pull an LEDC PWM output high with an external resistor? (for boot)

Posted: Sun Jun 08, 2025 12:49 pm
by kholmes
On my ESP32 S3 - there's an LEDC output driving a motor via PWM to a chunky mosfet.

The mosfet is on a very noisy, high voltage driver board, and I felt that I need to isolate the ES32 on a different power rail - namely a USB power supply. The difficulty comes from the optical isolator I'm using on the driver board, which inverts the ESP PWM signal. So PWM Low/0 means the motor is driven at full power.

It's fine once the ESP is powered up and running - the analogue output signal is inverted. The problem is during ESP boot-up, and it turns out that rebooting the ESP while connected to the live motor driver board is a thing that can happen in the end use case. This means that the motor is driven uncontrolled at full-power for fraction of second while the ESP boots.

I thought maybe I could solve the issue by pulling the PWM output pin high with an external 10k resistor - and that worked for like 2 minutes, but then it seemed like something burnt out on the ESP, and the PWM output climbed up to max over a few seconds.

So my question is - does setting a GPIO (specifically #47) to LEDC PWM output change the ability of that pin to sink current? with a 10k pull-up on 3.3v - I thought that it would be ok sinking 0.33mO of current?

thanks,
Kevin.

Re: Can I pull an LEDC PWM output high with an external resistor? (for boot)

Posted: Wed Jun 11, 2025 11:27 pm
by MicroController
GPIO 47 and 48 seem to be powered by "VDD_SPI", which should match the flash/PSRAM voltage and may be as low as 1.8V.
If your chip uses 1.8V flash, those pins' max. permissible input voltage may be limited to 1.8V.