nRF52840DK current consumption tests using PPK II

I am performing a tests on nRF52840DK to measure the System ON power consumption using PPK II. For all tests, I am using blinky example. The full code:

/*
 * Copyright (c) 2016 Intel Corporation
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <zephyr/kernel.h>
#include <zephyr/drivers/gpio.h>

/* 1000 msec = 1 sec */
#define SLEEP_TIME_MS   1000

/* The devicetree node identifier for the "led0" alias. */
#define LED0_NODE DT_ALIAS(led0)

/*
 * A build error on this line means your board is unsupported.
 * See the sample documentation for information on how to fix this.
 */
static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios);

int main(void)
{
	int ret;

	if (!gpio_is_ready_dt(&led)) {
		return 0;
	}

	ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE);
	if (ret < 0) {
		return 0;
	}

	while (1) {
		ret = gpio_pin_toggle_dt(&led);
		if (ret < 0) {
			return 0;
		}
		k_msleep(SLEEP_TIME_MS);
	}
	return 0;
}

I have followed guide that explains how to prepare nRF52840DK for measuring current consumption using PPK II:

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_ppk2%2FUG%2Fppk%2FPPK_user_guide_Intro.html

So I did the following:

1. Cut the SB40

2. Connect the Vin and Vout of the PPK II  to P22 of the nRF52840DK

3. Connect the USB (J2) to power the nRF52840DK

4. Start the nRF Power Profiler in Ampere meter mode

TEST1

  • SW6: Default mode
  • nRF Power source: VDD
  • nRF52840 powered through USB J2
  • PPK II in Ampere mode
  • USB (J2) to connected to power the DK

My system photo:

...

Results:

Concerns:
I was hoping to see the spikes every 1 second when the LED is turned ON but that does not seem to be the case. Additionally, there seems to be quite a bit of noise that looks like below when zoomed in:

TEST2

  • SW6: nRF only mode
  • nRF Power source: VDD
  • nRF52840 powered through USB J2
  • PPK II in Ampere mode
  • USB (J2) to connected to power the DK

When the SW6 is put in the nRF only mode, the program does not seem to be running. After putting the switch to nRF Only position, the com port dissapeared and the LED's stopped blinking, however the Power profiler graph looks very simillar to TEST1 (slightly less current consumption).

Results:

Concerns:
I have read about nRF only mode here: https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf52840_dk%2FUG%2Fdk%2Fnrf_only_mode.html

But I cannot fully figure out why would the LED not be working.

TEST3

For this test, I use PPK II source mode instead of Ampere mode.

  • SW6: Default mode
  • nRF Power source: VDD
  • nRF52840 powered by the PPK II through P21 connector 
  • PPK II in Source mode (3.3V)
  • USB (J2) to connected to power the DK

See my system photo:

Results:



