Problem uploading sketch into ESP32-CAM Module!

1. I have just bought the following (Fig-1) ESP32-CAM Camera Module.
image
Figure-1:

2. I have decided to upload the following Blink Sketch as an initial functional check of the Module. I am using IDE 1.18.19. I have selected this Board:
"AI Thinker ESP32-CAM".

#define RLED 33 //onbooard RedLED

void setup() 
{
  Serial.begin(115200);
  pinMode(RLED, OUTPUT);
}

void loop() 
{
  digitalWrite(RLED, HIGH);
  delay(1000);
  digitalWrite(RLED, LOW);
  delay(1000);
}

3. Since the CAM Module does not have a USB/UART Port, I have used the following USB/TTL converter and connection (Fig-2) to upload sketch.


Figure-2:

4. I have pressed the Upload button in the IDE, and I have pressed down the RST button of the Module when the "Connecting........" message has appeared.

5. The uploading has failed with the following message:
Serial port COM5
A fatal error occurred: Failed to connect to ESP32: No serial data received.

6. I seek assiatnce to solve my problem.

When you press the reset button, what message appears in the IDE Serial monitor, set it to 115200 baud.

During the appearance of this message "Connecting.....", I can press the RST button of the Module; but, I cannot click on the Serial Monitor icon. If I do so, the communication phase is terminated.

Do you think that the followig FTDI (USB/TTL) Adapter (Fig-1) will help as almost all the online tutorials have used this adapter; whereas, I have used CH340G based USB/TTL adapter.


Figur-1:

Did you open the Serial monitor first and then pressed the reset button ?

1. I click on the Upload Button.
This message apperas on the messageBox of IDE:

Serial port COM5
Connecting............

2. I click on the Serial Monitor icon; as a result, the following mssage appears on the messageBox of IDE.

Error opening serial port 'COM5'. (Port busy) (Serial Monitor does not appear.)
..........................

3. I press the RST button on the CAM Module. After a while, the following mssage appears on the messagebox of IDE.
A fatal error occurred: Failed to connect to ESP32: No serial data received.

Dont start upload.

Then follow post #2.

Normally, we create sketch, compile, upload, and then open Serial Monitor.

This time, I have created the sketch, compiled, opened the Serial Monitor at Bd = 115200, and then pressed on the RST button of the CAM Module. Nothing has appeared on the Serial Monitor.

I do appreciate the normal program load process.

The ESP32 will on reset send messages to its serial port.

And if DIO0 is connected to GND when you press reset you should see 'Waiting for upload'.

These messages to the ESP32 serial port have nothing to do with the Arduino IDE or any program. So can be used as a very useful troubleshooting step.

If you dont ge these messages then probably in order of probability;

The wiring is wrong.
The USB - Serial adapter or its driver is faulty.
The ESP32CAM is faulty.

1 Like

Thank you for the useful information with respect to a debugging message "Waiting for upload" which I only know now.

I will perform the above-mentioned three fault-finding steps one-by-one and will let you know the results.

@srnet

image

1. I have performed continuity check of all the jumper wires. They look fine.
2. I have checked my two USB/TTL (CH340G based) adapters/converters connecting with software UART port of UNO, and they are also working.

3. Before I suspect the Camera Module, I would like to try with the FDTI adapter which I have ordered alreday. It will take 6 days to arrive.

Thank you very much for the sound guidance in trouble shooting of my non-functional setup/equipment.

@srnet

I have received the FTDI adapter today and tried --
1. procedures of your post #6; I did not see any "Waiting for upload" message.
2. Uploading with 5V Vcc/3.3V Vcc and 3.3V RX/TX logic; there is no communication connectivity with RST button pressed.

I am planning to order for another ESP32-CAM Module from another vendor along with ESP32-CAM-MB Micro USB Download Module (Fig-1).
image
Figure-1:

@srnet

Good news is this:
I have been able to program the ESP32-CAM Module (the old one) with the help of ESP32-CAM-MB Micro USB Download Module (Fig-1). I have uploaded a sketch to blink onbaord RedLED at GPIO33, and the LED is blinking alright.

There is no need to press the BOOT/IO0 button (to short IO0 with GND) to statrt uploading. The uploading starts following the click on the Upload button.

image
Figure-1a: ESP32-CAM-MB Micro USB Download Module

image
Figure-1b: Camera Module is placed on the Daughter Module

The concern reamains as to why I am not able to progrm the ESP32-CAM module by the USB/TTL adapter (Fig-2, post #1)!

GND on this picture is not real GND.
Use GND near the 5V pin, like in the picture in the post#1.
Cheers.

1 Like

I have just tried with the setup of Fig-2 of post #1 by using GND-pin near the 5V-pin. Unfortunately, the uploading does not start. It terminates the process with the following message:

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
the selected serial port For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
does not exist or your board is not connected

You are right! I have checked that that pin (though marked as GND) is connected with GND-pin of the ESP32's Metal Cover (body GND).

Thank you for giving kind attention to my issue.

I would like to draw your attention to the following schematic (Fig-1) of UNO in ordr to asses if the DTR signal has any involvement with Uploading issue?


Figure-1:

Not for an ESP32CAM.

1 Like

I don`t remember, it was year ago... try to set flash frequency to 40MHz, or change the upload speed, I just know I lost the whole day with it...
Anyway, it should be connected like in the post#1.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.