How can I minimize operating current as lower as possible?

Hello~

I am developing nrf52840 with zephyr ncs tool chain v2.7.0 and SDK v2.6.1.

Our hadware is very simple, just a power IC, a nrf52840 and a G-sensor.

Our pre-production PCB average current is 600uA when normal operating. We want to minimize it to around 120uA (This is the estimate current value we get from here:  Online Power Profiler for Bluetooth LE  )

When normal operation, without scan, with advertising and sleep 100 ms in main loop. And we  turned on ADC, I2C also.

And when normal operation, G-sensor is off.

We turn on DCDC also.

This is our Device tree, we had turned off all unused function blocks.

/ {
    zephyr,user {
        io-channels = <&adc 0>;
    };

    // redefine button pins
    // Left :   buttonL
    // Right :  buttonR
    // Up:      buttonU
    // Down :   buttonD
    // PWR  :   buttonP
    buttons {
        compatible = "gpio-keys";
        debounce-interval-ms = <200>;
        buttonL: button_0 {        
            gpios = <&gpio0 26 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
            label = "Left button switch 1";
            zephyr,code = <INPUT_KEY_0>;
        };

        buttonR: button_1 {        
            gpios = <&gpio0 27 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
            label = "Right button switch 2";
            zephyr,code = <INPUT_KEY_1>;
        };

        buttonU: button_2 {        
            gpios = <&gpio0 6 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
            label = "Up button switch 3";
            zephyr,code = <INPUT_KEY_2>;
        };

        buttonP: button_3 {        // the middle one
            gpios = <&gpio0 7 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;  
            label = "Down button switch 4";
            zephyr,code = <INPUT_KEY_3>;
        };

        buttonB: button_4 {        // the bottom one
            gpios = <&gpio0 5 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;  
            label = "Power button switch 5";
            zephyr,code = <INPUT_KEY_5>;
        };
        
    };

    leds {
		compatible = "gpio-leds";
		led0: led_0 {
			gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
			label = "Red LED 0";
		};
		led1: led_1 {
			gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
			label = "Green LED 1";
		};
		led2: led_2 {
			gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
			label = "Blue LED 2";
		};
	};

    aliases {
        btn0 = &buttonL;
        btn1 = &buttonR;
        btn2 = &buttonU;
        btn3 = &buttonP;
		btn4 = &buttonB;
    };

    gpio-inputs 
    {
        compatible = "gpio-keys";
        gsensor_int: gsensor_int {
            gpios = <&gpio0 11 (GPIO_ACTIVE_HIGH)>;
            label = "g-sensor interrupt";
            zephyr,code = <INPUT_KEY_6>;
        };
    };

    gpio-outputs
    {
        compatible = "gpio-leds";
        adc_en: adc_en {
            gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
            label = "ADC enable";
        };
    };
};

&adc {
       #address-cells = <1>;
       #size-cells = <0>;
       status= "okay";
       channel@0 {
           reg= <0>;
        
           zephyr,gain = "ADC_GAIN_1_6";
           zephyr,reference = "ADC_REF_INTERNAL";
           zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 10)>; //<ADC_ACQ_TIME_DEFAULT> : 10us
           zephyr,input-positive = <NRF_SAADC_AIN2>; // P0.04
           zephyr,resolution = <12>;
           zephyr,oversampling = <8>;
       };
};


&i2c0 {
	compatible = "nordic,nrf-twim";
	status = "okay";
	clock-frequency = <100000>;
    pinctrl-0 = <&i2c0_default>;
	pinctrl-1 = <&i2c0_sleep>;
    zephyr,concat-buf-size = <64>;
    zephyr,flash-buf-max-size = <64>;
	/*Gsensor:Gsensor@50 {
        compatible = "i2c-device";
		label = "i2c Gsensor addr 0x50";
		reg = <0x50>;
	};*/
};

