Autonomo & power consumption (again)

I am running an autonomo with the LoRaBee. I can’t get it below 4mA.

Here’s what I do:

loop:

  • do something; measure; transmit
  • Send LoraBeeToSleep
  • RTC.standbyMode() (for about 10 minutes)

I am wondering whether there is another interrupt (system millis?) running that eats the power?

I am using these IOs : VCC_BEE (to enable the lora module), VCC_SW (to switch on the grove rail for measurements and two digital inputs for measuring power consumption via a coulomb counter. I know that IO takes power but 4mA seems a bit much.

Current code is here:
https://github.com/kgbvax/kanaltemp/blob/master/kanaltemp.ino

Have you tried it without the sensors connected?

I just ran it without the temperature sensor and all related code: 4mA.
I then measured just the Autonomo with an ampmeter alone: ~12mA during boot and 120 uA during sleep. After 20 seconds after sleep - it jumps to 3mA.

When reconnecting the Coulomb counter, interesting things happen:
When going to sleep, the system drops to 1,12 mA (so the Coulomb Counter adds 1mA, boo!). However after about 20 seconds, the system jumps to 4mA again (and stays there).

So the CC adds 1mA which sucks but is not my main problem.
I will now look towards the bee.

What about the Columb counter, is that what you are using to measure the current, or do you have an external ammeter?

I have run your sketch on an Autonomo here.

I do not have a RN2483 attached (I don’t think I have one).

I replaced your LoRaBee sleep command to use the ones available in the current library (sleep and wakeUp).

I have also commented out lines 235-287 as I don’t have LoRaBee connected. These also have many lengthy and full power delays.

I get a reading of 200uAs (it fluctuates) when in sleep mode.

I think I got it: integer overflow

void Sodaq_RN2483::sleep(uint16_t msec) (which is my own code :frowning: )

I calculate the sleep at 10 minutes, 10100060 -500 = 699.500.
unit16_t max = 64k, with overflow it yields 37356.
RN2483 sleep max is 4294967296 = unit32_t max.

will re-test and issue a pull request later the day.

Ehm, current library? Which one are you referring to? Perhaps missed these.

Yeah, that makes sense, the LoRa is waking up after about 37 seconds instead of after 10 minutes.

Sorry, those functions have not been incorporated into a release version yet.

Here is the basic code:

void Sodaq_RN2483::wakeUp()
{
    debugPrintLn("[wakeUp]");

    // "emulate" break condition
    this->loraStream->flush();
    this->loraStream->end();
    this->loraStream->begin(300);
    this->loraStream->write((uint8_t)0x00);
    this->loraStream->flush();
    this->loraStream->end();

    // set baudrate
    this->loraStream->begin(getDefaultBaudRate());
    this->loraStream->write((uint8_t)0x55);
    this->loraStream->flush();
}

void Sodaq_RN2483::sleep()
{
    debugPrintLn("[sleep]");

    this->loraStream->print(STR_CMD_SLEEP);
    this->loraStream->print(CRLF);
}

And the sleep command is defined as:

#define STR_CMD_SLEEP "sys sleep 259200000" // 3 days
1 Like

Yay, now 1/4 the power. Good enough.

Thanks for asking questions :smile: