DIY Projects

ESP32-CAM pinout and equipments. ESP-EYE, AI Thinker, TTGO T-Camera, M5Stack Timer Camera …

esp32-cam pinout ai thinker m5stack timer camera ttgo t-camera t-journal esp-eye

Even though all ESP32-CAM development boards share the same C ++ (Arduino) code, each manufacturer has connected the camera module to the pins of the ESP32 differently. This article summarizes the pinout of the main ESP32-CAM development boards currently available. ESP-EYE by Espressif, ESP32-CAM Ai Thinker, M5Stack Timer Camera, TTGO T-Camera, T-Camera Plus and T-Journal.

 

If you’re new to ESP32-based camera modules, you can start by reading this guide which details each model from manufacturers Espressif, Ai Thinker (generic entry-level models), M5Stack and TTGO.

Follow the link that corresponds to your development board to quickly access technical details

Pin identification of the ESP-EYE certified Amazon AWS-IoT by Espressif

The plans and circuits of the ESP-EYE being Open Source and available on GitHub, several manufacturers produce compatible boards following the design proposed by Espressif. The board is equipped with a 3D antenna to improve WiFi connectivity. No connector (SMA or IPEX) is available to connect a possible external antenna. The ESP-EYE does not embed a cryptographic module which would have been a real plus for professional applications.

The microphone will allow the development of AI (Artificial Intelligence) based applications such as voice control.

More ESP-EYE development board

Pins assigned to OmniVision OV2640, OV3660 or OV5640 camera module

Pins assigned to the OmniVision OV2640, OV3660 or OV5640 camera module.

#define PWDN_GPIO_NUM    -1
#define RESET_GPIO_NUM   -1
#define XCLK_GPIO_NUM    4
#define SIOD_GPIO_NUM    18
#define SIOC_GPIO_NUM    23
#define Y9_GPIO_NUM      36
#define Y8_GPIO_NUM      37
#define Y7_GPIO_NUM      38
#define Y6_GPIO_NUM      39
#define Y5_GPIO_NUM      35
#define Y4_GPIO_NUM      14
#define Y3_GPIO_NUM      13
#define Y2_GPIO_NUM      34
#define VSYNC_GPIO_NUM   5
#define HREF_GPIO_NUM    27
#define PCLK_GPIO_NUM    25

SPI connector to be soldered on the board

Four pads (not drilled) allow to solder a connector (at a pitch of 2.54mm a priori) for SPI peripherals (micro SD card reader, TFT screen, etc.)

Bus SPI ESP32 pin
DATA_OUT (DOUT) IO12
DATA_INT (DIN) IO2
CLK IO0
CS IO19

Identification of other equipment on board the ESP-EYE

The ESP-EYE has several additional accessories on board:

Equipment ESP32 pin
Micro Cirrus Logic CS53L30
DMIC_I2S_WS IO32
DMIC_I2S_SDO IO33
DMIC_I2S_SCK IO26
LED
Red IO21
White IO22
Buttons
IN IN
Boot IO0
User programmable IO15
PSRAM
CS IO16
CLK IO17

Ai Thinker ESP32-CAM Pin Locating (ESP32-S)

ESP32 development board built around Ai Thinker’s ESP32-S SoC. The board does not have a UART / USB converter. This means that it will be necessary to manually connect the serial port of the ESP32 using an FTDI module to manually connect the ESP32 to the computer.

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.

Pins 2 4 12  13  14 and 15 are shared with the micro SD card reader. Therefore, it is strongly advised not to use these pins for any other purpose if you want to store pictures or videos.

Pins 2 4 12  13  14 and 15 are RTC compatible and support the Analog to Digital Converter (ADC) of the ESP32.

If your application uses the micro SD card reader, only pins 2 3 and 16 are available. However, the following constraints must be taken into account:

