Learning Objectives
By the end of this chapter, you will be able to:
- Compare Arduino, ESP32, Raspberry Pi, STM32, and Particle platforms across power, cost, connectivity, and ecosystem dimensions
- Justify platform selection for specific IoT project requirements using quantitative criteria such as battery life and total cost of ownership
- Operate interactive simulators to prototype and validate firmware on different platforms before purchasing hardware
- Assess the strengths, limitations, and production scalability of each platform family
Key Concepts
- Prototyping Platform: Standardised development board ecosystem (Arduino, Raspberry Pi, ESP32) with consistent pinout, libraries, and community support.
- Arduino: Beginner-friendly MCU ecosystem with standardised shields and a large library ecosystem, ideal for rapid iteration.
- ESP32: Dual-core MCU with Wi-Fi and Bluetooth, the dominant prototyping platform for connected IoT devices at $5 per module.
- Raspberry Pi: Linux-based single-board computer used for IoT gateways, edge AI, and applications requiring full OS support.
- MicroPython: Python 3 subset running directly on microcontrollers, enabling rapid scripting without C/C++ compilation.
- PlatformIO: Cross-platform embedded development environment supporting 900+ boards with dependency management and CI integration.
- Community Ecosystem: Libraries, tutorials, and forum support that dramatically accelerates development on popular prototyping platforms.
Prototyping is building rough, working versions of your IoT device to test ideas quickly and cheaply. Think of it like building a model airplane before constructing the real thing – a prototype reveals problems when they are still easy and inexpensive to fix. Modern prototyping tools make it possible to go from idea to working device in days rather than months.
“Picking the right hardware platform is like choosing the right vehicle for a journey!” said Max the Microcontroller. “An Arduino Uno is like a bicycle – simple, reliable, and great for short trips. An ESP32 is like a car – it has Wi-Fi and Bluetooth built in, so it can go places. A Raspberry Pi is like a truck – powerful enough to carry heavy loads like machine learning and video processing.”
Sammy the Sensor was overwhelmed. “How do I choose?” Max broke it down. “Ask yourself three questions. Do you need wireless connectivity? Go with ESP32. Do you need to run Linux or process images? Get a Raspberry Pi. Is your project simple with just a few sensors? An Arduino is perfect and costs less than five dollars.”
Lila the LED shared a tip. “For IoT prototyping, the ESP32 is the most popular choice because it includes Wi-Fi and Bluetooth at a low price. You can even simulate it online with Wokwi before buying real hardware!” Bella the Battery added her perspective. “From a power standpoint, Arduino and ESP32 can run on batteries for months. The Raspberry Pi needs a constant power supply – it draws way too much current for battery operation. Always consider power requirements when choosing your platform!”
Arduino Family
Arduino Uno
- MCU: ATmega328P (8-bit AVR)
- Speed: 16 MHz
- Memory: 32 KB Flash, 2 KB RAM
- I/O: 14 digital, 6 analog
- Best For: Learning, simple projects, hobbyist prototypes
Arduino Mega
- MCU: ATmega2560
- Memory: 256 KB Flash, 8 KB RAM
- I/O: 54 digital, 16 analog
- Best For: Projects requiring many I/O pins
Arduino Nano/Mini
- Compact form factors
- Same MCU as Uno
- Best For: Space-constrained projects
Arduino Due
- MCU: ARM Cortex-M3 (32-bit)
- Speed: 84 MHz
- Memory: 512 KB Flash, 96 KB RAM
- Best For: Computationally intensive applications
Arduino Strengths and Limitations
Strengths:
- Beginner-friendly IDE and ecosystem
- Massive community and library support
- Standardized form factor (shields)
- Abundant tutorials and examples
Limitations:
- Limited processing power
- No built-in Wi-Fi/Bluetooth (except Wi-Fi-enabled variants)
- 5V logic (compatibility issues with 3.3V devices)
ESP32/ESP8266 Family
ESP32
- MCU: Dual-core Xtensa LX6, 240 MHz
- Memory: 520 KB RAM, 4 MB Flash (typical)
- Connectivity: Wi-Fi 802.11 b/g/n, Bluetooth Classic + BLE
- Peripherals: Rich (ADC, DAC, touch sensors, SPI, I2C, UART)
- Power Modes: Deep sleep < 10 uA
ESP8266
- MCU: Single-core Xtensa L106, 80/160 MHz
- Connectivity: Wi-Fi 802.11 b/g/n
- Lower cost and simpler than ESP32
Strengths and Limitations
Strengths:
- Built-in Wi-Fi/Bluetooth
- Low cost ($2-10)
- Low power with deep sleep
- Arduino IDE compatible
- Active community
Limitations:
- Fewer I/O pins than Arduino Mega
- 3.3V logic only
- Wi-Fi stack consumes resources
Best For:
- Wi-Fi-connected sensors
- Home automation
- IoT gateways
- Battery-powered Wi-Fi devices
Interactive Simulator: Arduino Blink
What This Simulates: Classic Arduino Uno LED blink program - the first project for every maker
Programming Fundamentals:
- digitalWrite() function
- delay() timing
- setup() and loop()
- Pin modes
Hardware Fundamentals:
- GPIO pins (digital output)
- LED forward voltage
- Current limiting resistor
- Active HIGH/LOW
How to Use:
- Click Start Simulation
- Watch built-in LED on pin 13 blink every second
- Modify delay() values to change blink rate
- Try different pins (2-13) with external LED
Raspberry Pi Family
Raspberry Pi 4 Model B
- Processor: Quad-core ARM Cortex-A72, 1.5 GHz
- RAM: 1/2/4/8 GB options
- Connectivity: Gigabit Ethernet, Wi-Fi, Bluetooth
- Interfaces: USB 3.0, HDMI, GPIO header
- OS: Raspberry Pi OS (Linux), Ubuntu, Windows IoT
Raspberry Pi Zero/Zero W
- Compact, low-cost variant
- Single-core ARM11, 1 GHz
- 512 MB RAM
- Zero W adds Wi-Fi/Bluetooth
Raspberry Pi Pico
- MCU-class board (not Linux-capable)
- RP2040 dual-core Cortex-M0+, 133 MHz
- 264 KB RAM
- Best For: MCU projects needing custom silicon
Strengths and Limitations
Strengths:
- Full Linux environment
- Rich software ecosystem
- Powerful processing for edge computing
- Extensive peripherals
- Large community
Limitations:
- Higher power consumption (2-7W)
- Not real-time (Linux has scheduling latency)
- Larger form factor
- Requires SD card for boot
Best For:
- Edge gateways
- Video processing
- Machine learning inference
- Complex IoT applications