Arduino Sleep Mode for Power Savings

Veröffentlicht von

Arduino boards are excellent tools for experimentation and prototyping, especially when power is abundant. But what if power is an issue? Whether you're running on limited battery or working in a remote monitoring scenario using solar power, sometimes every milliamp counts. Your device's power draw―when in use and at rest―can make a huge difference in your application.

Power Draw

Let's look at a few popular options in the world of microcontroller boardsWhen running normally with a blank program (as in, what you get when you open a new blank file on the Arduino IDE), we observed the following power consumption values.

  • Arduino Uno (ATmega328P):47mA
  • Sparkfun Pro Micro 5V (ATmega32U4): 36mA
  • Arduino Pro Mini 5V (ATmega328P): 16mA

These values don't sound like much power, but consider that an Arduino Uno would theoretically suck the power out of a 750mAh 3.7V LiPo in under 12 hours, neglecting conversion losses and other inefficiencies. Even the comparatively efficient Pro Mini only lasts about 35 hours in perfect conditions. In a real application, both times would be significantly shorter. There must be a better solution.

Arduino Sleep Mode

As it just so happens, there is something called sleep mode. In fact, several types of low power sleep modes are available via the Arduino IDE:

  • SLEEP_MODE_IDLE
  • SLEEP_MODE_ADC
  • SLEEP_MODE_PWR_SAVE
  • SLEEP_MODE_STANDBY
  • SLEEP_MODE_PWR_DOWN

We arranged this list beginning with the least power savings and most active functionality and ending with most power savings. In SLEEP_MODE_PWR_DOWN, most processor functions are turned off. For a quick test of the SLEEP_MODE_PWR_DOWN, I used code found here, listed below:

#include <avr/sleep.h>

void setup ()

{

set_sleep_mode (SLEEP_MODE_PWR_DOWN);

sleep_enable();

sleep_cpu ();

}  // end of setup

void loop () { }

With that code loaded into our respective boards, we see the following:

  • Arduino Uno: 24mA
  • Sparkfun Pro Micro 5V: 5mA
  • Arduino Pro Mini 5V: .63mA

Putting the Uno to sleep saves about half its power consumption. That's better, but not great, since the Uno still has to power a USB interface chip, voltage regulators, and a power LED. The Pro micro sees its power consumption cut by around a factor of 7 to 5mA, likely owing much of its sleep efficiency to the fact that the chip entering sleep mode also handles USB interface.

The Pro Mini, however, is exceptionally efficient in sleep mode. At just .63mA, the Pro Mini has just 2.6 percent of the power usage of sleeping Uno. You'll need to supply your own FTDI device, which makes this board a bit harder to program. But for projects that need to sip power, the Pro Mini is the clear winner.

On the other hand, if you need extremely low power, the ATTiny85 in its V variation, running at 1.8V and 1 MHz, only draws:

  • Active: 300μA, or .3mA
  • Power-down mode: in.001μA. or .003mA

The ATTiny85 uses half the current consumption of the sleeping 5V Pro Mini when active and fully functional. If you're interested, I outlined how to get started with this fantastic chip.

Arduino Wake Up

Sleep modes can be beneficial for applications with intermittent tasks. For instance, a sensor or real-time clock (RTC) module could ping an interrupt to wake up when it needs to perform a task. It can also use the reset pin to restart the system, allowing it to do its duty, then go back to sleep. While you won't need it for every project, being able to put your microcontroller to sleep is an excellent skill to have in your microcontroller programming toolbox.

Neue Beiträge

Leider ergab Ihre Suche kein Ergebnis

Aktuelles über Elektronikkomponenten­

Wir haben unsere Datenschutzbestimmungen aktualisiert. Bitte nehmen Sie sich einen Moment Zeit, diese Änderungen zu überprüfen. Mit einem Klick auf "Ich stimme zu", stimmen Sie den Datenschutz- und Nutzungsbedingungen von Arrow Electronics zu.

Wir verwenden Cookies, um den Anwendernutzen zu vergrößern und unsere Webseite zu optimieren. Mehr über Cookies und wie man sie abschaltet finden Sie hier. Cookies und tracking Technologien können für Marketingzwecke verwendet werden.
Durch Klicken von „RICHTLINIEN AKZEPTIEREN“ stimmen Sie der Verwendung von Cookies auf Ihrem Endgerät und der Verwendung von tracking Technologien zu. Klicken Sie auf „MEHR INFORMATIONEN“ unten für mehr Informationen und Anleitungen wie man Cookies und tracking Technologien abschaltet. Das Akzeptieren von Cookies und tracking Technologien ist zwar freiwillig, das Blockieren kann aber eine korrekte Ausführung unserer Website verhindern, und bestimmte Werbung könnte für Sie weniger relevant sein.
Ihr Datenschutz ist uns wichtig. Lesen Sie mehr über unsere Datenschutzrichtlinien hier.