ESP32 pin Digital input Digital output Other function Note
IO0 PULL UP CLK Sends a PWM signal at startup. Allows you to switch the ESP32 to Flash Mode each time you want to upload a program.
IO1 TX Debug output at startup
IO2 DATA0 Connected to the on-board LED
IO3 RX Takes the HIGH state at startup
IO4 DATA1 / FlashLight
IO12 DATA2 Fail to start if in PULLUP mode
IO13 DATA3
IO14 CLK Sends a PWM signal at startup
IO15 CMD Sends a PWM signal at startup
IO16

Flash Light, LED lighting

A white lighting LED is connected to the IO4 pin of the ESP32. You can use it as an accent light only if you are not using the micro SD card to store photos or videos.

Pin identification of the micro SD card reader

The IO4 pin is shared between the white LED and the DATA1 pin of the integrated microSD card reader. This causes the LED to blink with each write to the SD card.

Integrated microSD card reader pin ESP32 pin
CLK IO14
CMD IO15
DATA0 IO2
DATA1 / White LED (Flash Light) IO4
DATA2 IO12
DATA3 IO13

Attention, to be able to use an external antenna to increase the range and the stability of the WiFi signal, you must first activate the IPEX connector by moving the resistor. Follow the instructions detailed in this article

Find more ESP32-CAM development boards 

Pins assigned to OmniVision OV2640, OV3660 or OV5640 camera module

Pins assigned to the OmniVision OV2640, OV3660 or OV5640 camera module.

#define PWDN_GPIO_NUM 32 
#define RESET_GPIO_NUM -1 
#define XCLK_GPIO_NUM 0 
#define SIOD_GPIO_NUM 26 
#define SIOC_GPIO_NUM 27 
#define Y9_GPIO_NUM 35 
#define Y8_GPIO_NUM 34 
#define Y7_GPIO_NUM 39 
#define Y6_GPIO_NUM 36 
#define Y5_GPIO_NUM 21 
#define Y4_GPIO_NUM 19 
#define Y3_GPIO_NUM 18 
# define Y2_GPIO_NUM 5 
#define VSYNC_GPIO_NUM 25 
#define HREF_GPIO_NUM 23 
#define PCLK_GPIO_NUM 22

M5 Stack Timer Camera Pin Locating

The M5Stack Timer Camera has 8MB of PSRAM, an OmniVision OV3660 sensor equipped with a lens with a field of view of 66.5 ° which offers a resolution of 2048×1536 pixels, an RTC clock (BM8563), a PH2.0- connector. 4P (Grove connector), a white LED (IO2) and a connector for LiPo battery. The battery charge can be measured on the pin (IO33)

The M5Stack Timer Camera is available alone or delivered installed in a box ( version X ) with Lego Technics support.

Interface ESP32 pin
OV3660 camera module
SCCB Clock IO23
SCCB Data IO25
System Clock IO27
Vertical Sync IO22
Horizontal Reference IO26
Pixel Clock IO21
Pixel Data Bit 0 IO32
Pixel Data Bit 1 IO35
Pixel Data Bit 2 IO34
Pixel Data Bit 3 IO5
Pixel Data Bit 4 IO39
Pixel Data Bit 5 IO18
Pixel Data Bit 6 IO36
Pixel Data Bit 7 IO19
Camera Reset IO15
Camera Power Down -1
Power Supply 3.3V 3V3
Ground GND
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 .

More M5Stack Timer Camera deals

Obsolete ESP32-CAM M5Stack Development Boards

Here are several development boards that M5Stack has removed from its catalog that are best left off buying. ESP32-Camera (without PSRAM), M5Camera (models A or B), M5CameraX and M5CameraF.

You may find them on sale on AliExpress for example.

For those who still use these boards, here is the pin identification for your projects.

Locating the OmniVision OV2640 2MP sensor for M5Camera, models A and B

M5Camera boards, models A and B are equipped with 4MB of Flash memory and 4MB of PSRAM. The Grove PH2.0 (4-pole) connector exposes the IO4 and IO13 pins of the ESP32.

