ESP32-CAM not flashable with ESPHome?

Hello

I have a ESP32-CAM board. I have an ESP32-CAM-MB board, and a YP-05 FTDI programming board. I have tried both of these options to upload the flash to the ESP32-CAM board. The YP-05 board is wired as shown in the attached image.

I have tried plugging the ESP32-CAM board into my Pi4 running HomeAssistant and ESPHome, using either the YP-05 or the ESP32-CAM-MB. I tried many different MiniUSB and MicroUSB cables. The device is always selectable, but it cannot ever connect to the device. I always get this:

Connecting......................................
ERROR Running command failed: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
ERROR Please try running esptool.py --before default_reset --after hard_reset --baud 460800 --port /dev/ttyUSB0 --chip esp32 write_flash -z --flash_size detect 0x10000 /data/build/esp-cam-1/.pioenvs/esp-cam-1/firmware.bin 0x1000 /data/build/esp-cam-1/.pioenvs/esp-cam-1/bootloader.bin 0x8000 /data/build/esp-cam-1/.pioenvs/esp-cam-1/partitions.bin 0xe000 /data/cache/platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin locally.
INFO Upload with baud rate 460800 failed. Trying again with baud rate 115200.
esptool.py v4.6.2
Serial port /dev/ttyUSB0
Connecting......................................
ERROR Running command failed: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
ERROR Please try running esptool.py --before default_reset --after hard_reset --baud 115200 --port /dev/ttyUSB0 --chip esp32 write_flash -z --flash_size detect 0x10000 /data/build/esp-cam-1/.pioenvs/esp-cam-1/firmware.bin 0x1000 /data/build/esp-cam-1/.pioenvs/esp-cam-1/bootloader.bin 0x8000 /data/build/esp-cam-1/.pioenvs/esp-cam-1/partitions.bin 0xe000 /data/cache/platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin locally.

I also tried https://web.esphome.io/ and selected the option to “Prepare for First Use”. Likewise, connection is never made.

Is there anything I am missing? Any way to debug what is the issue here?

It looks like you set the logic levels to 5V. That should be 3.3V and you may have fried those GPIOs.

The programming device will always be selectable regardless of where and ESP is correctly connected.

I deliberately chose 5v, and then used dupont cable from YP-05 VCC to +5v on the ESP32-CAM board. While researching, I found conflicting notes, some stating 5v is better, some stating 3.3v is better.

Anyway, I have gotten it to work. I changed a lot of things, and I cannot pinpoint exactly what made it wake up. It is now flashed, added to HA, and is sending images to HA. Awesome!

If there is a benefit to using the 3.3v instead of 5v for programming, I would be interested in any links.

It has been a bit of a learning curve, as I have a ESP32-CAM-MB board, but that appears to be faulty. The seller sent it, but said he received a batch with many fauly, and sent the YP-05 for free just in case.

Also, I did not realise that after flashing, I cannot use the ESP32-CAM-MB board to power the ESP32-CAM board, as it appears to boot it into the programming mode. And the Data cables from the YP-05 do the same thing.

I think I understand it a bit better now.

Thanks for your help.

I solved it by selecting “SKIP THIS STEP” and select manually ESP32 option, it will create the base yml, load the initial config for the esp cam and click in install by USB port. I used the next link for all it: Esp32Cam and ESPHome: How to Monitor your dumb devices (washer, heater…) or even your plants - Random DiY Projects

Note: I didn’t change to 3.3v, keep using 5v.