Introduction to ESP32: Basics and Features

01

What is ESP32?

ESP32 is a high-performance, low-power microcontroller chip for the Internet of Things (IoT) launched by Espressif Systems. This series integrates Wi-Fi and Bluetooth functionalities, widely used in smart homes, industrial control, wearable devices, and other fields.

02

What are the features of ESP32?

  • Stable Performance

Introduction to ESP32: Basics and Features

ESP32 has stable performance, with an operating temperature range of -40°C to +125°C. The integrated self-calibration circuit achieves dynamic voltage adjustment, eliminating defects in external circuits and adapting to changes in external conditions.

  • Highly Integrated

Introduction to ESP32: Basics and Features

ESP32 integrates functions such as antenna switch, RF balun, power amplifier, low-noise amplifier, filter, and power management module. It requires very few peripheral components to achieve powerful processing performance, reliable security performance, and Wi-Fi & Bluetooth functionalities.

  • Ultra-Low Power Consumption

Introduction to ESP32: Basics and Features

ESP32 is designed for mobile devices, wearable electronics, and IoT applications, featuring industry-leading low-power performance, including fine-grained clock gating, power-saving modes, and dynamic voltage adjustment.

  • Wi-Fi & Bluetooth Solutions

Introduction to ESP32: Basics and FeaturesIntroduction to ESP32: Basics and Features

ESP32 can operate as a standalone system running applications or as a slave device to a host MCU, providing Wi-Fi and Bluetooth functionalities through SPI/SDIO or I2C/UART interfaces.

03

Application Areas of ESP32

ESP32 is widely used in IoT, embedded systems, smart homes, automotive devices, security devices, and other fields.

How to Choose Between ESP32 and STM32?

  • For IoT development, prioritize: ESP32
    • Built-in wireless protocol stack supports MQTT, HTTP, and other IoT standard protocols.
  • For industrial control, prioritize: STM32
    • Provides more precise timers (1ns resolution) and rich industrial bus interfaces (such as CAN FD).

04

Product Hierarchy of ESP32

Espressif’s high cost-performance, highly integrated Wi-Fi and Bluetooth SoC chips are highly sought after. They categorize products into three levels to meet various customization needs:

  • Chip: The core component, integrating processor core, memory, wireless transceiver, various peripheral interfaces, etc.
  • Module: To lower the hardware design threshold, the chip is soldered onto a small PCB, integrating external Flash memory, crystal oscillator, antenna (PCB antenna or IPEX connector for external antenna), and necessary matching circuits.
  • Development Board: Facilitates rapid prototyping for customers, integrating rich peripheral interfaces and functional modules onto a single circuit board to meet user needs for developing IoT applications.

4.1 Classification and Features of ESP32 Chips

ESP32 has various series of chip models, with differences mainly in core architecture, wireless functionality, memory configuration, and expansion capabilities, providing differentiated performance support for different IoT application scenarios.

ESP8266 Series

32-bit MCU & 2.4 GHz Wi-Fi

  • Single-core CPU clock frequency up to 160 MHz
  • +19.5 dBm antenna output power, ensuring good coverage
  • Sleep current less than 20 μA, suitable for battery-powered wearable devices
  • Peripherals include UART, GPIO, I2S, I2C, SDIO, PWM, ADC, and SPI

ESP32 Series

32-bit MCU & 2.4 GHz Wi-Fi & Bluetooth/Bluetooth LE

  • Two or one independently controllable CPU cores, clock frequency adjustable from 80 MHz to 240 MHz
  • +19.5 dBm antenna output power, ensuring good coverage
  • Traditional Bluetooth supports L2CAP, SDP, GAP, SMP, AVDTP, AVCTP, A2DP (SNK), and AVRCP (CT) protocols
  • Low-power Bluetooth (Bluetooth LE) supports L2CAP, GAP, GATT, SMP, and BluFi, SPP-like protocols above GATT
  • Low-power Bluetooth connects to smartphones, sending low-power beacons for easy detection
  • Sleep current less than 5 μA, suitable for battery-powered wearable devices
  • Peripherals include capacitive touch sensors, Hall sensors, SD card interface, Ethernet, high-speed SPI, UART, I2S, and I2C

