Author Topic: High sleep current draw  (Read 760 times)

kizniche

  • NewMember
  • *
  • Posts: 5
  • Country: us
    • kylegabriel.com
High sleep current draw
« on: January 13, 2020, 10:52:25 AM »
Hello,

My Moteino Mega is drawing 1.5 mA during sleep and I'm not sure what the issue to cause such a high draw would be. My setup is as follows:

  • Moteino Mega with RFM69HCW (unaltered except the addition of a μ.FL connector)
  • 3 AA batteries in series, connected to VIN and GND.

Code: [Select]
#include "LowPower.h"

void setup() {
    Serial.begin(115200);
}

void loop() {
    LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
    delay(8000);
}

With a Current Ranger, I'm measuring 1590 μA during sleep and ~12 mA out of sleep.

Am I missing a step to possibly disable the RF module?

Thanks,

Kyle
Github: kizniche

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6608
  • Country: us
    • LowPowerLab
Re: High sleep current draw
« Reply #1 on: January 13, 2020, 10:58:52 AM »
That code only sleeps the MCU.

The radio module needs to be slept as well. Initialize it and call radio.sleep() as seen in some of the RFM69 library examples. If there is a FLASHMEM that also needs to be slept.

As a good practice, also check physical and solder connections, sometimes low quality flux (no pun intended) may cause unwanted current leaks, anything else attached that is using power needs to sleep as well.

And a third thing, although this should not really be necessary I would write a LOW to all unused GPIO.

Try these things one at a time and you should sleep at under 10uA.

kizniche

  • NewMember
  • *
  • Posts: 5
  • Country: us
    • kylegabriel.com
Re: High sleep current draw
« Reply #2 on: January 13, 2020, 11:50:53 AM »
Thank you for the quick and detailed reply. I cleaned any residual flux from the board with ethanol (photo attached of board). I do not have flash memory installed. And indeed, adding radio.sleep() reduced the current draw.

Code: [Select]
#include "LowPower.h"
#include <RFM69.h>
RFM69 radio;

void setup() {
    Serial.begin(115200);
}

void loop() {
    radio.sleep();
    LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);

    radio.initialize(RF69_915MHZ, 1, 1);
    delay(8000);
}

Using the above code, I'm now measuring ~23 μA during sleep and ~12 mA out of sleep. This is adequate for my use, but I'm a little curious about the ~10 μA discrepancy.

My production code uses the LMIC library (https://github.com/matthijskooijman/arduino-lmic) for LoRaWAN with ABP. Should I be using RFM69 to take the radio in and out of sleep if I were to use the LMIC library (use them both together), or are you familiar with a similar function within LMIC I should be using instead of radio.sleep()?
Github: kizniche

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6608
  • Country: us
    • LowPowerLab
Re: High sleep current draw
« Reply #3 on: January 13, 2020, 12:26:52 PM »
Sorry but I'm not familiar with LMIC and how it sleeps the devices.
You should be calling radio.initialize() once, in setup(), not in loop(). Maybe that's where the discrepancy is.

TomWS

  • Hero Member
  • *****
  • Posts: 1929
Re: High sleep current draw
« Reply #4 on: January 14, 2020, 10:02:45 AM »
You should be calling radio.initialize() once, in setup(), not in loop(). Maybe that's where the discrepancy is.
Probably and I'd move the radio.sleep() there as well (after initialize) since you aren't using the radio in this test.

Quote from: kizniche
I cleaned any residual flux from the board with ethanol
Whoa, I wouldn't trust having ethanol around my shop!!!  ;)