Energy system

Concepts

Waspmote has 4 operational modes:

  • On: Normal operation mode. Consumption in this state is 17 mA.

  • Sleep: The main program is paused, the microcontroller passes to a latent state, from which it can be woken up by all asynchronous interruptions and by the synchronous interruption generated by the Watchdog. The duration interval of this state is from 32 ms to 8 s. Consumption in this state is 30 μA.

  • Deep Sleep: The main program pauses, the microcontroller passes to a latent state from which it can be woken up by all asynchronous interruptions and by the synchronous interruption triggered by the RTC. The interval of this cycle can be from seconds to minutes, hours, days. Consumption in this state is 33 μA.

  • Hibernate: The main program stops, the microcontroller and all the Waspmote modules are completely disconnected. The only way to reactivate the device is through the previously programmed alarm in the RTC (synchronous interrupt). The interval of this cycle can be from seconds to minutes, hours, days. Almost all devices are totally disconnected from the battery: only the RTC is powered through the battery, from which it consumes 7 μA.

Operational Mode

Consumption

Microcontroller

Cycle

Accepted interruptions

On

17 mA

On

-

All interruption sources

Sleep

30 μA

On

Depends on INT source

All interruption sources

Deep Sleep

33 μA

On

1 s – 31 days

All interruption sources (RTC always used)

Hibernate

7 μA

Off

1 s – 31 days

Only RTC

On the other hand, each module (radio, sensor board, etc) might have up to several operation modes.

  • On: Normal operation mode.

  • Sleep: Some communication modules permit to set up sleep modes so as to save energy (depends on each module).

  • Off: By using Waspmote's digital switches (controlled by the microcontroller), the module is switched off completely. This mode has been implemented by Libelium as an independent layer of energy control, so that it can reduce consumption to a minimum (~7 μA) without relegating to techniques implemented by the manufacturer.

For complete information about interruption types and their handling, see the "Interruption" chapter.

Related API libraries: WaspPWR.h, WaspPWR.cpp

All information about the programming and operation of interruptions can be found in the Interruptions Programming Guide.

All the documentation is located in the Development section in the Libelium website.

Note: Before setting Waspmote to a low-power consumption mode, it is always recommended to switch any communication module off.

Sleep mode

In this mode, the main program is paused, the microcontroller passes to a latent state, from which it can be woken by all asynchronous interruptions and by the synchronous interruption generated by the Watchdog. When the Watchdog Timer is set up, the duration interval can be programmed from 16 ms to 8 s. Consumption in this state is 30 μA.

In this mode the microcontroller stops executing the main program. The program stack where all the variables and log values are stored keep their value, so when Waspmote returns to on mode, the next instruction is executed and the variable values are maintained.

The following example would set Waspmote in the Sleep mode for 32 ms. The microcontroller would be in a state of minimum consumption waiting for the synchronous interruption from the Watchdog:

{
    PWR.sleep(WTD_32MS, ALL_OFF);
}

Deep Sleep mode

In this mode, the main program is paused, the microcontroller passes to a latent state from which it can be woken by all the asynchronous interruptions and by the synchronous interruption launched by the RTC. The interval of this cycle can go from seconds to minutes, hours, days. Consumption in this state is 33 μA.

In this mode the microcontroller stops executing the main program. The program stack where all the variables and log values are stored keep their value, so when Waspmote returns to on mode, the next instruction is executed and the variable values are maintained.

Hibernate mode

In this mode, the main program stops, the microcontroller and all the modules are completely disconnected. The only way to reactivate the device is through the previously programmed alarm in the RTC (synchronous interrupt). The interval for this cycle can go from seconds to minutes, hours or days. Almost all devices are totally disconnected from the battery: only the RTC is powered through the battery, from which it consumes 7μA.

In this mode the microcontroller does not store any values from variables or from the program stack. When leaving the Hibernate state the microcontroller is reset, so the setup and loop routines are run as if the main switch were activated.

The Hibernate mode requires the physical Waspmote's hibernate switch to be put in "enable" position. It is necessary to follow the next steps when executing the program for the first time after uploading it to Waspmote:

  1. Connect the battery.

  2. Switch Waspmote on.

  3. Wait for the red LED to light on and turn the hibernate switch to the "enable" position while the red LED is on.

  4. Once the hibernate switch is in the "enable" position, the green LED must blink to indicate that the program is running.

The following example would set Waspmote in the Hibernate mode for 2 days, 1 hour and 30 minutes. The microcontroller would be switched off waiting for the RTC to switch the device on again with a synchronous interruption.

{
    PWR.hibernate("02:01:30:00", RTC_OFFSET, RTC_ALM1_MODE2);
}

Related API libraries: WaspPWR.h, WaspPWR.cpp

All information about the programming and operation of sleep modes can be found in the Interruptions Programming Guide.

All the documentation is located in the Development section in the Libelium website.

Last updated