ESP32-H Series

32-bit RISC-V MCU & Bluetooth 5 (LE) & IEEE 802.15.4

  • 32-bit RISC-V single-core processor, main frequency up to 96 MHz
  • 320 KB SRAM, 128 KB ROM storage space, 4 KB LP Memory, supports external flash
  • 19 programmable GPIOs, supporting common peripheral interfaces such as UART, SPI, I2C, I2S, infrared transceiver, LED PWM, full-speed USB serial/JTAG controller, GDMA, MCPWM
  • Can be used to build Thread terminal devices; can be combined with other Wi-Fi SoCs to build Thread border routers and Matter bridges

ESP32-C2 Series

32-bit RISC-V MCU & 2.4 GHz Wi-Fi & Bluetooth 5 (LE)

  • RISC-V 32-bit single-core processor, main frequency up to 120 MHz
  • Industry-leading low-power performance and RF performance
  • Built-in 272 KB SRAM (of which 16 KB is dedicated to cache), 576 KB ROM storage space
  • 14 programmable GPIO pins: SPI, UART, I2C, LED PWM controller, SAR ADC, temperature sensor

ESP32-C3 Series

32-bit RISC-V MCU & 2.4 GHz Wi-Fi & Bluetooth 5 (LE)

  • RISC-V 32-bit single-core processor, four-stage pipeline architecture, main frequency up to 160 MHz
  • Industry-leading low-power performance and RF performance
  • Built-in 400 KB SRAM, 384 KB ROM storage space, supports multiple external SPI, Dual SPI, Quad SPI, QPI flash
  • Comprehensive security mechanisms: secure boot based on RSA-3072 algorithm, flash encryption based on AES-128-XTS algorithm, innovative digital signature and HMAC modules, hardware accelerators supporting encryption algorithms
  • Rich communication interfaces and GPIO pins, supporting various scenarios and complex applications

ESP32-C5 Series

32-bit RISC-V MCU & 2.4 and 5 GHz Wi-Fi 6 & Bluetooth 5 (LE) & IEEE 802.15.4

  • Ultra-low power MCU with a RISC-V 32-bit single-core processor
  • 2.4 & 5 GHz dual-band Wi-Fi 6 (802.11ax), Bluetooth® 5 (LE), Zigbee, and Thread (802.15.4)
  • Supports connection to external flash and PSRAM
  • 29 GPIOs, rich peripherals
  • Security mechanisms: secure boot, flash and PSRAM encryption, hardware encryption accelerator, trusted execution environment (TEE) controller, access permission management (APM) hardware module, and physical memory protection (PMP)

ESP32-S3 Series

32-bit MCU & 2.4 GHz Wi-Fi & Bluetooth 5 (LE)

  • Xtensa® 32-bit LX7 dual-core processor, main frequency up to 240 MHz
  • Built-in 512 KB SRAM, 384 KB ROM storage space, supports multiple external SPI, Dual SPI, Quad SPI, Octal SPI, QPI, OPI flash, and external RAM
  • Additional vector instructions for accelerating neural network computations and signal processing tasks
  • 45 programmable GPIOs, supporting common peripheral interfaces such as SPI, I2S, I2C, PWM, RMT, ADC, UART, SD/MMC host controller, and TWAI™ controller
  • Flash encryption based on AES-XTS algorithm and secure boot based on RSA algorithm, digital signature and HMAC modules, “World Controller” module

ESP32-P4 Series

32-bit RISC-V MCU

  • High-performance MCU with RISC-V 32-bit dual-core and single-core processors
  • 128 KB HP ROM, 16 KB LP ROM, 768 KB HP L2MEM, 32 KB LP SRAM, 8 KB SPM
  • Powerful image and voice processing capabilities
  • Chip packaging can stack 16 MB or 32 MB PSRAM
  • 55 programmable GPIOs, supporting common peripheral interfaces such as MIPI-CSI, MIPI-DSI, USB 2.0 OTG, Ethernet, SDIO 3.0, I3C, SPI, I2S, I2C, LED PWM, MCPWM, RMT, ADC, UART, and TWAI™ controller
  • Security mechanisms: secure boot, flash encryption, hardware encryption accelerator, hardware random number generator. It also supports hardware access protection, enabling access permission management (APM) and privilege separation.

