LowPowerLab Forum

Hardware support => Moteino => Topic started by: iarovuo on September 25, 2023, 06:05:33 PM

Title: Moteino consuming 10mA every two seconds
Post by: iarovuo on September 25, 2023, 06:05:33 PM
Having just plain vanilla Moteino with RFM95 and add-on 4Mbit flash.

The below code sends data, powers down rf95 and ATmega328p for 56 sec.
Data is being sent over correctly every 56sec or so, as expected.

But, when I measure current drawn, it's pulling ~10mA every 2 sec, for a second, and then near nothing for another 2 sec.

LowPower library is by LowPowerLab v2.2

What am I missing?


int sleeps = 60;
void loop(){
  rf95.send(data, sizeof(data));
  rf95.waitPacketSent();
  delay(1);
  rf95.sleep();
  for (uint8_t i = 0; i < sleeps / 8; i++){
    LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
  }
}
Title: Re: Moteino consuming 10mA every two seconds
Post by: iarovuo on September 25, 2023, 06:26:55 PM
Worth to note, I am using standard Fluke76 to measure the current.
... and when doing so, the Moteino ATmega328p seems to rebooting constantly. (Sends data, goes to sleep and reboots)

So, It seems this is not the way to measure the current drawn, as it seems to be causing reboots.
Title: Re: Moteino consuming 10mA every two seconds
Post by: Felix on September 26, 2023, 10:02:40 PM
Maybe use a CurrentRanger?  :o
Kidding aside, the Fluke might brown out the Moteino, or something else causing that reboot.
Otherwise your code looks OK.