User Tools

Site Tools


supp:arduino:sleep

Putting Arduino to Sleep Mode

The best way to save energy for a device is to switch it off.

In case of MC it should still react to external events to be woken up, such as a push button event. This can be achieved by setting the MC to sleep. There are several sleep modes available. To generalize: The “deeper” the sleep the less mechanisms can be used to wake the MC up again.

With Arduino you often use the power-down sleep mode. Only INT0 (level not edge interrupt), INT1 (level not edge interrupt) or PCINT (pin change interrupt, i.e. rising or falling edge) are able to wake the MC up from this sleep mode again.

Fig.: Sleep modes of ATmega328P and other MCs.
Source: Microchip ATmega328P datasheet, p. 48.

Material

supp/arduino/sleep.txt · Last modified: 2018/11/15 15:33 by admin