# ESP-WROOM-32 layout USB-UART

I want my layout will include female headers to connect CP2102 MICRO USB to UART TTL Module 6Pin so I could just 'stick' it to my PCB while uploading the code. The 5V for the ESP will be supply from external source during operation.

The thing is the CP2102 has the following pins: 5V, 3.3V, GND, TX, RX, DTR:

I looked in the schematic of ESP32, micro USB 5V&USB-UART section and I saw that for upload the code properly I need RTS pin from CP2102, which is not accessible:

So it's seems that there is a missing pin out (RTS) for uploading the code. I didn't find any module for micro USB&UART that contain all the desired pins.

Is there any solution for it? Or should I implement the micro USB 5V&USB-UART section on my layout?

Thanks.

Update:

So I got the board and the USB to UART section looks like:

I tried to upload a sketch to the board and got the following message:

Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____

I pushed the BOOT push-button as always do with ESP32 and nothing happen! I also measured voltages across IO0: 3.3v and 0V when I push the button.

Finally I got the message:

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header


My design looks the same as the reference suggest, but still I failed in uploading a sketch.

• You need to sutdy the programming process to understand what these are used for versus the possible alternatives and make your own decision. Mar 30, 2019 at 14:52
• Did you get it working? Thanks
– VAAA
May 12 at 5:55

Do you need RTS? Yes and no. Per the reference schematics for the ESP-WROOM-32, the RTS pin is needed (along with DTR) if you want the programming process to be able to automatically restart and put the ESP device into the correct "Boot" mode for programming and then automatically restart it and run in the regular boot mode after it's done programming. If you don't have the RTS pin, then you'll have to use a separate mechanism (like a pushbutton) connected directly to the ESP-WROOM-32 pin IO0 so that you can power it up in the correct boot mode for programming.

I am somewhat familiar with this process, as I have split off the ESP programmer / power circuit into my own custom PCB, following the same reference schematics that you're looking at.

• According to the reference schematics, it's seems that i need both the RTS pin and push-button for IO0. I have the complete board (nudemcu-32s) and when I want to upload a code I must press the push-button of IO0 (BOOT) for a while otherwise i get fatal error: "timed out waiting for packet header". So from my experience the push-button is necessary anyway. Mar 31, 2019 at 15:48
• @Electrician it is very likely that design is incorrect, then. I initially ran into the same problem when I first made my custom ESP32 programmer PCB, but if it is done correctly then the pushbutton isn't necessary (as I found out when I fixed my circuit). If you are already relying on the pushbutton, then you probably won't need RTS coming out of the programmer circuit.
– mith
Apr 1, 2019 at 16:20

For a more automated flash and reset binary file upload you need to connect DTR and RTS pins. Below is a circuit schematic on how to achieve proper data transmission on a ESP32 MCU boards.

See the answers in this question ESP32 with FTDI programmer

• does it matter particularly what transistor is used for the IO0 and RST conections? I'm thinking something like a S8050? Feb 16 at 19:21
• no really no. You just need to select one that is able to fast switch for the corresponding data transfer bps Feb 17 at 10:34