← Back to Blog

Comparing IoT Controllers for Your Project

A comprehensive guide to selecting the right microcontroller for IoT applications. Compare ESP32, STM32, RP2040, Raspberry Pi, and more across power, performance, connectivity, and cost. Includes decision frameworks and real-world use cases.

14 min read Roman Swetly

Comparing IoT Controllers for Your Project

A comprehensive guide to selecting the right microcontroller for your IoT application, with real-world considerations and decision frameworks.

Comparing IoT Controllers for Your Project

Introduction

The microcontroller (MCU) is the heart of any IoT device. It determines what sensors you can connect, how much code you can run, how long your batteries will last, and even what communication protocols you can support. Choosing the wrong controller can derail your project—leading to cost overruns, performance bottlenecks, or premature battery failure.

This article provides a detailed comparison of the most popular IoT controllers, along with a practical decision framework to help you select the right one for your specific use case.


1. Controller Comparison Overview

ControllerProcessingConnectivityPower ConsumptionMemory (Flash/RAM)Best Use Case
ESP8266Single-core @ 80 MHzWi-FiModerate (~70 mA active)4MB / 160KBLow-cost Wi-Fi sensors, simple actuators
ESP32Dual-core @ 240 MHzWi-Fi, BLE, Classic BTModerate (~100-150 mA active)4-16MB / 520KBWi-Fi sensors, gateways, complex logic, audio
ESP32-S3Dual-core @ 240 MHzWi-Fi, BLE 5.0Moderate8-16MB / 512KBAI/ML at the edge, advanced IoT applications
ESP32-C3Single-core RISC-V @ 160 MHzWi-Fi, BLE 5.0Moderate4MB / 400KBSecure, low-cost Wi-Fi + BLE applications
STM32 (L0/L4)Single/dual-core Cortex-M0+/M4External (SPI/UART/I2C)Very Low (<2 µA sleep)64-512KB / 20-160KBBattery-powered sensors, industrial control
STM32 (F4/H7)Single/dual-core Cortex-M4/M7ExternalModerate512KB-2MB / 256KB-1MBHigh-performance embedded, DSP, motor control
RP2040Dual-core @ 133 MHzExternalLow2MB / 264KBCost-sensitive, high-performance embedded
Raspberry PiMulti-core CPU @ 1.2-2.4 GHzEthernet, Wi-Fi, BTHigh (~500 mA - 3A)Up to 64GB (SD)Gateways, edge AI, complex applications, UI
Raspberry Pi Pico WDual-core @ 133 MHzWi-Fi, BLELow2MB / 264KBLow-cost Wi-Fi embedded, RP2040 with wireless
Particle Photon 2ARM Cortex-M33 @ 150 MHzWi-Fi, BLE 5.0Moderate2MB / 1MBCloud-connected IoT, enterprise deployments
Arduino Uno R4ARM Cortex-M4 @ 48 MHzExternalLow256KB / 32KBHobbyist projects, education, simple sensors
ESP32-P4Dual-core @ 400 MHzExternal (Ethernet, etc.)Moderate-HighUp to 32MBHigh-performance edge AI, video processing

2. Detailed Controller Profiles

2.1 ESP8266 – The Pioneer

ESP8266
ESP8266 ESP-01

Overview: The ESP8266 revolutionised IoT by bringing Wi-Fi connectivity to microcontrollers at an incredibly low cost. It remains a viable option for simple, cost-sensitive projects.

Strengths:

  • Extremely low cost (<$3 per module)
  • Large community and extensive libraries
  • Mature toolchain (Arduino IDE, PlatformIO, ESP8266 RTOS SDK)
  • Direct Wi-Fi connectivity without external modules

Weaknesses:

  • Single-core processor – cannot handle complex multitasking
  • Limited RAM (160KB) – struggles with large JSON payloads or web servers
  • No Bluetooth support
  • Older architecture (Tensilica Xtensa) – less efficient than newer designs

When to use:

  • Simple Wi-Fi sensors (temperature, humidity, door contacts)
  • Basic actuator control (relays, LED dimming)
  • Projects with tight cost constraints
  • Applications with simple data payloads (<1KB)

2.2 ESP32 – The Workhorse

ESP32

Overview: The ESP32 is the most popular IoT controller for a reason. Its dual-core processor, integrated Wi-Fi and Bluetooth, and extensive peripheral set make it suitable for a vast range of applications.

