Hello,

I have implemented battery measurement using the battery sample, however I can see that the ADC consumption is quite high even (mA range), even if sampling every 60 seconds. I suspect that ADC goes IDLE and still eats lot of current.

I have seen that power management feature is not supported for ADC (I tried but got error), and I haven’t found any useful information in Nordic forum besides generic suggestion of using nrfx drivers.

Has anyone found a solution to power off the ADC at runtime?

Thanks and regards

Hi @PaoloZigoni

I don’t believe the battery ADC sample is power optimized. You may want to take a look at the active_sleep sample for some insights. Also, the console UART receiver uses a significant amount of current. Turning off the console or disabling RX in your overlay would help.

Here is a .overlay snippet of disabling rx:

/* Disabling uart rx pin to get low power */
&uart0 {
	compatible = "nordic,nrf-uart";
	disable-rx;
};

Here’s the code for turning off the console:

int setup_uart()
{

	static const struct device *const console_dev =
		DEVICE_DT_GET(DT_CHOSEN(zephyr_console));

	/* Disable console UART */
	int err = pm_device_action_run(console_dev, PM_DEVICE_ACTION_SUSPEND);
	if (err < 0)
	{
		printk("Unable to suspend console UART. (err: %d)\n", err);
		return err;
	}

	/* Turn off to save power */
	NRF_CLOCK->TASKS_HFCLKSTOP = 1;

	return 0;
}

Also making sure you have GPIOs set to sense mode and the LIS2DH pull-up is disabled will also help:

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

&i2c1 {
	lis2dh@18 {
		compatible = "st,lis2dh";
		reg = <0x18>;
		disconnect-sdo-sa0-pull-up;
	};
};

Hello Jared,

i have 33uA consumption with my demo, with 2 UARTs that I manage with PM. So far so good.

I’m doing some tests now by disabling the ADC with NRF_SAADC_NS->ENABLE=0 after reading, and enabling back when needed. For now the consumptions looks normal again.

Terms and Conditions | Privacy Policy