Power optimisation help

Hi Nordic Community

I am very new to Nordic products and the Zephyr RTOS so please forgive any silly questions.

I am trying to get a better understanding on how to obtain very low power usage and indeed, what low power measurements are actually achievable.

There is a lot of information in this forum about steps you can take to reduce power usage, but most of this refers to the older nRF5 SDK and not the newer nRF Connect SDK and the Zephyr RTOS.

I have an nRF52840DK, nRF52840 Dongle and Raytac mdbt50q-db-40 (52840 development board https://www.raytac.com/product/ins.php?index_id=81).

Scenario 1: Blinky App

On the DK when measuring power (with PPK2 setup as per the instructions) I can see usage of 4.6µA when the light is off. When the light is on is isn't much higher but I assume the LED isn't measured on the DK in this configuration.

On the Dongle, using the exact same app but built with the dongle profile, I measure 24.5µA when the light is off and 4850µA (4,9mA) when the light is on. According to this post (https://devzone.nordicsemi.com/f/nordic-q-a/70031/nordic-dongle-power-off-mode/287549#287549) you need to cut SB2 to save a 10µA. He was able to get power down to 0.5µA. I haven't cut SB2 yet as I am still frequently programming the dongle but even if I saved 10µA it would still be running at 14µA when sleeping. Any thoughts on how to get this power usage reduced?

Scenario 2: Custom Bluetooth Beacon App

I have created a thermometer beacon app which advertises every 10s and sends a periodic update every 5 seconds. It is connected to a SHT31 sensor via I2C and I am using the ADC to read a voltage divider from the battery to calculate the remaining battery life.

On the DK the average power usage is 20µA and 4.6µA when sleeping.

On the Dongle and the Raytac board the average power usage is 84µA and 61µA when sleeping (well perhaps it isn't sleeping?)

Is this sleep current (61µA for the whole dongle) correct or should it more closely match the DK current of 4.6µA? Is it possible to understand what is using current when it's supposed to be sleeping?

Even the 20µA average on the DK is much higher than what I would expect compared to the estimate provided by the Nordic Profiler Tool https://devzone.nordicsemi.com/power/w/opp/2/online-power-profiler-for-bluetooth-le which says around 6.3µA for my settings.

Reading through the forums, some of the items that were covered include:

  • Making sure the external crystals are used.
  • Disabling unused peripherals.
  • Using DC/DC rather than LDO.

In my testing I have completely removed all references to the sensor and the ADC to see if it makes any difference to the power but there was no change.

I have also tried to disable peripherals such as the following without any affect: (is this the correct way to disable peripherals?)

CONFIG_PWM=n
CONFIG_SPI=n

Some general questions:

Is there a specific guide somewhere that shows steps you can take to reduce power usage using the nRF Connect SDK with Zephyr?

Is there a reference app with known power draw that I can use to test power usage on the dongle (ie: the whole board and not just the nRF chip)?

Unless I have missed it, I don't see reference to setting crystal type or value, DC/DC settings or other power saving features in the sample apps. Are there default settings being applied?

Is it necessary for me to specify settings such as: (it didn't seem to make any difference when I used them)

CONFIG_CLOCK_CONTROL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=n
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_20PPM=y

I would appreciate any guidance on this.

Regards,

Gary

  • Hi 

    Quick update on my progress with this.

    I have managed to find the following blog post which contains a lot of good info around power optimisation on Zephyr https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/optimizing-power-on-nrf53-designs

    I also used the attached project to a comment on that post to further see how to implement some of the steps. (The project no longer compiles as some of the functions/API's have changed but I managed to get it working. You may want to consider updating it.)

    I am still working my way though all the steps detailed in the blog post but I managed to get the Blinky App on the nRF52840 Dongle into a very low power state.

    To start with I cut SB2 and soldered SB1 on the dongle and I then added 

    #include <pm/pm.h>
    #include <pm/device.h>
    to the main.c file and this reduced the sleep power usage to 3.27µA. 
    If I then add pm_power_state_force(0, (struct pm_state_info){PM_STATE_SOFT_OFF, 0, 0}); after a few repetitions of the blink then the power usage goes down to 0.39µA. This clearly shows me how low power the dongle is cable of going.
    This answers the "Scenario 1" in my post above.
    I tested the dongle with my custom BT Beacon app and the power usage went down to 66µA average and 41µA when "sleeping". This is 20µA lower than my previous measurements. I haven't managed to get it lower yet. I would like to get the sleep current to around the 3.3µA (same as the Blinky App) or lower.
    I am still confused about why the sleep current on the DK is 4.6µA but 41µA on the dongle? Since I now know that the dongle is capable of very low power usage what could be running on the dongle that isn't being measured on the DK?
    I will continue to apply the steps from the blog post and see if they make any difference. I would still appreciate feedback to my questions above please.
    Regards,
    Gary
  • Hi

    Here is another update on my project.

    I am very happy to let you know that I managed to get the power levels on the dongle much lower.

    The culprit was the SHT31 temperature/humidity sensor, or more specifically, the Zephyr driver for that sensor. Turns out the sensor has 2 modes of operation which include "single shot mode" or "periodic acquisition mode". The Zephyr driver defaults to the "periodic" mode and this creates a constant current draw of around 45µA. When I changed it to "Single Shot" mode that constant 45µA goes away.

    Now I am achieving an average power usage of 20µA and a sleep power usage of 3.4µA which is fine for its intended purpose.

    I can also see that the DC/DC is defaulted "On" in the Kconfig file located in the Zephyr Boards directory.

    # nRF52840 DK NRF52840 board configuration

    # Copyright (c) 2016 Nordic Semiconductor ASA
    # SPDX-License-Identifier: Apache-2.0

    if BOARD_NRF52840DK_NRF52840

    config BOARD_ENABLE_DCDC
    bool "Enable DCDC mode"
    select SOC_DCDC_NRF52X
    default y

    config BOARD_ENABLE_DCDC_HV
    bool "Enable High Voltage DCDC converter"
    select SOC_DCDC_NRF52X_HV
    default y

    endif # BOARD_NRF52840DK_NRF52840

    I haven't yet found any default settings for the external crystals. Can someone let me know what the default settings are and whether I need to specifically enable them myself?

    Regards

    Gary

  • Gary T said:
    Now I am achieving an average power usage of 20µA and a sleep power usage of 3.4µA which is fine for its intended purpose.

    Great!

    Gary T said:
    I haven't yet found any default settings for the external crystals. Can someone let me know what the default settings are and whether I need to specifically enable them myself?

    Default setting is to use the LF crystal. https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1/drivers/clock_control/Kconfig.nrf#L31

    For boards that does not have LF crystal, set CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

Related