Strengths:

  • Dual-core processor – run Wi-Fi stack on one core, application on the other
  • Integrated Wi-Fi, Bluetooth Classic, and BLE
  • Extensive peripheral set (I²C, SPI, UART, ADC, DAC, touch, PWM, CAN)
  • Large community and mature software ecosystem
  • OTA (Over-The-Air) update support
  • Low-cost relative to capabilities

Weaknesses:

  • Moderate power consumption – not suitable for long-term battery operation
  • Requires external flash – some modules have limited built-in storage
  • Security features are basic compared to newer chips

When to use:

  • Wi-Fi sensors with moderate complexity
  • IoT gateways and bridges
  • Applications requiring Bluetooth (BLE beacons, device pairing)
  • Audio processing, simple GUI displays
  • Smart home devices (lights, switches, thermostats)

2.3 ESP32-S3 – AI at the Edge

Overview: The ESP32-S3 is a significant upgrade over the original ESP32, adding support for AI/ML workloads and improved security.

Strengths:

  • Vector instructions for AI/ML acceleration
  • Improved BLE 5.0 support
  • Secure boot and flash encryption
  • Up to 16MB flash, 512KB SRAM
  • USB OTG support

Weaknesses:

  • Slightly higher cost than ESP32
  • Still moderate power consumption

When to use:

  • Edge AI applications (voice recognition, gesture detection, object classification)
  • Secure IoT deployments requiring trusted execution
  • USB-connected devices
  • Applications needing more RAM than ESP32 provides

2.4 STM32 – The King of Low Power

STM32

Overview: STM32 microcontrollers are the benchmark for ultra-low-power operation, with some variants achieving <2 µA in sleep mode. They offer a wide performance range from simple Cortex-M0 to powerful Cortex-M7.

STM32 L0/L4 Series (Ultra-Low Power):

  • Sleep current: <2 µA
  • Active current: ~100 µA/MHz
  • Application: Battery-powered sensors running for 2+ years
  • Example: Soil moisture monitors, temperature loggers, wearables

STM32 F4/H7 Series (High Performance):

  • Processing: Cortex-M4 (FPU) or Cortex-M7
  • Application: Motor control, digital signal processing, industrial automation
  • Peripherals: Advanced timers, CAN, Ethernet, USB

Strengths:

  • Extensive family covering every possible use case
  • Industry-leading low-power performance
  • Excellent peripheral set and DMA capabilities
  • Wide industry adoption and long-term availability
  • Comprehensive HAL and LL libraries

Weaknesses:

  • No built-in wireless connectivity – requires external modules
  • Steeper learning curve than Arduino/ESP
  • Development tools can be complex (STMCube, Keil, IAR)

When to use STM32 L0/L4:

  • Battery-powered sensors and wearables
  • Industrial sensors requiring 5+ year battery life
  • Remote monitoring applications with periodic wake-up

When to use STM32 F4/H7:

  • Motor control and robotics
  • Digital signal processing (audio, vibration analysis)
  • Industrial automation with CAN or EtherCAT
  • Applications requiring 5V tolerance (F4 series)

2.5 RP2040 – The New Contender

RP2040

Overview: Raspberry Pi’s RP2040 is a powerful, low-cost dual-core Cortex-M0+ microcontroller that has gained rapid popularity.

Strengths:

  • Dual-core Cortex-M0+ @ 133 MHz – surprisingly capable
  • Very low cost (~$1 per chip)
  • PIO (Programmable I/O) for custom protocols
  • 264KB SRAM – generous for its class
  • Excellent documentation and community support
  • MicroPython support (via Raspberry Pi Pico)

Weaknesses:

  • No built-in wireless (Pico W adds Wi-Fi)
  • Limited flash (up to 2MB on modules)
  • Newer ecosystem – fewer libraries than ESP or STM32
  • No built-in ADC (only one SAR ADC with 12-bit)

When to use:

  • Cost-sensitive projects needing performance
  • Custom protocol implementations (WS2812, DVI, SDIO)
  • Educational projects and prototyping
  • High-volume consumer products

2.6 Raspberry Pi – The Gateway

Overview: Raspberry Pi single-board computers are full Linux systems capable of running complex applications. They are best used as gateways, edge servers, or AI processing nodes.