&pinctrl {
    i2c0_default: i2c0_default {
        group1 {
            psels = <NRF_PSEL(TWIM_SDA, 0, 12)>,
                <NRF_PSEL(TWIM_SCL, 0, 13)>;
        };
    };

    i2c0_sleep: i2c0_sleep {
		group1 {
			psels = <NRF_PSEL(TWIM_SDA, 0, 12)>,
				<NRF_PSEL(TWIM_SCL, 0, 13)>;
			low-power-enable;
		};
	};

    // reserve form mp debug
    uart0_default: uart0_default {
		group1 {
			psels = <NRF_PSEL(UART_TX, 0, 29)>,
				<NRF_PSEL(UART_RTS, 0, 8)>;
		};
		group2 {
			psels = <NRF_PSEL(UART_RX, 0, 30)>,
				<NRF_PSEL(UART_CTS, 0, 7)>;
			bias-pull-up;
		};
	};

	uart0_sleep: uart0_sleep {
		group1 {
			psels = <NRF_PSEL(UART_TX, 0, 29)>,
				<NRF_PSEL(UART_RX, 0, 30)>,
				<NRF_PSEL(UART_RTS, 0, 8)>,
				<NRF_PSEL(UART_CTS, 0, 7)>;
			low-power-enable;
		};
	};

};

//uart0 confict with button3,4
&uart0 {
    status="disabled";
};

&uart1 {
    status="disabled";
};

&pwm0 {
    status="disabled";
};

&i2c1 {
    status="disabled";
};

&spi0 {
    status="disabled";
};

&spi1 {
    status="disabled";
};

&qspi {
    status="disabled";
};

&spi3 {
    status="disabled";
};

&ieee802154 {
    status="disabled";
};

&usbd {
    status="disabled";
};


&power {
    status = "okay";
};

&clock {
    status = "okay";
};

&acl {
    status = "disabled";
};

&cryptocell {
    status = "okay";
};

&temp {
    status = "disabled";
};

&nfct {
    status = "disabled";
};

&wdt {
    status = "disabled";
};

This is power management settings in our project:

CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_RUNTIME=y
CONFIG_POWEROFF=y
CONFIG_PM_CPU_OPS=y
CONFIG_BOARD_ENABLE_DCDC=y

Do you have any ideas on "how to minimize operating current to 120 uA " ?

Parents Reply Children
  • Hi!

    Our hardware partner measured current for us.

    But we can't run you code directly, maybe Device Tree confliction? 

    So we seperate to two parts, one is always sleep, the other always on.

    Here is the measurement:

    This is all sleep, max 129 uA, average 0.846 uA

    This is all busy, max 4.165 mA, average 3.331 mA

    Is this information useful?

  • Hi,

    JY wu said:

    But we can't run you code directly, maybe Device Tree confliction? 

    What happens when you try to run it on your board? Did you try to load the 'system_on_current_meas_test.hex' I included in the *.zip?

    JY wu said:

    Here is the measurement:

    This is all sleep, max 129 uA, average 0.846 uA

    Does this include the current going into the sensor?

  • Hi~

    About questions:

    1. Did you try to load the 'system_on_current_meas_test.hex' I included in the *.zip?

    Ans: No, out engineer told me, they modify main.c to two projects. one is all sleep, the other is all on.

    2. Does this include the current going into the sensor?

    Ans: Since G-sensor is not activated, what I can tell is "G-sensor has power supply, but not activated."

  • I'm afraid this doesn't really help us troubleshoot the problem. I still don't know if the current measurement setup is able to correctly measure the sleep current of the chip, how much current the sensor will draw in this state, how your FW is configured, etc. Have you tried measuring the sleep current yourself with a ampmeter? And what is the expected idle current for the g-sensor in the state it is in?

  • Hi~

    About your questions:

    1. Have you tried measuring the sleep current yourself with a ampmeter? 

    NO, job of measuring current is done by our hardware partner.

    2. And what is the expected idle current for the g-sensor in the state it is in?

    It's around 36 uA according to it's datasheet.

    But huge thanks for your help, I think we have to measure current by ourself first.

Related