yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
ESP32 Core Board📖
1. ESP32 Introduction
  • 1. ESP32S3 Overview
  • 2. Environment Setup Introduction
  • 3. Dev Board Introduction
2. ESP-IDF Development Tutorial
1. Before Development
  • 1. Environment Setup (Windows)
  • 2. Environment Setup (Linux)
  • 3. Build and Flash
2. Basic Peripherals
  • 1. LED Control
  • 2. Button Detection
  • 3. Peripheral Interrupts
  • 4. ESP_TIMER
  • 5. GPTIMER
  • 6. Watchdog Timer
  • 7. DMA
  • 8. ADC
  • 9. PWM Breathing LED
  • 10. RGB LED Effects
3. Serial Communication and Storage System
  • 1. Serial UART Communication Experiment
  • 2. I2C_OLED Display Experiment
  • 3. SPI Bus Communication Experiment
  • 4. PSRAM External Memory Experiment
  • 5. Flash Read and Write Experiment
  • 6. USB Emulated Mass Storage Experiment
4. FreeRTOS operating system
  • 1.FreeRTOS Core Concepts Theory
  • 2.Task Creation and Management
  • 3.Queue
  • 4.Binary Semaphore
  • 5.Mutex
  • 6.Event Groups
  • 7.Software Timer
  • 8.Task Scheduler
  • 9.Low Power Mode
  • 10.Deadlock
  • 11.Priority Inversion
5. Network Protocols and Wireless Communication
  • 1. WIFI Network Basics
  • 2. WIFI STA Mode
  • 3. WIFI AP Mode
  • 4. UDP Client Experiment
  • 5. UDP Server Experiment
  • 6. TCP Client Experiment
  • 7. TCP Server Experiment
  • 8. Socket Programming Basics
  • 9. HTTP Client Experiment
  • 10. HTTP Server Experiment
  • 11. MQTT IoT Communication Protocol
  • 12. WIFI OTA Upgrade
  • 13. Bluetooth Fundamentals
  • 14. Bluetooth Slave Mode
  • 15. Bluetooth Master Mode
6. Audio Applications
  • 1.I2S Microphone Recording and U-Disk Playback
  • 2.I2S Audio Playback Experiment
  • 3.Repeater Experiment
7. Xiaozhi AI Voice
  • 1. Burn Xiaozhi Firmware
  • 2. Network and Configuration
  • 3. AI Agent Settings
  • 4. Program Analysis
  • 5. Free Chat
3. Arduino Development Course
1. Before Development
  • 1. Environment Setup
  • 2. Build and Flash
2. Basic Peripherals
  • 1. LED Control
  • 2. Button Detection
  • 3. Peripheral Interrupts
  • 4. ESP_TIMER
  • 5. GPTIMER
  • 6. Watchdog Timer
  • 7. ADC
  • 8. PWM Breathing LED
  • 9. RGB LED Effects
3. Serial Communication and Storage System
  • 1. Serial UART Communication
  • 2. I2C OLED Display
  • 3. SPI Bus Communication
  • 4. Flash Read and Write
  • 5. USB Emulated Mass Storage
4. Network Protocols and Wireless Communication
  • 1. WIFI Network Basics
  • 2. WIFI STA Mode
  • 3. WIFI AP Mode
  • 4. UDP Server Experiment
  • 5. UDP Client Experiment
  • 6. TCP Client Experiment
  • 7. TCP Server Experiment
  • 8. HTTP Client Experiment
  • 9. HTTP Server Experiment
  • 10. MQTT IoT Communication Protocol
  • 11. WIFI OTA Upgrade
  • 12. Bluetooth Fundamentals
  • 13. Bluetooth Slave Mode
  • 14. Bluetooth Master Mode
5. Audio Applications
  • 1.I2S Microphone Recording and U-Disk Playback
  • 2.I2S Audio Playback Experiment
  • 3.Repeater Experiment
4. MicroPython Development Course
1. Before Development
  • 1. Environment Setup
  • 2. Build and Flash
  • 3. Thonny IDE
2. Basic Peripherals
  • 1. LED Control
  • 2. Button Detection
  • 3. Peripheral Interrupts
  • 4. TIMER_IT
  • 5. Watchdog Timer
  • 6. ADC
  • 7. PWM Breathing LED
  • 8. RGB LED Effects