Strengths:

  • Full Linux OS – can run any software stack
  • High processing power for edge AI and analytics
  • Built-in Ethernet, Wi-Fi, Bluetooth
  • HDMI output for UI
  • USB for peripherals (cameras, storage, 4G modems)
  • Extensive software ecosystem

Weaknesses:

  • High power consumption (500mA – 3A)
  • No real-time capabilities
  • Longer boot time
  • Not suitable for battery operation
  • Higher cost

When to use:

  • IoT gateways aggregating multiple sensors
  • Edge AI inference (TensorFlow, OpenCV)
  • Local data processing and storage
  • Prototyping before moving to custom hardware
  • Applications requiring a screen or UI

2.7 Particle Photon 2 – The Enterprise Choice

Overview: Particle is a commercial IoT platform that combines hardware, software, and cloud services. The Photon 2 is their latest Wi-Fi + BLE module.

Strengths:

  • Built-in cloud integration (Particle Cloud)
  • Secure boot, encrypted storage
  • OTA updates over Wi-Fi
  • Device management dashboard
  • Production-ready with certifications

Weaknesses:

  • Vendor lock-in (Particle Cloud)
  • Recurring subscription costs
  • Limited customisation for self-hosted deployments

When to use:

  • Enterprise IoT deployments with high security requirements
  • Rapid prototyping with cloud integration
  • Products needing FCC/CE certification out-of-the-box
  • Teams without deep embedded expertise

3. Key Selection Criteria

3.1 Processing Power

  • Single-core – sufficient for simple sensors and actuators. Can be bottlenecked by Wi-Fi stack.
  • Dual-core – allows parallel processing (network stack on one core, application on the other). Essential for responsive Wi-Fi applications.
  • Multi-core / High-frequency – needed for AI inference, video processing, or complex algorithms.

Recommendation:

  • Simple sensors → ESP8266, STM32L0
  • Wi-Fi sensors with OTA → ESP32, ESP32-C3
  • Edge AI → ESP32-S3, Raspberry Pi
  • Industrial control → STM32F4/H7

3.2 Memory (Flash & RAM)

ControllerFlash (typical)RAMLimitation
ESP82664MB160KBLow RAM – can’t handle large JSON payloads
ESP324-16MB520KBAdequate for most applications
STM32L064-128KB20-32KBVery limited – optimize memory usage
STM32F4256KB-1MB64-256KBGood for complex applications
RP20402MB (external)264KBDecent RAM, limited flash
Raspberry PiSD card (GB)0.5-8GBBasically unlimited for embedded tasks

Rule of thumb:

  • <32KB RAM → consider STM32L0, optimise heavily
  • 32-128KB RAM → STM32F0/F1, RP2040
  • 128-512KB RAM → ESP8266, ESP32, STM32F4
  • 512KB RAM → ESP32-S3, Raspberry Pi

3.3 Power Consumption

Critical for battery-powered designs.

ControllerActive CurrentSleep Current1-Year Operation Battery Size
STM32L0~5 mA<2 µA~80 mAh (AA battery)
STM32L4~8 mA<1 µA~100 mAh
RP2040~20 mA~100 µA~2,000 mAh (needs larger battery)
ESP8266~70 mA~10 µA~700 mAh
ESP32~100-150 mA~10-150 µA~1,500-2,000 mAh
ESP32-S3~120 mA~10-50 µA~1,500 mAh
Raspberry Pi~500 mA - 3AN/A (no deep sleep)Not battery-viable

Power optimisation techniques:

  • Deep sleep modes with timer wake-up (ESP, STM32)
  • Duty cycling – active <1% of the time
  • Use of lower-power radios (LoRa, BLE) when possible
  • Selective peripheral power management

Recommendation:

  • <5 µA sleep → STM32L0/L4
  • <20 µA sleep → ESP32 (deep sleep)
  • Battery-powered but need Wi-Fi → ESP32 (short transmissions, long sleep)
  • Mains-powered → any controller

3.4 Peripherals and Interfaces

Consider what sensors and actuators you need to connect:

PeripheralUse CaseControllers Best Suited
I²CTemperature, humidity, accelerometersAll (ESP32, STM32, RP2040)
SPIDisplays, SD cards, high-speed sensorsSTM32F4, RP2040, ESP32
UARTGPS, serial modules, debugAll
ADC (12-bit)Analog sensors (light, moisture)STM32, ESP32, RP2040 (Pico only)
PWMLED dimming, motor speedAll
CANIndustrial, automotiveSTM32, ESP32 (with CAN transceiver)
USBProgramming, data transfer, HIDESP32-S3, RP2040, STM32F4
EthernetGateways, industrialRaspberry Pi, STM32F4/H7

