Following on the heels of the success with my nRF52840DK power consumption, I moved to my XIAO nRF52840 board. This was the board I wanted to run my Zigbee F.A.R.T, sensor on.

I used the same arrangement as before, with the Nordic Power Profiler Kit (PPK) supplying 3.3v. I soldered a connector to the battery terminals underneath the XIAO board and wired the PPK to them.

As before, I decided to start with Blinky! I reset it all back to the original Zephyr sample and flashed it.

Very familiar pattern! 3.2mA when the LED is on and about 2.5mA when it’s off. Average consumption was 2.17mA.

I added in the same CONFIG changes as I had on the DK, but unfortunately, the code wouldn’t compile! The problem was the CONFIG_SERIAL setting. Setting it to n prevented the code from compiling 🤬

I left it at “y” and added my overlay changes, which turn off lots of the peripherals.

This vastly improved the situation! Same 1 second on/off blinking of the LED, but the average power consumption was now only 650µA. That’s about 140 days on battery power. This was very encouraging.

Fixing the config

The solution to the compilation problem was to add CONFIG_CONSOLE=n. With that setting in place, I was able to compile and flash the code.

This didn’t affect the power consumption at all though. It stayed at an average of 650µA.

So I chose to look at the periods when the LED was off.

Zooming in showed the “off” periods used about 300µA on average. This was higher than the DK consumption, but perfectly acceptable for my needs!

Back to Zigbee!

Happy enough Blinky and with a solution to the compilation error, I moved back to my Zigbee code.

I flashed it on and…

…the power consumption was up at 8mA!!!! Whilst the LED was supported to be flashing, it wasn’t.

My heart sank! 8mA was a measly 10 days on a battery. Not good at all.

I then realised that this pattern was the same as the DK experiments. It was the Zigbee radio listening for signals!

I immediately opened Home Assistant and started the pairing process. Sure enough, the device appeared and got added in, with the two temp probes showing!

In the same fashion as the DK, the consumption then plummeted to an average of 410µA! Phew.

410µA is about 210 days on battery power, which exceeds my battery life target of 6 months!!

Given my amateur code, I’m confident there is room to shave more off the top of this. The DK was down at 250µA, so I know it’s possible.

I just need to more experience with Zephyr, Nordic and the XIAO board! As I’ve said about one hundred times, I’m an amateur at embedded programming and there is nothing wrong with that 🙂

Every day is a school day.

What’s next?

My code needs more work. I’ve been trying to add some status LED support e.g. ready to pair, identifying, etc, but they don’t work properly yet.

I’ve love to get the consumption down to 200µA. If 400µA is the best I can do, I’m still chuffed with that!!

Support

If you find my blog posts useful and want to show your appreciation, you can always buy me a coffee. Your support is appreciated!

Buy Me a Coffee at ko-fi.com

Be sure to check out my YouTube channel.

5 responses

  1. I reckon you could do _a lot_ better than the 400uA using Matter over Thread if this post is anything to go by: https://devzone.nordicsemi.com/f/nordic-q-a/96873/power-consumption-of-matter-template-example. You could probably get close with Zigbee too though I believe Matter over Thread has the better lower bound (and maybe better SDK?).

    It looks like this guy achieved ~65uA steady state which would get your expected battery life to ‘a few years’ 😂 He also has it reporting every 10 seconds which could be played with to either increase or decrease the desired battery life. One could even use a smaller battery if desired! The Eve Weather uses an NRF52840 run on a CR2450 (~600mAh) and claims 1+ year battery life with an eink display (caveat: it only reports every 10 minutes)!

    1. A lot of what I read said that 100uA should be easily achievable with reasonable reporting frequency. It will take time to delve deeper into the SDK and the various configuration settings. 400uA is good enough for me right now as it will hit the 6 month life I wanted to see. 65uA would be over three years!! The question is just how much time it would take me to get down that low. The temperature probes etc will also use small amounts of current and that’s probably much harder to manage.

      Hoping I’ll get down to 200uA easily enough.

      1. I’ve managed to get my Zigbee device down to <20 µA! That’s over a year on a coin battery.

        No reason to suspect I can’t do the same on an ESP32. Questioning whether or not I should just stick to the nRF52840 for now.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.