nRF9160DK current consumption measurement.

Hi Team,

I’m currently evaluating the new custom PCB we designed and need to measure its sleep current consumption.

To do this, I plan to create simple firmware for the nRF9160DK. Using an overlay file, I’ll disable unnecessary features, set the necessary GPIOs to high or low, and then check the current consumption.

The first step is to create firmware for the DK to put it into sleep mode.

I follow the steps in this guide https://devzone.nordicsemi.com/guides/hardware-design-test-and-measuring/b/nrf9x/posts/getting-started-with-current-measurements-on-the-nrf9160#:~:text=The%20best%20way%20to%20measure%20current%20on%20the%20nRF9160%20DK

Here is the code

#include <zephyr/kernel.h>
#include <modem/lte_lc.h>

int main(void)

{

	while (1)
	{
		lte_lc_offline();
		k_sleep(K_MSEC(1000));
		NRF_REGULATORS->SYSTEMOFF = 1;
	}
	return 0;
}

prj.conf

CONFIG_LTE_LINK_CONTROL=y

# enable GPIO
CONFIG_GPIO=n

# Enable uart driver
CONFIG_SERIAL=n

# enable console
CONFIG_CONSOLE=n
CONFIG_UART_CONSOLE=n

CONFIG_LOG=n

I built the firmware for the nrf9160dk_nrf9160_ns and flashed it.

For current measurement, I’m using the PPKII, and the current reading is 2.86mA.

However, when I tested the compiled .hex file from the guide, the current dropped to 387µA. After resetting, it decreased further to 1.6µA.



Then I flashed back the samples I created, and consumption is the same 1.6uA till the moment I completely remove power, disconnect the USB, and reconnect everything, the current increases back to 2.86mA. To bring it back down to 1.6µA, I need to flash the DK again only with precompiled .hex from guide. This is a black box for me now.  

I am using SDK 2.6.1, DK 1.1.0

Parents
  • Hi,

     

    Then I flashed back the samples I created, and consumption is the same 1.6uA till the moment I completely remove power, disconnect the USB, and reconnect everything, the current increases back to 2.86mA. To bring it back down to 1.6µA, I need to flash the DK again only with precompiled .hex from guide. This is a black box for me now.  

    Do I understand correctly when your sample can go down to 1.6 uA, but will go into a high consumption state after a power cycle?

    Could you share how you connect the power, and where you measure the current? Note that there are capacitances on the kit itself, so it is important that you let the board itself power down to 0V before power cycling.

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    Then I flashed back the samples I created, and consumption is the same 1.6uA till the moment I completely remove power, disconnect the USB, and reconnect everything, the current increases back to 2.86mA. To bring it back down to 1.6µA, I need to flash the DK again only with precompiled .hex from guide. This is a black box for me now.  

    Do I understand correctly when your sample can go down to 1.6 uA, but will go into a high consumption state after a power cycle?

    Could you share how you connect the power, and where you measure the current? Note that there are capacitances on the kit itself, so it is important that you let the board itself power down to 0V before power cycling.

     

    Kind regards,

    Håkon

Children
  • Hi Hakon,

    I prepared the video of the test, please check. 


    The issue is that my code works only if I flash it after precompiled .hex file from the guide and only till the power cycle.

  • Hi,

     

    Thank you for sharing such a detailed howto.

    Could you try to add this line before entering the while-loop?

    nrf_modem_lib_init();

     

    The whole program will then look like this:

    #include <zephyr/kernel.h>
    #include <modem/lte_lc.h>
    #include <modem/nrf_modem_lib.h>
    
    int main(void)
    
    {
    	nrf_modem_lib_init();
    	while (1)
    	{
    		int ret = lte_lc_offline();
    		k_sleep(K_MSEC(1000));
    		NRF_REGULATORS->SYSTEMOFF = 1;
    	}
    	return 0;
    }

     

    Kind regards,

    Håkon

Related