Home / Sourcing Guides / MCU Selection
STM32F103 vs STM32F405 vs ESP32: Choosing the Right MCU
Picking a microcontroller is easier when you stop comparing datasheets line by line and start with three questions: how much compute do you need, do you need wireless connectivity, and what does the part cost at your volume? Here is how three popular choices stack up.
The three parts at a glance
- STM32F103C8T6 — Cortex-M3, 72 MHz, 64 KB flash, 20 KB RAM. The workhorse for general control and a favourite for prototypes.
- STM32F405RGT6 — Cortex-M4F with FPU, 168 MHz, 1 MB flash, 192 KB RAM. For DSP, motor control, graphics and heavy data handling.
- ESP32 (including ESP-12F modules) — dual-core Xtensa, built-in Wi-Fi and Bluetooth. The default when your product must connect wirelessly.
1. Compute and memory
If your code is a control loop, a sensor reader or a simple display driver, the STM32F103C8T6 has more than enough headroom. If you are doing FFT, floating-point math, audio processing or running a graphics stack, step up to the STM32F405RGT6 and its floating-point unit. The difference in raw throughput is roughly a factor of three to four, plus a much larger flash and RAM budget.
2. Connectivity changes everything
The ESP32 family integrates Wi-Fi and Bluetooth on-chip, which no STM32F1/F4 part offers. If your product needs to talk to a phone or a network, an ESP-12F module removes an entire radio subsystem from your BOM. The trade-off is higher power consumption and a less deterministic real-time environment than a bare STM32.
3. Real-time behaviour and peripherals
STM32 parts run bare-metal or with RTOS and have predictable interrupt latency, which matters for motor control, precision timing and industrial interfaces. The STM32F405 in particular offers advanced timers, multiple ADCs and hardware crypto. ESP32 is excellent at connectivity but shares its cores with the Wi-Fi stack, so timing-critical tasks need careful design.
4. Cost and availability
The STM32F103 is usually the cheapest of the three and is stocked in huge quantities, which is why it appears in so many designs. The F405 costs more but replaces what would otherwise be a separate DSP or a bigger part. ESP32 modules are inexpensive for the connectivity you get, but module supply and flash size vary by vendor — check the exact variant.
A quick decision guide
- Need Wi-Fi or Bluetooth? → ESP32 / ESP-12F.
- Simple control, tight budget, no radio? → STM32F103C8T6.
- DSP, FPU, motor control, graphics or large code? → STM32F405RGT6.
All three appear in our market pulse rankings, which reflect real sourcing demand. Need pricing on a specific variant and quantity? Send the exact part number for a quote.
Need parts checked or quoted?
Send the part numbers, quantity and target price to sales@vantageethk.com or WhatsApp +86 187 7789 5758. We work from the Shenzhen supply chain and reply within hours on business days.