M5Camera, model A M5Camera model B
With the ESP32 Espressif logo With FCC / CE logo
#define PWDN_GPIO_NUM     -1
#define RESET_GPIO_NUM    15
#define XCLK_GPIO_NUM     27
#define SIOD_GPIO_NUM     25
#define SIOC_GPIO_NUM     23
#define Y9_GPIO_NUM       19
#define Y8_GPIO_NUM       36
#define Y7_GPIO_NUM       18
#define Y6_GPIO_NUM       39
#define Y5_GPIO_NUM        5
#define Y4_GPIO_NUM       34
#define Y3_GPIO_NUM       35
#define Y2_GPIO_NUM       32
#define VSYNC_GPIO_NUM    22
#define HREF_GPIO_NUM     26
#define PCLK_GPIO_NUM     21
#define PWDN_GPIO_NUM     -1
#define RESET_GPIO_NUM    15
#define XCLK_GPIO_NUM     27
#define SIOD_GPIO_NUM     22
#define SIOC_GPIO_NUM     23
#define Y9_GPIO_NUM       19
#define Y8_GPIO_NUM       36
#define Y7_GPIO_NUM       18
#define Y6_GPIO_NUM       39
#define Y5_GPIO_NUM        5
#define Y4_GPIO_NUM       34
#define Y3_GPIO_NUM       35
#define Y2_GPIO_NUM       32
#define VSYNC_GPIO_NUM    25
#define HREF_GPIO_NUM     26
#define PCLK_GPIO_NUM     21

TTGO T-Camera, T-Camera Plus and T-Journal from LilyGo

LilyGo, the manufacturer of ESP32 TTGO development boards, offers us 3 ESP32-CAM development boards.

TTGO T-Camera and T-Camera Plus boards are equipped with a 3D WiFi antenna as well as an IPEX connector.

The T-Journal is equipped with a double SMA / IPEX connector.

Here is a comparison table which summarizes the main technical specifications of the 3 LilyGo TTGO camera boards with the Ai Thinker ESP32-CAM.

Function ESP32-CAM Ai Thinker TTGO T-Camera TTGO T-Camera Plus TTGO T-Journal
ESP32 ESP32-S2 ESP32-WROVER-B ESP32-DOWDQ6 ESP32-PCIO-D4
PSRAM memory 4Mo 8Mo 8Mo
Flash memory 4Mo 4Mo 4Mo 4Mo
GPIO connector
Microphone

MSM261S4030H0

SD card reader
BME280 (temperature + humidity + atmospheric pressure)
I2C via GPIO * Connector Connector
Screen OLED SSD1306

0,96″ (128×64)

IPS ST7789

1.3 “

OLED SSD1306

0,96″ (128×64)

Camera OV2640 OV2640 OV2640 OV2640
THE BRIDGE GPIO

AS312

User button

UART / USB CP2104 CP2104 CP2104
Connector micro usb micro usb micro usb
JST connector for LiPo battery
3D WiFi antenna  
IPEX uFL connector To modify**
SMA connector
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 or other equipment. Pins 1 and 3 will need to be released each time you want to upload a program.

(**) Follow the instructions of this tutorial .

Pin identification of the TTGO T-Camera

The TTGO T-Camera is equipped with a PIR motion detector (AS312) accessible on pin IO33 .

The SSD1306 OLED screen is accessible via the I2C bus on pins IO21 (SDA) and IO22 (SCL).

Pins assigned to the OmniVision OV2640 camera module.

define PWDN_GPIO_NUM -1
define RESET_GPIO_NUM -1
define XCLK_GPIO_NUM 32
define SIOD_GPIO_NUM 13
define SIOC_GPIO_NUM 12
define Y9_GPIO_NUM 39
define Y8_GPIO_NUM 36
define Y7_GPIO_NUM 23
define Y6_GPIO_NUM 18
define Y5_GPIO_NUM 15
define Y4_GPIO_NUM 4
define Y3_GPIO_NUM 14
define Y2_GPIO_NUM 5
define VSYNC_GPIO_NUM 27
define HREF_GPIO_NUM 25
define PCLK_GPIO_NUM 19

