Using an external serial adapter on ESP32

Enfield Cat's Blog: Arduino and other projects.


Introduction

Normally a ESP32 module should be recognised by your computer as a USB serial device. But what if it is not?!! If it is not recognosed a work around is to use an external USB to serial adapter board. The downside of this is when flashing the eeprom of the device you need to press "boot" and "en" buttons when the Arduino programmer is ready to write to the device. Once flashing is complete the unit can still be reset by the IDE using the "RTS" pin. Press these buttons and release when the "Connecting" prompt appears in the dialogue pane.

Sketch uses 1630786 bytes (82%) of program storage space. Maximum is 1966080 bytes.
Global variables use 62020 bytes (18%) of dynamic memory, leaving 265660 bytes for local variables. Maximum is 327680 bytes.
esptool.py v2.6
Serial port COM8
Connecting........____

You can press the boot-en button combination ahead of time, in which case the console (if connected) will show the following text. However, be aware that if doing this ahead of time the "Waiting for download" has a timeout period, after which it will beoot normally. This is to prevent the ESP32 being left to wait "forever" after the combination is pressed. This should prevent the unit being either accidentally or deliberately sabotaged by being left in a waiting state.

rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download

The pins to connect are:

Serial AdapterESP32 pinComments
GNDGNDCommon Ground
VCC (or 5V)VIN5volt power
RX0TX0USB serial receive is ESP32 transmit
TX0RX0USB serial transmit is ESP32 receive
RTSEN or 0Optional: allows Arduino IDE to reset device after flashing eeprom

Diagram of wiring between serial adapter and esp32



Thank you for visiting camelthorn.cloudHome