Schematic Checklist
The integrated circuitry of ESP32-S2 requires only 20 electrical components (resistors, capacitors, and inductors) and a crystal, as well as an SPI flash. The high integration of ESP32-S2 allows for simple peripheral circuit design. This chapter details the schematic design of ESP32-S2.
The following figure shows a reference schematic design of ESP32-S2. It can be used as the basis of your schematic design.
Any basic ESP32-S2 circuit design may be broken down into the following major building blocks:
The rest of this chapter details the specifics of circuit design for each of these sections.
Power Supply
The general recommendations for power supply design are:
When using a single power supply, the recommended power supply voltage is 3.3 V and the output current is no less than 500 mA.
It is suggested to add an ESD protection diode at the power entrance.
More information about power supply pins can be found in ESP32-S2 Series Datasheet > Section Power Supply.
Digital Power Supply
ESP32-S2 has pin27 VDD3P3_RTC_IO and pin45 VDD3P3_CPU as the digital power supply pin(s) working in a voltage range of 3.0 V ~ 3.6 V and 2.8 V ~ 3.6 V. It is recommended to add an extra 0.1 μF decoupling capacitor close to the pin(s).
Pin VDD_SPI can serve as the power supply for the external device at either 1.8 V or 3.3 V (default). It is recommended to add extra 0.1 μF and 1 μF decoupling capacitors close to VDD_SPI.
When VDD_SPI operates at 1.8 V, it is powered by ESP32-S2’s internal LDO. The typical current this LDO can offer is 40 mA.
When VDD_SPI operates at 3.3 V, it is driven directly by VDD3P3_RTC through a 5 Ω resistor, therefore, there will be some voltage drop from VDD3P3_RTC.
Attention
When using VDD_SPI as the power supply pin for in-package or off-package 3.3 V flash/PSRAM, the supply voltage should be 3.0 V or above, so as to meet the requirements of flash/PSRAM’s working voltage.
VDD_SPI can also be driven by an external power supply.
The schematic for the digital power supply pins is shown in Figure ESP32-S2 Schematic for Digital Power Supply Pins.
Analog Power Supply
ESP32-S2’s VDDA, VDD3P3, and VDD3P3_RTC pins are the analog power supply pins, working at 2.8 V ~ 3.6 V.
For VDD3P3, when ESP32-S2 is transmitting signals, there may be a sudden increase in the current draw, causing power rail collapse. Therefore, it is highly recommended to add a 10 μF capacitor to the power rail, which can work in conjunction with the 0.1 μF capacitor(s).
Add a LC circuit on the VDD3P3 power rail to suppress high-frequency harmonics. The inductor’s rated current is preferably 500 mA and above.
Place appropriate decoupling capacitors near the other analog power pins according to Figure ESP32-S2 Schematic for Analog Power Supply Pins.
Chip Power-up and Reset Timing
ESP32-S2’s CHIP_PU pin can enable the chip when it is high and reset the chip when it is low.
When ESP32-S2 uses a 3.3 V system power supply, the power rails need some time to stabilize before CHIP_PU is pulled up and the chip is enabled. Therefore, CHIP_PU needs to be asserted high after the 3.3 V rails have been brought up.
To reset the chip, keep the reset voltage VIL_nRST in the range of (–0.3 ~ 0.25 × VDD) V. To avoid reboots caused by external interferences, make the CHIP_PU trace as short as possible.
Figure ESP32-S2 Power-up and Reset Timing shows the power-up and reset timing of ESP32-S2.
Table Description of Timing Parameters for Power-up and Reset provides the specific timing requirements.
Parameter |
Description |
Minimum (µs) |
---|---|---|
tSTBL |
Time reserved for the power rails to stabilize before the CHIP_PU pin is pulled high to activate the chip |
50 |
tRST |
Time reserved for CHIP_PU to stay below VIL_nRST to reset the chip |
50 |
Attention
CHIP_PU must not be left floating.
To ensure the correct power-up and reset timing, it is advised to add an RC delay circuit at the CHIP_PU pin. The recommended setting for the RC delay circuit is usually R = 10 kΩ and C = 1 μF. However, specific parameters should be adjusted based on the characteristics of the actual power supply and the power-up and reset timing of the chip.
If the user application has one of the following scenarios:
Slow power rise or fall, such as during battery charging.
Frequent power on/off operations.
Unstable power supply, such as in photovoltaic power generation.
Then, the RC circuit itself may not meet the timing requirements, resulting in the chip being unable to boot correctly. In this case, additional designs need to be added, such as:
Adding an external reset chip or a watchdog chip, typically with a threshold of around 3.0 V.
Implementing reset functionality through a button or the main controller.
Flash and PSRAM
ESP32-S2 requires in-package or off-package flash to store application firmware and data. In-package PSRAM or off-package RAM is optional.
Off-Package Flash and PSRAM
ESP32-S2 supports up to 1 GB off-package flash and 1 GB off-package RAM. If VDD_SPI is used to supply power, make sure to select the appropriate off-package flash and RAM according to the power voltage on VDD_SPI (1.8 V/3.3 V). It is recommended to add a zero-ohm series resistor on the SPI communication lines to lower the driving current, reduce interference to RF, adjust timing, and better shield from interference.
Currently, the ESP32-S2-WROVER module uses a 4 MB SPI flash and 2 MB PSRAM by default.
The schematic for ESP32-S2 flash and SRAM is shown in Figure ESP32-S2 Flash and SRAM.
Clock Source
ESP32-S2 supports two external clock sources:
External Crystal Clock Source (Compulsory)
The ESP32-S2 firmware only supports 40 MHz crystal.
The circuit for the crystal is shown in Figure ESP32-S2 Schematic for External Crystal. Note that the accuracy of the selected crystal should be within ±10 ppm.
Please add a series component (resistor or inductor) on the XTAL_P clock trace. Initially, it is suggested to use an inductor of 24 nH to reduce the impact of high-frequency crystal harmonics on RF performance, and the value should be adjusted after an overall test.
The initial values of external capacitors C1 and C4 can be determined according to the formula:
where the value of CL (load capacitance) can be found in the crystal’s datasheet, and the value of Cstray refers to the PCB’s stray capacitance. The values of C1 and C4 need to be further adjusted after an overall test as below:
Select TX tone mode using the Certification and Test Tool.
Observe the 2.4 GHz signal with a radio communication analyzer or a spectrum analyzer and demodulate it to obtain the actual frequency offset.
Adjust the frequency offset to be within ±10 ppm (recommended) by adjusting the external load capacitance.
When the center frequency offset is positive, it means that the equivalent load capacitance is small, and the external load capacitance needs to be increased.
When the center frequency offset is negative, it means the equivalent load capacitance is large, and the external load capacitance needs to be reduced.
External load capacitance at the two sides are usually equal, but in special cases, they may have slightly different values.
If an oscillator is used, its output should be connected to XTAL_P on the chip through a DC blocking capacitor (about 50 pF). XTAL_N can be floating. Please make sure that the oscillator output is stable and its accuracy is within ±10 ppm. It is also recommended that the circuit design for the oscillator is compatible with the use of the crystal, in case there is a defect in the circuit design, users can still use the crystal. The schematic for the crystal oscillator in ESP32-S2 is shown in Figure ESP32-S2 Schematic for Crystal Oscillator.
Note
Defects in the manufacturing of crystal (for example, large frequency deviation of more than ±10 ppm, unstable performance within the operating temperature range, etc) may lead to the malfunction of ESP32-S2, resulting in a decrease of the RF performance.
It is recommended that the amplitude of the crystal is greater than 500 mV.
When Wi-Fi or Bluetooth connection fails, after ruling out software problems, you may follow the steps mentioned above to ensure that the frequency offset meets the requirements by adjusting capacitors at the two sides of the crystal.
RTC Clock Source (Optional)
ESP32-S2 supports an external 32.768 kHz crystal to act as the RTC clock. The external RTC clock source enhances timing accuracy and consequently decreases average power consumption, without impacting functionality.
Figure ESP32-S2 Schematic for 32.768 kHz Crystal shows the schematic for the external 32.768 kHz crystal.
Please note the requirements for the 32.768 kHz crystal:
Equivalent series resistance (ESR) ≤ 70 kΩ.
Load capacitance at both ends should be configured according to the crystal’s specification.
The parallel resistor R is used for biasing the crystal circuit (5 MΩ < R ≤ 10 MΩ). In general, you do not need to populate the resistor.
If the RTC clock source is not required, then the pins for the 32.768 kHz crystal can be used as GPIOs.
RF
RF Circuit
ESP32-S2’s RF circuit is mainly composed of three parts, the RF traces on the PCB board, the chip matching circuit, the antenna and the antenna matching circuit. Each part should meet the following requirements:
For the RF traces on the PCB board, 50 Ω impedance control is required.
For the chip matching circuit, it must be placed close to the chip. A CLC structure is preferred.
The CLC structure is mainly used to adjust the impedance point and suppress harmonics, and a set of LC can be added if space permits.
The RF matching circuit is shown in Figure ESP32-S2 Schematic for RF Matching.
For the antenna and the antenna matching circuit, to ensure radiation performance, the antenna’s characteristic impedance must be around 50 Ω. Adding a CLC matching circuit near the antenna is recommended to adjust the antenna. However, if the available space is limited and the antenna impedance point can be guaranteed to be 50 Ω by simulation, then there is no need to add a matching circuit near the antenna.
RF Tuning
The RF matching parameters vary with the board, so the ones used in Espressif modules could not be applied directly. Follow the instructions below to do RF tuning.
Figure ESP32-S2 RF Tuning Diagram shows the general process of RF tuning.
In the matching circuit, define the port near the chip as Port 1 and the port near the antenna as Port 2. S11 describes the ratio of the signal power reflected back from Port 1 to the input signal power, the transmission performance is best if the matching impedance is conjugate to the chip impedance. S21 is used to describe the transmission loss of signal from Port 1 to Port 2. If S11 is close to the chip conjugate point (35+j0) and S21 is less than -35 dB at 4.8 GHz and 7.2 GHz, the matching circuit can satisfy transmission requirements.
Connect the two ends of the matching circuit to the network analyzer, and test its signal reflection parameter S11 and transmission parameter S21. Adjust the values of the components in the circuit until S11 and S21 meet the requirements. If your PCB design of the chip strictly follows the PCB design stated in Chapter PCB Layout Design, you can refer to the value ranges in Table Recommended Value Ranges for Components to debug the matching circuit.
Reference Designator |
Recommended Value Range |
Serial No. |
---|---|---|
C11 |
1.2 ~ 1.8 pF |
GRM0335C1H1RXBA01D |
L2 |
2.4 ~ 3.0 nH |
LQP03TN2NXB02D |
C12 |
1.8 ~ 1.2 pF |
GRM0335C1H1RXBA01D |
If the components are in the 0201 SMD package size, please use a stub in the PCB design of the RF matching circuit near the chip. If the antenna input impedance is not 50 ohm, an additional set of RF matching is recommended for antenna tuning.
If the usage or production environment is sensitive to electrostatic discharge, it is recommended to reserve ESD protection devices near the antenna.
Note
If RF function is not required, then the RF pin can be left floating.
UART
It is recommended to connect a 499 Ω series resistor to the U0TXD line to suppress the 80 MHz harmonics.
GPIO18 works as U1RXD and is in an uncertain state when the chip is powered on, which may affect the chip’s entry into download boot mode. To solve this issue, add an external pull-up resistor.
Usually, UART0 is used as the serial port for download and log printing. For instructions on download over UART0, please refer to Section Download Guidelines.
Other UART interfaces can be used as serial ports for communication, which could be mapped to any available GPIO by software configurations. For these interfaces, it is also recommended to add a series resistor to the TX line to suppress harmonics.
When using the AT firmware, please note that the UART GPIO is already configured (refer to Hardware Connection). It is recommended to use the default configuration.
SPI
When using the SPI function, to improve EMC performance, add a series resistor (or ferrite bead) and a capacitor to ground on the SPI_CLK trace. If space allows, it is recommended to also add a series resistor and capacitor to ground on other SPI traces. Ensure that the RC/LC components are placed close to the pins of the chip or module.
Strapping Pins
At each startup or reset, a chip requires some initial configuration parameters, such as in which boot mode to load the chip, etc. These parameters are passed over via the strapping pins. After reset, the strapping pins work as normal function pins.
All the information about strapping pins is covered in ESP32-S2 Series Datasheet > Section Strapping Pins. In this document, we will mainly cover the strapping pins related to boot mode.
After chip reset is released, the combination of GPIO0 and GPIO46 controls the boot mode. See Table Boot Mode Control.
Boot Mode |
GPIO0 |
GPIO46 |
---|---|---|
Default Config |
1 (Pull-up) |
0 (Pull-down) |
SPI Boot |
1 |
Any value |
Download Boot |
0 |
0 |
Invalid combination 1 |
0 |
1 |
- 1
This combination triggers unexpected behavior and should be avoided.
Signals applied to the strapping pins should have specific setup time and hold time. For more information, see Figure Setup and Hold Times for Strapping Pins and Table Description of Timing Parameters for Strapping Pins.
Parameter |
Description |
Minimum (ms) |
---|---|---|
tSU |
Time reserved for the power rails to stabilize before the chip enable pin (CHIP_PU) is pulled high to activate the chip. |
0 |
tH |
Time reserved for the chip to read the strapping pin values after CHIP_PU is already high and before these pins start operating as regular IO pins. |
3 |
Attention
Do not add high-value capacitors at GPIO0, otherwise, the chip may not boot successfully.
GPIO
The pins of ESP32-S2 can be configured via IO MUX or GPIO matrix. IO MUX provides the default pin configurations, whereas the GPIO matrix is used to route signals from peripherals to GPIO pins. For more information about IO MUX and GPIO matrix, please refer to ESP32-S2 Technical Reference Manual > Chapter IO MUX and GPIO Matrix.
Some peripheral signals have already been routed to certain GPIO pins, while some can be routed to any available GPIO pins. For details, please refer to ESP32-S2 Series Datasheet > Section Peripheral Pin Configurations.
When using GPIOs, please:
Pay attention to the states of strapping pins during power-up.
Pay attention to the default configurations of the GPIOs after reset. The default configurations can be found in Table IO MUX Pin Functions. It is recommended to add a pull-up or pull-down resistor to pins in the high-impedance state or enable the pull-up and pull-down during software initialization to avoid extra power consumption.
Avoid using the pins already occupied by flash/PSRAM.
GPIO33 ~ GPIO37 work in the same power domain VDD3P3_CPU, which can also be configured to VDD_SPI by software.
Pin No |
Pin Name |
Pin Type |
Pin Providing Power |
At Reset |
After Reset |
Digital Function0 |
RTC |
Analog |
---|---|---|---|---|---|---|---|---|
1 |
VDDA |
Power |
||||||
2 |
LNA_IN |
Analog |
||||||
3 |
VDD3P3 |
Power |
||||||
4 |
VDD3P3 |
Power |
||||||
5 |
GPIO0 |
IO |
VDD3P3_RTC_IO |
IE, WPU |
IE, WPU |
IO MUX |
RTC |
|
6 |
GPIO1 |
IO |
VDD3P3_RTC_IO |
IE |
IE |
IO MUX |
RTC |
Analog |
7 |
GPIO2 |
IO |
VDD3P3_RTC_IO |
IE |
IE |
IO MUX |
RTC |
Analog |
8 |
GPIO3 |
IO |
VDD3P3_RTC_IO |
IE |
IO MUX |
RTC |
Analog |
|
9 |
GPIO4 |
IO |
VDD3P3_RTC_IO |
IE |
IO MUX |
RTC |
Analog |
|
10 |
GPIO5 |
IO |
VDD3P3_RTC_IO |
IO MUX |
RTC |
Analog |
||
11 |
GPIO6 |
IO |
VDD3P3_RTC_IO |
IO MUX |
RTC |
Analog |
||
12 |
GPIO7 |
IO |
VDD3P3_RTC_IO |
IO MUX |
RTC |
Analog |
||
13 |
GPIO8 |
IO |
VDD3P3_RTC_IO |
IO MUX |
RTC |
Analog |
||
14 |
GPIO9 |
IO |
VDD3P3_RTC_IO |
IE |
IO MUX |
RTC |
Analog |
|
15 |
GPIO10 |
IO |
VDD3P3_RTC_IO |
IE |
IO MUX |
RTC |
Analog |
|
16 |
GPIO11 |
IO |
VDD3P3_RTC_IO |
IE |
IO MUX |
RTC |
Analog |
|
17 |
GPIO12 |
IO |
VDD3P3_RTC_IO |
IE |
IO MUX |
RTC |
Analog |
|
18 |
GPIO13 |
IO |
VDD3P3_RTC_IO |
IE |
IO MUX |
RTC |
Analog |
|
19 |
GPIO14 |
IO |
VDD3P3_RTC_IO |
IE |
IO MUX |
RTC |
Analog |
|
20 |
VDD3P3_RTC |
Power |
||||||
21 |
XTAL_32K_P |
Analog |
VDD3P3_RTC_IO |
IO MUX |
RTC |
Analog |
||
22 |
XTAL_32K_N |
Analog |
VDD3P3_RTC_IO |
IO MUX |
RTC |
Analog |
||
23 |
DAC_1 |
IO |
VDD3P3_RTC_IO |
IE |
IO MUX |
RTC |
Analog |
|
24 |
DAC_2 |
IO |
VDD3P3_RTC_IO |
IE, WPU |
IO MUX |
RTC |
Analog |
|
25 |
GPIO19 |
IO |
VDD3P3_RTC_IO |
IO MUX |
RTC |
Analog |
||
26 |
GPIO20 |
IO |
VDD3P3_RTC_IO |
IO MUX |
RTC |
Analog |
||
27 |
VDD3P3_RTC_IO |
Power |
||||||
28 |
GPIO21 |
IO |
VDD3P3_RTC_IO |
IO MUX |
RTC |
|||
29 |
SPICS1 |
IO |
VDD_SPI |
IE, WPU |
IE, WPU |
IO MUX |
||
30 |
VDD_SPI |
Power |
||||||
31 |
SPIHD |
IO |
VDD_SPI |
IE, WPU |
IE, WPU |
IO MUX |
||
32 |
SPIWP |
IO |
VDD_SPI |
IE, WPU |
IE, WPU |
IO MUX |
||
33 |
SPICS0 |
IO |
VDD_SPI |
IE, WPU |
IE, WPU |
IO MUX |
||
34 |
SPICLK |
IO |
VDD_SPI |
IE, WPU |
IE, WPU |
IO MUX |
||
35 |
SPIQ |
IO |
VDD_SPI |
IE, WPU |
IE, WPU |
IO MUX |
||
36 |
SPID |
IO |
VDD_SPI |
IE, WPU |
IE, WPU |
IO MUX |
||
37 |
GPIO33 |
IO |
VDD_SPI / VDD3P3_CPU |
IE |
IO MUX |
|||
38 |
GPIO34 |
IO |
VDD_SPI / VDD3P3_CPU |
IE |
IO MUX |
|||
39 |
GPIO35 |
IO |
VDD_SPI / VDD3P3_CPU |
IE |
IO MUX |
|||
40 |
GPIO36 |
IO |
VDD_SPI / VDD3P3_CPU |
IE |
IO MUX |
|||
41 |
GPIO37 |
IO |
VDD_SPI / VDD3P3_CPU |
IE |
IO MUX |
|||
42 |
GPIO38 |
IO |
VDD3P3_CPU |
IE |
IO MUX |
|||
43 |
MTCK |
IO |
VDD3P3_CPU |
IE |
IO MUX |
|||
44 |
MTDO |
IO |
VDD3P3_CPU |
IE |
IO MUX |
|||
45 |
VDD3P3_CPU |
Power |
||||||
46 |
MTDI |
IO |
VDD3P3_CPU |
IE |
IO MUX |
|||
47 |
MTMS |
IO |
VDD3P3_CPU |
IE |
IO MUX |
|||
48 |
U0TXD |
IO |
VDD3P3_CPU |
IE, WPU |
IE, WPU |
IO MUX |
||
49 |
U0RXD |
IO |
VDD3P3_CPU |
IE, WPU |
IE, WPU |
IO MUX |
||
50 |
GPIO45 |
IO |
VDD3P3_CPU |
IE, WPD |
IE, WPD |
IO MUX |
||
51 |
VDDA |
Power |
||||||
52 |
XTAL_N |
IO |
||||||
53 |
XTAL_P |
IO |
||||||
54 |
VDDA |
Power |
||||||
55 |
GPIO46 |
IO |
VDD3P3_CPU |
IE, WPD |
IE, WPD |
IO MUX |
||
56 |
CHIP_PU |
Analog |
||||||
57 |
GND |
Power |
ADC
Please add a 0.1 μF filter capacitor between ESP pins and ground when using the ADC function to improve accuracy.
USB
ESP32-S2 has a full-speed USB On-The-Go (OTG) peripheral with integrated transceivers. The USB peripheral is compliant with the USB 1.1 specification.
GPIO19 and GPIO20 can be used as D- and D + of USB respectively. It is recommended to populate zero-ohm series resistors between the mentioned pins and the USB connector. Also, reserve a footprint for a capacitor to ground on each trace. Note that both components should be placed close to the chip.
Note that USB_D+ will have level output, so please add a pull-up resistor to determine the initial high-level output voltage.
ESP32-S2 also supports leading the GND, RXD, and TXD pins out and connecting them to a USB-to-UART tool for firmware download and log message printing. For details please refer to Section Download Guidelines.
Touch Sensor
When using the touch function, it is recommended to populate a zero-ohm series resistor at the chip side to reduce the coupling noise and interference on the line, and to strengthen the ESD protection. The recommended resistance is from 470 Ω to 2 kΩ, preferably 510 Ω. The specific value depends on the actual test results of the product.
The ESP32-S2 touch sensor has a waterproof design and digital filtering function. Note that only GPIO14 (TOUCH14) can drive the shield electrode.