See more offers for the TTGO T-Camera

Pin identification of the 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) .

The motion detector has been replaced by a push button.

Here are the pins assigned to the equipment integrated in the TTGO T-Camera Plus.

Equipment ESP32 pin
Micro SD card reader
MISO IO22
DAWDLE IO19
SCLK IO21
CS IO0
Microphone
SCLK IO14
LCLK IO32
DOUT IO33
1.3 “TFT screen IPS ST7789
MISO IO22
DAWDLE IO19
SCLK IO21
CS IO12
DC IO15
BK IO2

Pins assigned to the OmniVision OV2640 camera module. Source

define PWDN_GPIO_NUM -1
define RESET_GPIO_NUM -1
define XCLK_GPIO_NUM 4
define SIOD_GPIO_NUM 18
define SIOC_GPIO_NUM 23
define Y9_GPIO_NUM 39
define Y8_GPIO_NUM 36
define Y7_GPIO_NUM 36
define Y6_GPIO_NUM 37
define Y5_GPIO_NUM 38
define Y4_GPIO_NUM 39
define Y3_GPIO_NUM 13
define Y2_GPIO_NUM 34
define VSYNC_GPIO_NUM 5
define HREF_GPIO_NUM 27
define PCLK_GPIO_NUM 25

See more offers for the TTGO T-Camera Plus

Pin identification of the 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.

Pins 2, 4, 14 and 13 as well as the 3.3V and GND power pins are exposed on the board. You will need to solder a 2.54mm pitch connector directly to the board. The holes are already pre-drilled.

Pins IO2 and IO4.

Power supply 2x GND, 2x 3V3

I2C connector. IO14 (SDA) and IO13 (SCL).

IO32 user button

Pins assigned to the OmniVision OV2640 camera module.

#define PWDN_GPIO_NUM     32
#define RESET_GPIO_NUM    -1
#define XCLK_GPIO_NUM     27
#define SIOD_GPIO_NUM     25
#define SIOC_GPIO_NUM     23
#define Y9_GPIO_NUM       19
#define Y8_GPIO_NUM       36
#define Y7_GPIO_NUM       18
#define Y6_GPIO_NUM       39
#define Y5_GPIO_NUM       5
#define Y4_GPIO_NUM       34
#define Y3_GPIO_NUM       35
#define Y2_GPIO_NUM       17
#define VSYNC_GPIO_NUM    22
#define HREF_GPIO_NUM     26
#define PCLK_GPIO_NUM     21

See more offers for the TTGO T-Journal

WiFi signal quality

The resolution and the stability of the video stream depend mainly on the quality of the WiFi connection. The most recent cards are equipped with a 3D WiFi antenna which guarantees very good signal quality.

If there is any problem displaying the video stream, this is the first thing to check, especially for budget Ai Thinker ESP32-CAM cards. In this case, do not hesitate to activate the external antenna by following this tutorial.

Here is a summary table with the type of antenna for the main current ESP32-CAM development boards.

Engraved on the PCB UFL / IPEX connector SMA connector 3D antenna
WiFi signal quality * Depends on the external antenna

3dBi mini

*** ***
ESP-EYE
ESP32-CAM Ai Thinker ✓ *
M5Stack Timer Camera
Older M5Stack models
TTGO T-Camera
TTGO T-Camera Plus
TTGO T-Journal

(*) Circuit to be modified before being able to use an external antenna

ESP3-CAM tutorial and projects

Ready to get started, here are some projects and tutorials to get you started.

You will also find in this article many tips to improve

Updates

2021/01/27  Publication of the article

Version française

Thanks for reading

Click to rate this post!
[Total: 0 Average: 0]
Exit mobile version