🧪 New tutorials are being published — build from robot arms to sensors step by step
Skip to content

ESP32-NanoCam Hardware Spec

Buy in Store

1. Hardware Overview

The hardware material in this section comes from the NanoCamModule.pdf + NanoCamBASE.pdf schematics. Overall architecture: the core board (ESP32-S3 + camera + audio) plugs onto the base board (USB power + serial flashing).

Plaintext
┌─────────────────────────────────────────────────────────┐
│                    NanoCam 核心板                         │
│  ┌──────────┐  ┌──────────┐  ┌────────────┐            │
│  │ ESP32-S3 │  │ ES8311   │  │ NS4150B   │            │
│  │   R8     │  │ I2S 麦克风│  │ I2S 功放   │            │
│  │ (QFN56)  │  │          │  │            │            │
│  └────┬─────┘  └──────────┘  └────────────┘            │
│       │                                                 │
│  ┌────┴─────┐  ┌──────────┐  ┌────────────┐            │
│  │ GD25Q128 │  │  DVP     │  │ ME6217C33  │            │
│  │ 16MB Flash│ │ 摄像头   │  │ 3.3V LDO   │            │
│  └──────────┘  │ FPC-24P  │  └────────────┘            │
│                └──────────┘                             │
├─────────────────────────────────────────────────────────┤
│                    NanoCam 底板                          │
│  ┌──────────┐  ┌──────────┐  ┌────────────────────┐    │
│  │ USB-C    │  │ CH340K   │  │ 一键下载电路        │    │
│  │ 5V输入   │  │ USB-UART │  │ (DTR/RTS→BOOT/EN)  │    │
│  └──────────┘  └──────────┘  └────────────────────┘    │
│                                                         │
│  扩展接口: I2C ×1, UART ×1, 5V/GND/3.3V                 │
└─────────────────────────────────────────────────────────┘

Figure 1: Core board front (ESP32-S3 / camera / audio)

2. MCU and Storage

2.1 Main Chip

ParameterSpecification
ModelESP32-S3 N16R8
PackageQFN56
CPUXtensa LX7 dual-core 240MHz
PSRAM8MB (Octal SPI, R8 suffix)
Flash16MB (N16 suffix, external 128M-bit SPI Flash)
Clock40MHz passive crystal + 10pF×2 matching capacitors

2.2 Flash Storage

ParameterSpecification
ModelGD25Q128ESIG
Capacity128M-bit = 16MB
InterfaceSPI (standard four-wire)
BrandGigaDevice
Flash SignalESP32-S3 GPIOFunction
CSIO29Chip select
SO (DO)IO31Data output
SI (DI)IO32Data input
SCLKIO30Clock
WPIO34Write protect
HOLDIO33Hold

3. Camera Subsystem

3.1 DVP Interface

ParameterSpecification
Interface typeFPC 0.5 WS 24P (24-pin FPC connector)
Supported SensorsGC2145 (default) / OV2640 / OV5640 and other DVP cameras
I2C configuration busSDA=IO41, SCL=IO42 (shared with the external I2C)
Pixel formatRGB565 / JPEG / YUV422, etc.

Figure 5: GC2145 camera module dimensions (68° field of view)

3.2 Full DVP Pin Mapping

Signal CategorySignal NameESP32 GPIONotes
System clockXCLKIO9Master clock output 24MHz
Pixel clockPCLKIO6Camera pixel clock input
Frame syncVSYNCIO13Vertical sync
Line syncHREFIO11Horizontal reference
ControlPWDNIO12Camera power-down control
ControlRESETIO14Camera reset
I2CSDAIO41Camera I2C data (shared with ES8311)
I2CSCLIO42Camera I2C clock (shared with ES8311)
Data D0Y2IO4Pixel data bit0
Data D1Y3IO2Pixel data bit1
Data D2Y4IO1Pixel data bit2
Data D3Y5IO3Pixel data bit3
Data D4Y6IO5Pixel data bit4
Data D5Y7IO7Pixel data bit5
Data D6Y8IO8Pixel data bit6
Data D7Y9IO10Pixel data bit7

3.3 Camera Signal Group Summary

Plaintext
Camera DVP 信号组:
  XCLK  = IO9     # Master clock out (24MHz)
  PCLK  = IO6     # Pixel clock in
  VSYNC = IO13    # Vertical sync
  HREF  = IO11    # Horizontal ref
  PWDN  = IO12    # Power down (active low)
  RESET = IO14    # Hardware reset

  D0(Y2) = IO4    D1(Y3) = IO2
  D2(Y4) = IO1    D3(Y5) = IO3
  D4(Y6) = IO5    D5(Y7) = IO7
  D6(Y8) = IO8    D7(Y9) = IO10

  SIOD(SDA) = IO41
  SIOC(SCL) = IO42

