High current consuption using BME280 on Seeed Xiao BLE (nRF52840) in Zephyr RTOS

Hi,

I'm developing an IoT product using nRF52840 provided by Seeed (Xiao BLE) with a BME280 sensor connected via I2C on a custom PCB, without another peripheral that BME280 and passive components for I2C connection. I can't get low power consumption, even if I try the system_off Zephyr example.

When I try the bme_280 example of Zephyr and enable the PM/PM_DEVICE features, the consumption is still so high (about 1mA). I need that it consumes a few hundred uA . An strange ripple between BME280 measurements is seen when I measure current using PPK2:

  • My config file:

-

CONFIG_SENSOR=y
CONFIG_PM=y
CONFIG_PM_DEVICE=y

  • I2C circuit Diagram (VCC=3V3):

  • Overlay file:

&i2c1 {
	status = "okay";
	bme280@76 {
		compatible = "bosch,bme280";
		reg = <0x76>;
	};
};

  • Zephyr version: 3.2.99
  • nRF Connect version:2.3.0

I also tried:

I don't know what can I try.

Thanks

Parents
  • Hi there,

    1. Could you share your schematics?
    2. Can you try to reproduce the same with our development kit connected to the BME280 sensor?
    3. How is the PPK2 connected to your custom board? 

    even if I try the system_off Zephyr example.

    Can you share a PPK2 trace from this? 

    regards

    Jared 

  • Hi, I'm back with news. 
    I could solve it for Seeed Xiao, using SAADC NRFX drivers, and was not necessary to use the uninit() function, provided by SAADC NRFX driver:

    	status = nrfx_saadc_init(NRFX_SAADC_DEFAULT_CONFIG_IRQ_PRIORITY);
    	if (status != NRFX_SUCCESS)
    	{
    		LOG_INF("SAADC init failed: %d\n", status);
    	}
    	else
    		LOG_INF("SAADC init successful");
    
    	status = nrfx_saadc_channel_config(&saadc_channel);
    	if (status != NRFX_SUCCESS)
    	{
    		LOG_INF("SAADC config failed: %d\n", status);
    	}
    	else
    		LOG_INF("SAADC config successful");
    	uint32_t channels_mask = nrfx_saadc_channels_configured_get();
    	status = nrfx_saadc_simple_mode_set(channels_mask,
    										NRF_SAADC_RESOLUTION_12BIT,
    										NRF_SAADC_OVERSAMPLE_DISABLED,
    										NULL);


    And here is the PPK2 trace, with low power consumption during SAADC standby:



    For some reason, Zephyr RTOS ADC API not manage well power consumption.

    Thanks a lot!!

Reply
  • Hi, I'm back with news. 
    I could solve it for Seeed Xiao, using SAADC NRFX drivers, and was not necessary to use the uninit() function, provided by SAADC NRFX driver:

    	status = nrfx_saadc_init(NRFX_SAADC_DEFAULT_CONFIG_IRQ_PRIORITY);
    	if (status != NRFX_SUCCESS)
    	{
    		LOG_INF("SAADC init failed: %d\n", status);
    	}
    	else
    		LOG_INF("SAADC init successful");
    
    	status = nrfx_saadc_channel_config(&saadc_channel);
    	if (status != NRFX_SUCCESS)
    	{
    		LOG_INF("SAADC config failed: %d\n", status);
    	}
    	else
    		LOG_INF("SAADC config successful");
    	uint32_t channels_mask = nrfx_saadc_channels_configured_get();
    	status = nrfx_saadc_simple_mode_set(channels_mask,
    										NRF_SAADC_RESOLUTION_12BIT,
    										NRF_SAADC_OVERSAMPLE_DISABLED,
    										NULL);


    And here is the PPK2 trace, with low power consumption during SAADC standby:



    For some reason, Zephyr RTOS ADC API not manage well power consumption.

    Thanks a lot!!

Children
No Data
Related