Upload to ESP32-CAM using UNO fails: "No serial data received"

Hi. I am having the same problem with my esp32-cam(ov2640). I tried to program it using an arduino uno. I used the webcamera example for this but the error "A fatal error occurred: Failed to connect to ESP32: No serial data received." pops up. I am using the cam for the first time. So please help me(I am not that experienced).

Hi @spacexplorer444. Please tell us the connections you have made between the pins on the Uno and the ESP32-CAM.

ESP cam Arduino
5V - 5V
GND- GND
GPIO 0- GND
UOT - RX
UOR - TX
GND(arduino) to RESET(arduino)

Also is it possible to program the esp32 cam with an arduino? If not ill buy a ftdi.

The esp32cam can draw a lot of current so if you are powering it from the Arduino this may be an issue.
The gpio pins of an esp32 are 3.3v not 5v so this may be the next issue you have.

Your best option may be to get one of the "esp32cam motherboards" to program it as they just slot in (search Aliexpress for "esp32-cam-mb").
The esp32cam they supply with it is slightly modified so it can reset automatically, if yours is not this type you may need to press the reset whilst holding the program button on the esp32cam to program it.

BTW - see How to Program / Upload Code to ESP32-CAM AI-Thinker (Arduino IDE) | Random Nerd Tutorials

1 Like

Unintuitively, this is wrong.

The reason is that the purpose of this circuit is to connect the USB to serial bridge chip on the UNO (e.g., ATmega16U2) to the ESP32. The labels on the pins on the UNO are in relation to the pins on its primary ATmega328P microcontroller chip, not the USB to serial bridge chip. The bridge chip has an RX-TX, TX-RX connection to the ATmega328P, so the pin labeled "RX" on the UNO is actually connected to the TX pin on the bridge chip, and the pin labeled "TX" on the UNO is connected to the RX pin on the bridge chip.

So in order to make a RX-TX, TX-RX connection between the bridge chip and the ESP32, you must make connections between the pins that are labeled as described in this table:

ESP32-CAM UNO
U0T TX
U0R RX

Other than that, the other connections are correct.


However, I should warn you that connecting the RX pin of the UNO directly to the U0R pin on the ESP32-CAM is not a great idea. The ESP32 runs at 3.3 V (there is a voltage regulator on the board that reduces the 5 V input from the 5 V pin to 3.3 V before feeding it to the ESP32) so you should really only subject the GPIO pins to 3.3 V maximum. The UNO runs at 5 V and so the signals transmitted from the USB to serial bridge chip use 5 V logic levels. So you are subjecting the U0R pin of the ESP32 to 5 V, which is above its maximum rating:

https://docs.espressif.com/projects/esp-faq/en/latest/hardware-related/hardware-design.html#what-is-the-voltage-tolerance-of-gpios-of-esp-chips

What is the voltage tolerance of GPIOs of ESP chips?

The voltage tolerance of GPIO is 3.6 V. If the voltage exceeds 3.6 V, please add a voltage divider to protect GPIO pins from damage.

Maybe you can get away with 5 V, but it is also possible you could do permanent physical damage to the ESP32.