Tapatalk

Current consumption during sleep

Current consumption during sleep

81

PostJun 26, 2018#1

Hello,

I  am testing the LoRa node and when it is sleeping the current consumption as measured with a multimeter is 3.2mA which I find a lot.

Here's the simple code I am using

Code: Select all

#include <avr/sleep.h>
#include <avr/wdt.h>

void setup() {
  // put your setup code here, to run once:
 ADCSRA = 0;  

  // clear various "reset" flags
  MCUSR = 0;     
  // allow changes, disable reset
  WDTCSR = bit (WDCE) | bit (WDE);
  // set interrupt mode and an interval 
  WDTCSR = bit (WDIE) | bit (WDP3) | bit (WDP0);    // set WDIE, and 8 seconds delay
  wdt_reset();  // pat the dog
  
  set_sleep_mode (SLEEP_MODE_PWR_DOWN);  
  noInterrupts ();           // timed sequence follows
  sleep_enable();
 
  // turn off brown-out enable in software
  MCUCR = bit (BODS) | bit (BODSE);
  MCUCR = bit (BODS); 
  interrupts ();             // guarantees next instruction executed
  sleep_cpu ();  
}
void loop() {
  // put your main code here, to run repeatedly:



}
Using the lowpower example does not make any difference either

Code: Select all

// **** INCLUDES *****
#include "LowPower.h"

void setup()
{
    // No setup is required for this library
}

void loop() 
{
    // Enter power down state for 8 s with ADC and BOD module disabled
    LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);  
    
    // Do something here
    // Example: Read sensor, data logging, data transmission.
}
I am testing with nothing attached to the node. 
Any comments ? The documentation seems to imply current consumption in the range of uA rather than mA which is my target as well
Regards

1885
1885

PostJun 26, 2018#2

Hello,

Please try to use the low power example from the Talk2 Library. It's very likely you didn't place the Radio in Sleep mode.

Here's a video demonstrating the low-power consumption during sleeping:



Regards

81

PostJun 28, 2018#3

ooops. You are right. I was so focused on the atmega328p and how to decrease its current consumption that I completely forgot there is a radio module to turn off as well. 
Turning it off, decreased the current consumption to around 15uA and that's perfect for me

Thanks!