How to use an ESP32 DevKit as an UART adapter

ShellAddicted
2 min readAug 25, 2019

--

If you like to play with micro-controllers, an USB to serial (UART) adapter is an indispensable tool to own, they are extremely useful, cheap and small… yeah too small, I’ve just lost mine (still don’t know how or when, anyway it’s gone), but I need to flash an STM32 on a Motor Driver Board which shipped with a broken firmware, how I can solve this situation? I don’t want to wait 20+ days for a new one, or overpay it for a fast shipping.

Lucky I’ve an ESP32 DevKitC with an on-board USB-to-UART (CP210X) module that I can use.

Wiring

  • Make sure that the external micro-controller, and the ESP32 board share a common ground, (just wire together at least 1 GND pin between the 2 boards)
  • Short pin EN with GND on the ESP32 board this keeps the ESP32 chip in RESET state, so it will not interfere.
  • now connect ESP32 TX and RX pins to their respective on your external micro-controller, plug the USB cable to the computer and you’re good to go!
  • Bonus: you can use the 3.3v from the ESP32 board to power the external micro-controller.

Note: this setup is utilizable only for 3.3V logic boards, 5V logic may work as well, try this at your own risk.

--

--

ShellAddicted

Just a developer, that likes to break and fix stuff.