
ESP-32S User Manual
FCC STATEMENT
This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions:
(1) This device may not cause harmful interference.
(2) This device must accept any interference received, including interference that may cause undesired
operation.
Any changes or modifications not expressly approved by the party responsible for compliance could void the
user’s authority to operate the equipment.
Please notice that if the FCC identification number is not visible when the module is installed inside another
device, then the outside of the device into which the module is installed must also display a label referring to
the enclosed module. This exterior label can use wording such as the following: “Contains FCC ID:
2AHMR-ESP32S” any similar wording that expresses the same meaning may be used.
This equipment complies with FCC radiation exposure limits set forth for an uncontrolled environment. This
equipment should be installed and operated with a minimum distance of 20cmbetween the radiator & your
body. This transmitter must not be co-located or operating in conjunction with any other antenna or
transmitter.
The module is limited to OEM installation ONLY.
The OEM integrator is responsible for ensuring that the end-user has no manual instruction to remove or
install module.
The module is limited to installation in mobile application;
A separate approval is required for all other operating configurations, including portable configurations with
respect to Part 2.1093 and difference antenna configurations.
There is requirement that the grantee provide guidance to the host manufacturer for compliance with Part
15B requirements.
Copyright © 2017 Ai-Thinker Technology Co., Ltd. All rights reserved.

