Easy Basics: Project 084d ESP32-CAM Development Board with camera - Troubleshooting

of Acoptex.com in ESP8266 ESP-32

Basics: Project 084d

Project name: ESP32-CAM Development Board with camera - Troubleshooting

Tags: Arduino, Arduino Uno, Ai-Thinker, ESP32-CAM, Development Board with camera, OV2640, OV7670, seeedstudio, troubleshooting

Attachments: none

In this project, you needed these parts (Dear visitors. You can support our project buy clicking on the links of parts and buying them or donate us to keep this website alive. Thank you):

1. ESP32-CAM Development Board with camera 1 set

2. Arduino IDE ( you can download it from here  )

3. USB to TTL/Serial adaptor/converter 1 pc

4. Jumper cables F-F, F-M

5. Micro SD card and SD card adapter 1 pc

6. WiFi Antenna, Compact Internal WiFi Antenna with U.FL connector and 5.9 inch cable 1 pc (optional)


There were some ESP32 camera boards launched previously such as ESP32-PICO-tinyCAM, but most seem to have been phased out. Seeed Studio had AI Thinker ESP32-CAM development board with a 2MP camera for $9.90. This development board can be programmed with ESP-IDF as explained in details in Github or in Arduino IDE. The demo code takes a QR code, and outputs it as ASCII code in the serial console. Another option - M5Stack ESP32 camera (ESP32CAM) board sold for $13.90 shipped on Banggood. The latter features the same OV2640 camera module, does not come with a micro SD card, but includes a USB port, and a grove connector, as well as pads for soldering MPU6050 & BME280 sensors. Another advantage is support LiPo battery via IP5306 charger chip.

We will learn in this project about the most common errors when using the ESP32-CAM Development Board with camera and how to fix them. 

Understanding the USB to TTL converter

You can read more about them here.

Understanding the ESP32-CAM Development Board with camera

The ESP32-CAM has a very competitive small-size camera module that can operate independently as a minimum system with a footprint of only 27*40.5*4.5mm and a deep sleep current of up to 6mA.

ESP-32CAM can be widely used in various IoT applications. It is suitable for home smart devices, industrial wireless control, wireless monitoring, QR wireless identification, wireless positioning system signals and other IoT applications. It is an ideal solution for IoT applications.

ESP-32CAM adopts DIP package and can be directly inserted into the backplane to realize rapid production of products, providing customers with high-reliability connection mode, which is convenient for application in various IoT hardware terminals.

The ESP32-CAM Development Board with camera doesn’t come with a USB connector, so you need an USB to TTL/Serial adaptor/converter to upload code through the  serial pins (U0R and U0T pins).


  • The smallest 802.11b/g/n Wi-Fi BT SoC Module
  • Low power 32-bit CPU,can also serve the application processor
  • Up to 160MHz clock speed,Summary computing power up to 600 DMIPS
  • Built-in 520 KB SRAM, external 4MPSRAM
  • Support OV2640 and OV7670 cameras,Built-in Flash lamp.
  • Support image WiFI upload
  • Support TF card
  • Supports multiple sleep modes.
  • Embedded Lwip and FreeRTOS
  • Supports STA/AP/STA+AP operation mode
  • Support Smart Config/AirKiss technology
  • Support for serial port local and remote firmware upgrades (FOTA)


  • Dimensions 40.5mm x27mm x4.5mm
  • Weight G.W 20g
  • Battery Exclude
  • Package DIP-16
  • SPI Flash Default 32Mbit
  • Bluetooth Bluetooth 4.2 BR/EDR and BLE standards
  • Wi-Fi 802.11 b/g/n/
  • Support interface UART,SPI,I2C,PWM
  • Support TF card Maximum support 4G
  • IO port 9
  • UART Baudrate Default 115200 bps
  • Image Output Format JPEG( OV2640 support only ), BMP,GRAYSCALE
  • Spectrum Range 2412 ~2484MHz
  • Antenna Onboard PCB antenna, gain 2dBi
  • Transmit Power 802.11b: 17±2 dBm (@11Mbps); 802.11g: 14±2 dBm (@54Mbps); 802.11n: 13±2 dBm (@MCS7)
  • Receiving Sensitivity CCK, 1 Mbps : -90dBm; CCK, 11 Mbps: -85dBm; 6 Mbps (1/2 BPSK): -88dBm; 54 Mbps (3/4 64-QAM): -70dBm; MCS7 (65 Mbps, 72.2 Mbps): -67dBm
  • Power Dissipation Turn off the flash lamp:180mA@5V; Turn on the  flash lamp and turn on the brightness to the maximum:310mA@5V; Deep-sleep: Minimum power consumption can be achieved 6mA@5V; Moderm-sleep: Minimum up to 20mA@5V; Light-sleep: Minimum up to 6.7mA@5V
  • Security WPA/WPA2/WPA2-Enterprise/WPS
  • Power Supply Range 5V
  • Operating Temperature -20 ℃ ~ 85 ℃
  • Storage Environment -40 ℃ ~ 90 ℃ , < 90%RH

