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.
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
| Controller | Processing | Connectivity | Power Consumption | Memory (Flash/RAM) | Best Use Case |
|---|---|---|---|---|---|
| ESP8266 | Single-core @ 80 MHz | Wi-Fi | Moderate (~70 mA active) | 4MB / 160KB | Low-cost Wi-Fi sensors, simple actuators |
| ESP32 | Dual-core @ 240 MHz | Wi-Fi, BLE, Classic BT | Moderate (~100-150 mA active) | 4-16MB / 520KB | Wi-Fi sensors, gateways, complex logic, audio |
| ESP32-S3 | Dual-core @ 240 MHz | Wi-Fi, BLE 5.0 | Moderate | 8-16MB / 512KB | AI/ML at the edge, advanced IoT applications |
| ESP32-C3 | Single-core RISC-V @ 160 MHz | Wi-Fi, BLE 5.0 | Moderate | 4MB / 400KB | Secure, low-cost Wi-Fi + BLE applications |
| STM32 (L0/L4) | Single/dual-core Cortex-M0+/M4 | External (SPI/UART/I2C) | Very Low (<2 µA sleep) | 64-512KB / 20-160KB | Battery-powered sensors, industrial control |
| STM32 (F4/H7) | Single/dual-core Cortex-M4/M7 | External | Moderate | 512KB-2MB / 256KB-1MB | High-performance embedded, DSP, motor control |
| RP2040 | Dual-core @ 133 MHz | External | Low | 2MB / 264KB | Cost-sensitive, high-performance embedded |
| Raspberry Pi | Multi-core CPU @ 1.2-2.4 GHz | Ethernet, Wi-Fi, BT | High (~500 mA - 3A) | Up to 64GB (SD) | Gateways, edge AI, complex applications, UI |
| Raspberry Pi Pico W | Dual-core @ 133 MHz | Wi-Fi, BLE | Low | 2MB / 264KB | Low-cost Wi-Fi embedded, RP2040 with wireless |
| Particle Photon 2 | ARM Cortex-M33 @ 150 MHz | Wi-Fi, BLE 5.0 | Moderate | 2MB / 1MB | Cloud-connected IoT, enterprise deployments |
| Arduino Uno R4 | ARM Cortex-M4 @ 48 MHz | External | Low | 256KB / 32KB | Hobbyist projects, education, simple sensors |
| ESP32-P4 | Dual-core @ 400 MHz | External (Ethernet, etc.) | Moderate-High | Up to 32MB | High-performance edge AI, video processing |
2. Detailed Controller Profiles
2.1 ESP8266 – The Pioneer
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
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
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
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)
| Controller | Flash (typical) | RAM | Limitation |
|---|---|---|---|
| ESP8266 | 4MB | 160KB | Low RAM – can’t handle large JSON payloads |
| ESP32 | 4-16MB | 520KB | Adequate for most applications |
| STM32L0 | 64-128KB | 20-32KB | Very limited – optimize memory usage |
| STM32F4 | 256KB-1MB | 64-256KB | Good for complex applications |
| RP2040 | 2MB (external) | 264KB | Decent RAM, limited flash |
| Raspberry Pi | SD card (GB) | 0.5-8GB | Basically 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.
| Controller | Active Current | Sleep Current | 1-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 - 3A | N/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:
| Peripheral | Use Case | Controllers Best Suited |
|---|---|---|
| I²C | Temperature, humidity, accelerometers | All (ESP32, STM32, RP2040) |
| SPI | Displays, SD cards, high-speed sensors | STM32F4, RP2040, ESP32 |
| UART | GPS, serial modules, debug | All |
| ADC (12-bit) | Analog sensors (light, moisture) | STM32, ESP32, RP2040 (Pico only) |
| PWM | LED dimming, motor speed | All |
| CAN | Industrial, automotive | STM32, ESP32 (with CAN transceiver) |
| USB | Programming, data transfer, HID | ESP32-S3, RP2040, STM32F4 |
| Ethernet | Gateways, industrial | Raspberry 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 Case | Controller | Alternative |
|---|---|---|
| Simple Wi-Fi sensor | ESP8266 | ESP32-C3 |
| Wi-Fi sensor with OTA | ESP32 | ESP32-C3 |
| Battery sensor (no Wi-Fi) | STM32L0 | RP2040 + low-power radio |
| Edge AI | ESP32-S3 | Raspberry Pi |
| Gateway (Linux) | Raspberry Pi | Radxa, Banana Pi |
| Motor control | STM32F4 | ESP32 |
| Wearable | STM32L4 | nRF52840 |
| Industrial (wired) | STM32F4/H7 | NXP, Infineon |
| Prototyping | Arduino Uno R4 | ESP32, 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:
- Start with your requirements – power, connectivity, performance, and cost.
- Consider your team’s expertise – development time is often a hidden cost.
- Think about the future – will you need OTA updates? Edge AI? Scale?
- Don’t over-engineer – an ESP8266 may be enough for a simple sensor.
- 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
- Designing Scalable IoT Systems: A Practical Guide for Integrators – the main article providing a broad overview of IoT architecture.
- Ultra-Low-Power IoT: Achieving <1 µA Sleep Current – detailed STM32 power optimisation.
- Overview of Wireless Communication Protocols – deciding how your controller will communicate.
This article is based on practical experience building the N3xar platform, where a diverse range of controllers is deployed to meet varying client requirements.