Many appliances need a human’s attention to perform maintenance actions. For example, James's lab dehumidifier turns on an LED to indicate its reservoir is full. Wouldn’t it be nice if it could use the Internet to notify someone it needs emptying? With the help of Nordic’s nRF7002 Design Kit (DK), it is now possible to get a phone notification when an LED turns on.
Watch the Video:
Project Overview
James reviewed Nordic’s nRF7002 design tools in another video. The nRF70 is a dual-band Wi-Fi 6 companion IC for microcontrollers (MCUs.) He planned to use the QFN-packaged chip in a custom printed circuit board (PCB). However, things do not always go as planned.
Initially, James used the nRF7002 Design Kit (DK) board. This board has the nRF70 and chip antennas for both bands. It also features an nRF5340 application processor connected to the nRF70. The board has various header pins, breakout points, and other useful debug features. For example, it has a third chip, which is another MCU. However, that MCU is dedicated to programming and debugging the application processor.
Nordic’s nRF SDK Connect is based on the Zephyr real-time operating system. There is an example for the nRF7002 DK that connects to an MQTT broker and sends a message once per minute. James modified that example to read for an analog-to-digital converter (ADC) input and send that value to the broker. Feeling confident about his new Zephyr skills, James tried changing microcontrollers.
Xiao + nRF7002
Since this project really only needs a single analog input, the Seeed Studio Xiao BLE seemed like a perfect choice. It has a Nordic microcontroller and just enough I/O pins to connect to an nRF7002. After spending some time modifying the Zephyr Devicetree and reconfiguring a blink project for the Xiao, James had a blinking LED.
However, that’s when James discovered a significant mistake with the design!
The Xiao’s microcontroller is Nordic’s nRF52840. This chip only has a single core and 256 kilobytes of RAM. The nRF53 on the nRF7002 DK has a dual-core processor with their own RAM. The chip dedicates one core to the user application and (optionally) the other core to managing network operations. The application processor has twice the RAM of the nRF52!
This difference is significant because the MQTT example needs almost 250 kilobytes of RAM! In other words, there isn’t enough memory to run the code on the Xiao BLE!
Back-Up Plan
Since James really wanted a Wi-Fi LED Detector, he decided to go another route. He built the project around the design kit instead of his custom PCB. After all, the fundamental code was already in place!
The first step was to solder the photoresistor to the DK board. Next, James installed it into a 3D-printed case. A few measurements and tests then demonstrated that detecting whether the dehumidifier’s FULL light was ON or OFF was possible.
With the hardware working, James used a Nordic Power Profiler Kit 2 to see how much energy a Wi-Fi LED Detector would consume on average. The answer? About 4.25 milliamps!
That number is really high for an IoT device. However, it is very good for an IoT device based on a design kit and with ZERO code optimizations–like sleep modes. So, James decided to just wrap up this stage of the project here.
RF Measurements
A lesson James learned is that he should have studied the code examples more before designing a custom PCB. Even though the custom board wouldn’t work how he needed it, James still wondered what the RF path looked like.
Using a Vector Network Analyzer (VNA), James measured the response of the dual-band antenna. It looks good for the 2.4 GHz Wi-Fi bands. However, James is concerned that the response is a bit weak for the 5 GHz bands.
Regardless, it still looked good on the VNA for a first try!
Downloads & Links:
- Download Code, CAD Files, and More!
- Sign Up to Review the Nordic Wi-Fi 6 IC Dev Kit nRF7002 DK with WI-Fi 6 Router
- A Nordic DevAcadamy Course on the nRFConnect SDK by skruglewicz
- Hands-on with Nordic’s nRF7002 DK, EK, and EB Boards - Workbench Wednesdays 82
- Nordic MQTT Example
- Nordic ADC Example
- Ohm’s Law Calculator
Bill of Material:
Product Name | Manufacturer | Quantity | Buy Kit |
---|---|---|---|
nRF7002, RF Transceiver, 2.401 GHz to 5.895 GHz, 86 Mbps,-98.6 dBm , 21 dBm Pout, 2.9V to 4.5Vsupply, QFN-48 | Nordic Semiconductor | 1 | Buy Now |
nRF7002-EK, Evaluation Kit (Shield Style) | Nordic Semiconductor | 1 | Buy Now |
nRF7002-DK, Design Kit | Nordic Semiconductor | 1 | Buy Now |
nRF7002-EB, Evaluation Board | Nordic Semiconductor | 1 | Buy Now |
nRF52840 Xiao (BLE) | Seeed Studio | 1 | Buy Now |