In the package you will get 1 x ESP32-CAM Development Board, 1x camera Module-OV2640-FPC-24P-0.5mm-21mm- 2 Megapixel and 2x headers-2.54mm-1x8pin.

This product has been discontinued at Seeed Studio.  They highly recommend to try & choose Sipeed series products: Starts from $7.9,The 1st RISC-V 64 AI modules/boards for Edge computing, machine vision, speech recognition.

Make AI embeded to any IoT device possible! The new released Maixduino was designed in an Arduino Uno form factor, with a ESP32 module on board together with the MAIX AI module. The support of arduino compatible interface as well as Arduino IDE enable you update your arduino projects from IoT to AIoT easily without any additional cost! The maixduino kit provides an OV2640 camera module and a 2.4 inch TFT LCD for quick start machine vision projects, and onboard MEMS microphone for experiencing speech recognition promptly.

On-Board vs IPEX Antenna

ESP32-CAM Development Board with camera can be with the antenna jumper set for an external antenna or for the on-board antenna. You can see the two different settings below:

If you have a low frame rate or poor reception this might be the problem. You can either move the jumper with a bit of very careful soldering or buy an IPEX WiFi antenna which will improve the signal.


  • We can easily build a simple camera with this board and save the photos in an SD card using the embedded SD card slot the board offers.
  • We can then modify this project to detect humans and save an image when one is detected.
  • We can recognize human faces and act accordingly.
  • We can build a surveillance camera with the ESP32 Cam board.
  • We can also stream video using this board.

You can find the ESP32-CAM schematic here, ESP32-CAM development board specification is here, camera specification is here.

Signals and connections of the ESP32-CAM Development Board with camera

ESP32-CAM pinout:

GND - ground pin. Connected to Arduino board GND pin.

5V - external power supply pin 5VDC 2A

VCC - power supply pin. Connected to 5V pin.

3V3 - power supply pin. Connected to 3V3 pin.

U0TXD, U0RXD - Serial pins. You need these pins to upload code to your board.

GPIO 0 - pin which determines whether the ESP32 is in flashing mode or not. When GPIO 0 connected to GND, the ESP32 is in flashing mode.