4. Audio Subsystem

4.1 Audio Architecture

Plaintext
AP2718AT (模拟MEMS麦) → ES8311 Codec (ADC/DAC) → NS4150B (模拟功放) → 扬声器
                               ↕ I2S (MCLK=39,BCLK=38,WS=47,DOUT=48,DIN=40) + I2C (41/42, addr=0x30)
                            ESP32-S3
ComponentModelTypeInterface
MicrophoneAP2718ATAnalog MEMS silicon microphoneDifferential analog → ES8311 ADC
CodecES8311Audio codec (I2S+I2C)I2S=MCLK=39,BCLK=38,WS=47,DOUT=48,DIN=40, I2C=41/42, addr=0x30
AmplifierNS4150BClass-D analog amplifierES8311 DAC output → analog input → speaker

4.2 ES8311 Codec I2S Pins

I2S SignalESP32 GPIOFunction
MCLKIO39Master clock
BCLK (SCLK)IO38Bit clock
LRCLK (WS)IO47Left/right channel clock
DOUT (DAC)IO48Serial data output (playback)
DIN (ADC)IO40Serial data input (recording)

Audio uses I2S0 Standard Duplex mode; the ES8311 codec supports recording and playback simultaneously.

4.3 ES8311 I2C Control

I2C SignalGPIODescription
SDAIO41I2C bus shared with the camera
SCLIO42I2C bus shared with the camera
Address0x30ES8311 8-bit I2C address

5. Power System

5.1 Power Chain

Plaintext
USB-C (5V) ──→ 底板 NCE3401 P-MOSFET 反接保护 ──→ VDD50

                    ┌─────────────────────────┤
                    ↓                         ↓
            核心板 ME6217C33 LDO            NS4150B 功放
                    │                  (5V 直供)

                 VDD33 (3.3V)

        ┌───────────┼───────────┐
        ↓           ↓           ↓
    ESP32-S3    ES8311 Codec   GD25Q128 Flash
    DVP摄像头   AP2718AT 麦    ME6211A18/28 LDO

5.2 Key Components

ChipModelFunction
LDOME6217C33P5G (SOT-89-5)5V→3.3V regulation
LDOME6211A18M3G (SOT-23)5V→1.8V (camera core)
LDOME6211A28M3G ×2 (SOT-23)5V→2.8V (U6=AVDD, U7=DOVDD)
U1 input filteringC14 (10μF) + C15 (0.1μF)ME6217C33 input
U1 output filteringC1 (22μF)ME6217C33 output
Reverse polarity protectionNCE3401 P-MOSFETBase board power input protection
Gate resistorR11 10KΩP-MOS gate tied to ground

6. Base Board and Flashing

Figure 2: Pin silkscreen on the back of the core board (RXD/TXD/SCL/SDA/5V/GND, etc.)

6.1 USB to Serial

ParameterSpecification
ChipCH340K
USB interfaceUSB-C (USB1)
Serial connectionTXD→U0RXD (IO44), RXD→U0TXD (IO43) (crossed)
USB matching resistorsR4, R5 22R/1% (in series with D+/D-)
DTR/RTSOne-click flashing auto-controls BOOT + EN

Figure 3: Base board front (USB-C and expansion interfaces)

6.2 One-Click Download Circuit

Uses Q1 and Q2 (S8050 NPN transistors) for automatic flashing:

CH340K SignalControlTarget Pin
DTR→ Q1 →ESP32 EN (CHIP_PU)
RTS→ Q2 →ESP32 BOOT (IO0)

Principle: the USB flashing tool toggles DTR/RTS to automatically control the BOOT and EN sequence — no manual button presses required.

6.3 Core Board ↔ Base Board Connector Pin Table

