Scott Rapson's Exhaustive Testing Finds the Easiest, Lowest-Latency Wireless Microcontrollers
Covering everything from HC-05 modules to the Raspberry Pi, this impressive benchmarking endeavor delivers real-world data.
Electric UI's Scott Rapson has been benchmarking various ways to connect microcontrollers wirelessly — aiming to find the link that provides the lowest latency empirically, rather than relying on data sheets and synthetic best-case scenarios.
While standards groups, radio chipset vendors, and IoT [Internet of Things] system integrators happily talk about improvements to bandwidth, long-range capabilities, or how low their power consumption is, I've really struggled to find substantive information about latency beyond hand-wavy marketing superlatives," Rapson explains. "Calculating symbol rate and latency figures from radio first-principles is doable, but modern radio chipsets are also subject to protocol specific behaviors and increasingly complex software stacks."
The solution, then, is to attack the problem in the real world: getting a bunch of microcontrollers with radio transceivers and putting them head-to-head to see which delivers the lowest latency for uni-directional user interaction tasks — think "switching on a lightbulb" or "controlling a robot's actuators."
Rapson's tests focused on a selection of commonly-used devices: Silicon Labs RF+8051 running the SiK firmware, a HopeRF RFM95W with its Semtech SX1276 connecting over LoRa, the Nordic nRF24L01 connecting over 2.4Ghz, its nRF52850 running over the Nordic UART Bridge Service and Bluetooth Low Energy, the Espressif ESP32 connecting over ESP-NOW, Wi-Fi, IEEE 802.15.4, Bluetooth Low Energy with both Bluedroid and NimBLE, and Bluetooth Classic, HC-05/06 modules connecting over Bluetooth Classic, and the Raspberry Pi 4 Model B connecting over Wi-Fi.
In short: a decent list, covering "10k lines of code, a new year, and […] an overwhelming >200 tests across the different targets," Rapson writes. And the conclusion? A clear win for the Nordic nRF24 module: "it recorded the lowest minimum, lower/upper quartile, and median [latency] for 12B and 128B payloads.
"The easiest implementation was the ESP32-C6 with IEEE 802.15.4, followed by the transparent UART bridges SiK and HC-05, and ESP-NOW," Rapson continues. "The most frustrating work was troubleshooting the NimBLE stack on the ESP32. The perfect storm of sub-par default performance, stale example projects, and needing to continually cross-reference between the Espressif and MyNewt documentation websites and source-code."
Rapson's full, exhaustive write-up is available on the Electric UI website, and concludes with the advice that the Espressif ESP32-C6 is a solid choice for anyone looking to build low-latency IoT projects, followed by Nordic nRF parts "if you can tolerate a steeper learning curve."