Low power and battery life
Note
Make sure to close the serial connection with the module when you finish the example.
Step 5: What have you learned?
In this section, you have learned that:
Modules with Zigbee protocol, as well as others, can go into a temporary sleep state in which
n
they consume virtually no current. In Zigbee, only the modules configured as End Devices can
go to sleep.
When an end device is asleep its parent (the router or coordinator that allows the end device to
n
join the network) buffers its data until a timeout expires (SP), or until the end device sends a
poll request to retrieve the data.
Pins 9 and 13 are related to the sleep modes. You can use pin 9 to put the module to sleep, and
n
pin 13 to determine the sleep state of the device.
While an XBee is in sleep mode, there is no data transmission or reception. If you try to
n
communicate with the module when it is asleep, XCTU displays a warning message saying that
the module must be reset to wake up.
To configure your module to go to sleep, you must configure the following parameters:
n
Sleep Mode (SM):
l
Pin sleep mode (SM = 1) pull high pin 9 by connecting it to 3.3 volts to put the module to
o
sleep. The module will wake up when pin 9 is de-asserted (low).
Cyclic sleep modes (SM = 4 and SM = 5) enable the module to sleep and wake up on a
o
fixed schedule. These modes need the ST and SP parameters to be configured.
Time before Sleep (ST) is the period of time during which no data is sent or received (while
l
the module is awake) before returning to cyclic sleep. This parameter is only applicable for
cyclic sleep modes.
Cyclic Sleep Period (SP) is the length of time an XBee remains asleep. This parameter is
l
only applicable for cyclic sleep modes.
Step 6: Extend the example
If you are ready to move beyond this exercise and extend the example, try the following:
Connect a
battery
n
away from COORD (XBee A).
Combine this feature with a real sensor to create a low-power sensor network.
n
XBee® Zigbee® Mesh Kit
to ED_CYCLIC (XBee B), ED_PIN (XBee C), or both and move the modules
Example: enable sleep mode
94
Need help?
Do you have a question about the XBee Zigbee Mesh Kit and is the answer not in the manual?