Huawi
Mentor Team
Choose us and achieve your future
Internet of Things
Embedded Systems
Microcontrollers
Hello everyone, I am Huawi Zangying. Following me can help you learn more about microcontroller knowledge. Today, let’s talk about ESP8266, ESP32, and STM32.
Espressif has been in the networking field for some years now, first launching the low-cost ESP8266 chip with Wi-Fi. Its service provider, Anxinke, then launched Wi-Fi modules based on this chip. This combination has significantly advanced the Wi-Fi-based IoT industry. The cheapest Wi-Fi module costs dozens of yuan, while the ESP8266 has brought the price down to around 10 yuan.
In 2016, Espressif released the ESP32, which is an upgraded version of the ESP8266, faster and with Bluetooth 4.2 and low energy. It is priced around 20 yuan, making it hard to find competitors at this price point.
From the data in the table, we can see that the ESP32 has more available pins than the ESP8266, and its performance has more than doubled. In general, both ESP32 and ESP8266 offer high cost-performance ratios.

ESP32 vs STM32
The advantages of ESP32 include: dual-core processors capable of multi-threaded real-time processing; high-speed main frequency of 240MHZ, significantly faster than STM32F1’s 72MHZ and STM32F4’s 168MHZ, and its price is much lower than the continuously rising STM series; built-in Bluetooth and Wi-Fi, eliminating the need to purchase additional modules, thus further reducing costs; programming can be done in the Arduino environment, making it much easier than STM32, with many open-source projects available, allowing for rapid development.
Disadvantages: The limited number of pins is one of the significant drawbacks of the ESP32 at this stage. In many product development processes, a large number of IO ports are needed to detect switch states, while many pins are required to control motors. In such cases, STM32 becomes the only choice.
STM32 is a 32-bit microcontroller based on the ARM architecture.
Advantages include: a rich variety of communication interfaces, such as USART, I2C, SPI, CAN, Ethernet communication, etc.; a large number of available GPIOs for controlling many devices; numerous timers and a well-developed interrupt system that can implement very complex logic; multiple ADC and DAC functions for reading many sensors; capable of running real-time operating systems like Free RTOS, RT thread, UCOS, etc., to control complex systems; can connect to SD cards, LCD screens, camera interfaces, and USB functionalities.
Disadvantages: 1. The price of STM32 has been continuously rising. However, the price of the STM32F1 series is significantly lower than that of the STM32F4 series. If Ethernet, camera, and DAC functions are not needed, the F1 series can be considered. 2. There is a certain level of difficulty in getting started, requiring some time to learn.

Conclusion
The usage and audience of STM32 in China far exceed that of ESP32, as STM32 has occupied the mainstream market for a long time, and there are more learning materials available compared to ESP32. Additionally, due to some open-source issues, users of STM32 still dominate. However, the era of the Internet of Things has arrived, and the cost-performance ratio of the ESP32 in the current market is unmatched. Taking advantage of this opportunity, ESP has great potential.
Currently developed smart devices will not remain on the development board; they need to keep pace with the times to enable remote control and access. However, achieving full-chain development, including smart device development, cloud service connection, and mobile device programming, is still quite challenging. The ESP32 also has a full-chain development framework that integrates cloud services, indicating that the ESP32 will undoubtedly have a place in the IoT space. Although the ESP32 is small and inexpensive, its functions are extremely powerful, making it very suitable for the current IoT era, worthy of our thorough study and exploration.
For those who want to learn microcontrollers correctly, you can look at my previous articles for tutorials from beginner to advanced, or long press the QR code at the bottom of the article to get the materials.
Recommended Reading
Why is microcontroller project experience so important?
Why do beginners learn microcontrollers from entry-level to advanced?
Text: Huawi
10 years focused on microcontroller programming practice
/ One-on-one teaching / Tutoring
Regular sharing of cutting-edge IoT technology insights