ESP-32S User Manual
Contents
1.Preface
................................................................................................................................................
1
2. Pin Definitions
....................................................................................................................................
3
2.1 Pin Layout
.................................................................................................................................
3
2.2 Pin Description
.........................................................................................................................
4
2.3 Strapping Pins
...........................................................................................................................
5
3. Functional Description
.......................................................................................................................
7
3.1 CPU and Internal Memory
........................................................................................................
7
3.2 External Flash and SRAM
..........................................................................................................
7
3.3 Crystal Oscillators
.....................................................................................................................
7
3.4 Power Consumption
.................................................................................................................
8
3.5 Peripherals and Sensors
...........................................................................................................
9
3.5.1 Peripherals and Sensors Description
.............................................................................
9
3.5.2 Peripheral Schematics
.................................................................................................
14
4. Electrical Characteristics
..................................................................................................................
15
4.1 Absolute Maximum Ratings
...................................................................................................
15
4.2 Recommended Operating Conditions
....................................................................................
15
4.3 Digital Terminal Characteristics
.............................................................................................
15
4.4 Wi-Fi Radio
.............................................................................................................................
16
4.5 Bluetooth LE Radio
.................................................................................................................
16
4.5.1 Receiver
.......................................................................................................................
16
4.5.2 Transmit
......................................................................................................................
17
4.6 Reflow Profile
.........................................................................................................................
17
5. Schematics
.......................................................................................................................................
18

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
1.Preface
ESP-32S is a powerful, generic Wi-Fi +BT+BLE MCU module that targets a wide variety of applications,
ranging from low-power sensor networks to the most demanding tasks, such as voice encoding, music
streaming and MP3 decoding.
At the core of this module is the ESP32-D0WDQ6 chip*, which is designed to be scalable and adaptive. There
are two CPU cores that can be individually controlled or powered, and the clock frequency is adjustable from
80 MHz to 240 MHz . The user may also power off the CPU and make use of the low-power coprocessor to
constantly monitor the peripherals for changes or crossing of thresholds. ESP32 integrates a rich set of
peripherals, ranging from capacitive touch sensors, Hall sensors, low-noise sense amplifiers, SD card
interface, Ethernet, high speed SDIO/SPI, UART, I2S and I2C.
The integration of Bluetooth, Bluetooth LE and Wi-Fi ensures that a wide range of applications can be
targeted, and that the module is future proof: using Wi-Fi allows a large physical range and direct connection
to the internet through a Wi-Fi router, while using Bluetooth allows the user to conveniently connect to the
phone or broadcast low energy beacons for its detection. The sleep current of the ESP32 chip is less than 5
µA, making it suitable for battery powered and wearable electronics applications. ESP-32S supports data
rates of up to 150 Mbps, and 22 dBm output power at the PA to ensure the widest physical range. As such
the chip does offer industry-leading specifications and the best performance for electronic integration, range,
power consumption, and connectivity.
The operating system chosen for ESP32 is free RTOS with LWIP; TLS 1.2 with hardware acceleration is built in
as well. Secure (encrypted) over the air (OTA) upgrade is also supported, so that developers can continually
upgrade their products even after their release.
Table 1 provides the specifications of ESP-32S.
Table 1: ESP-32S Specifications
FCC/CE/IC/TELEC/KCC/SRRC/NCC
802.11 b/g/n/d/e/i/k/r (802.11n up to 150 Mbps)
A-MPDU and A-MSDU aggregation and 0.4 µs guard
interval support
Bluetooth v4.2 BR/EDR and BLE specification
NZIF receiver with -98 dBm sensitivity
Class-1, class-2 and class-3 transmitter

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
Module interface
SD card, UART, SPI, SDIO, I2C, LED PWM, Motor PWM,
GPIO, capacitive touch sensor, ADC, DAC, LNA pre-
amplier
Hall sensor, temperature sensor
Operating temperature range
Ambient temperature range
Station/SoftAP/SoftAP+Station/P2P
WPA/WPA2/WPA2-Enterprise/WPS
UART Download / OTA (via network) / download and
write firmware via host
Supports Cloud Server Development / SDK for custom
firmware development
IPv4, IPv6, SSL, TCP/UDP/HTTP/FTP/MQTT
AT instruction set, cloud server, Android/iOS app

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
2. Pin Definitions
2.1 Pin Layout
Figure 1: Top and Side View of ESP-32S
Table 2: ESP-32S Dimensions

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
2.2 Pin Description
ESP -32S has 39 pins. See pin definitions in Table 3.
Table 3: ESP-32S Pin Definitions
Chip-enable signal. Active high.
4IGPI036, SENS0R_VP, ADC_H, ADC1_CH0, RTC_GPI00
5IGPI039, SENS0R_VN, ADC1_CH3, ADC_H, RTC_GPI03
6IGPI034, ADC1_CH6, RTC_GPI04
7IGPI035, ADC1_CH7, RTC_GPI05
GPI032, XTAL_32K_P (32.768 kHz crystal oscillator input), ADC1_CH4,
T0UCH9, RTC_GPI09
GPI033, XTAL_32K_N (32.768 kHz crystal oscillator output), ADC1_CH5,
T0UCH8, RTC_GPI08
GPI025, DAC_1, ADC2_CH8, RTC_GPI06, EMAC_RXD0
GPI026, DAC_2, ADC2_CH9, RTC_GPI07, EMAC_RXD1
GPI027, ADC2_CH7, T0UCH7, RTC_GPI017, EMAC_RX_DV
GPraM,ADC2_CH6, T0UCH6,MTMS, HSPHK, HS2_CLK, SD_CLK,
EMAC_TXD2
GPI012, ADC2_CH5, T0UCH5, RTC_GPI015, MTDL HSPIQ, HS2_DATA2,
SD_DATA2, EMAC_TXD3
GPI013, ADC2_CH4, T0UCH4, RTC_GPI014, MTCK, HSPID, HS2_DATA3,
SD_DATA3, EMAC_RX_ER
GPIO9, SD_DATA2, SPIHD, HS1_DATA2, U1RXD
GPIO10, SD_DATA3, SPIWP, HS1_DATA3, U1TXD
GPIO11, SD_CMD, SPICSO, HS1_CMD, U1RTS
GPIO6, SD_CLK, SPICLK, HS1_CLK, U1CTS
GPIO7, SD_DATA0, SPIQ, HS1_DATA0, U2RTS
GPIO8, SD_DATA1, SPID, HS1_DATA1, U2CTS
GPIO15, ADC2_CH3, T0UCH3, MTD0, HSPICSO, RTC_GPI013, HS2_CMD,
SD_CMD, EMAC_RXD3
GPIO2, ADC2_CH2, T0UCH2,HSPIWP, HS2_DATA0, SD_DATA0
GPIO0, ADC2_CH1, T0UCH1, CLK_0UT1, EMAC_TX_CLK
GPIO4,ADC2_CH0,T0UCH0, RTC_GPI010, HSPIHD, HS2_DATA1,
SD_DATA1, EMAC_TX_ER
GPIO16, HS1_DATA4, U2RXD, EMAC_CLK_0UT
GPIO17, HS1_DATA5, U2TXD, EMAC_CLK_0UT_180
GPIO5, VSPICSO, HS1_DATA6, EMAC_RX_CLK
GPIO19, VSPIQ, UOCTS, EMAC—TXDO

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
GPIO21, VSPIHD, EMAC_TX_EN
GPIO1, U0TXD, CLK_OUT3, EMAC_RXD2
GPIO22, VSPIWP,U0RTS, EMAC_TXD1
GPIO23, VSPID, HS1_STROBE
2.3 Strapping Pins
ESP32-D0WDQ6 has five strapping pins. Software can read the value of these five bits from the register
”GPIO_STRAPPING”. During the chip power-on reset, the latches of the strapping pins sample the voltage
level as strapping bits of ”0” or ”1”,and hold these bits until the chip is powered down or shut down.
Each strapping pin is connected with its internal pull-up/pull-down during the chip reset. Consequently, if a
strap-ping pin is unconnected or the connected external circuit is high-impedance, the internal weak
pull-up/pull-down will determine the default input level of the strapping pins.
To change the strapping bit values, users can apply the external pull-down/pull-up resistances, or apply the
host MCU5s GPIOs to control the voltage level of these pins when powering ESP32 on.
After reset, the strapping pins work as the normal functions pins.
Refer to Table 4 for detailed boot modes of configuration by strapping pins.
Table 4: Strapping Pins
Voltage of Internal LDO (VDD_SDIO)
Debugging Log on U0TXD During Booting
Falling-edge Input
Falling-edge Output
Falling-edge Input
Rising-edge Output
Rising-edge Input
Falling-edge Output
Rising-edge Input
Rising-edge Output
Note:
* Pins SCK/CLK,SDO/SD0, SDI/SD1, SHD/SD2, SWP/SD3 and SCS/CMD, namely, GPIO6 to GPIO11 are
connected to the integrated SPI flash integrated on ESP-32S and are not recommended for other uses.

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
Note:
Firmware can configure register bits to change the settings of ”Voltage of Internal LDO(VDD_SDIO)”
and ”Timing of SDIO Slave” after booting.

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
3. Functional Description
This chapter describes the modules and functions integrated in ESP-32S.
3.1 CPU and Internal Memory
ESP32-DOWDQ6 contains two low-power Xtensa® 32-bit LX6 microprocessors. The internal memory
includes:
•
448 KB of ROM for booting and core functions.
• 520 KB of on-chip SRAM for data and instruction.
• 8KB of SRAM in RTC, which is called RTC SLOW Memory and can be accessed by the co-processor during
•
8 KB of SRAM in RTC, which is called RTC FAST Memory and can be used for data storage; it is accessed
by the main CPU during RTC Boot from the Deep-sleep mode.
• 1 kbit of eFuse, of which 256 bits are used for the system (MAC address and chip configuration) and the
remaining 768 bits are reserved for customer applications, including Flash-Encryption and Chip-ID.
3.2 External Flash and SRAM
ESP32-DOWDQ6 supports up to four 16-MB external QSPI flash and SRAM with hardware encryption based
on AES to protect developer’s programs and data.
ESP32 can access the external QSPI flash and SRAM through high-speed caches.
• Up to 16 MB of external flash are memory-mapped onto the CPU code space, supporting 8, 16 and
32-bit access. Code execution is supported.
• Up to 8 MB of external flash/SRAM are memory-mapped onto the CPU data space, supporting 8, 16 and
32-bit access. Data-read is supported on the flash and SRAM. Data-write is supported on the SRAM.
ESP-32S integrates 4 MB of external SPI flash. The 4-MB SPI flash can be memory-mapped onto the CPU code
space, supporting 8, 16 and 32-bit access. Code execution is supported. The integrated SPI flash is connected
to GPIO6, GPIO7, GPIO8, GPIO9, GPIO10 and GPIO11. These six pins cannot be used as regular GPIO.
3.3 Crystal Oscillators
The frequencies of the main crystal oscillator supported include 40 MHz, 26 MHz and 24 MHz. The accuracy
of crystal oscillators applied should be ±10PPM,and the operating temperature ranges from-40°C to 85°C.
When using the downloading tools, remember to select the right crystal oscillator type. In circuit design,
capacitors C1 and C2 that connect to the earth are added to the input and output terminals of the crystal
oscillator, respectively. The values of the two capacitors can be flexible, ranging from 6 pF to 22 pF. However,
the specific capacitive values of C1 and C2 depend on further tests and adjustments of the overall
performance of the whole circuit. Normally, the capacitive values ofC1 and C2 are within 10 pF when the
crystal oscillator frequency is 26 MHz, or 10 pF<C1 and C2<22 pF when the crystal oscillator frequency is 40
MHz.
The frequency of the RTC crystal oscillator is typically 32 kHz or 32.768 kHz. The accuracy can be out of the
range of ±20 PPM, when the internal calibration is applied to correct the frequency offset. When the chip

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
operates in low-power modes, the application chooses the external low-speed (32 kHz) crystal clock, rather
than the internal RC oscillators, to achieve the accurate wakeup time.
3.4 Power Consumption
With the advanced power management technology, ESP32-D0WDQ6 can switch between different power
modes as follows:
- Active mode: chip radio is powered on. The chip can receive, transmit, or listen.
- Modem-sleep mode: the CPU is operational and the clock is configurable. Wi-Fi / Bluetooth
baseband and radio are disabled.
- Light-sleep mode: the CPU is paused. The RTC and ULP-coprocessor are running. Any wake-up
events (MAC, host, RTC timer, or external interrupts) will wake up the chip.
- Deep-sleep mode: Only RTC is powered on. Wi-Fi and Bluetooth connection data are stored in RTC
memory. The ULP-coprocessor can work.
- Hibernation mode: The internal 8MHz oscillator and ULP-coprocessor are disabled. The RTC
recovery memory is powered down. Only one RTC timer on the slow clock and some RTC GPIOs are
active. The RTC timer or the RTC GPIOs can wake up the chip from the Hibernation mode.
- Association sleep pattern: The power mode switches between the active mode and
Modem-sleep/Light- sleep mode during this sleep pattern. The CPU, Wi-Fi, Bluetooth, and radio
wake up at pre-determined intervals to keep Wi-Fi / BT connections on.
- ULP sensor-monitored pattern: The main CPU is in the Deep-sleep mode. The ULP co-processor does
sensor measurements and wakes up the main system, based on the measured data from sensors.
The power consumption varies with different power modes/sleep patterns, and work status, of functional
modules (see Table 5).
Table 5: Power Consumption by Power Modes
Wi-Fi Tx packet 13 dBm ~ 21 dBm
Wi-Fi / BT Tx packet 0 dBm
Wi-Fi / BT Rx and listening
Association sleep pattern (by Light-
0.9 mA@DTIM3, 1.2 mA@DTIM1
The CPU is powered on.
Max speed: 20 mA
The ULP-coprocessor is powered on.
ULP sensor-monitored pattern

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
3.5 Peripherals and Sensors
3.5.1 Peripherals and Sensors Description
Table 6: Peripherals and Sensors Description
Provides about 60dB gain by using larger
Capacitive touch sensors
TOUCH5

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
Supports SD memory card V3.01 standard
Three channels of 16-bit timers generate
16 independent channels @80MHz
Two UART devices with hardware
Two I2C devices in slave or master modes

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
I2S0l_DATA_in0~15
I2SOO_BCK_in
I2S0O_WS_in
I2S0I_BCK_in
I2S0I_WS_in
I2S0I_H_SYNC
I2S0I_V_SYNC
I2S0I_H_ENABLE
I2S0O_BCK_out
I2S0O_WS_out
I2S0I_BCK_out
I2S0I_WS_out
I2S0O_DATA_out0~23
I2S1l_DATA_inO~15
I2S1O_BCK_in
I2S1O_WS_in
I2S1I_BCK_in
I2S1LWS_in
I2S1LH_SYNC
I2S1I_V_SYNC
I2S1I_H_ENABLE
I2S1O_BCK_out
I2S1O_WS_out
I2S1l_BCK_out
I2S1l_WS_out
I2S1O_DATA_outO~23
Stereo input and output from/to the audio
codec, and parallel LCD data output
RMT_SIG_IN0~7
RMT_SIG_OUTO~7
Eight channels of IR transmitter and
receiver for various waveforms

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
Supports Standard SPI, Dual SPI, and
Quad SPI that can be connected to the
Standard SPI consists of clock,
chip-select, MOSI and MISO. These SPIs
can be connected to LCD and other
external devices. They support the
• both master and slave modes;
• 4 sub-modes of the SPI format
transfer that depend on the clock
phase (CPHA) and clock polarity
(CPOL) control;
• CLK frequencies by a divider;
• up to 64 bytes of FIFO and DMA.
JTAG for software debugging
MTMS

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
SDIO interface that conforms to the
industry standard SDIO 2.0 card
specification. On ESP -32S these pins are
connected to the integrated SPI flash.
Ethernet MAC with MII/RMII interface
EMAC_RXD1
• Functions of Motor PWM,LEDPWM,UART,l2C,l2S,general purpose SPI and Remote Controller can be
configured to any GPIO except GPIO6,GPIO7,GPIO8,GPIO9,GPIO10 and GPIO11.
•
In Table6, for the items marked with ”Any GPIOs*” in the ”Pin” column, users should note that
GPIO6, GPIO7, GPIO8, GPIO9, GPIO10 and GPIO11 are connected to the integrated SPI flash of
ESP-32S and are not recommended for other uses.

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
3.5.2 Peripheral Schematics
Figure 2: ESP-32S Peripheral Schematics
Note:
The MTDI should be kept at low electric level.

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
4. Electrical Characteristics
4.1 Absolute Maximum Ratings
Table 7: Absolute Maximum Ratings
Maximum soldering temperature
4.2 Recommended Operating Conditions
Table 8: Recommended Operating Conditions
4.3 Digital Terminal Characteristics
Table 9: Digital Terminal Characteristics
Note:
The specifications in this chapter have been tested under the following generalcondition: Vbat =3.3V’Ta
=27°C,unless otherwise specified.

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
4.4 Wi-Fi Radio
Table 10: Wi-Fi Radio Characteristics
Adjacent Channel Rejection
4.5 Bluetooth LE Radio
4.5.1 Receiver
Table 11: Receiver Characteristics - BLE
Maximum received signal @0.1% BER
Adjacent channel selectivity C/I
F = F0 + 2 MHz
Out-of-band blocking performance
2000 MHz - 2400 MHz

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
4.5.2 Transmit
Table 12: Transmit Characteristics – BLE
Adjacent channel transmit power
4.6 Reflow Profile
Table 13: Reflow Profile
Ts max to TL (Ramp-up Rate)
Preheat
Temperature Min. (Ts Min.)
Temperature Typ. (Ts Typ.)
Temperature Min. (Ts Max.)
Time (Ts)
150°C
175°C
200°C
60 ~180 seconds
Time maintained above: -Temperature (TL)/Time (TL)
260°C max, for 10 seconds
Target peak temperature (Tp Target)
Time within 5°C of actual peak (tp)
Ts max to TL (Ramp-down Rate)
Tune25°C to Peak Temperature (t)

ESP-32S User Manual
Shenzhen Ai-Thinker Technology Co., Ltd http://www.ai-thinker.com
5. Schematics
Figure 3: ESP-32S Schematics
Note:
The capacitance of Gland C2 varies with the selection of the crystal.