Upload Code to ESP32-CAM AI-Thinker using ESP32-CAM-MB USB Programmer (easiest way)

Learn how to upload code to the ESP32-CAM AI-Thinker board using the ESP32-CAM-MB micro USB programmer. This is the easiest way to program your ESP32-CAM board.

This micro USB programmer works like a shield that you attach to the ESP32-CAM board. The programmer comes with a USB socket that you connect directly to your computer.

Upload Code to ESP32-CAM AI-Thinker using ESP32-CAM-MB USB Programmer easiest way

The ESP32-CAM AI-Thinker module is an ESP32 development board with an OV2640 camera, microSD card support, on-board flash lamp and several GPIOs to connect peripherals. And it costs just a few bucks.

However, one of the biggest hassles when working with the ESP32-CAM Ai-Thinker module is uploading code to the board. The AI-Thinker board doesn’t have a built-in USB programmer. In previous tutorials we recommended using an FTDI programmer to connect to the board through the serial pins.

Additionally, you also needed to follow another two or three steps until successfully uploading the code. But, now you can simply use the ESP32-CAM-MB USB programmer and click the Upload button to successfully program your board. It’s that simple.

Getting the ESP32-CAM-MB USB Programmer

You can open the next link to check the available stores to get the ESP32-CAM-MB USB Programmer. The package includes the ESP32-CAM-MB Programmer and it might also include the ESP32-CAM board itself.

ESP32-CAM-MB Micro USB Programmer CH340G Serial Chip for OV2640

ESP32-CAM AI-Thinker MB Programmer

The ESP32-CAM AI-Thinker MB programmer is a shield that you attach to your ESP32-CAM board GPIOs. The following image shows the programmer and the ESP32-CAM side by side.

ESP32-CAM-MB Micro USB Programmer CH340G Serial Chip for OV2640

The programmer comes with the CH340C USB to serial chip.

ESP32-CAM-MB CH340G Serial Chip USB Converter

This allows you to program the ESP32-CAM using the USB port on the shield.

ESP32-CAM-MB CH340G Serial Chip Micro USB Port Programmer

Additionally, the shield also comes with a RESET and a BOOT (IO0) buttons. This may be useful to easily reset the ESP32-CAM or put it into flashing mode.

Program ESP32-CAM using the MB Programmer (Arduino IDE)

To program the ESP32-CAM board with Arduino IDE, you need to have Arduino IDE installed as well as the ESP32 add-on. Follow the next tutorial to install the ESP32 add-on, if you haven’t already:

Then, simply connect the MB programmer to the ESP32-CAM as shown in the following image.

ESP32-CAM-MB Micro USB Programmer CH340G Serial Chip OV2640 Camera

Then, connect the board to your computer using a USB cable.

After that, in your Arduino-IDE, follow the next steps:

1) Go to Tools Board and select AI-Thinker ESP32-CAM. You must have the ESP32 add-on installed. Otherwise, this board won’t show up on the Boards menu.

Select the AI-Thinker ESP32-CAM in Arduino IDE Tools Menu

2) Go to Tools Port and select the COM port the ESP32-CAM is connected to.

Note: if the board doesn’t show up, it means that you probably don’t have the CH340C drivers installed on your computer. Go to Google and search “CH340C drivers” followed by your operating system and install the drivers.

3) For demonstration purposes, you can copy the following blink sketch:

  Rui Santos
  Complete instructions at https://RandomNerdTutorials.com/esp32-cam-projects-ebook/
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files.
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

// ledPin refers to ESP32-CAM GPIO 4 (flashlight)
const int ledPin = 4;