4.2 Classification and Features of ESP32 Modules

ESP-WROOM-02D

ESP-WROOM-02D integrates the ESP8266EX chip, offering superior RF performance.

ESP-WROOM-02U

ESP-WROOM-02U integrates the ESP8266EX chip, providing even better RF performance, and comes with a U.FL connector.

ESP32-WROOM-32E

ESP32-WROOM-32E integrates the ESP32-D0WD-V3 chip, offering higher stability and security performance.

2.4 GHz Wi-Fi + Bluetooth® + low-power Bluetooth module built-in ESP32 series chip, Xtensa® dual-core 32-bit LX6 processor, optional 4/8/16 MB flash, 26 GPIOs, rich peripherals, onboard PCB antenna.

ESP32-H2-MINI-1

ESP32-H2-MINI-1 is a general-purpose low-power Bluetooth and IEEE 802.15.4 dual-mode module, powerful, with the core being the ESP32-H2 chip, very suitable for low-power IoT scenarios, such as building smart home devices based on the Matter protocol, achieving interconnectivity across multiple ecosystems, and can also be used to build border routers (Thread Border Router) in combination with Wi-Fi SoCs. This module is compact, and its module packaging and main pins are compatible with ESP32-C3-MINI and ESP32-C6-MINI series modules.

ESP32-C3-MINI-1

ESP32-C3-MINI-1 is a general-purpose Wi-Fi and low-power Bluetooth (Bluetooth LE) module, compact, with rich peripheral interfaces, suitable for smart homes, industrial automation, healthcare, consumer electronics, and other fields.

ESP32-C5-WROOM-1

General-purpose 2.4 & 5 GHz dual-band Wi-Fi 6 (802.11ax), Bluetooth® 5 (LE), Zigbee, and Thread (802.15.4) module, rich peripheral interfaces, suitable for smart homes, industrial automation, healthcare, consumer electronics, and other fields.

ESP32-S3-WROOM-1

ESP32-S3-WROOM-1 is a general-purpose Wi-Fi + Bluetooth MCU module, with rich peripheral interfaces, powerful neural network computing and signal processing capabilities, designed for the AI and AIoT market, suitable for various application scenarios, such as wake word detection and voice command recognition, face detection and recognition, smart homes, smart appliances, smart control panels, smart speakers, etc.

4.3 ESP32 Development Boards

ESP32-S3-DevKitC-1 v1.1

ESP32-S3-DevKitC-1 is an entry-level development board equipped with Wi-Fi + Bluetooth® LE module ESP32-S3-WROOM-1, ESP32-S3-WROOM-1U, or ESP32-S3-WROOM-2.

Most pins of the onboard module are brought out to the side pin headers of the development board, allowing developers to easily connect various peripheral devices through jumpers as needed, and the development board can also be plugged into a breadboard for use.

Introduction to ESP32: Basics and FeaturesESP32-C5-DevKitC-1

ESP32-C5-DevKitC-1 is an entry-level development board using the general-purpose module ESP32-C5-WROOM-1(U). This development board has complete Wi-Fi, low-power Bluetooth, Zigbee, and Thread functionalities.

Introduction to ESP32: Basics and FeaturesIntroduction to ESP32: Basics and FeaturesESP32-H2-DevKitM-1

ESP32-H2-DevKitM-1 is an entry-level development board equipped with low-power Bluetooth® and IEEE 802.15.4 dual-mode module ESP32-H2-MINI-1 or ESP32-H2-MINI-1U.

Introduction to ESP32: Basics and FeaturesESP32-DevKitC

ESP32-DevKitC is an entry-level mini development board of the ESP32 series, equipped with rich peripherals and optimized pin layout, helping users quickly achieve product development.Introduction to ESP32: Basics and Features

4.4 How to Choose Products?