Concerns:
The device does not seem to enter low power mode (current consumption is above 1mA. Also, I am not able to notice the spikes every 1 second when the LED is turned ON.

TEST4

  • SW6: nRF only mode
  • nRF Power source: VDD
  • nRF52840 powered by the PPK II through P21 connector 
  • PPK II in Source mode (3.3V)
  • USB (J2) to connected to power the DK

When the SW6 is put in the nRF only mode, the program does not seem to be running. After putting the switch to nRF Only position, the com port dissapeared and the LED's stopped blinking

Result:

TEST5

  • SW6: Default mode
  • nRF Power source: VDD
  • nRF52840 powered by the PPK II through P21 connector 
  • PPK II in Source mode (3.3V)
  • USB (J2) to disconnected

Results:

With the USB J2 disconnected, I can finally see some results that make sense. I can see the current consumption increase/decrease every 1 second when the LED is toggled

I have then tried to setup my nRF52840DK according this:

infocenter.nordicsemi.com/index.jsp

TEST6

Using Li-Po battery to power the board in addition to USB J2

  • SW6: Default mode
  • nRF Power source: VDD
  • nRF52840 powered by the Li-po battery (3.8V)
  • PPK II in Ampere meter mode
  • USB (J2) to connected to DK

Results:

TEST7

Using Li-Po battery to power the board and having the USB disconnected

  • SW6: Default mode
  • nRF Power source: VDD
  • nRF52840 powered by the Li-po battery (3.8V)
  • PPK II in Ampere meter mode
  • USB (J2) to disconnected 

Result:

As you can see from above, I have made power consumption experiments with 7 different configurations and only one (TEST5) provided results that makes any sense.

I would like to understand what is the most optimal way to measure the current consumption of the nRF52840 as there are many variables involved and it is not fully clear. 

Questions:

1. Regarding TEST1 it is not clear to me why I am not able to capture current consumption spikes when the LED turns ON. Is there a problem with the J2 USB? Should it be connected and what affect does it have? Since I use ampere meter mode, I have to power the board from an external source so I chose USB.

2. Regarding TEST2 it is very strange to me why the LED stops blinking and when the switch (SW6) is put in nRF only mode. From what I understand, the SW6 position in nRF only mode should disable the interface MCU, the debugging but everything that relates to main CPU including LED's should still function..

3. Regarding TEST3, I have used Source meter mode to externally power the device while having the USB plugged in. The current consumption is very strange and again, the LED toggling does not seem to show up on the graph.

4. Regarding TEST4, same issue that TEST2 has.. The LED stopped blinking and current consumption is quite strange... How can we explain this behaviour?

5. Regarding TEST5. Finally able to see the graph that makes some sense. The current increases/decreases at 1second intervals.. However the system does not seem to enter proper System ON low power mode when the task is idling. 

6. Regarding TEST6 and TEST7 I am not fully understanding why there is no difference whether I have the USB plugged in or plugged out?

7. So what is the truly correct way to measure the nRF52840DK current consumption? I am interested in the current consumption of the nRF52840 and all peripherals connected to it (LED's and whatever other sensors that I plug in and use). For this, I assume I should use nRF only mode to ensure the Interface MCU is cut off. But as I shown in my experiments above, when using nRF only mode the cpu does not seem to run properly - the LED's wont even blink.

Parents
  • Hi,

     

    When measuring current, it is important that you don't back-power the peripherals/logic around the nRF on the DK itself.

    You can find the schematic and layout of the DK on our website, for reference:

    https://www.nordicsemi.com/Products/Development-hardware/nRF52840-DK/Download?lang=en#infotabs

     

    I'm combining the answer on questions 1 to 4, as the root-cause is the same:

    It is because the LEDs are buffered through transistors, powered on a different voltage net.

    5. Regarding TEST5. Finally able to see the graph that makes some sense. The current increases/decreases at 1second intervals.. However the system does not seem to enter proper System ON low power mode when the task is idling. 

    Here you are sourcing the whole DK, including switches/buffers/etc.

    6. Regarding TEST6 and TEST7 I am not fully understanding why there is no difference whether I have the USB plugged in or plugged out?

    This is because you are powering the whole board via the external power. Here's the logic for v2.0.x of the DK (which looks like the rev you have):

    7. So what is the truly correct way to measure the nRF52840DK current consumption? I am interested in the current consumption of the nRF52840 and all peripherals connected to it (LED's and whatever other sensors that I plug in and use). For this, I assume I should use nRF only mode to ensure the Interface MCU is cut off. But as I shown in my experiments above, when using nRF only mode the cpu does not seem to run properly - the LED's wont even blink.

    The correct way depends on what the requirements are. The DK is setup to only measure the nRF + what-ever is connected to the GPIOs (except for the buffered LEDs)

    As per yours, it includes the VDD_PER net, which will require that you connect some solder bridges and using the "NRF ONLY" position:

     

    Kind regards,

    Håkon

  • The correct way depends on what the requirements are. The DK is setup to only measure the nRF + what-ever is connected to the GPIOs (except for the buffered LEDs)

    Ok lets forget the LED's for now (perhaps I will make modification to solder some bridges as you have suggested later)


    What would be the easiest method to see the device enter the system ON mode (measuring current in few uA range)? As you can see from all the graphs the device did not seem to have entered proper low power mode even though for some tests I have used nRF only mode? Since my measurements are not taking into account LED current consumption, I would assume to see the device enter ultra low power mode when the LED is turned OFF and the CPU is idling..

    Could you provide some steps how to achieve this and perhaps it will get clear to me what was the issue.

  • Hi,

     

    zazas321 said:
    What would be the easiest method to see the device enter the system ON mode (measuring current in few uA range)? As you can see from all the graphs the device did not seem to have entered proper low power mode even though for some tests I have used nRF only mode? Since my measurements are not taking into account LED current consumption, I would assume to see the device enter ultra low power mode when the LED is turned OFF and the CPU is idling..

    Have you set CONFIG_SERIAL=n in your prj.conf?

     

    Kind regards,

    Håkon

  • Il repeat the tests with serial turned OFF tommorow. 

    Additionally, I would like to further understand if there is a difference if I have the USB plugged in when performing measurements or not? I was under the impression that if the switch is set to nRF only  there should be no difference if the rest of DK is powered since we only measure nRF only?

    Is that right?

  • Sure, but can you confirm if there is a difference between the USB plugged in and USB not plugged in when using nRF only mode? From what I understand there should be no difference?

    Anyways, I have performed tests with CONFIG_SERIAL=n

    Here are the results:

    TEST8

    Using Li-Po battery to power the board and having the USB disconnected

    • SW6: nRF only mode
    • nRF Power source: VDD
    • nRF52840 powered by the Li-po battery (3.8V)
    • PPK II in Ampere meter mode
    • USB (J2) to disconnected 

    As you can see form the graph, I can see that the CPU enters system ON sleep mode and wakes up to perform some actions (toggling the GPIO) every 1 second. I guess that makes sense Slight smile

    TEST9

    • SW6: nRF only mode
    • nRF Power source: VDD
    • nRF52840 powered by the Li-po battery (3.8V)
    • PPK II in Ampere meter mode
    • USB (J2) to disconnected 

    Despite the fact that I have SW6 in nRF only mode, I am measuring the same current consumption as the nRF only mode. Is that because I dont have the USB plugged in which is required to power the interface MCU? 

    TEST10

    • SW6: Default mode
    • nRF Power source: VDD
    • nRF52840 powered by the Li-po battery (3.8V)
    • PPK II in Ampere meter mode
    • USB (J2) to connected

    Since I have the USB connected, the current shoots up every 1 second. Does that have to do anything with the Interface CPU being powered?

    TEST11

    • SW6: nRF only mode
    • nRF Power source: VDD
    • nRF52840 powered by the Li-po battery (3.8V)
    • PPK II in Ampere meter mode
    • USB (J2) to connected

    Despite the fact that I have the USB connected, I have the SW6 in nRF only mode so I assume that interface MCU is disabled (opposite as TEST10) is my understanding correct?

  • Hi,

     

    Having several power sources present simultaneously has been improved in newer board revisions, but I would recommend that you only keep one active.

     

    Kind regards,

    Håkon

Reply Children
No Data
Related