ESP32-CAM modules have been on the market for several years now. With some manufacturers such as M5Stack, we are already at the 5th generation of development board which complicates the choice quite a bit, especially when starting out. AI Thinker, M5Stack and TTGO are the best known manufacturers in the field.
Unable to test all development boards offered in this article. ESP-EYE by Espressif, ESP32-CAM Ai Thinker, M5Stack Timer Camera, TTGO T-Camera, T-Camera Plus and T-Journal. Do not hesitate to share your experience (good or bad) or to point out an error or an oversight to me using the comments.
General recommendations before making your choice
Some development boards do not have a connector (GPIO). It will therefore be impossible to add an SD card reader, a motion detector or any other I2C equipment. You will need to take this into account when making your choice. The presence of an expansion slot (GPIO) is indicated in each comparison table.
If you are a beginner, choose a model with a USB-C or micro-USB connector, which indicates that the development board is equipped with a UART / USB converter. Programming will be simplified
The new Kentrix K210 SoC is a micro-controller dedicated to vision for mobile applications. It is not an ESP32. It does not have WiFi connectivity, nor Bluetooth. The programming is different and the projects for ESP32-CAM are not compatible.
ESP-EYE from Espressif
The ESP-EYE is a development board for image recognition and audio processing developed by Espressif. It is a development board primarily intended for companies wishing to quickly develop a prototype connected to the Amazon AWS-IoT platform.
The ESP-EYE is equipped with an ESP32 chip (ESP32-D0WD version), a 3D WiFi antenna of a 2MP camera, a Cirrus Logic CS53L30 microphone, 2 LEDs (red and white), 8Mo of PSRAM usable to increase the RAM of the ESP32 and 4MB of flash memory (program and user data storage). Programming is done via a micro USB connector.
The ESP-EYE has a mini extension connector for connecting additional equipment via the SPI bus (OLED screen, microSD card reader).
Bus SPI | ESP32 pin |
DATA_OUT (DOUT) | IO12 |
DATA_INT (DIN) | IO2 |
CLK | IO0 |
CS | IO19 |
It can be used to connect I2C equipment by manually assigning the pins using the wire.begin method (pin_SDA, pin_SCL).
The ESP-EYE is an Amazon AWS-IoT certified development board.
Several starter examples are available on GitHub here. The example is delivered with the drivers for the OmniVision OV2640, OV3660 and OV5640 camera modules.
ESP32-CAM AI Thinker
It was ultimately the manufacturer AI Thinker who popularized Espressif’s ESP-EYE open source project with its ESP32-CAM version. The other board manufacturers then followed suit.
There are now many manufacturers who have cloned the project. Most ESP32-CAM modules use an ESP32-S SoC from AI Thinker .
The ESP32-CAM is the cheapest development board equipped with a camera module and therefore the most sold. She does the job without flinching.
To cut back on the price and size of the board, it does not have a UART / USB converter which makes programming more complicated, especially when starting out.
To start, it is best to equip yourself with the Timer Camera from M5Stack or a T-Camera from TTGO. All these models are presented in more detail later in the article.
The Ai Thinker ESP32-CAM Development Board has a true breadboard compatible expansion slot and exposes several of the ESP32 pins that are still available.
Find more ESP32-CAM development boards
How do I upload a program?
As the ESP32-CAM AI Thinker does not have a UART / USB converter, you will have to think about buying an FTDI module. You will also need some female-female jumpers. Connect the pins of the FTDI module like this.
FTDI | ESP32 CAM Ai Thinker |
5V | 5V |
GND | GND |
TX | UOT |
RX | easy |
IO0 connector on GND + RESET before uploading |
Before you can upload the program from the Arduino IDE (or another environment), you will have to put the ESP32 in flash mode. To do this, connect the IO0 pin to the GND pin then reset (or power on).
How to activate the external antenna?
Models built around the ESP32-S microcontroller have an IPEX (uFL) connector that allows the use of an external antenna to increase the range and quality of the WiFi signal. By default, the antenna engraved on the PCB is selected.
To be able to use the external antenna, it will therefore be necessary to move the resistance (or replace it with a small piece of copper wire) like this.
To make the change, follow the instructions detailed in this article
M5Stack Timer Camera
The M5Stack Timer Camera is a camera module based on an ESP32 (unspecified version, probably ESP32-D0WD) with 8MB of PSRAM integrated. The OmniVision OV3660 module offers a resolution of 2048×1536 pixel is equipped with a lens with a field of view of 66.5°.
The M5Stack Timer Camera is available alone or delivered installed in a box (X version) with Lego Technics support.
The OmniVision OV3660 sensor is not suitable for night vision. The spectral response is best between 400nm and 700nm. Additional lighting at 800nm should however improve night vision for animal viewing or video surveillance in low light.
The development board also has an RTC clock (BM8563), a PH2.0-4P (Grove) port, a white LED (IO2) and a connector for LiPo battery. The battery charge can be measured on pin (IO33). Go to the next paragraph for pin identification.
The board is equipped with a 3D 2.4GHz WiFi antenna eliminating the need for an external antenna via an IPEX connector.
Programming can be done with Arduino code (ESP32-Arduino library), with C++ code (ESP-IDK 4.1 minimum) or in Blockly with the UIFlow home version.
An example developed with the ESP-IDF SDK (programming in C++) is available on GitHub here.
The X version comes in a protective box with a LEGO Technic compatible mount and a 140mAh battery.
The M5Stack Timer Camera can also be used to connect I2C accessories via a 4-pin PH2.0 connector better known as the Grove connector.
The Grove connector exposes the GPIO04 and GPIO13 pins of the ESP32. You can use the many available Grove M5Stack or SeeedStudio equipment.
As the M5Stack Timer Camera is equipped with a UART / Serial converter (CP2104 controller), there is no need to put the camera in “bootloader” mode each time you want to upload a new program.
The M5Stack Timer Camera is a great place to start. Programming can be done by assembling blocks (blocky language) or with Arduino code.
M5Stack Timer Camera Pinout
Here is the pin identification of the ESP32 reserved for the OmniVision OV3660 camera module, the white LED and the LiPo battery charge control (optional).
Interface | ESP32 pin |
---|---|
Grove connector | |
SCL | IO13 |
SDA | IO4 |
5V | 5V |
GND | GND |
Other equipment | |
White led | IO2 |
LiPo battery voltage (BAT_ADC_Pin) | IO33 |
Technical data taken from official documentation .
Obsolete models to avoid: M5Camera A and B, M5CameraX, M5CameraF and ESP32-Camera
M5Stack has removed the M5Camera A, M5Camera B, M5CameraX and M5CameraF development boards from their catalog, detailed here on GitHub. You may find them on sale on AliExpress for example. Stay away from its less efficient models that will no longer receive technical support.
You can still buy the ESP32-Camera but that’s a bit of a shame because its price is very close to the much newer and better equipped Timer Camera. You choose.
M5Stack M5StickV K210 AI Camera (Kendryte K210 without WiFi)
The M5StickV is built around the Kendryte K210 SoC, a dual-core 64-bit RISC-V processor and a dedicated neural network processor for image analysis and video processing.
The M5StickV AI is equipped with an OmniVision OV7740 sensor which offers high sensitivity even in low light. The M5StickV includes, among other things, an I2S Class-D speaker, an IPS screen, a 6-axis MPU6886 accelerometer, a 200mAh LiPo battery, an AXP192 power manager.
The Kendryte K210 does not have any connectivity (WiFi or Bluetooth).
The easiest is to use the MicroPython language to develop code for the K210. Several MicroPython code samples developed using the MaixPy editor (developed by Seeed Studio) are available here . Small regret, no example for the camera module is available yet ?!
As I reported in this guide to choosing TTGO T-Watch, the manufacturer’s website Kendryte has been offline for a while now. Buyout or bankruptcy following the COVID-19 pandemic, that is the question? Only the GitHub repository is still active. I therefore advise you to stay away from this product for the moment.
The M5StickV K210 AI is available for around $ 30 (excluding shipping) from the M5Stack online store.
TTGO T-Camera, T-Camera Plus or T-Journal from LilyGo
LilyGo, the manufacturer of ESP32 TTGO development boards, offers us 3 ESP32-CAM development boards.
The ESP32-CAM TTGO T-Camera and T-Camera Plus boards are equipped with a 3D WiFi antenna as well as an IPEX connector. A priori, it is not necessary to intervene on the circuit to connect an external antenna. However, the 3D WiFi antenna should provide a good signal in most situations, indoors at least. The T-Journal is equipped with an SMA antenna which can be replaced by an IPEX antenna (connector available without modification).
TTGO T-Camera
The TTGO T-Camera is equipped with a PIR motion detector (AS312) accessible on the IO33 pin as well as an OLED SSD1306 I2C screen
TTGO T-Camera Plus
The TTGO T-Camera Plus has a microphone (MSM261S4030H0), a temperature, humidity and atmospheric pressure sensor (BME280), a color TFT screen with a diagonal of 1.3 “and an SD card reader (up to 16GB) .
Too bad the motion detector has been replaced by a push button, probably to make selfies! It would have been perfect for a surveillance camera with its microSD card reader.
TTGO T-Journal
The TTGO T-Journal is directly fitted with an SMA connector. An IPEX connector (uFL) is also present at the base of the SMA connector. Good idea ! No antenna is engraved on the PCB, so you must use an external antenna.
Comparison table of TTGO T-Camera, T-Camera Plus and T-Journal
Here is a comparison table which summarizes the main technical specifications of the 3 LilyGo TTGO camera boards.
Function | ESP32-CAM Ai Thinker | TTGO T-Camera | TTGO T-Camera Plus | TTGO T-Journal |
ESP32 Version | ESP32-S2 | ESP32-WROVER-B | ESP32-DOWDQ6 | ESP32-PCIO-D4 |
PSRAM memory | 4Mo | 8Mo | 8Mo | – |
Flash memory | 4Mo | 4Mo | 4Mo | 4Mo |
GPIO connector | ✓ | x | x | x |
Microphone | x | x | ✓ MSM261S4030H0 | x |
SD card reader | ✓ | x | ✓ | x |
BME280 (temperature + humidity + atmospheric pressure) | x | x | ✓ | x |
I2C | GPIO* | Connector | Connector | x |
Screen | x | OLED SSD1306 0,96″ (128×64) | IPS ST7789 1.3 “ | OLED SSD1306 0,96″ (128×64) |
Camera | OV2640 | OV2640 | OV2640 | OV2640 |
I/0 | GPIO* | ✓ AS312 | x | x |
User button | x | ✓ | x | x |
Integrated programmer (UART / USB converter) | x | CP2104 | CP2104 | CP2104 |
Connector | x | micro usb | micro usb | micro usb |
JST connector for LiPo battery | x | ✓ | ✓ | ✓ |
3D WiFi antenna | x | ✓ | ✓ | |
IPEX uFL connector | To modify** | ✓ | ✓ | ✓ |
SMA connector | x | x | x | ✓ |
Dimension | 40*27*18mm | 69.13*28.41*8.45mm | 64.57mm * 23.98mm | |
Resources | Read | Read | Read | |
Average price (excluding transport costs) | <€ 8 | € 15 | 17 € | € 14 |
(*) Attention, if you use the micro SD card reader, only pins 1, 3 and 16 are available for the I2C bus. Pins 1 and 3 will need to be released each time you want to upload a program.
(**) Follow the instructions of this tutorial.
How to program an ESP32-CAM module?
ESP32-CAM is first and foremost an ESP32 development board. This means that we can develop code using compatible languages:
- ESP-IDF is the C++ development kit offered by Espressif which allows you to use all the functions of the ESP32. It is based on FreeRTOS. You must already have a very good command of C++ to get started.
- ESP32-Arduino. This is the version of the ESP-IDF SDK suitable for the Arduino or PlatformIO IDE. You will find many projects and examples to get started. This is the preferred solution when starting out.
- UIFlow. This is the home version of Blockly developed by M5Stack. It can only be used with M5Stack boards.
- Micro Python. A few projects are starting to emerge on the internet.
ESP-IDF | ESP32-Arduino | UIFlow (Blockly) | Micro Python | |
ESP-EYE | ✓ | ✓ | ||
ESP3-CAM | ✓ | ✓ | ✓ | |
M5Stack Timer Camera, ESP32 Camera and older models | ✓ | ✓ | ✓ | |
TTGO T-Camera | ✓ | ✓ | ||
TTGO T-Camera Plus | ✓ | ✓ | ||
TTGO T-Journal | ✓ | ✓ |
Summary table, which model to choose?
Here is a summary table to help you choose the ESP32-CAM development board that best suits your project.
Maker Espressif + generic ESP32 ESP32-WROVER-B ESP32-DOWDQ6 ESP32-PCIO-D4 ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ CP2104 CP2104 CP2104 Average price (excluding transport costs) ~ 15 € ~ 17 € ~ 14 €
ESP3-CAM tutorial and projects
Ready to get started, here are some projects and tutorials to get you started.
- ESP32-CAM pinout and equipments. ESP-EYE, AI Thinker, TTGO T-Camera, M5Stack Timer Camera …
- ESP32-CAM. Which model to choose? ESP-EYE, AI Thinker, TTGO T-Camera, M5Stack Timer Camera …
- 5 tips for ESP32-CAM. Fixed IP address. AP mode. Image rotation 90°. Automatic recovery WiFi connection. HTML code storage
- ESP32-CAM. Solder the external antenna to improve the range and stability of the video stream
- ESP32-CAM. Migrate CameraWebServer project from Arduino IDE to PlatformIO
You will also find in this article many tips to improve
- How to assign (fix) the IP address of the ESP32-CAM?
- How to start the ESP32-CAM in Access Point (AP) mode?
- How to make an automatic re-connection in case of loss or unavailability of the WiFi network?
- An example of Arduino code with a simplified HTML interface
- How to store the HTML code of the interface as a long string on the Flash memory of the ESP32
- How to rotate the image 90°
- A complete example of ESP32-CAM project with HTML interface and image rotation
Updates
2021/01/26 Publication of the article
Thanks for reading
- ESP32-CAM pinout and equipments. ESP-EYE, AI Thinker, TTGO T-Camera, M5Stack Timer Camera …
- ESP32-CAM. Which model to choose? ESP-EYE, AI Thinker, TTGO T-Camera, M5Stack Timer Camera …
- 5 tips for ESP32-CAM. Fixed IP address. AP mode. Image rotation 90°. Automatic recovery WiFi connection. HTML code storage
- ESP32-CAM. Solder the external antenna to improve the range and stability of the video stream
- ESP32-CAM. Migrate CameraWebServer project from Arduino IDE to PlatformIO