3. Serial Communication and Storage System
  • 1. Serial UART Communication Experiment
  • 2. I2C_OLED Display Experiment
  • 3. SPI Bus Communication Experiment
  • 4. Flash Read and Write Experiment
  • 5. Print Storage
4. Network Protocols and Wireless Communication
  • 1. WIFI Network Basics
  • 2. WIFI STA Mode
  • 3. WIFI AP Mode
  • 4. UDP Client Experiment
  • 5. UDP Server Experiment
  • 6. TCP Client Experiment
  • 7. TCP Server Experiment
  • 8. HTTP Client Experiment
  • 9. HTTP Server Experiment
  • 10. MQTT
  • 11. Bluetooth Fundamentals
  • 12. Bluetooth Slave Mode
  • 13. Bluetooth Master Mode
5. Audio Applications
  • 1. I2S Audio Playback Experiment
  • 2. Repeater Experiment
Download
  • Code
  • Hardware_Info
  • 3D_Model_File
  • Software_Tools
  • VMware
  • VM_File
Download ZIP

Welcome to ESP32 Core Board repository

3. Dev Board Introduction

Dev Board Introduction


Dev Board Introduction1. Development Board Overview1.1 Core Board Photo1.2 Core Specifications at a Glance2. Module Details — ESP32-S3-WROOM-1-N16R82.1 Model Decoding2.2 Module Internal Structure3. Complete Pin Mapping3.1 Fixed-Function Pins (Cannot Be Repurposed)3.2 Available GPIOs (Allocate as Needed)3.3 I2C Device Address Table4. Peripheral Details4.1 Hardware Distribution Diagram4.2 Power System4.3 USB Interfaces4.4 CH340K USB-to-Serial4.5 WS2812 RGB LED4.6 Audio SystemES8311 Audio CodecNS4150 Amplifier4.7 SSD1306 OLED Display4.8 Buttons5. PSRAM and Flash Usage Notes5.1 Flash Partition Layout (MicroPython Firmware Example)5.2 PSRAM Memory Mapping6. Typical Development Wiring6.1 Basic Debugging Wiring6.2 Using USB OTG6.3 Connecting External I2C Devices


1. Development Board Overview

The core board used in this tutorial is the ESP32-S3 full-featured development board, equipped with the official Espressif module ESP32-S3-WROOM-1-N16R8 (16 MB Flash + 8 MB Octal PSRAM). It features an on-board ES8311 audio codec + MEMS microphone + NS4150 amplifier + speaker connector + SSD1306 OLED display + WS2812 RGB LED, making it a full-featured teaching platform covering GPIO, audio, display, USB, and wireless communication.

1.1 Core Board Photo

Core board photo

1.2 Core Specifications at a Glance

ItemSpecification
Main control moduleESP32-S3-WROOM-1-N16R8
Flash16 MB (Octal SPI, N stands for Octal)
PSRAM8 MB (Octal SPI)
PCB antennaOn-board ceramic / PCB antenna (built into WROOM-1)
USB-to-serialCH340K (USB-C connector), auto-download circuit
Native USB OTGUSB-C connector (GPIO19 / GPIO20), supports Device / Host
Audio codecES8311 (I2S full duplex + I2C control)
AmplifierNS4150 (3W Class D, enabled by GPIO7)
MicrophoneOn-board MEMS analog microphone (sampled through the ES8311 ADC)
Speaker connector2-pin PH socket / solder pads
DisplaySSD1306 128×32 monochrome OLED (I2C)
RGB LEDWS2812 × 1 (GPIO48, on-board LED)
ButtonsBOOT (GPIO0) + RST (EN)
Power supplyUSB-C 5V → 3.3V LDO
Pin headers2.54 mm standard spacing, dual-row, breadboard compatible
DimensionsApprox. 55 × 28 mm

2. Module Details — ESP32-S3-WROOM-1-N16R8

2.1 Model Decoding

ESP32-S3-WROOM-1-N16R8
          │      ││ ││
          │      ││ │└── R8: 8 MB Octal PSRAM
          │      ││ └──── R: with PSRAM
          │      │└──────16: 16 MB Flash
          │      └─────── N: Octal SPI Flash
          └──────── WROOM-1: built-in PCB antenna module
