ESP32 vs STM32 vs Arduino: Choosing an MCU for Production
When does each microcontroller family belong in a shipping product? A practical decision matrix covering cost, supply chain, ecosystem, and certification.
Microcontroller selection is one of the highest-leverage decisions on a hardware product. Get it right and the rest of the project compounds — drivers, tooling, and ecosystem do work for you. Get it wrong and the whole stack fights you for years. This guide covers the three families that dominate the conversation in 2026.
Quick Summary
- Arduino (the platform — typically AVR or SAMD) — best for hobby, education, and the absolute simplest production devices. Almost never the right answer above 1,000 units.
- ESP32 (Espressif) — the modern default for cost-sensitive connected products. Wi-Fi, BLE, dual-core compute, $1.50–$4 in volume. For battery-powered designs the sleep-current numbers matter more than the headline specs — see Reducing Power Consumption in Battery Devices.
- STM32 (STMicroelectronics) — the modern default for industrial, automotive, and certified-grade products. Vast portfolio, mature ecosystem, predictable supply chain.
Arduino Platform
"Arduino" usually means an ATmega328P (Uno) or SAMD21 (MKR/Zero). The Arduino IDE and library ecosystem are unmatched for prototyping speed — you can be reading a sensor in 20 minutes. But the underlying chips are slow (16 MHz), low-memory (2-32 KB RAM), and expensive in volume relative to alternatives.
Use Arduino for: hobby, education, ultra-low-volume products (under 500 units) where engineering time savings outweigh BOM cost.
ESP32 Family
Espressif's ESP32 family (S3, C3, C6 in 2026) ships with Wi-Fi and BLE built in, dual-core compute, USB OTG, and a respectable ML accelerator on the S3. The chip costs $1.50–$4 in volume; modules cost $3–$8. Espressif's ESP-IDF SDK is mature, well-documented, and supported by a large open-source ecosystem (PlatformIO, ESP-Hosted, Arduino-ESP32).
Use ESP32 for: connected consumer products, smart-home devices, sensor nodes, low-volume industrial telemetry. The cost-to-features ratio is unmatched. Caveats: power consumption is decent but not best-in-class for battery-only devices, and Espressif has historically been a single-source — manageable risk for most products, an architectural concern for safety-critical ones.
STM32 Family
ST Microelectronics offers the broadest MCU portfolio of any vendor — from <$0.50 STM32G0 chips for cost-sensitive sensors up to STM32H7/MP1 chips that run Linux. The ecosystem (STM32Cube, HAL, X-CUBE packages) is mature and well-supported. STM32 chips have a reputation for reliable supply chain (multiple fab sites, EU + Asia distribution) and predictable lifecycles.
Use STM32 for: industrial controllers, motor control, automotive, medical (with the right certified series), products that need 10+ year lifecycles, products that need second-source flexibility within the family.
Decision Framework
Pick based on the dominant constraint:
- Cost is the dominant constraint, connected product → ESP32-C3 or C6
- Cost is the dominant constraint, no connectivity → STM32G0 or RP2040
- Battery life dominates → STM32L4/L5, nRF52, or careful ESP32 with deep sleep
- Long lifecycle / supply chain certainty → STM32 (any series)
- Heavy compute (vision, ML, audio) → STM32H7, ESP32-S3, or i.MX RT
- Real-time + safety → STM32 with Cortex-M7 or M4F + safety library
- Educational / prototype only → Arduino platform
Switching Cost
Once a project commits to an MCU family, switching costs balloon. The application code may port in days, but drivers, board support, certification work, supplier qualifications, and engineer expertise are family-specific. Treat the MCU pick as a 5-year decision, not a per-product decision.
Frequently Asked Questions
Can I use Arduino code on STM32 or ESP32?
Yes — both platforms support Arduino-compatible cores (Arduino-ESP32, STM32duino). They are excellent for prototyping but you should expect to migrate to the native SDK before production for performance, debug visibility, and long-term support.
What about RP2040 or Nordic nRF?
RP2040 (Raspberry Pi) is gaining ground for cost-sensitive non-connected products and is a credible second-source for STM32 in some categories. nRF52/53 (Nordic) is the leader in BLE-first low-power devices — wearables, beacons, medical sensors. Both are good answers when the dominant constraint matches their strengths.
Need Help Picking?
We pick MCUs every week for client projects. A 30-minute call covers the supply-chain, cost, certification, and engineering implications of the choice. Book one at interfacernd.com/book.
How inteRFace R&D can help
Building something hardware-shaped?
We help hardware founders go from sketch to certified product. Bring the spec, or just the idea, to a free 30-minute call with a senior engineer. Prefer email? A senior engineer reads every one.
Related articles
OTA Firmware Updates: Architecture, Security, and Safe Rollback
Every connected product needs OTA from day one, because the first security CVE turns a shipped fleet into a liability you cannot patch. Here is how to architect updates that are signed, atomic, power-fail safe, and rollback-proof.
Embedded SystemsDesigning a BLE Command Protocol for Connected Devices
The command layer between a phone and a BLE device is the part most teams improvise on a deadline and regret in the field. Here is how to design a compact, versioned, reliable, and secure BLE command protocol that lets host and firmware evolve independently.
Embedded SystemsChoosing a Battery for Your Hardware Product: Chemistry, Safety, and UN 38.3
Battery choice is a system decision with safety, certification, and shipping consequences most teams discover the week before their first container ships. Here is how to pick a chemistry, size it for real peak current, protect it, and clear UN 38.3 before it blocks you.