Comprehensive Overview:

  • ESP32-D0WD: Dual-core Xtensa LX6 architecture, main frequency 240MHz, supports Wi-Fi/BT dual-mode communication, suitable for complex task processing.

  • ESP32-S0WD: Single-core Xtensa LX6 architecture, main frequency 160MHz, cost-optimized version suitable for basic IoT devices.

  • ESP32-S3: New neural network acceleration unit, supports USB OTG and camera interface, main frequency increased to 240MHz.

  • ESP32-C3: Adopts RISC-V single-core architecture, integrates BLE 5.0, deep sleep power consumption only 2μA, focusing on low-power scenarios.

  • ESP32-PICO-D4: The minimum packaging solution integrating 4MB Flash and PSRAM, suitable for space-constrained devices.

Application Scenario Selection

  1. High-Performance Scenarios: Recommend ESP32-S3, suitable for AIoT devices requiring machine vision or voice recognition.
  2. Low-Power Requirements: Prioritize ESP32-C3, suitable for battery-powered sensor nodes.
  3. Cost-Sensitive Projects: Choose ESP32-S0WD single-core solution to meet basic networking needs.
  4. Industrial Applications‌: It is recommended to use the ESP32-WROVER series, equipped with PSRAM to ensure the operation of complex protocol stacks.

05

What Programming Languages are Suitable for ESP32?

  1. C/C++C and C++ are the main programming languages officially supported by ESP32. Since the underlying hardware drivers and operating systems (such as FreeRTOS) are mainly written in C/C++, using these two languages allows direct access and control of hardware resources, achieving efficient code execution and low-power management. Additionally, C/C++ provides a rich set of library functions and data structures, facilitating complex algorithm design and system optimization for developers.
  2. ArduinoArduino is a programming language based on an open-source hardware and software platform that simplifies the programming process for electronic devices. ESP32 also supports the Arduino IDE, allowing developers to write code using the Arduino language. The Arduino language is based on C/C++, but offers a more concise and understandable syntax and a rich set of library functions, making it very suitable for beginners and rapid prototyping. By installing the ESP32 Arduino core board support package, developers can directly compile and upload programs to ESP32 in the Arduino IDE.
  3. MicroPythonMicroPython is a streamlined version of the Python language, designed for embedded systems. ESP32 supports the MicroPython interpreter, allowing developers to program using Python. Python is known for its clear syntax and strong library support, enabling developers to write and debug code more quickly. Additionally, MicroPython provides access interfaces to ESP32 hardware resources, including GPIO control, network communication, etc. However, compared to C/C++, MicroPython may run slightly slower and occupy more memory space.
  4. JavaScript (via Espruino)Espruino is an open-source project that ports the JavaScript engine to various microcontrollers, including ESP32. By using Espruino firmware, developers can write programs for ESP32 using JavaScript. This approach allows front-end developers to more easily participate in IoT project development, as they are already familiar with JavaScript syntax and ecosystem. However, it should be noted that Espruino is not an officially supported platform for ESP32, so additional configuration and optimization work may be required in some cases.

06

Classroom Tutorials

C language is the cornerstone of hardware and software fields, but as an entry-level language for beginners, it can easily discourage learning enthusiasm. Therefore, for novices, I tend to believe that Python is more suitable as your first programming language, and MicroPython can more easily let you experience the joy of hardware programming.

This series of tutorials will use Python as the programming language, demonstrating projects as much as possible using Mixly graphical programming.

The development board used isESP32EA-MOC-4M, what are its features?

1. Uses the original brand new ESP32-WROOM-32E module released by Espressif in 20232. Enhanced power supply, G|V can provide a maximum output capability of 3.3V 40mA3. Onboard circuit protection and power selection circuit4. Type-C communication interface, no need to distinguish between positive and negative, more convenient to use5. Supports LEGO battery box input interface, allowing 6-12VDC input6. Onboard 2.54 pitch G|V|S expansion pin header interface, no expansion board required

Introduction to ESP32: Basics and Features

Students who need accessories can go to my Taobao store with the same name to purchase.

Introduction to ESP32: Basics and FeaturesFollow me for more sharingWeilan Classroom

Leave a Comment