DesignatorOptionsMeaning
Flash interfaceN (Octal), Q (Quad)N is faster and is the standard configuration for N16R8
Flash capacity4 / 8 / 16 (MB)N16 = 16 MB
PSRAM capacity2 / 8 (MB)R8 = 8 MB
AntennaWROOM-1 (on-board) / WROOM-1U (IPEX external)This board uses WROOM-1

2.2 Module Internal Structure

xxxxxxxxxx
┌─────────────────────────────────────────┐
│         ESP32-S3-WROOM-1 module         │
│                                         │
│   ┌──────────────┐    ┌──────────────┐  │
│   │  ESP32-S3    │    │ Octal Flash  │  │
│   │  QFN56 chip  │◄──►│  16 MB       │  │
│   │              │    └──────────────┘  │
│   │              │    ┌──────────────┐  │
│   │              │◄──►│ Octal PSRAM  │  │
│   │              │    │  8 MB        │  │
│   └──────┬───────┘    └──────────────┘  │
│          │                              │
│   ┌──────┴───────────────────────────┐  │
│   │ RF matching network + PCB antenna│  │
│   └──────────────────────────────────┘  │
│                                         │
│   Dimensions: 18.0 × 25.5 × 3.1 mm      │
│   Operating temp: -40°C ~ +85°C         │
└─────────────────────────────────────────┘

Flash and PSRAM are connected to the ESP32-S3 through independent Octal SPI buses. PSRAM occupies GPIO33 ~ GPIO37 (internal connections), and these 5 GPIOs cannot be used for external wiring.


3. Complete Pin Mapping

3.1 Fixed-Function Pins (Cannot Be Repurposed)

GPIOFunctionDescription
0BOOT buttonInternal pull-up; pressed = 0; low at power-up enters download mode
3JTAG TMSUSB Serial/JTAG controller
7NS4150 PA enableHigh level = amplifier on
8I2S DOUTES8311 DAC data input (playback path)
15I2S MCLKES8311 master clock (4.096 MHz @ 16 kHz sample rate)
16I2S BCLKI2S bit clock
17I2S DINES8311 ADC data output (recording path)
18I2S WSI2S word select (left/right channel switching)
19USB OTG D-Native USB OTG data line D-
20USB OTG D+Native USB OTG data line D+
33 ~ 37PSRAM (Octal)Internally connected to PSRAM in the module, not usable externally
41I2C SDAShared I2C data line for ES8311 + SSD1306
42I2C SCLShared I2C clock line for ES8311 + SSD1306
43UART0 TXConnected to CH340K RX, used for serial print output
44UART0 RXConnected to CH340K TX, used for serial input reception
48WS2812 RGB LEDSingle-wire data pin (RMT driven)

Pin distribution diagram

Conflict warning: GPIO43/44 double as UART0 TX/RX. When using printf() / ESP_LOGI(), these two pins cannot be used for other peripherals at the same time (PWM on GPIO43 will corrupt the serial output).

3.2 Available GPIOs (Allocate as Needed)

The following GPIOs are brought out to the pin headers and do not conflict with on-board peripherals, so they can be freely used in experiments:

GPIOSpecial function (optional)Notes
1ADC1_CH0Can be used as ADC / normal IO
2ADC1_CH1Can be used as ADC / normal IO
4ADC1_CH3Can be used as ADC / normal IO
5ADC1_CH4Can be used as ADC / normal IO
6ADC1_CH5Can be used as ADC / normal IO
9—Normal IO
10FSPICS0Can be used as normal IO / SPI CS
11FSPIDSPI MOSI / normal IO
12FSPICLKSPI CLK / normal IO
13FSPIQSPI MISO / normal IO
14—Normal IO
21—Normal IO
38—Normal IO
39—Normal IO
40—Normal IO
45—Normal IO (Strapping pin: internal pull-down at power-up)
46—Normal IO (Strapping pin: internal pull-down at power-up)
47—Normal IO

Strapping pin reminder: GPIO0, GPIO45, and GPIO46 latch their levels at chip power-up to determine the boot mode. GPIO0 is connected to the BOOT button; GPIO45/46 have internal pull-downs. If external pull-up resistors are added, evaluate whether they affect the boot process.

