Zigbee low power end device

Hi,

What is the lowest possible current consumption for nrf52840 dongle dev board with zigbee ?

I'm using this for development and i'm getting 20-30uA in idle. Is it possible to go down with current consumption to 2-3uA ? I know that it is possible without zigbee because I prepared a minimal test app that just calls k_sleep in main and then the current consumption is about 2-3uA. But when I created minimal test app with zigbee I cannot get lower than 20uA.

Below is my minimal zigbee app:

#include <zephyr/kernel.h>
#include <ram_pwrdn.h>

#include <zboss_api.h>
#include <zigbee/zigbee_app_utils.h>
#include <zb_nrf_platform.h>

void zboss_signal_handler(zb_bufid_t bufid)
{
    zigbee_default_signal_handler(bufid);
    if (bufid) {
        zb_buf_free(bufid);
    }
}

int main(void)
{
    zb_set_rx_on_when_idle(ZB_FALSE);
    power_down_unused_ram();

    zigbee_enable();

    k_sleep(K_FOREVER);
    return 0;
}

CONFIG_SERIAL=n
CONFIG_GPIO=n
CONFIG_CONSOLE=n
CONFIG_BOARD_SERIAL_BACKEND_CDC_ACM=n

CONFIG_ZIGBEE_ADD_ON=y
CONFIG_ZIGBEE_APP_UTILS=y
CONFIG_ZIGBEE_ROLE_END_DEVICE=y

CONFIG_RAM_POWER_DOWN_LIBRARY=y

CONFIG_NET_IPV6=n
CONFIG_NET_IP_ADDR_CHECK=n
CONFIG_NET_UDP=n

  • That is great news ! So it is possible to lower the current consumption and there must be something wrong with my setup.

    Do You ave any samples for sleeping device on nrf52840 dongle ? Because I still get 20uA with light_switch example but I had to adapt it to nrf52840 dongle.

    One thing that I just noticed is that the CPU is waking up every 1 second when in idle. Is this correct behaviour or result of misconfiguration ?

  • Hello,

    It looks like I messed up my units. My measurements were for the mA order, but you are of course talking about µA. My apologies for the mistake.

    So my test did not in fact show lower draws than yours.

    rozpruwacz said:
    Do You ave any samples for sleeping device on nrf52840 dongle ? Because I still get 20uA with light_switch example but I had to adapt it to nrf52840 dongle.

    We don't have any SED samples which support the nRF52840 Dongle out of the box.

    How did you modify the sample? Could you share the files which you changed and added to the sample?

    One source for higher power draw can be that some peripherals are initialized. They can be disabled in a devicetree overlay and some instructions are found here: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/test_and_optimize/optimizing/power_general.html#disable_unused_pins_and_peripherals

    I'll also do some more work where I make sure to disable unused peripherals, but let me know if you have any progress in the mean time. I'll get back to you early next week.

    Best regards,

    Maria

  • Hi,

    I have finally found the culprit. It was the ncs,zigbee-timer chosen node. I used the dt overlay from light_switch sample:

    / {
    	chosen {
    		ncs,zigbee-timer = &timer2;
    	};
    };
    
    &timer2 {
    	status = "okay";
    };

    I disabled timer2 and removed ncs,zigbee-timer node and current consumption went down to 3-4uA in idle which is a very good result.

    From the ncs-zigbee code I can see that the same can be achived by selecting CONFIG_ZIGBEE_TIME_KTIMER=y which is described in the docs as:

    "Configures the ZBOSS OSIF layer to use Zephyr's system time as the Zigbee time source"

    But this is not clear to me what are the consequences of that setting. Is it ok to use CONFIG_ZIGBEE_TIME_KTIMER=y ? I can see that this setting is selected only in ncp sample. Why is that ?

    PS.

    Another tip to keep current consumption low when using gpio buttons with native zephyr input subsystem (CONFIG_INPUT=y) is to set sense-edge-mask parameter in DT:

    &gpio0 {
        sense-edge-mask = <0xffffffff>;
    };
    
    &gpio1 {
        sense-edge-mask = <0xffffffff>;
    };

  • Hello,

    Pardon the delay and the short response.

    CONFIG_ZIGBEE_TIME_KTIMER is chosen when timer2 is not configured in devicetree. See the Kconfig symbol definition here: https://github.com/nrfconnect/ncs-zigbee/blob/main/subsys/Kconfig#L394-L406.

    Since timer2 is configured for all other samples than ncp, CONFIG_ZIGBEE_TIME_COUNTER is chosen by default.

    Best regards,

    Maria

Related