The following pins are internally connected to the Micro SD card reader:

  • GPIO 14: CLK
  • GPIO 15: CMD
  • GPIO 2: Data 0
  • GPIO 4: Data 1 (also connected to the on-board LED)
  • GPIO 12: Data 2
  • GPIO 13: Data 3


  1. I would like to use the esp32-cam at night. Has someone a idea wich cam-module (for example NoIR-module) can I use with the esp32 and where I can find a library and example to use this? RGB cameras almost invariably have a near IR filter because near IR mucks up colour accuracy completely. A monochrome camera is the best candidate for having response to near IR. True night vision is something else entirely, involving photomultiplier tube to get extreme sensitivity. You just want to use an IR floodlight and IR-capable camera. You will be lucky if unscrewing the lens will allow access to the IR filter or you may need more drastic measures to remove it. 
  2. How to upload the new firmware as no micro USB port available?  As there is no micro USB port on the ESP32-CAM module hence you need to use the USB to TTL adapter/converter.
  3. Failed to connect to ESP32: Timed out waiting for packet header. This error means that the ESP32-CAM is not in flashing mode or it is not connected properly to the FTDI programmer. Read again how to upload the sketch, check that your ESP32-CAM is in flashing mode. Connect the ESP32-CAM board to your PC/laptop using an FTDI programmer. IO 0 (GPIO 0) needs to be connected to GND otherwise you will not be able to upload sketch. If you want to upload sketch, follow these steps: go to Tools -> Board and select ESP32 Wrover Module, go to Tools -> Port and select the COM port (ESP32-CAM connected to), go to Tools -> Partition Scheme and select Huge APP (3MB No OTA), Press the ESP32-CAM on-board RST (RESET) button, click the Arduino IDE upload button to upload the sketch. Double-check that GPIO 0 is connected to GND and settings in the Tools menu if you can not upload your sketch. You need to press the ESP32-CAM on-board RST button to restart your ESP32-CAM in flashing mode. Check that you have the FTDI programmer jumper cap set to 3.3V. 
  4. Camera init failed with error 0x20001 or similar to this error. If you have this error, it means that your camera OVX is not connected properly to ESP32-CAM board or you have the wrong pin assignment in the code. Sometimes, unplugging and plugging the FTDI programmer several times or restart the board several times, can solve this issue. The camera has a tiny connector and you must ensure it’s connected correctly and with a secure fit, otherwise it will fail to establish a connection. When you get this error, it might also mean that you didn’t select the right board in the define section or the pin definition is wrong for your board. Make sure you select the right camera module in your DIY projects. You just need to uncomment the right camera module and comment all the others: //#define CAMERA_MODEL_WROVER_KIT //#define CAMERA_MODEL_M5STACK_PSRAM #define CAMERA_MODEL_AI_THINKER In our projects, we’re using the CAMERA_MODEL_AI_THINKER, so it’s the one that is enabled. You need to check each IO pin with your ESP32-CAM board pinout. Some ESP32-CAM boards require 5V power supply or 3V3 pover supply to work properly. It can be the faulty FTDI programmer. You can try to replace an actual FTDI programmer with FT232RL. If you get this error, it can be also your camera or the camera ribbon is broken. If that is the case, you may get a new OV2640 camera.
  5. Brownout detector or Guru meditation error. When you open your Arduino IDE Serial monitor and the error message: Brownout detector was triggered is printed again and again. It means that there is a hardware problem - poor quality USB cable or USB cable is too long or board with some defect (bad solder joints) or bad PC/laptop USB port or not enough power provided by PC/laptop USB port. You can try a different data USB cable which is shoter or use a different PC/laptop USB port or use a USB hub with an external power supply or power the ESP32-CAM with 5V.
  6. Sketch too big error – Wrong partition scheme selected. 
    When you get the following error:
    Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
    Error compiling for board ESP32 Dev Module.
    It means that you haven’t selected the right partition scheme. Make sure you select the right partiti
    When you get the following error:
    Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.Error compiling for board ESP32 Dev Module. It means that you haven’t selected the right partition scheme. Make sure you select the right partition scheme. Open Arduino IDE go to Tools -> Partition Scheme, select Huge APP (3MB No OTA).
  7. Board at COM.. is not available – COM Port Not Selected. If you get the following error or similar: serial.serialutil.SerialException: could not open port 'COM6': WindowsError(2, 'The system cannot find the file specified.') Failed to execute script esptool the selected serial port Failed to execute script esptool  does not exist or your board is not connected Board at COM6 is not available. It means that you haven’t selected the COM port in the Tools menu.  Open Arduino IDE, go to Tools -> Port and select the COM port the ESP32 is connected to. It might also mean that the ESP32-CAM is not establishing a serial connection with your computer or it is not properly connected to the USB connector.
  8. How to set a fixed the IP Address for my ESP32-CAM? You can check this in our project: Basics: Project 070l ESP32 Development board Static IP Address
  9. Psram error: GPIO isr service is not installed. You are using a board without PSRAM and you get the following error or similar: E (161) gpio: gpio_isr_handler_remove(380): GPIO isr service is not installed, call gpio_install_isr_service() first Camera init failed with error 0x101 if your board was initialized with the following settings: config.frame_size = FRAMESIZE_UXGA; config.jpeg_quality = 10; config.fb_count = 2; Adding the following lines eliminates the issues (it lowers the image resolution so it won’t need so much space to store images. You cannot get some high resolution formats due to the limited memory because of that): if(psramFound()){ config.frame_size = FRAMESIZE_UXGA;   config.jpeg_quality = 10; config.fb_count = 2;} else {config.frame_size = FRAMESIZE_SVGA;  config.jpeg_quality = 12; config.fb_count = 1;} Please note: face recognition and detection doesn’t work with boards without PSRAM. But you can still use all the other functionalities of the board.
  10. How to set my ESP32-CAM as Access Point (AP)? You can set your ESP32-CAM as an AP, to be able to connect to your ESP32-CAM directly without connection to your router. You can use the following sketch to set your video streaming web server as an AP. This sketch is for ESP32 Wrover Module board, with Huge APP (3MB No OTA) selected as partition scheme. It was tested with the AI Thinker Model, M5STACK PSRAM Model and M5STACK WITHOUT PSRAM. If you need more information about it, check our project: Basics: Project 072g ESP32 ESP32 Development board - Setting an access point
  11. Weak Wi-Fi Signal. If you power the ESP32-CAM with 5V, you can get a more stable Wi-Fi signal. The ESP32-CAM has two options: you can use either the built-in antenna or an external antenna. If your AI-Thinker ESP32-CAM has no Wi-Fi connection or poor connection, it can be that the external antenna enabled, so if you connect an external antenna to the connector, it should work fine. Check the jumper 0K resistor (by the antenna connector) position. To use the on-board antenna, the resistor must be like this: / For the IPEX antenna connector, the resistor must be like this: If you want o enable the on-board antenna - unsolder the resistor that goes to the antenna, it’s in this position and solder together the two connections to enable the on-board antenna.
  12. No IP Address in Arduino IDE Serial Monitor. If you see (……) printed in the Arduino IDE Serial Monitor - ESP32-CAM is not establishing a Wi-Fi connection with local router. You need to double-checkyour local network credentials (SSID and password) in the sketch, see lines: const char* ssid = "SSID"; const char* password = "PASSWORD"; Check the baud rate in the Arduino IDE Serial Monitor otherwise you won’t get your board IP address or you’ll get different symbols on the screen. In our projects with the ESP32-CAM, we use 115200 baud rate. It can be that you will need to press the ESP32-CAM on-board RST button several times to restart your ESP32-CAM and print the IP address during boot. Double-check the connections between your ESP32-CAM board and the FTDI programmer. RX connected to TX and TX connected to RX. If you connect them other way, the ESP32-CAM will not establish a serial communication with your PC/laptop. If the router is far away from ESP32-CAM board, it will not catch the Wi-Fi signal. Ensure that your ESP32-CAM within the WiFi range of your router.
  13. Can’t open web server. If the ESP32-CAM is printing the IP address in your Arduino IDE Serial Monitor, but when you try to open the web server in your web browser you see a blank screen, it means that you are trying to access the ESP32-CAM web server with several web browser tabs. At the moment, ESP32-CAM sketches only work with one client connected at a time.
  14. The image lags/shows lots of latency. It's normal to have some latency for such a small and cheap camera. You can reduce it with: Powering the ESP32-CAM with a standalone 5V power supply, reduce the frame size with the following in your code: config.frame_size = FRAMESIZE_SVGA or config.frame_size = FRAMESIZE_VGA
  15. Which MicroSD card size should I use? According to the ESP32-CAM datasheet, the ESP32-CAM only supports 4GB microSD cards. We have checked 8GB and 16GB with ESP32-CAM development board works fine. You might not be able to store more than 4GB, even though you have 8GB or 16GB. 
  16. Can I do projects with M5Stack board? Yes, the M5Stack ESP32 board is compatible. You must check your camera pinout to ensure you have the right assignment in the code. You can find the M5Stack camera connections here.
  17. esp_camera_fb_get(): Failed to get the frame on time! If you are using the ESP32-CAM Module 2MP OV2640 Camera sensor Module Type-C USB module from Aliexpress which doesn’t have the extra PSRAM the other M5 models do, and the camera has one changed IO pin.  The CameraWebServer Arduino example we’re probably all using doesn’t have this ESP32-CAM model defined. So we need to add it yourself in the main tab add: #define CAMERA_MODEL_M5STACK_NO_PSRAM and in the camera_pins.h tab add the following:
  18. #elif defined(CAMERA_MODEL_M5STACK_NO_PSRAM)
  19. #define PWDN_GPIO_NUM -1
  20. #define RESET_GPIO_NUM 15
  21. #define XCLK_GPIO_NUM 27
  22. #define SIOD_GPIO_NUM 25
  23. #define SIOC_GPIO_NUM 23
  24. #define Y9_GPIO_NUM 19
  25. #define Y8_GPIO_NUM 36
  26. #define Y7_GPIO_NUM 18
  27. #define Y6_GPIO_NUM 39
  28. #define Y5_GPIO_NUM 5
  29. #define Y4_GPIO_NUM 34
  30. #define Y3_GPIO_NUM 35
  31. #define Y2_GPIO_NUM 17
  32. #define VSYNC_GPIO_NUM 22
  33. #define HREF_GPIO_NUM 26
  34. #define PCLK_GPIO_NUM 21
  35. And you’re good to go. Please note that the max resolution of the ESP32-CAM Module is XGA 1024×768, we assume it's also because of the lack of PSRAM.
  36. Camera probe: Detected camera not supported.esp camera init(): camera probe failed with error 0x20004. You have selected in sketch the wrong camera type and flashed the sketch on wrong ESP32-CAM development board. 
  37. See the section Camera init failed with error 0x20001 or similar to this error. 
  38. What if I am getting this error during the sketch uploading? Can I fix it?No. Your ESP32-CAM board is damaged. You will need to buy another.


We have learnt in this project about the most common errors when using the ESP32-CAM Development Board with camera and how to fix them. 


  • None

Project resources:

  • None

Other projects of Acoptex.com
Medium Basics: Project 083w Sipeed Maixduino board - Using PlatformIO IDE of Acoptex.com in Sipeed Maixduino 08-08-2019
Medium Basics: Project 083e Sipeed Maixduino board - Uploading MaixPy of Acoptex.com in Sipeed Maixduino 04-08-2019
Medium Basics: Project 083f Sipeed Maixduino board - Using MycroPython of Acoptex.com in Sipeed Maixduino 04-08-2019

Published at 28-06-2019
Viewed: 14502 times