void setup() {
  // initialize digital pin ledPin as an output
  pinMode(ledPin, OUTPUT);

void loop() {
  digitalWrite(ledPin, HIGH);
  digitalWrite(ledPin, LOW);

View raw code

This sketch, simply blinks the on-board flash LED.

4) Then, click the Upload button in your Arduino IDE.

Program ESP32-CAM with Arduino IDE

And that’s it!

You should get a message saying the code was successfully uploaded and your board should be blinking the LED flash.

ESP32-CAM-MB Micro USB Programmer CH340G Demonstration Testing

Wrapping Up

Using the ESP32-CAM AI-Thinker MB Programmer is the easiest way to program the ESP32-CAM board. You no longer have to use an FTDI programmer and experience timeout issues.

We hope you have found this article useful. You can try our projects with the ESP32-CAM:

Thanks for reading.

Build Web Server projects with the ESP32 and ESP8266 boards to control outputs and monitor sensors remotely. Learn HTML, CSS, JavaScript and client-server communication protocols DOWNLOAD »

Build Web Server projects with the ESP32 and ESP8266 boards to control outputs and monitor sensors remotely. Learn HTML, CSS, JavaScript and client-server communication protocols DOWNLOAD »

Recommended Resources

Build a Home Automation System from Scratch » With Raspberry Pi, ESP8266, Arduino, and Node-RED.

Home Automation using ESP8266 eBook and video course » Build IoT and home automation projects.

Arduino Step-by-Step Projects » Build 25 Arduino projects with our course, even with no prior experience!

What to Read Next…

Enjoyed this project? Stay updated by subscribing our newsletter!

81 thoughts on “Upload Code to ESP32-CAM AI-Thinker using ESP32-CAM-MB USB Programmer (easiest way)”

  1. hola espero pueda ayudar yo uso el USB ESP32-CAM-MB + ESP 32CAM cargo el código de prueba que enciende el led de la cámara y todo ok
    pero si cargo este proyecto Transmisión de video ESP32-CAM y reconocimiento facial con Arduino IDE el código sube bien pero el resultado es este
    ya probé todo y no hay manera de que funcione lo que no tengo claro es que mi ESP32CAM el modelo no creo que sea al-thinker en placa de mi esp 32 cam hay lo siguiente DM ESP32-S algún consejo ya no se que mas probar gracias
    ets Jun 8 2016 00:22:57

    rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0xee
    mode:DIO, clock div:1
    ho 0 tail 12 room 4
    ho 0 tail 12 room 4
    entry 0x400806b8

    [E][camera.c:1049] camera_probe(): Detected camera not supported.
    [E][camera.c:1249] esp_camera_init(): Camera probe failed with error 0x20004

    • tazma tengo el mismo problema, el codigo del LED me funciona, pero al ejecutar el del CameraWebServer me muestra el error:
      rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
      configsip: 0, SPIWP:0xee
      mode:DIO, clock div:1
      ho 0 tail 12 room 4
      entry 0x400806b4
      E (79) psram: PSRAM ID read error: 0xffffffff

      [E][camera.c:1113] camera_probe(): Detected camera not supported.
      [E][camera.c:1379] esp_camera_init(): Camera probe failed with error 0x20004

    • To the truckload of whiners repeatedly complaining about errors initializing unsupported cameras… WHY YOU THINK THAT IS?

      Error is LITERALLY telling you the ESP32 software is incompatible with the camera hardware, so either change software or change hardware.

      If you have a camera with exact pinout specified in your code plug it in, otherwise select the pinout of whatever camera you’re using. Duhhhh.

      in above tutorial the camera is the OV2640 so in Web Cam Server sketch example commenting out:


      and uncommenting:


      would be the correct camera.

  2. This looks like a cool thing to have. The ESP32 cam is really good, compared to all the others that cost more. Ordered one from the eBay link.

      • Pues yo no soy capaz de cargar el código como verás más arriba el error
        E][camera.c:1049] camera_probe(): Detected camera not supported.
        [E][camera.c:1249] esp_camera_init(): Camera probe failed with error 0x20004

  3. Digging a bit deeper in the maze of AliExpress, there also appears to be an ESP32 camera with integrated CH340 USB connection. If you need only 1 or 2 ESP32 cams that is certainly an attractive option

  4. Good evening. So this project is precisely timed. At the beginning of January I ordered these boards, at the end of the month it came and it is waiting to be implemented. So thanks a lot. I’m just remodeling the measurement with ESP and BM680 powered by LiPo and recharged solar. But once the next project with RPi and ePaper is complete, it will be another “night service” right away. But right now, it’s just for sitting at home. The test was negative again, which I wish you both (it’s about Covid). Lots of health and good mood.

  5. Hmmmm… I tested the board out today. The kit comes with an ESP32 camera board. I was able to upload a sketch to it using the MB board interface. Sketch worked as expected.

    I was NOT able to upload a sketch to a AI Thinker Cam board using this MB board. I was able to upload the sketch to this AI Thinker Cam board using the trusty FTDI board.

    I wonder if it’s possible that only THEIR included ESP32 cams work with this MB board. I’ve contacted the seller through eBay to get their guidance.

    • Specifically, I received the failure to connect error message:
      Connecting ….. ….. …… …….
      A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
      when I attempt to upload using the MB board to another ESP32 cam board.

          • Hi.
            Today I tried it with another ESP32-CAM board, and it didn’t upload on the first try.
            I found out that you need to hold the programmer IO0 button and then press the ESP32-CAM on-board RST button when you start seeing the dots on the debugging window.
            It worked for me.
            Can you try it?
            If it works for you too, I’ll add a troubleshooting section to this article.

          • I had success uploading a cam sketch to one of my other ESP32 cams. However, I found that after the sketch loaded, it wouldn’t run while still connected to the installer board. I tested it successfully while attached to my computer via FTDI cable. Pressing/holding IO0 and then pressing RST on the cam board was the way to go.
            The board didn’t cost very much, and I got another ESP32 cam out of it. I don’t know if it will replace my FTDI process, though.
            Thank you

          • BLUF: I think this is a Hardware Flow Control issue / C430 USB driver issue.

            The issue I am seeing with the ESP32-CAM-MB is that for some reason the RST line is being asserted on the CH430 by some of the serial port programs. I have parital success with the Arduino IDE, and puTTY but no luck with0 PyMAKR (VS Code). I have also tried HyperTerm and some other ones.

            The Windows 10 driver is set to have Flow Control as ‘None’, and the software is also set this way.

            The CH430 driver that I am using is ‘2019’ (CH431), and at some point, I will try the 2014 version. I might also try a Mac or Raspberry PI.

            I tried another PC, but had an issue getting PyMAKR to install properly.

  6. Hi Sara,
    I tried out two boards I received today with the MB, but I’m not getting my two older Cam boards loades neither. The boards are a litte bit different on the side where the flash LED is locaded. It looks like that there are two more resistors installed and there is also a 3V3 print???
    I trieded that out with the IO0 button, no luck.

    • Hi Kurt.
      Try holding the IO0 button on the programmer when you start seeing the dots on the debugging window and then press and release the ESP32-CAM on-board RESET button (not the programmer RST button).
      This worked for me.

      • Hi,

        Yes this is the problem – there is a method when using the programmer.
        1.Click on Arduino IDE Upload button
        2. When the output in the IDE shows the connecting message

        esptool.py v3.0-dev
        Serial port COM35

        On the programmer module press and hold down the IO0 on the side of the module.
        While still holding down IO0, now press and let go of the RST button on teh ESP32 (not the programmer)
        Let go of the IO0 now (so you’re not pressing any buttons anymore)

        Program downloads, mine does get stuck with

        Writing at 0x0002c000… (100 %)
        Wrote 261792 bytes (122371 compressed) at 0x00010000 in 3.1 seconds (effective 681.5 kbit/s)…
        Hash of data verified.
        Compressed 3072 bytes to 119…
        Writing at 0x00008000… (100 %)
        Wrote 3072 bytes (119 compressed) at 0x00008000 in 0.0 seconds (effective 2457.6 kbit/s)…
        Hash of data verified.

        Hard resetting via RTS pin…

        But, just press reset button on the ESP32 again, and the new firmware will start exewcuting.

        • Thank you so much!
          This was the best explanation so far and made mine work.
          Was thinking about buying a new one since I thought mine was doomed.

  7. Hello,
    Today I tried to upload the code to the board using the MB module but when I do I get “Connecting …..______……..” Is this normal? Also do I need a special micro usb cable for uploading code? Do I simply follow the steps from the other comments (boot button and once ….. appear the on board reset from the esp32? I also have a problem installing the CH340 drivers, they won’t install any idea how to fix that?
    Thanks in advance

    • Hi.
      But does the code upload? Or do you get an uploading error after the …..____…… ?
      If that’s the case you need to do as mentioned previously.
      “Try holding the IO0 button on the programmer when you start seeing the dots on the debugging window and then press and release the ESP32-CAM on-board RESET button (not the programmer RST button).”

      • Hi Sara, I tried holding the IO0 button and then the ESP32 CAM on-board reset but the results in the monitor window are unreadable:
        16:29:57.478 -> ……………………………………….e⸮.RչA ⸮±⸮0⸮⸮⸮5SH⸮⸮⸮⸮:⸮⸮ (u]E⸮⸮⸮R⸮U⸮I⸮o⸮’⸮͠I⸮W⸮⸮⸮B⸮⸮⸮⸮⸮R⸮z*⸮T⸮iE%⸮_⸮Q⸮%U=}V⸮J⸮ȷX⸮⸮⸮g⸮⸮K⸮⸮⸮⸮l+⸮

      • Whatever I try it does not work. In the Serial monitor I constantly see:
        rst:0x10 (RTCWDT_RTC_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
        flash read err, 1000
        ets_main.c 371
        ets Jun 8 2016 00:22:57

        If I upload a sketch I always get
        A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

        It’s a HK-ESP32-CAM-MB and the IO0 button on the programmer when you start seeing the dots on the debugging window and then press and release the ESP32-CAM on-board RESET button (not the programmer RST button) does not work either. Is my board just broken or is there another magic combination to make it work?

        • Hi.
          I don’t know any other “magic” combination.
          But I can’t be sure that the board is the problem.

  8. The blinking code works well. But how to get the cameraWebServer example works? It upload fine but the serial monitor don’t give me any result.

      • Tried to press the RST on board button (on ESP32-CAM board also on ESP32-CAM-MB), still nothing in the serial monitor.
        Should, i try to change the #define CAMERA_MODEL…. ?

        • Hi.
          I don’t think it is related to that.
          It should be something about the serial communication.
          Check that you’re using the right baud rate and that you’re opening the Serial Monitor or the right port.

          • If the baud rate is not right, it usually show a scramble text, and also i already test to change the baud rate (the cameraWebServer example use 115200 baud rate), it is still not working (tried to press the rst button in each board everytime changing the baud rate). Also already double check the com port.

            But it solved by updating the arduino ide app to 1.8.13 . Thanks again.

  9. Hello.

    I recieved two ESP32-CAM boards and the two ESP32-CAM32-MB programers today. After choosing the AI Thinker ESP-cam board in the arduino IDE and selecting the active COM port I can’t upload the blink sketch..I get the same error as above : Failed to connect to ESP32: Timed out waiting for packet header.

    So I tried your suggestion:
    After seeing the dots in the arduino console I pressed the IO0 button (kept holding it down) and then pressed and released the reset button on the camera board (not on the programmer board) …but no luck.
    Also pressing IO2 button and releasing it and then pressing and releasing the camera-board RST button didn’t solve the problem. The behaviour is the same for the two boards.

    I tried different cables also. All cables work fine in uploading sketches on arduinos but I can’t upload the sketch on the ESP32-CAM.

    • Hi.
      That’s weird. The programmer worked fine for me with the boards that came with it.
      For other boards, I needed to do that with the buttons. But I was always able to upload the code.
      Can you try selecting another board. You can try the ESP32 Wrover module.

      • Same here, reset via MB (regardless if pressing the button or sending RTS signal) works only with the ESP32 CAM module that arrived with the MB and not with the other modules. Flash button or DTR signal for activating the bootloader work well with all the boards.

        • I’ve also tried this with some ESP32-CAM-MB boards, with the ESP32-CAM modules that came with the board and with some older ones I had before I got these.

          There seems to be a difference between the PCBs of the ESP32-CAM modules that come with the ESP32-CAM-MB boards and “other” ones. It looks like the pin closest to the “flash” LED is marked GND/R, where it is marked only GND on the older boards I have. That silkscreen GND/R marking can (just about) be seen in the third image in this post, as well as the one that has the “flash” LED on, further down. When mounted on the ESP32-CAM-MB board, that GND/R ESP32-CAM pin is connected to (one side of) the RST side-facing button on the ESP32-CAM-MB board.

          On the ESP32-CAM modules that came with the ESP32-CAM-MB boards, the GND/R pin seems to connect to other GND pins on the module via a 13.8K resistor, so it’s only weakly pulled to GND. The other two GND pins (on the ESP32-CAM module) are connected to each other.

          Conversely, On the older ESP32-CAM modules, all three GND pins are connected together (low resistance between all of them).

          That GND/R pin is also connected to the RST pin of the ESP32 module, itself, on the back of the ESP32-CAM module, as well as (unsurprisingly) to one side of the RST button on the back of the ESP32-CAM module (in that difficult-to-reach place!)

          So it seems that they have got around the issue, on “other” ESP32-CAM modules, of the RST pin on the ESP32 itself not being broken out any of the pins on the 0.1″ pin headers, but only to the hard-to-reach RST button under the board, by modifying the ESP32-CAM PCB layout.

          That lack-of-reset-pin issue was mentioned by bitluni, who made one of the first kinds of these programming boards (that I saw, anyway, last year), and that issue is mentioned in his description on the product page here: tindie.com/products/bitluni/cam-prog/. He got around the issue by cutting off power to the microcontroller instead of “toggling” the reset pin on the ESP32 (since that can’t be done, except for by hand, on those “other” ESP32-CAM modules).

          I tested his boards and they worked well for programming with the “normal”/”other” ESP32-CAM modules, and didn’t require any special parameters (like monitor_rts = 0 and monitor_dtr = 0 in the platformio.ini file).

          Sadly, it seems that by modifying the ESP32-CAM module, it has made the ESP32-CAM modules that come with the ESP32-CAM-MB boards incompatible for use with programming boards like bitluni’s (unless the GND/R pin is not connected to GND on bitluni’s programming board, as would be the case for the “normal”/”other” ESP32-CAM modules, as that would hold the modules with a GND/R pin in perpetual reset), and the ESP32-CAM-MB boards are not compatible with the “normal”/”other” ESP32-CAM modules, as they expect the “special” GND/R pin, in order to reset those ESP32-CAM modules.

    • Hi Marco
      Sorry I am a bit late replying.
      I had a similar problem – there seems to be some incompatibility between the boards.
      I solved it with FTDI – see my post of May 21, 2021 at 3:32 pm

      I see you bought FTDI. Did that solve it for you?

  10. At the moment I have just these boards but monday I will recieve a FTDI programmer so I will try with that one to figure out whats wrong.

  11. I can upload the firmware using the MB without pressing IO0 (flash) or RST button with both PlatformIO and Arduino IDE but the microcontroller doesn’t work when PlatformIO serial monitor is opened. Seems as RST and IO0 are pulled LOW by RTS and/or DTR and PlatformIO serial monitor pulls RST LOW which Arduino serial monitor doesn’t.

    • With PlatformIO these lines have to be added to platformio.ini:

      monitor_rts = 0
      monitor_dtr = 0

      However, reset via MB (regardless if pressing the button or sending RTS signal) works only with the ESP32 CAM module that arrived with the MB and not with the other modules. I am still trying to find out the reason why reset button (and RTS) doesn’t work with other boards.

  12. Hello everybody,

    anyone has an idea on how to connect the esp32-cam to my router via ethernet?
    If you can’t connect any ethernet module to the board directly, maybe there is an way to send it to another board, that is connected via ethernet or something else?

    I searched the whole internet, but I couldn’t find anything so far…

    • He Felix,

      i’ve used the esp32-cam-mb (the one with usb) and used the webcam setting from this site.
      (ESP32-CAM Video Streaming Web Server (works with Home Assistant) and it bounded with my wireless router. In the serial monitor you can red the ip address. Working nicely but don’t expect much from the camera although :=)

    • You can connect ethernet directly using the RMII interface (to a PHY, such as LAN8720). However, the camera interface and RMII share some of the same pins by default. Normally, you might be able to use alternate camera pins, if they weren’t already hard-wired by the ESP32-CAM board. I don’t know if the conflicting RMII pins can be remapped to other GPIO.

      Look at “Ethernet Media Access Controller” in the ESP32 technical reference manual for implementation details/options.

  13. I experienced similar issues and trued several of the suggestions – seemingly not working . But after all this, I just put a 4Gb micro SD card in the slot and wham!! – 25-35fps using the AI Thinker webserver example – no issues or noticeable time lag at the smaller screen sizes. Using Arduino IDE and just compiling and upload – no need to hold down the boot button. Very handy piece of kit for uploading but no GPIO pins exposed so you need to move it to a breadboard after uploading to try the projects out.

  14. Hello everyone and without the intention of offending anyone, I have to say that the esp32 CAM is a crappy camera if or if it hangs every 2 x 3 it works when a fiasco feels like it

    • Data transfer from the camera to the ESP32 is slow or even hangs when the voltage drops because of power supply which can’t supply enough current without dropping the voltage or if the camera overheats. With good power supply ESP32 CAM works very well.

      FTDI module can’t supply enough current via 3V3 pin, take 5V from the 5V/3.3V jumper pin and connect it to 5V input. Jumper still has to be in the 3V3 position and all other voltage levels must be 3.3 V.

      3.3 V output from breadboard voltage module is too weak as well, use 5 V. Most of laptop USB ports are also too weak but everything works well when using powered USB hub. USB cables must be good too, with some USB cables the ESP32 CAM will reset whenever starting wifi connection.

      Once there is enough power the ESP32 CAM modules work very reliable.

  15. I bought esp32-cam and its programmer. But it is not a ai thinker. I get these errors after loading the program . I’ve tried a lot of different pin connections. Either does not recognize the camera or gives this error. What should i do to make it work.

    Error code:
    Camera Ready! Use ‘’ to connect
    [E][camera.c:1483] esp_camera_fb_get(): Failed to get the frame on time!
    Camera capture failed

    • Hi.

      Here’s what one of our readers suggested for that problem:

      I found out the solution for my case, I hope many others can read this message because I have seen many people frustrated on the Internet with the error ” esp_camera_fb_get(): Failed to get the frame on time!”.

      Everything was solved just changing some parameters:

      config.xclk_freq_hz = 5000000;

      config.frame_size = FRAMESIZE_SVGA;

      I hope this helps.

    • Hey.
      I had the same problem with one ESP32-Cam, just reseated the little ribbon cable and the camera started to work. Gived a try.


  16. Hello Sara (et al)! I think I already found my answer by reading between the lines in a couple of comments. But my question is do you need to have the esp32 cam MB programmer module attached to the camera module during operation? Thank you

  17. i bought 3 of these mb programmers with esp32-cams from aliexpress.2 of the cams kept giving me upload errors and i can’t get them to work with the programmers.
    one of the cameras programmed like a champ on all 3 programmer boards, didn’t have to press any buttons. I kind of remember having to add a capacitor when i get these type of errors on these cams .I am not saying the
    cameras are bad yet , they may need this added capacitor. Thanks for all the
    great info you have always provided.

    • Hi Richard.
      I’m sorry for the issues.
      I didn’t have any troubles with the programmers I have.
      However, we needed to press some buttons to make them work with other cameras (the ones that didn’t come with the programmer).

  18. These models of ESP32-CAM-MB programmer connect RTS to EN and DTR to BOOT, but don’t include the transistor network required to not reset the board when both RTS and DTR are asserted at the same time (which most serial terminals do on connection, even when hardware flow control is disabled – this includes putty, pymakr and ampy). This causes it to go into an unusable reset state whenever you try to connect using these apps. Yat is able to connect properly and go into REPL, as it has manual control over RTS and DTR, but not being able to use ampy or pymakr to upload code makes it a lot harder to develop.

    I worked around this by removing the two SMD diodes connecting the RTS and DTR lines from the CH340 to the EN and BOOT buttons and pins (these are physically located between the MicroUSB port and the IC). With those lines disconnected you have to use the physical buttons to reboot go into the bootloader, but when using micropython that’s rarely needed anyway.

  19. Simple question. Does anyone know where to find a schematic for the ESP32-CAMERA-MB programmer board? That would be useful.

    For the record, my variants work with Sara’s plan. ie when the compile/upload process gets to the “linking everything together” stage I press and hold the IO1 button on the programmer, then when the “…….______…….” arrive I also press the RST button on the camera board for a good two seconds. Then release both and the upload starts. Works every time so far.

    What I need to know now is how to connect an external 5V supply to the MB and also what the RST button on the MB does. Hence the request for a schematic.

  20. Thank you RNT for all your tutorials, and Sara for all your solutions above, which I will try later, although I solved my problems with the clumsy FTDI method.

    I bought three ESP32-CAM-MB piggy back cards from a UK supplier and they worked a treat – no problem uploading and running complex WiFi hotspot camera programs.

    The problems began when I bought a single ESP32-CAM card from the same UK supplier and tried to upload using an ESP32-CAM-MB Micro USB Programmer card and it brought up the error shown at the bottom of this post.

    Another ESP32-CAM from China brought up the same error!

    After a lot of fiddling around I did it the old way with an FTDI and the programs uploaded and ran OK.

    I think there must be an incompatibility between some of the cards and the clue may be in the error message below.

    Googling: Chip is ESP32-D0WDQ6 (revision 1)
    shows other people have had similar problems

    The ERROR I got was :

    Chip is ESP32-D0WDQ6 (revision 1)
    Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None

    A fatal error occurred: Timed out waiting for packet header
    A fatal error occurred: Timed out waiting for packet header

  21. Hi..Sara
    I have the problem in my esp32 cam, after loading is rising : a fatal error occurred : MD5 of file does not match data in flash!
    what can I do.
    And my ESP 32 cam always on his LED.
    Saut TL

  22. There are at least two versions of esp32-cam, one has the pin physically closest to antenna plug connected to GND, the other version (for MB) has pin connected to RST. This causes those troubles above. Please make a new tutorial with new instructions. And debug the MB-board and publish the schematic. It is quite a mess.

  23. I had the same problem as the other people where my Arduino Mega would program happily but my ESP32 CAM would not, even with the programmer board.

    My usb cable is 3 foot long and cannot be substituted if I want to reach the computer on the ground.

    So, I switched to my laptop which I could have right in front of me, plugged a 1 foot long usb data cable into the usb data port and it programmed up all the cam units well.

    I have 5 of these units from the same vendor and NONE of them require any reset or boot buttons to be pressed at any stage, the programmer board takes care of all that.

    Have 5 programmed up and running, spied on my wife and my cat. Both yelled at me:)

  24. Have you tried the ESP32 Cam with the built in micro USB socket? That makes it similar to other microcontrollers with just a USB connection and all pins available for I/O.

    Also have you tried replacing the OV2640 cam with the much higher resolution OV5640 on the ESP32 Cam board? Higher quality would be a big improvement but I understand there are some issues.

    At 1:30 he shows replacing the OV2640.
    There is also an auto focus version that can be used like a microscope up close.
    The above with code and side by side images and video could be another of your ESP32 Cam articles.

  25. I’m not sure if anyone has mentioned this yet but the ESP 32 CAM that comes with many of the original MB from China actually have a different pin out than other ESP 32 CAM boards. Especially different from the Ai Thinker version. That is why it doesn’t work when you try to use it with another board. Took forever to find out and had to re pin the library to get it to upload and work correctly. Don’t remember where I had seen that mentioned. I had gotten some of the first ones to come out. They look like cheap knockoffs but worked well once figured out. I’m glad to see they have started to mature a bit and I’m gonna look into the ESP 32 CAM boards with everything on one board.

    Great site and great info. Got this bookmarked on 4 different computers now.

  26. Can this be setup to work in the Visual Studio IDE?
    I’ve tried, but I must be missing something because when the ESP32-CAM board boots, I get the following printed on the serial terminal:

    — Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
    — More details at https://bit.ly/pio-monitor-filters
    — Miniterm on COM6 115200,8,N,1 —
    — Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H —

  27. So I have used this tutorial off and on since it first came out with various cheap china knock off boards including some of the older ESP-32 CAM-MB boards and this has always worked for me. No other ‘tutorial’ I have found out there has worked this well across the different cheap boards and any issue I come across is easily fixed just by reading the comments first or using the troubleshooting guide you guys have. So I thank you for such a well done tutorial and a well done website overall. I keep coming back to this rabbit hole and this website is where I refresh my memory. Keep up the great work.

    So I just had issue I wanted to point out with no output to the serial monitor using Arduino IDE 2.0. I switched back to the IDE ver. (Windows Store) and didn’t upload the sketch again, just opened the serial monitor on the correct port and hit RST on the esp board and it worked.

    I don’t know why there was an issue yet, but anyone else has issue just use the older, pre-Arduino IDE 2.0.

  28. Hello everyone.
    I followed the instructions and it keeps giving me an error. The USB cable is new.

    I am using ESP32-CAM-MB programming

    Somebody could help me?


    A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

    A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header


Leave a Comment

Download Our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.