4. Decision Flowchart

Do you need Wi-Fi or Bluetooth?
├── Yes → Consider ESP32, ESP32-C3, ESP8266, or Particle Photon 2
│   ├── Need edge AI/ML? → ESP32-S3
│   ├── Need BLE 5.0 + Wi-Fi? → ESP32-C3 or ESP32-S3
│   ├── Need low-power Wi-Fi? → ESP8266 (simple) or ESP32 (deep sleep)
│   └── Need cloud integration? → Particle Photon 2
│
└── No → Consider STM32 or RP2040
    ├── Need ultra-low power? (<5µA sleep) → STM32L0/L4
    ├── Need high performance (DSP, motor control)? → STM32F4/H7
    ├── Need cost-sensitive but performant? → RP2040
    └── Need custom I/O protocols? → RP2040 (PIO)

Do you need to run Linux or a full OS?
├── Yes → Raspberry Pi (gateway, edge AI, UI)
└── No → Continue with MCU selection

What is your development experience?
├── Beginner → Arduino, ESP32 (Arduino IDE)
├── Intermediate → STM32 (STM32Cube), ESP32 (ESP-IDF)
└── Advanced → RP2040 (SDK), STM32 (HAL/LL), ESP32 (FreeRTOS)

5. Real-World Application Examples

5.1 Smart Agriculture Sensor Node

Requirements:

  • Battery-powered (2 years)
  • Soil moisture, temperature, humidity sensing
  • LoRaWAN communication
  • Low cost

Recommended: STM32L0 (ultra-low power) + LoRa module

Rationale: The STM32L0 provides the required ultra-low power, the LoRa module offers long-range communication, and the combination can achieve the 2-year battery target.

5.2 Smart Home Light Controller

Requirements:

  • Mains-powered
  • Wi-Fi connectivity
  • PWM dimming
  • OTA updates
  • Low cost

Recommended: ESP8266

Rationale: Low cost, built-in Wi-Fi, sufficient performance for simple PWM control, OTA update support.

5.3 Industrial IoT Gateway

Requirements:

  • Ethernet connectivity
  • USB for peripherals
  • LoRa gateway capability
  • Local data processing
  • Web UI

Recommended: Raspberry Pi

Rationale: Full Linux OS, Ethernet and USB built-in, can run LoRa gateway software, sufficient processing for data aggregation and web server.

5.4 Wearable Health Monitor

Requirements:

  • Battery-powered (2 weeks)
  • BLE connectivity
  • ECG/PPG sensors
  • Data processing
  • Security

Recommended: STM32L4 + BLE module (or nRF52840)

Rationale: The STM32L4 provides the needed low power and processing capabilities. Nordic nRF52840 would be an alternative with built-in BLE.


6. Quick Reference Table

Use CaseControllerAlternative
Simple Wi-Fi sensorESP8266ESP32-C3
Wi-Fi sensor with OTAESP32ESP32-C3
Battery sensor (no Wi-Fi)STM32L0RP2040 + low-power radio
Edge AIESP32-S3Raspberry Pi
Gateway (Linux)Raspberry PiRadxa, Banana Pi
Motor controlSTM32F4ESP32
WearableSTM32L4nRF52840
Industrial (wired)STM32F4/H7NXP, Infineon
PrototypingArduino Uno R4ESP32, Raspberry Pi Pico

7. Conclusion

Choosing the right IoT controller is a decision that impacts your entire project. There is no single “best” controller—only the one that best fits your requirements.

Key takeaways:

  1. Start with your requirements – power, connectivity, performance, and cost.
  2. Consider your team’s expertise – development time is often a hidden cost.
  3. Think about the future – will you need OTA updates? Edge AI? Scale?
  4. Don’t over-engineer – an ESP8266 may be enough for a simple sensor.
  5. Don’t under-engineer – an ESP8266 may struggle with complex logic and large payloads.

“The best controller is the one that meets your requirements today and can scale with you tomorrow.”


Further Reading


This article is based on practical experience building the N3xar platform, where a diverse range of controllers is deployed to meet varying client requirements.

← Previous Post
Overview of Wireless Communication Protocols for IoT
Next Post →
Distributed vs. Centralized Intelligence in IoT

Related Articles