3.3 I2C Device Address Table

ES8311 and SSD1306 share the same I2C bus formed by GPIO41/42:

DeviceI2C addressDescription
ES8311 audio codec0x187-bit address
SSD1306 OLED display0x3C128×32 monochrome

4. Peripheral Details

4.1 Hardware Distribution Diagram

Hardware distribution diagram

4.2 Power System

xxxxxxxxxx
USB-C (5V) ──→ resettable fuse ──→ Schottky diode ──→ 5V bus ──→ 3.3V LDO ──→ ESP32-S3 + peripherals
                                                       │
                                                       └──→ NS4150 amplifier (direct 5V)
Power parameterSpecification
Input voltageUSB-C 5V (typical)
LDO output3.3V / approx. 800 mA
Amplifier powerDirect 5V (NS4150 supports up to 5.5V)
Resettable fuse500 mA (auto-disconnects on overcurrent, recovers when cooled)
Reverse polarity protectionSchottky diode (blocks reverse current)

4.3 USB Interfaces

The board has two USB-C receptacles with independent functions:

Dual Type-C ports

USB portFunctionConnection
USB-UARTSerial debugging + flashing + 5V powerCH340K → ESP32-S3 UART0 (GPIO43/44), with RTS/DTR auto-download circuit
USB OTGNative USB OTG (Device / Host)ESP32-S3 built-in USB Serial/JTAG controller (GPIO19 = D-, GPIO20 = D+), 3.3V power

The USB OTG port connects directly to the ESP32-S3's built-in USB controller and does not supply power. This port can be used for USB applications such as USB microphone, USB MIDI, USB serial passthrough, and USB drive read/write. It is also the JTAG debug interface; hardware breakpoint debugging can be performed via idf.py openocd.

4.4 CH340K USB-to-Serial

ParameterDescription
Chip modelCH340K (by WCH)
ConnectionUSB-C ↔ UART0 (GPIO43=TX, GPIO44=RX)
Baud rateUp to 2 Mbps (115200 / 921600 recommended for stability)
Auto-downloadSupported (RTS → EN, DTR → BOOT, automatically triggers download mode via transistor circuit)
DriversWindows needs the CH340 driver; Linux kernel ≥ 3.x is driver-free; macOS needs a driver

CH340K is a small-package variant of the CH340 series (10×10 mm), functionally identical to CH340G/C.

4.5 WS2812 RGB LED

ParameterDescription
ModelWS2812-2020 (or compatible SK6812)
Quantity1 (on-board LED)
Data pinGPIO48
Power3.3V (from the LDO, not direct 5V)
Driving methodRMT peripheral (led_strip component) or bit-banged GPIO
Color formatGRB (green-red-blue), 8-bit each, 24-bit total
Reset code≥ 50 μs low level (T0H/T1H timing generated by the RMT hardware)

The standard WS2812 power supply is 5V, but on this board it still lights up normally at 3.3V (slightly dimmer). For full brightness, use an external LED strip with its own 5V supply.

4.6 Audio System

A complete audio capture and playback chain centered on the ES8311:

​x
┌────────────── Recording path (MIC → ESP32) ──────────────┐
│                                                          │
│  MEMS mic ──→ ES8311 ADC ──→ I2S DIN (GPIO17) ──→ ESP32  │
│                                                          │
└──────────────────────────────────────────────────────────┘

┌──────────── Playback path (ESP32 → SPK) ─────────────────────────┐
│                                                                  │
│  ESP32 ──→ I2S DOUT (GPIO8) ──→ ES8311 DAC ──→ NS4150 PA ──→ SPK │
│                                            (GPIO7 enable)        │
└──────────────────────────────────────────────────────────────────┘

┌────────────────── Control path (I2C) ──────────────────────────┐
│                                                                │
│  ESP32 I2C (GPIO41/42) ──→ ES8311 (0x18)   register config     │
│                         ──→ SSD1306 (0x3C)  display content    │
│                                                                │
└────────────────────────────────────────────────────────────────┘

ES8311 Audio Codec

