ESP32 vs nRF52840: Which Platform?
Two microcontroller platforms dominate the LoRa mesh hardware landscape: Espressif's ESP32 family and Nordic Semiconductor's nRF52840. Both are capable, both are well-supported by Meshtastic and MeshCore firmware, and both pair with the SX1262 radio. But they are optimized for fundamentally different use cases, and choosing the wrong one has real consequences.
Platform Comparison at a Glance
| Feature | ESP32 / ESP32-S3 | nRF52840 |
|---|---|---|
| Manufacturer | Espressif Systems | Nordic Semiconductor |
| CPU cores | Dual-core Xtensa LX6/LX7 (ESP32-S3) | Single-core ARM Cortex-M4F |
| CPU speed | 240 MHz | 64 MHz |
| RAM | 512 KB SRAM (+ external PSRAM on some boards) | 256 KB SRAM |
| Flash | Typically 4 - 16 MB (external) | 1 MB internal (+ optional external) |
| WiFi | Yes (2.4 GHz 802.11 b/g/n) | No |
| Bluetooth | BLE 5.0 | BLE 5.0 + Bluetooth Mesh |
| Active current (typical) | 80 - 240 mA | 10 - 20 mA |
| Deep sleep current | 10 - 150 µA (varies by variant) | 1.9 - 8 µA |
| Supply voltage | 3.0 - 3.6V | 1.7 - 5.5V (natively tolerant) |
| Operating temp range | -40°C to +85°C (commercial grade varies) | -40°C to +85°C |
| Hardware crypto | AES accelerator, SHA accelerator | ARM TrustZone + hardware crypto engine |
| USB native | Yes (ESP32-S3, -S2, -C3) | Yes |
Power Consumption: The Real Numbers
For battery-powered mesh nodes, power consumption is frequently the deciding factor. Here are measured averages for a LoRa mesh node in active listening mode (radio on, MCU active, no WiFi):
| Condition | ESP32-S3 | nRF52840 | Factor Difference |
|---|---|---|---|
| Active (CPU + radio RX) | 80 - 120 mA | 15 - 20 mA | nRF52840 uses ~5 - 6x less |
| Light sleep (radio on) | 2 - 5 mA | 0.5 - 1 mA | nRF52840 uses ~4x less |
| Deep sleep (radio off) | 10 - 100 µA | 1.9 - 8 µA | nRF52840 uses ~5 - 50x less |
| Transmit (100 mW / +20 dBm) | ~400 - 500 mA peak | ~350 - 400 mA peak | Similar (dominated by PA current) |
Practical implication: A node that spends 95% of its time in light sleep will consume roughly 3 - 5 mA on ESP32-S3 vs 0.6 - 1 mA on nRF52840. On a 2000 mAh 18650 cell, that is:
- ESP32-S3: ~400 - 650 hours (~17 - 27 days)
- nRF52840: ~2000 - 3300 hours (~83 - 137 days)
This 4 - 5x difference is why nRF52840 is the correct choice for battery-powered or solar nodes, and the ESP32 is acceptable only when AC power is available.
Sleep Modes Explained
ESP32 Sleep Modes
- Active: Full operation, both cores running, radio on
- Modem sleep: WiFi/BT radio off, CPU running - not useful for mesh nodes since the LoRa radio is external
- Light sleep: CPUs paused, memory retained, peripheral clocks gated. ~0.8 mA total system (good for ESP32-S3 with LoRa radio in sleep)
- Deep sleep: Most of chip off, only RTC domain active. ~10 - 150 µA depending on wakeup configuration
- Hibernation: Only RTC timer active. ~5 µA but loses GPIO state
Key limitation: the ESP32's sleep modes interact poorly with external peripherals. Bringing WiFi up from deep sleep takes 200 - 400 ms - during which messages can be missed.
nRF52840 Sleep Modes
- System On (active): Full operation, up to 64 MHz CPU
- System On (idle): CPU halted, peripherals running - ~1 - 3 mA
- System On (low power): Aggressive clock gating - ~0.5 - 1 mA
- System Off: Only GPIO wakeup retained - ~1.9 µA typical
The nRF52840's architecture allows the BLE radio and application code to be active simultaneously in time-division, with very efficient power management built into the SoftDevice BLE stack.
WiFi: ESP32's Biggest Advantage
The ESP32's integrated 802.11 WiFi is a genuine capability that the nRF52840 lacks entirely. This matters for:
- MQTT bridging: An ESP32 node can connect directly to a WiFi network and forward mesh messages to an MQTT broker without any additional hardware
- OTA firmware updates: WiFi-based OTA is reliable and convenient; no cable required
- Web configuration interface: Meshtastic's web UI is served over WiFi from the node itself
- NTP time sync: WiFi-enabled nodes can sync accurate time without GPS
If your deployment scenario requires WiFi connectivity from the node itself - for example, a Meshtastic MQTT gateway or a node that serves as both a mesh device and a WiFi access point - the ESP32 is the better choice.
BLE Capabilities
Both platforms support BLE 5.0 and use it for phone-to-node configuration and message viewing via the Meshtastic and MeshCore apps. In practice, BLE performance is similar between the platforms. The nRF52840 additionally supports Bluetooth Mesh natively, but this is not used in current Meshtastic/MeshCore deployments.
Community and Software Support
| Criterion | ESP32 | nRF52840 |
|---|---|---|
| Meshtastic support | Excellent - most boards are ESP32 | Excellent - RAK4631, T-Echo, Station G2 all supported |
| MeshCore support | Good - T-Beam Supreme, Heltec V3 supported | Excellent - RAK4631 is the primary MeshCore platform |
| Community size | Larger overall (ESP32 dominates maker ecosystem) | Smaller but highly technical |
| Documentation quality | Extensive (Arduino, ESP-IDF, PlatformIO) | Good (Zephyr RTOS, Nordic SDK, Arduino) |
| Custom firmware development | Easier (Arduino IDE widely used) | Requires more expertise (Zephyr preferred) |
Decision Guide
| Use Case | Recommended Platform | Reason |
|---|---|---|
| Solar or battery repeater | nRF52840 | 4 - 5x better battery life is decisive |
| Portable handheld (multi-day) | nRF52840 | Extended field battery life |
| WiFi-connected gateway | ESP32 | Only platform with integrated WiFi |
| Mains-powered room server | ESP32 or Pi | Power draw irrelevant; WiFi useful |
| First node / beginner | ESP32 | More tutorials, more community support, cheaper |
| Secure or production mesh | nRF52840 | ARM TrustZone hardware security |
No comments to display
No comments to display