The ESP32 is the go-to microcontroller for DIY projects, smart home sensors, and other lightweight projects, but it’s not the only game in town. If energy efficiency is high on your list of priorities, the nRF52 series might be a better choice.
It all depends on what you’re comfortable sacrificing in the name of battery life.
Introducing Nordic Semiconductor’s nRF52
A very lightweight line of microcontrollers
Nordic Semiconductor is the company behind the nRF series of chips. The company makes a whole variety of chips, though the nRF52 seems to be the most popular choice among hobbyists.
Like the ESP32, the nRF52 is a microcontroller that’s available in a range of configurations. This isn’t a full-blown single-board computer like a Raspberry Pi, but rather a microcontroller. Code is flashed to the microcontroller’s ROM and the chip generally performs a single function.
Of the nRF52 series, the nRF52840 sits at the top of the pack. It packs in a 64MHz single-core processor, 1MB of flash memory, and 256KB of RAM. Wireless protocols include Bluetooth Low Energy (BLE), Bluetooth mesh, Thread, Zigbee, and proprietary 2.4GHz protocols.
There’s also a good range of interfaces including up to 48 GPIO pins, SPI, UARTE, I2S, and USB among others. There’s a full range of tech specs for the full series available on Nordic’s website, but there are a few things that really stand out when comparing the chip to the market-leading microcontroller for DIY projects.
This makes the nRF52 better for some jobs, and worse for others.
Why pick the nRF52 over the ESP32?
Power efficiency is the name of the game
You might have spotted it already, but none of the nRF52 chips feature Wi-Fi connectivity. This is in stark contrast to the ESP32, where almost every chip can connect to your wireless network. For many, this is the primary means of interacting with any devices built with an ESP32, like a smart home sensor or Bluetooth proxy.
Instead, you’ll need to use BLE or low-power mesh network protocols like Zigbee, Thread, and Bluetooth mesh to send data to and read data from the microcontroller. For some, the lack of Wi-Fi will be a deal-breaker, but for others it’s part of what makes the nRF52 so appealing.
Power efficiency above all else is the aim of the game here. Wi-Fi is a thirsty protocol, and requires a lot more energy to use than the aptly-named low-energy Bluetooth variant or mesh technologies like Zigbee. For smart home purposes, you’ll need to deploy Bluetooth on your Home Assistant server or invest in a mesh network coordinator like the ZBT-2 to make this happen.
The other thing worth noting is that the nRF52 lacks processing power compared to even the lightest ESP32 variants. This goes hand in hand with the lack of Wi-Fi in pursuit of power efficiency. It further narrows the field in terms of what you might want to use these chips for.
These chips are also marginally more expensive, but at less than $10 they’re still cheap enough to experiment with.
Building your first nRF52-based device
And a project to get you started
Nordic Semiconductor has developed the nRF Connect SDK for building low-power wireless devices with its chips. It’s based on the open-source Zephyr real-time operating system (RTOS), and you can develop applications in a Windows, Mac, or Linux environment if you’re working from scratch.
Thankfully, support for the nRF52 series has improved among competing platforms and SDKs. Most notably, the ESPHome project has added support for the nRF52 in particular. This makes a lot of sense considering how well suited the chip is to low-power applications like smart home sensors.
The ESPHome protocol specifically supports Adafruit’s Feather and Itsybitsy boards, plus Seeed Studio’s XIAO BLE board (though the project notes that other boards should work too). With ESPHome installed, you can use simple YAML files to build smart home devices using a vast range of components. Other popular SDKs you can use include MicroPython and Arduino.
If you’re looking for a project to get started, consider the hidden temperature and humidity sensor. This nRF52840 project is built into an IKEA photo frame along with an 1,100 mAh rechargeable lithium polymer battery. The author of the project, YouTuber Microamp Home, picked the board for its minuscule power draw compared to ESP32 alternatives.
While the nRF52 takes the win for power efficiency, ESP32 remains one of the most versatile microcontroller families you can buy. These tiny chips are even capable of running full operating systems.