ParameterSpecification
ModelES8311 (Everest)
Resolution24-bit ADC / DAC
Sample rate8 kHz ~ 96 kHz (16 kHz commonly used in this tutorial)
InterfaceI2S (Philips standard format, 16-bit) + I2C control
Operating modeSlave mode (MCLK / BCLK / WS provided by ESP32)
Analog inputMEMS microphone (single-ended / differential)
Analog outputHeadphone / Line-out (connected to NS4150 amplifier)
MCLK4.096 MHz = 256 × 16 kHz (sample rate × 256)
I2C address0x18 (7-bit)

NS4150 Amplifier

ParameterSpecification
ModelNS4150 (Class D audio amplifier)
Output power3W @ 5V / 4Ω (typical)
Enable pinGPIO7 (high level to enable)
Power supplyDirect 5V (not through the LDO)
Speaker connector2-pin 1.25 mm PH socket

Power-on/off timing note: keep the PA off (GPIO7=0) before initializing the ES8311, then pull it high after initialization to avoid pop noise.

4.7 SSD1306 OLED Display

ParameterSpecification
Driver ICSSD1306
Resolution128 × 32 pixels (monochrome white)
InterfaceI2C (SDA=GPIO41, SCL=GPIO42)
I2C address0x3C (7-bit)
SizeApprox. 0.91 inch
Power3.3V

SSD1306 and ES8311 share the same I2C bus (GPIO41/42). During initialization, create one i2c_bus_ handle and pass it to both.

4.8 Buttons

ButtonGPIODefault statePressed levelFunction
BOOTGPIO0Pulled highLow (0)At runtime = user button; low at power-up = enter download mode
RSTEN (CHIP_PU)Pulled highLow (0)Hardware reset (bypasses the program, directly pulls the chip EN pin low)

Manual download mode: hold BOOT → tap RST → release BOOT. The auto-download circuit triggers this sequence automatically via RTS/DTR signals, so manual operation is generally unnecessary.

Hardware feature 1


5. PSRAM and Flash Usage Notes

5.1 Flash Partition Layout (MicroPython Firmware Example)

The MicroPython firmware has a built-in partition table. After flashing, the remaining space is automatically used as the /flash file system. Typical layout:

xxxxxxxxxx
0x000000 ┌──────────────────┐
         │  Bootloader      │  ~ 16 KB
0x008000 ├──────────────────┤
         │  Partition Table │  ~ 4 KB
0x009000 ├──────────────────┤
         │  MicroPython     │  ~ 1.5 MB (Python interpreter + hardware drivers)
         │  firmware        │
         ├──────────────────┤  ← firmware end address ≈ 0x1A0000
         │  LittleFS        │  ~ 14 MB (/flash file system, stores .py scripts)
         │  file system     │
0x1000000└──────────────────┘  ← end of 16 MB Flash

5.2 PSRAM Memory Mapping

The 8 MB Octal PSRAM is mapped into the ESP32-S3's external address space. After enabling CONFIG_SPIRAM, it can be dynamically allocated in FreeRTOS with the MALLOC_CAP_SPIRAM flag. After flashing the MicroPython firmware, PSRAM is automatically available (enabled in the GENERIC_S3_SPIRAM_OCT firmware). At the Python level, use gc.mem_free() to view remaining memory (SRAM only); PSRAM is managed automatically by the interpreter internally.


6. Typical Development Wiring

6.1 Basic Debugging Wiring

xxxxxxxxxx
ESP32-S3 dev board ── USB-C cable ──→ PC USB port (UART port)

No external wiring needed; one USB cable handles power + serial print + flashing.

6.2 Using USB OTG

Simulated USB drive

xxxxxxxxxx
ESP32-S3 dev board ── USB-C cable ──→ PC USB port (OTG port)
                                           ↑
                        enable USB Device feature in code

The OTG port does not supply power; the board must be powered simultaneously through the UART port (or via 5V/GND on the pin headers).

6.3 Connecting External I2C Devices

The on-board I2C bus already has ES8311 + SSD1306 attached. External devices can be connected in parallel to GPIO41 (SDA) and GPIO42 (SCL) on the pin headers. Note the following:

  • The external device's I2C address must not conflict with 0x18 (ES8311) or 0x3C (SSD1306)

  • Pull-up resistors are provided by the on-board devices; no additional pull-ups are needed for external devices

  • Bus speed recommended ≤ 400 kHz (Fast Mode)


Environment Setup Introduction
Environment Setup (Windows)

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文