AI Thinker CAM- Upload trouble?

AI Thinker ESP32 CAM uses an FTDI programmer to interface with the PC. It wasn’t uploading, so I dug up the pinout. That may have been wrong.

I uploaded Blink successfully once. It didn’t work, but PIO said it was successful. Once.

It’s not uploading again. Does anybody have experience with this thing? GPIO 0 and Ground have to be connected to upload.

First you want to make sure your module is in uploader mode. Open a serial monitor program (e.g. hterm) on the COM port of the device at 115200 baud.

Then, as you have already noted (also in Home · espressif/esptool Wiki · GitHub), GPIO0 has to be connected to GND, then the RESET button needs to be pushed (or RESET connected to GND momentarily).

At the reset button push the serial monitor must show

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download

If that is not the case, then the module is not powered correctly or the UART connections are wrong (e.g., inverted TX/RX), or the module wasn’t put into bootloader mode properly.

If the module is in bootloader mode, retry uploading.

Mine has no button. Does this mean I should ground the RST pin? Because there’s no reset either.

16 pins, including 3 x G, 5V, 3V, and one labeled 3.3/5 P_OUT.
So only ten GPIO.

You can reassign a lot of pins with an ESP32.

Schematics and module picture show a button underneath the red LED though which is the reset button (ESP32-CAM AI-Thinker Pinout Guide: GPIOs Usage Explained | Random Nerd Tutorials). If your module is different though then you have to repower the module so that, when the ESP32 gets power, it sees GND at GPIO0. Just re-plug the VCC connection.

can I fake a reset button with a pushbutton connected to 3V?

There are instructions for a button on GPIO0 for the bootmode: GitHub - raphaelbs/esp32-cam-ai-thinker: Informations and examples about A.I. Thinker ESP32-CAM using ESP-IDF

They call this a “RESET” button but it’s not. It’s GPIO0 for FLASH mode. They also note that you have to power-cycle the module while holding down that button.

Cripes! The reset button is UNDER the machine.

I got this:
¼|

Using Termite. Try PIO next.

could not open port ‘COM15’: could not open port ‘COM15’: PermissionError(13, ‘Access is denied.’, None, 5)
The terminal process “C:\Users\joema.platformio\penv\Scripts\platformio.exe ‘device’, ‘monitor’” terminated with exit code: 1.

It’s at 9600. You said set it to 115200.
Is that for real?

No, it is set to 115200.

Port is already connected to in another serial monitor program?

What’s the output now at 115200 baud?

THis in PIO:
,��

Switching to 9600

PIO at 9600:
,�� �d��

115200 is definitely the correct baud rate for the bootloader. monitor_speed = 115200 must be in there.

If you still only see garbage characters at that baud rate, maybe the power supply is bad. How is the +5V on the VCC pin of the module provided?

1 Like

There’s a jumper, on the 5V side. Red power LED is lit at the FTDI, from the CAM’s 5V output.

USB-A into FTDI. is the connection

The CAM powers the FTDI, not the other way around?

Anyways, I have bad experiences with USB-UART adapters powering really anything. The ESP32 (and the camera) will pull a lot of current during startup and a brown-out may occur. That’s also noted there.

If you have followed their exact wiring (with your modification that VCC from the FTDI is passed to the VCC of the CAM) and methodology (unplug VCC, hold down button for GPIO0 or short it, repower board) and the upload still doesn’t work, you should try using a stable external +5V power supply (e.g. USB cable with the pure pins on the other side for +5V, GND, D+, D-, or using another dev board which passes the USB voltage directly through unto a pin header).

That’s a dilema actually, because the I/O voltage of the ESP32 is 3.3V. But you need 5V on the power pins. But I guess if you put the jumper on the 5V side of the FTDI, the VCC pin as well as the I/O levels become 5V, not being controlled separately.

5V goes from FTDI to CAM.
FTDI is connected to the PC by USB, so I have pretty good faith in that.

Blink uploaded a second time, but it didn’t work.