I'm trying to make a DIY ESC with an ESP32. The problem is that, my ESC has 2 power inputs:

  1. With an XT60 that powers the mosfets and motor + the ESP32 through a switching buck converter to 3.3V
  2. From USB C

I'm not using the ESP S2, but the ESP32-WROOM-32E-N8, which requires a USB-to-UART converter. So I found one (datasheet below), but here's the problem: If I power the ESP from both USB AND XT60 at the same time, this will release the magic smoke... So my question is, how can we interrupt the USB C VBUS line from powering the ESP32 IF the XT60 is connected? And enable it again if it's the only power source?

And yes, I tried searching for "power prioritization ICs" and found multiple similar to this: https://www.analog.com/media/en/technical-documentation/data-sheets/4417f.pdf , but the Output current on the datasheet is "2mA", and I'm quite sure the ESP32 won't operate well at that level... (I think it needs AT LEAST 13mA)

Also, I did think about depletion mode normally-closed FETs, whose gate would be connected to the XT60 (+) pin, and whenever it is connected it would interrupt the USB line (VBUS, not D-,D+,GND), but I'm not sure if this is the best way to do this... Like what if it doesn't close INSTANTLY?

Serial to UART Datasheet: https://www.mouser.com/datasheet/2/163/DS_FT231X-13571.pdf .

  • 1
    \$\begingroup\$ please don't add info in comments ... edit the question and delete the comment ... forgot to say "Hello!" ... even though it is polite, it is irrelevant clutter in the question ... this site is not a chat forum ... you post a clear question and somebody will post a clear answer, nothing more \$\endgroup\$
    – jsotola
    Jun 21, 2023 at 18:46
  • \$\begingroup\$ Do you need to feed the ESP via USB? It could be enough to feed only the UART converter and just connect the control lines to the ESP. What is an XT60? A schematic of the supply model will help here. \$\endgroup\$
    – Jens
    Jun 21, 2023 at 18:50
  • \$\begingroup\$ The USB-C port supplies 5V, correct? Does that also supply the 3.3V buck? My first inclination would be to use diodes here, assuming you have the voltage headroom for a diode drop. If each supply passes through a diode, either can supply power, but they won't fight each other. \$\endgroup\$
    – Troutdog
    Jun 21, 2023 at 18:55
  • \$\begingroup\$ @Jens Yes, we do need to feed the ESP via USB. XT60 is a power socket type for LIPos to enter on the board \$\endgroup\$
    – Mito
    Jun 21, 2023 at 19:21
  • \$\begingroup\$ @Troutdog Yes, that would also get into the 3.3V Buck. But how is it possible to get them through a Diode? I'm planning on using MAX 12S Lipos on my ESC, so that would be a max voltage around 50V... Isn't it unsafe to feed 3.6-5V from the USB and 50V from the lipo into the 3.3V converter that supplies the ESP? \$\endgroup\$
    – Mito
    Jun 21, 2023 at 19:24

1 Answer 1


The LTC4417 is a power controller, which means that you must connect external MOSFETs to switch the power lines.

LTC4117 typical application

There also are power muxes with integrated switches (e.g., TPS2116):


The disadvantage of integrated switches is that they must be small and thus have a limited current capability (2500 mA for the TPS2116).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.