0

I try to use power down mode to extend battery life, but no matter what sleep library I use, the power consumption never goes below 3.4-3.6 mA. I'm using a chinese pro mini board with VCC input (but using the RAW results the same).

avr/power sketch:

#include <avr/power.h>
#include <avr/sleep.h>
void setup()
{ 
 Serial.begin(9600); 
 byte i;
 // Ensure no floating pins
 for(i=0; i<20 ; i++)
 {
 pinMode(i, OUTPUT);
 digitalWrite(i, LOW);
 }
 // Power-down board
 set_sleep_mode(SLEEP_MODE_PWR_DOWN);
 sleep_enable();
 // Disable ADC
 ADCSRA &= ~(1 << ADEN);
 // Power down functions
 PRR = 0xFF;
 // Enter sleep mode
 sleep_mode();
}
void loop()
{
}

rocketscream/Low-Power sketch:

#include <LowPower.h>
void setup() {
}
void loop() {
 LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
}
asked Sep 12, 2015 at 8:04
7
  • How are you powering it? Commented Sep 12, 2015 at 8:11
  • Using a 5V YwRobot breadboard power supply with VCC pin or a 9V battery with the RAW pin. Both are the same. Commented Sep 12, 2015 at 8:14
  • Are you measuring the current before or after the breadboard power supply? Commented Sep 12, 2015 at 9:46
  • 1
    After. Meanwhile I realized that the power led is always on even when the board is sleeping so I guess thats causing the power usage. I'll try to remove it and test again. Commented Sep 12, 2015 at 10:23
  • There is also a voltage regulator on that board, that has some quiescent current. Commented Sep 12, 2015 at 12:49

1 Answer 1

3

I tried your first sketch on my "bare-bones" board.

Bare-bones board

With the sketch exactly as written, it used 197 μA.

I wondered why it was that high, so I commented out this line:

 Serial.begin(9600);

That reduced consumption to 122 nA.

See Power saving techniques for microprocessors.

You need to get rid of any "power" LEDs, and disconnect any voltage regulators. If you want really low consumption you need to have minimal hardware.

Of course, if you need the voltage regulator, well so be it. But don't expect 100 nA consumption if you use it.

answered Sep 13, 2015 at 5:00

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.