Please help. Having a hell of a time connecting to an ESP module

I have been battling this issue for weeks and am making no progress. I am stuck. Any help would be greatly appreciated.

I am not new to programming, micros, circuit design, PCB design, soldering, etc. but I am new to the ESP32. I have a DEV board and I used it to prototype up a project that may be a product at some point. The project uses an IMU, OLED display, Bluetooth, WiFi, on-board battery, battery management and charger. Everything works great using the DEV board programmed through the USB port.

I then designed a PCB using the ESP32-WROOM-32E. I am using an external programmer as there is no USB-TTL device on-board. This version does have EN and BOOT buttons but I hope that the final version will not have them. My first attempts to upload the code did not work. Then, for some reason, I was able to upload the code to one of the two boards I have built up so far. Since then, nothing.

I have seen every post ever made on the issue with getting the ESP32 into boot mode. That is not the issue. With the COM window open, I can communicate with the ESP32. When I press the EN button, I get the reset traffic over the COM port. If I press EN and BOOT and then let up EN, I get the message that the ESP32 is in boot mode and ready to receive code. When I initiate the upload through the IDE, nothing.

So there is no issue with communicating from the ESP32 to the IDE. There is also no issue getting the ESP32 into boot mode. The IDE doesn't seem to acknowledge that the ESP32 is in boot mode and the transfer never takes place.

I'm stuck. Not sure what else to try.

(Oh. I use Visual Studio (not VSCode) as the IDE with the VisualMicro plug in but it doesn't matter. I can't get anything to go with the Arduino IDE either.)

Thanks for any help.

So, after sending a program to the ESP32, whiles its trying to connect, pressing and holding the button down, till the upload starts, does not work?

Yes. I have tried all combinations of using the buttons.

Starting the download from the IDE and then pressing EN-BOOT and releasing EN then BOOT.
Starting the download from the IDE and then pressing EN-BOOT, releasing EN but holding BOOT.

Pressing EN-BOOT, releasing EN, then BOOT, starting the download from the IDE.
Pressing EN-BOOT, releasing EN, holding BOOT, starting the download from the IDE.

None work.

When the ESP32 is unplugged list the available com ports. WHen the esp is plugged in list the com ports. Are there more com ports when the esp is plugged in?

Which esp32 developer board are you using?

Hold the button down till the upload starts.

Have you removed all the components connected to the developer board and then tried an upload?

Circuit diagram?

I haven't removed any components on the development board but I did remove all of the components on one of my boards with the exception of the ESP32, the buttons, and the support caps and resistors. No joy.

Idahowalker:
When the ESP32 is unplugged list the available com ports. WHen the esp is plugged in list the com ports. Are there more com ports when the esp is plugged in?

Oh, and I meant the components you added to the ESP32, for your project, like those on a bread board.

BTW, could you answer the above question?

I pretty much removed everything on my board, including the battery stuff. (I could build up another one with just the ESP32 and the absolute minimum parts but I think that is what I already have.)

With the programmer unplugged, there are no COM ports showing. With it plugged in, just COM3 shows.

This is the programmer I am using...

DSD Tech Programmer

So you don't have an ESP32 but an ESP8266?

I've just directly plugged the ESP32 development boards into the USB of the computer for programing.

Also, com3 will have issue with programming.

No doohickey thingamabob needed.

I am using ESP32-WROOM-32E modules, not ESP8266s. The development board has a WROVER module on it though.

The dev board works great through the USB port. My computer assigned it COM27. When I go to the programmer, the computer assigned it COM3. (Could that be the problem!!?!??!)

I just use developer modules. I've not dug into making my own module. You might want to ask the people who make the ESP32 over at ESPRESSIF

They are rather non-responsive over there.

BTW, I changed the COM port from 3 to 20. Same result.

Late to the discussion but I noticed that your dev board has two transistors, right above the "Boot" silk screen. Does your USB-TTL adapter have these transistors? If not, I think you should manually operate the boot and EN buttons and timing could be tricky. I don't have these transistors on my boards but I have them on my programmers.

I am VERY please to say that the problem is DEFINITELY solved. And the extra good news is that it wasn't my fault! (It is a rare occurrence when I can say that.)

It was the programmer! I guess I just got a bad one. It could receive but not transmit. Go figure. Once I got another, it worked great. Flawlessly. The programmer connects up first time every time. The EN and IO0 need to be held down simultaneously. The EN needs to be released first, then the IO0. No need to hold it down during upload.

In the circuit shown, only TX and RX are used. The dev board uses DTR and RTS. The transistors on the dev board are the interface between those two control lines and EN and IO0. That is why the dev board automatically resets after an upload. On my board, I have to manually press the EN button to reboot the ESP32.

The final version of my board is almost ready to be made. That one does not have the EN or BOOT buttons at all but I did put the DTR and RTS interface logic on the new board so it will automatically upload once the programmer initiates it and will automatically reboot the ESP32 after the upload. (I have designed my own programmer just for this purpose. I expect to be programming a lot of ESP32 modules in the future.)

Problem solved!

Sounds good! I didn't anticipate a non-working TX on the programmer. Could be solder blobs or bad reflow? Did you buy it from somewhere? I make my own programmers so it makes sense to have the transistors on the programmers, not on the device board. Depending on how many you're going to make, you may want to design your own programmer just so you have full control of the process. I just use an FT232RL and two transistors on my programmer and a reset button so I can reboot when I want.

If possible, stick the trace antenna over the board edge. That's the recommendation from Espressif. If not, don't put any trace or ground pour under the trace antenna. I see a couple traces from the programming header running under the antenna.

I have designed my own programmer and will order the boards today. It does use the FT232RL and brings out all the control pins. I expect to be programming lots of ESP32s so the pinouts are convenient for the ESP32 but are useable for anything else. The connector pins configuration of the programmer matches the board with the ESP32 on it. The switching of RX/TX is done on the board so the cable doesn't need to do the crossover.

I have kept as much circuitry away from the antenna as possible but a trace or two does run in that area. I don't expect that there will be any significant loss of signal.

You could still remove the ground pour under the antenna though. It's not much effort. Define a rectangle in a top resitrct layer before pouring ground plane.

The picture is deceiving. There is no ground pour in the keep out area on either side. The trace that looks like it goes into the keep out area goes in but runs along the pads before heading across to the other side.

Now that I figured out that the programmer was the problem, everything is working very well. I am actually pleased with the ESP32 module. I expect the new boards in a few days and those don't have any buttons on them at all for programming. At the same time I am expecting the PCBs for my programmer which should make everything very easy and straight forward.

If you have extra time on your hand, try out the ESP-IDF instead of arduino. It's a great development kit for internet of things. I've only used ESP-arduino a few times so I am guessing that ESP-arduino doesn't support RTOS or more customizations because I haven't used it much. Can you redefine which pins to run your TTL, SPI, I2C ports?