Base Board PinCore Board PinSignal NameESP32 GPIOFunction
P1-1P1-1VDD505V power output
P1-2P1-2VDD505V power output
P1-3P1-3GNDPower ground
P1-4P1-4GNDPower ground
P1-5P1-5SDAIO41I2C data (shared with camera/ES8311)
P1-6P1-6SCLIO42I2C clock (shared with camera/ES8311)
P1-7P1-7U0TXDIO43Serial port 0 transmit (connects to CH340K RXD)
P1-8P1-8U0RXDIO44Serial port 0 receive (connects to CH340K TXD)
P2-1P2-1ESP_PIO20USB differential data positive (D+)
P2-2P2-2ESP_NIO19USB differential data negative (D-)
P2-3P2-3VDD333.3V power output
P2-4P2-4VDD333.3V power output
P2-5P2-5GNDPower ground
P2-6P2-6GNDPower ground
P2-7P2-7BOOTIO0Boot mode / flashing
P2-8P2-8CHIP_PUENChip reset control

Figure 4: Pin silkscreen on the back of the base board

6.4 Base Board Expansion Interfaces

InterfaceExposed SignalsPurpose
P3 (I2C, 4Pin)5V1, GND, SDA, SCLExternal I2C devices
P4 (UART, 4Pin)5V1, GND, ESP_P, ESP_NExternal USB/serial devices

7. Complete GPIO Usage Table

Total: 33 GPIOs occupied, about 8 GPIOs available.

GPIOFunctionSignalNotes
IO0BOOTBOOTBoot mode / flashing (S2 button, 10K pull-up + 0.1μF debounce)
IO1DVP D2CAM_Y4Pixel data bit2
IO2DVP D1CAM_Y3Pixel data bit1
IO3DVP D3CAM_Y5Pixel data bit3
IO4DVP D0CAM_Y2Pixel data bit0
IO5DVP D4CAM_Y6Pixel data bit4
IO6DVP PCLKCAM_PCLKPixel clock input
IO7DVP D5CAM_Y7Pixel data bit5
IO8DVP D6CAM_Y8Pixel data bit6
IO9DVP XCLKCAM_XCLKCamera master clock (24MHz)
IO10DVP D7CAM_Y9Pixel data bit7
IO11DVP HREFCAM_HREFLine sync
IO12DVP PWDNCAM_PWDNCamera power-down control
IO13DVP VSYNCCAM_VSYNCFrame sync
IO14DVP RESETCAM_RESETCamera reset
IO18WS2812RGB_LED_DINWS2812 RGB LED data input
IO19USB differentialD- (ESP_N)USB differential data negative (D-)
IO20USB differentialD+ (ESP_P)USB differential data positive (D+)
IO21WS2812 DOUTRGB_LED_DOUTWS2812 cascade output (available when not cascaded)
IO29SPI CSFlash_CSExternal Flash chip select
IO30SPI SCLKFlash_CLKExternal Flash clock
IO31SPI SOFlash_DOExternal Flash data output
IO32SPI SIFlash_DIExternal Flash data input
IO33SPI HOLDFlash_HOLDExternal Flash Hold
IO34SPI WPFlash_WPExternal Flash write protect
IO38I2S BCLKI2S_BCLKES8311 bit clock
IO39I2S MCLKI2S_MCLKES8311 master clock
IO40I2S DINI2S_DINES8311 ADC data input
IO41I2C SDAI2C_SDAShared by camera + ES8311 + external I2C
IO42I2C SCLI2C_SCLShared by camera + ES8311 + external I2C
IO43UART0 TXUTXDSerial port 0 transmit (base board CH340K)
IO44UART0 RXURXDSerial port 0 receive (base board CH340K)
IO47I2S WSI2S_WSES8311 word select (LRCK)
IO48I2S DOUTI2S_DOUTES8311 DAC data output
ENCHIP_PURST/ENEnable/reset (S1 button, 10K pull-up)

Available GPIOs (unoccupied, expandable)

GPIOFeatureSuggested Use
IO15General-purpose IOExpansion
IO16General-purpose IOExpansion
IO17General-purpose IOExpansion
IO35General-purpose IOExpansion
IO36General-purpose IOExpansion
IO37General-purpose IOExpansion
IO45General-purpose IOExpansion
IO46General-purpose IOExpansion

⚠️ Occupied GPIOs: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,18,19,20,21,29,30,31,32,33,34,38,39,40,41,42,43,44,47,48

Available: 8 GPIOs

8. Key Design Constraints

8.1 I2S Peripheral Configuration

  • The ESP32-S3 has two I2S controllers:
    • I2S0: assigned to the ES8311 codec (MCLK=IO39, BCLK=IO38, WS=IO47, DOUT=IO48, DIN=IO40), bidirectional I2S Duplex, supporting recording and playback simultaneously
  • ES8311 I2C control: SDA=IO41, SCL=IO42, device address 0x30

