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
Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on email
Share on whatsapp
Table of Contents

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.

Read Also
ESP32-CAM. Which model to choose? ESP-EYE, AI Thinker, TTGO T-Camera, M5Stack Timer Camera ...

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

esp-eye espressif esp32

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 SPIESP32 pin
DATA_OUT (DOUT)IO12
DATA_INT (DIN)IO2
CLKIO0
CSIO19

Identification of other equipment on board the ESP-EYE

The ESP-EYE has several additional accessories on board:

  • Microphone Cirrus Logic CS53L30
  • 2 LEDs (red and white)
  • 8MB of PSRAM
  • A user button

esp-eye v2 pinout espressif esp32

EquipmentESP32 pin
Micro Cirrus Logic CS53L30
DMIC_I2S_WSIO32
DMIC_I2S_SDOIO33
DMIC_I2S_SCKIO26
LED
RedIO21
WhiteIO22
Buttons
ININ
BootIO0
User programmableIO15
PSRAM
CSIO16
CLKIO17

esp32 cam wifi wifi module esp32 serial to wifi esp32 cam development board 1

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.

ai thinker esp32 cam pinout

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:

  • The GPIO16 pin not being RTC, it will not be possible to wake up the ESP32-CAM using a PIR motion detector for example.
  • You will need to make pins 1 and 3 (RX / TX serial port) available each time you need to update the program. By integrating wireless update (OTA), you can downsize to one time.

Read Also
ArduinoOTA ESP32: Wi-Fi (OTA) Wireless Update from the Arduino IDE

ESP32 pinDigital inputDigital outputOther functionNote
IO0PULL UPCLKSends a PWM signal at startup. Allows you to switch the ESP32 to Flash Mode each time you want to upload a program.
IO1TXDebug output at startup
IO2DATA0Connected to the on-board LED
IO3RXTakes the HIGH state at startup
IO4DATA1 / FlashLight
IO12DATA2Fail to start if in PULLUP mode
IO13DATA3
IO14CLKSends a PWM signal at startup
IO15CMDSends 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 pinESP32 pin
CLKIO14
CMDIO15
DATA0IO2
DATA1 / White LED (Flash Light)IO4
DATA2IO12
DATA3IO13

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

Read Also
ESP32-CAM. Solder the external antenna to improve the range and stability of the video stream

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.

m5stack esp32 timer camera boardm5stack esp32 timer camera board packaged

InterfaceESP32 pin
OV3660 camera module
SCCB ClockIO23
SCCB DataIO25
System ClockIO27
Vertical SyncIO22
Horizontal ReferenceIO26
Pixel ClockIO21
Pixel Data Bit 0IO32
Pixel Data Bit 1IO35
Pixel Data Bit 2IO34
Pixel Data Bit 3IO5
Pixel Data Bit 4IO39
Pixel Data Bit 5IO18
Pixel Data Bit 6IO36
Pixel Data Bit 7IO19
Camera ResetIO15
Camera Power Down-1
Power Supply 3.3V3V3
GroundGND
Grove connector
SCLIO13
SDAIO4
5V5V
GNDGND
Other equipment
White ledIO2
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.

m5camera m5cameraX m5cameraF esp32-cam development boards

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 AM5Camera model B
With the ESP32 Espressif logoM5Stack ESP32 Camera PSRAM modelAWith FCC / CE logo M5Stack ESP32 Camera PSRAM model B.
#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.

FunctionESP32-CAM Ai ThinkerTTGO T-CameraTTGO T-Camera PlusTTGO T-Journal
esp32 cam wifi wifi module esp32 serial to wifi esp32 cam development board 1ttgo lilygo t-camera esp32 esp32-camttgo lilygo t-camera plus esp32 esp32-camttgo lilygo t-journal esp32 esp32-cam
ESP32ESP32-S2ESP32-WROVER-BESP32-DOWDQ6ESP32-PCIO-D4
PSRAM memory4Mo8Mo8Mo
Flash memory4Mo4Mo4Mo4Mo
GPIO connector
Microphone

MSM261S4030H0

SD card reader
BME280 (temperature + humidity + atmospheric pressure)
I2Cvia GPIO *ConnectorConnector
ScreenOLED SSD1306

0,96″ (128×64)

IPS ST7789

1.3 “

OLED SSD1306

0,96″ (128×64)

CameraOV2640OV2640OV2640OV2640
THE BRIDGEGPIO

AS312

User button

UART / USBCP2104CP2104CP2104
Connectormicro usbmicro usbmicro usb
JST connector for LiPo battery
3D WiFi antenna 
IPEX uFL connectorTo modify**
SMA connector
Dimension40*27*18mm69.13*28.41*8.45mm64.57mm * 23.98mm
ResourcesReadReadRead
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.

EquipmentESP32 pin
Micro SD card reader
MISOIO22
DAWDLEIO19
SCLKIO21
CSIO0
Microphone
SCLKIO14
LCLKIO32
DOUTIO33
1.3 “TFT screen IPS ST7789
MISOIO22
DAWDLEIO19
SCLKIO21
CSIO12
DCIO15
BKIO2

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

lilygo ttgo t-journal esp32 camera gpiolilygo ttgo t-journal esp32 camera gpio bottom

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.

Read Also
ESP32-CAM. Solder the external antenna to improve the range and stability of the video stream

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

Engraved on the PCBUFL / IPEX connectorSMA connector3D 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

Read Also
5 tips for ESP32-CAM. Fixed IP address. AP mode. Image rotation 90°. Automatic recovery WiFi connection. HTML code storage

Updates

2021/01/27  Publication of the article

Version française

Thanks for reading

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

Thanks for your reading

Did you like this project ? Don't miss any more projects by subscribing to our weekly newsletter!

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on email
Share on whatsapp

Are you having a problem with this topic?

Maybe someone has already found the solution, visit the forum before asking your question
We will be happy to hear your thoughts

      Leave a Reply

      Ads
      Read more
      Recent posts on the Forum
      DIY Projects
      DIY Projects