Sleep options

Sleep Modes enable the RF module to enter into states of low-power consumption when not in use. To set sleep mode on, there are some parameters involved.

Sleep Mode

By default, Sleep Modes are disabled and the RF module remains in Idle/Receive Mode. When in this state, the module is constantly ready to respond to either serial or RF activity.

Different options can be set:

  • 0: Disabled.

  • 1: Pin Hibernate Mode.

  • 2: Pin Doze Mode.

Example of use:

{
xbee802.setSleepMode(0); // Disable sleep mode
xbee802.setSleepMode(1); // Set Sleep Mode to Pin Sleep
xbee802.getSleepMode(); // Get the Sleep Mode used
}

Related variables:

xbee802.sleepMode // stores the sleep mode in a module

Sleep mode example: https://development.libelium.com/802-10-set-low-power-mode/

Pin Hibernate Mode

Pin Hibernate Mode minimizes power consumption (<10 uA). This mode is voltage level-activated; when Sleep_RQ (pin 9 of XBee) is asserted, the module will finish any transmission, reception or association activities, enter Idle Mode, and then enter a state of sleep. The module will not respond to either serial or RF activity while in pin sleep.

To wake up a sleeping module operating in Pin Hibernate Mode, de-assert Sleep_RQ (pin 9 of XBee). The module will be awake after 13.2 ms.

Example of use:

{
xbee802.setSleepMode(1); // Set Sleep Mode to Hibernate Mode
xbee802.sleep(); // Set XBee to sleep
delay(5000); // wait 5 seconds
xbee802.wake(); // Wake up the XBee
}

Pin Doze Mode

Pin Doze Mode works as Pin Hibernate Mode. However, Pin Doze features faster wake-up time (2 ms) and higher power consumption (<50 uA).

Example of use:

{
xbee802.setSleepMode(2); // Set Sleep Mode to Doze Mode
xbee802.sleep(); // Set XBee to sleep
delay(5000); // wait 5 seconds
xbee802.wake(); // Wake up the XBee
}

Last updated