8.2 DVP and I2S DMA Coexistence

  • DVP uses the LCD_CAM peripheral's DMA channel
  • ES8311 uses I2S0 DMA (single bidirectional I2S interface)
  • The two do not conflict, but pay attention to PSRAM bandwidth (8MB PSRAM is sufficient)
  • GPIO45/46 have no audio connection and can be used for other purposes; GPIO47 is used for I2S WS

8.3 I2C Bus Sharing

  • IO41 (SDA) + IO42 (SCL) connect to both the camera and the external I2C interface
  • I2C pull-up resistors: R12 (SDA, 4.7K/1%), R13 (SCL, 4.7K/1%), pulled up to VDD33
  • Make sure the camera's I2C address does not conflict with external devices
  • OV2640 default I2C address: 0x60 (write) / 0x61 (read) — no conflict with the ES8311 (0x30)

8.4 Sufficient Flash Capacity

  • 16MB Flash — ample space, enough to support:
    • OTA dual-partition scheme (factory + ota_0 + ota_1)
    • SPIFFS for the Web admin panel (~1MB)
    • XiaoZhi AI multilingual resource packs (.p3 files)
    • NVS configuration partition
    • Reserved space for upgrades
  • No need to worry about firmware size; the multi-Agent AI fits entirely

8.5 DVP Camera Input Pin Constraints

  • D0-D7, VSYNC, HREF and PCLK are input pins, driven by the camera sensor
  • When developing the driver, make sure these pins are configured in INPUT mode only
  • The I2S audio pins (38,39,40,47,48) can be configured as outputs (supported by the ESP32-S3)

9. ESP-IDF Configuration Recommendations

9.1 Key sdkconfig Items

Plaintext
# 芯片
CONFIG_IDF_TARGET_ESP32S3=y
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y

# Flash (16MB)
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y

# PSRAM (8MB Octal)
CONFIG_SPIRAM=y
CONFIG_SPIRAM_MODE_OCT=y
CONFIG_SPIRAM_SPEED_80M=y
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=49152
CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC=y

# Cache
CONFIG_ESP32S3_INSTRUCTION_CACHE_32KB=y
CONFIG_ESP32S3_DATA_CACHE_64KB=y
CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y

# 摄像头
CONFIG_CAMERA_MODULE_CUSTOM=y
CONFIG_CAMERA_PIN_XCLK=9
CONFIG_CAMERA_PIN_PCLK=6
CONFIG_CAMERA_PIN_VSYNC=13
CONFIG_CAMERA_PIN_HREF=11
CONFIG_CAMERA_PIN_SIOD=41
CONFIG_CAMERA_PIN_SIOC=42
CONFIG_CAMERA_PIN_PWDN=12
CONFIG_CAMERA_PIN_RESET=14
CONFIG_CAMERA_PIN_Y2=4
CONFIG_CAMERA_PIN_Y3=2
CONFIG_CAMERA_PIN_Y4=1
CONFIG_CAMERA_PIN_Y5=3
CONFIG_CAMERA_PIN_Y6=5
CONFIG_CAMERA_PIN_Y7=7
CONFIG_CAMERA_PIN_Y8=8
CONFIG_CAMERA_PIN_Y9=10
CONFIG_CAMERA_XCLK_FREQ=24000000

# 音频 (ES8311 Codec, I2S0)
# ES8311 I2S: MCLK=39, BCLK=38, WS=47, DOUT=48, DIN=40
# ES8311 I2C: SDA=41, SCL=42, addr=0x30

9.2 Camera Configuration

C
// esp32-camera 引脚配置
camera_config_t config = {
    .pin_pwdn  = 12,
    .pin_reset = 14,
    .pin_xclk  = 9,
    .pin_siod  = 41,
    .pin_sioc  = 42,
    .pin_d7    = 10,
    .pin_d6    = 8,
    .pin_d5    = 7,
    .pin_d4    = 5,
    .pin_d3    = 3,
    .pin_d2    = 1,
    .pin_d1    = 2,
    .pin_d0    = 4,
    .pin_vsync = 13,
    .pin_href  = 11,
    .pin_pclk  = 6,
    .xclk_freq_hz = 24000000,
    .pixel_format = PIXFORMAT_RGB565,  // 或 PIXFORMAT_JPEG
    .frame_size   = FRAMESIZE_QVGA,    // 320x240
    .jpeg_quality = 12,
    .fb_count     = 2,
    .fb_location  = CAMERA_FB_IN_PSRAM,
    .grab_mode    = CAMERA_GRAB_WHEN_EMPTY,
};

Next Steps