This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ADC channel resistors

I have configured 3 differential ADC channels to sample with timer/PPI/DMA buffer. When I turned everything off, I couldn't get below 20uA current (with only LFCLK running).

I realised recently that resistor dividers, used in SAADC channel config, are not deactivated with SAADC_channel_uninit().

With workaround code below I got current down to 12uA. Obviously, configuring GPIO's didn't didn't help in this case, with ADC channels dividers left on.

//trying to remove any pull_up/pull_down 
channel_0_config.resistor_p = NRF_SAADC_RESISTOR_DISABLED;
channel_0_config.resistor_n = NRF_SAADC_RESISTOR_DISABLED;
channel_1_config.resistor_p = NRF_SAADC_RESISTOR_DISABLED;
channel_1_config.resistor_n = NRF_SAADC_RESISTOR_DISABLED;
channel_2_config.resistor_p = NRF_SAADC_RESISTOR_DISABLED;
channel_2_config.resistor_n = NRF_SAADC_RESISTOR_DISABLED;
nrf_saadc_channel_init(0, &channel_0_config);
nrf_saadc_channel_init(1, &channel_1_config);
nrf_saadc_channel_init(2, &channel_2_config);

Is there any simpler/more elegant code to turn off these resistors, shouldn't that be the part of ..uninit() function?

Regards Tomasz

Parents
  • Can you provide more information about your sampling and your current consumption. Do you mean 12uA average current? or 12uA while the ADC is sampling, or 12uA when the ADC is between samples? Are you measuring the current with a scope to get this kind of resolution?

    What is your sample rate, is this 1Hz or 1000Hz?

  • When I turned everything off, AFTER SAMPLING, I couldn't get below 20uA current (with only LFCLK running). My workaround code reduced sleep current (when all sampling is turned off) down to 12uA. It is still a bit more than expected but OK for my development logging sensors. It is measured with Fluke multimeter, approx. 100R impedance in uA mode, and from 3V battery. Decoupling capacitance on sensor side is max 10uF.
    My SW configuration: on RTC interrupt callback, I wake up every 4s seconds, send ESB frame. If there's wakeup command, reset micro to start sampling. Sampling 3 channels at 40 ksps, sending out some data filtered and decimated, using ESB protocol. The active device current is max 5 to 6mA and data logging up to several minutes. On turn_off timeout or command received from host in reply, the sensor goes to sleep, with careful uninitialisation, in reverse order to initial configuration on device startup. In sleep mode very little is left to perform on RTC callback. The current consumption I described earlier comes from this sleep current, not periodic wakeup etc. Only one thing I can add: the sleep current I tested recently, was on desk, it changed with temperature and below +20 deg.C it dropped from 12 to ~8uA.

Reply
  • When I turned everything off, AFTER SAMPLING, I couldn't get below 20uA current (with only LFCLK running). My workaround code reduced sleep current (when all sampling is turned off) down to 12uA. It is still a bit more than expected but OK for my development logging sensors. It is measured with Fluke multimeter, approx. 100R impedance in uA mode, and from 3V battery. Decoupling capacitance on sensor side is max 10uF.
    My SW configuration: on RTC interrupt callback, I wake up every 4s seconds, send ESB frame. If there's wakeup command, reset micro to start sampling. Sampling 3 channels at 40 ksps, sending out some data filtered and decimated, using ESB protocol. The active device current is max 5 to 6mA and data logging up to several minutes. On turn_off timeout or command received from host in reply, the sensor goes to sleep, with careful uninitialisation, in reverse order to initial configuration on device startup. In sleep mode very little is left to perform on RTC callback. The current consumption I described earlier comes from this sleep current, not periodic wakeup etc. Only one thing I can add: the sleep current I tested recently, was on desk, it changed with temperature and below +20 deg.C it dropped from 12 to ~8uA.

Children
No Data
Related