MMB has helped developed numerous custom firmware builds for battery-powered devices and we have also helped our customers utilize the sleepy device features in our off-the-shelf firmware offering to optimize the battery life of their device.
Sleep/Wake Cycles
Zigbee networks facilitate Sleepy End Devices through “Parent/Child” relationships and a “check in” mechanism. Each Sleepy End Device is a Child. Routers or the Network Coordinator can serve as the Parent device for one or more Children. Parents cache messages while the Child is asleep so that the Child can retrieve the messages later. The Child can wake up at any time and send a “Data Request" message to the Parent to retrieve messages.
Poll Control Cluster
The sleep/wake behavior of a Sleepy End Device can be adjusted through a Cluster called Poll Control. Fun fact: MMB drafted the original specs for this Cluster to support one of our customers that was producing a Thermostat.
Long Poll Interval
The Poll Control cluster includes a “Long Poll Interval”, which is the longest amount of time that the device can sleep before waking up to send a MAC Data Request message to its Parent. The zigbee specifications dictate that a Parent must cache messages for a minimum of 7.68 seconds. For this reason, we recommend that our customers never set the Long Poll Interval longer than 7 seconds for a normal deployment. However, if the duration of message caching be increased for all Parent devices (for example, if a customer is writing their own firmware for the Coordinator and Routers, in addition to the End Devices), then the Long Poll Interval can be increased. For example, perhaps the factory default value of the Long Poll Interval attribute can be 7 seconds. Upon commissioning the device to a network where all of the Parent devices are known to be caching messages for a longer period of time, the Network Coordinator can send the Set Long Poll Command to the End Device to increase sleep duration of the Device. Caution should be exercised if the Long Poll interval is set to be longer than 7.68 seconds. The Coordinator should manage the Device's Check-In Interval and backup any application message in parallel to ensure that no messages are lost due to message timeout.
Child Table Timeout
The maximum possible value for the Long Poll Interval will be dictated by the Child Table timeout mechanism. If the Child does not send a MAC Data Request to the parent frequently enough, the Parent will remove it from its Child Table (i.e. remove it from the network). Most zigbee silicon vendors will enforce a timeout interval of 5 minutes between MAC Data Requests. In other words, if the Sleepy End Device fails to wake up and send at least a MAC Data Request once every 5 minutes, the Parent will remove it from its Child Table. You can read more about the Silicon Labs timeout mechanism in the following two articles:
How long can my end device go without polling its parent?
How often should my end device poll its parent?
Check In interval
The Poll Control cluster also includes a "Check In Interval" attribute to define the interval at which a device implementing the Poll Control cluster as a server sends a message to the device(s) implementing the Poll Control cluster as a Client. For example, consider a battery-powered temperature sensor. Among other clusters, it supports the Poll Control cluster as a server. The Network Coordinator will implement the Poll Control cluster as a Client, enabling a longer sleep/wake cycle of the temperature sensor. However, the configuration of the temperature sensor's polling mode (or any application message to the device) can only occur when it checks in. The Network Coordinator can manage the timing for these check ins by configuring the Check In Interval on the temperature sensor.
Calculating Current Consumption
When calculating the expected battery life of a device, it’s helpful to split it into two components: the RapidConnect module and Host device. You will need to determine the following for your Host device:
- All possible states (e.g. display on/off, buzzer active/inactive, LEDs on/off, etc)
- Current consumption for each state
- Fraction of time spent in each state during typical use
- Based on the above values, you can calculate the average current consumption for the Host device
Next, you'll need to complete the same analysis incorporating the RapidConnect Module. Our Battery Life Calculator will help with this.
Battery Life Calculator
MMB has created a Battery Life Calculator spreadsheet to provide rough guidance on the expected battery life of a device utilizing the RapidConnect module. Learn more and download the tool here: Battery Life Calculator.
Silicon Labs presents some helpful information in the white paper here.