Example: Enable sleep mode

Similar documents
In this activity you will create a tool to allow you to play games such as Red Light/Green Light. To create the game, follow the steps below.

Example: Receive analog data

Wireless Connectivity Kit Getting Started Guide. Getting Started Guide

XBee ZigBee Mesh Kit Radio Frequency (RF) Module. User Guide

XBee-PRO 900HP DigiMesh Kit

By Ambuj Varshney & Akshat Logar

XBee ZigBee SMT RF Module Development Kit Getting Started Guide

Comparing the Digi XBee API with EmberZNet EM260 API

L13. Communicating wireless by XBee modules

XBee Series 2 OEM RF Modules

XBee Grove Development Board. User Guide

1 of 4 1/23/ :17 AM

Figure 3-1: XBee Loopback Testing

XBee Starter Kit Getting Started Guide

The BASIC Stamp and other 5 V controllers need an adapter that:

XBee-PRO 868 RF Modules

XBee /XBee-PRO SX Radio Frequency (RF) Module. User Guide

GETTING STARTED GUIDE

MIT Media Lab: XBee Workshop. Instructor: Rob Faludi

ARDUINO WIRELESS SD SHIELD Code: A000065

XBee-PRO 900 DigiMesh RF Modules

XBee transparent mode

XBee /XBee-PRO SX. Radio Frequency (RF) Module. User Guide

Serial console tool. To open the Serial console tool, select Serial console from the Tools drop-down menu in the toolbar.

USB ZigBee Adapter. User Manual. 1.0, Dec 2011

XBee-PRO PKG-R RS-232 RF Modem

ZigBee / Application Kit

WIRELESS MESH NETWORKING: ZIGBEE VS. DIGIMESH WIRELESS MESH NETWORKING: ZIGBEE VS. DIGIMESH

XBee-PRO PKG-U USB RF Modem

Mailbox Notification Service. Created by Adam Kohring

BitPipe Cellular Dev-Kit

ZigBee Wireless. Thursday, October 12th, 9:15 pm Room 447

XBee-PRO PKG-U USB RF Modem

XBee /XBee-PRO OEM RF Modules

XBee Wireless. Michelle Shorter

Network USB over IP Server With 1-USB2.0 Port. User Manual V1.0

Configure your modules

DEMO XTR-8LR100 DEMO XTR-8LR10 User Manual

XCTU. Configuration and Test Utility Software. User Guide

RM024 DVK USER GUIDE VERSION 1.2

Wireless Communication Using Zigbee Module and Aurdino

XBee-PRO PKG-R RS-232 RF Modem

BitPipe Cellular Dev- Kit

XBee Multi Programmer User Guide. User Guide

XBee-PRO 900HP Development Kit Getting Started Guide

ZIC2410 Getting Started Guide

XBee Drop-in Networking Accessories User s Guide

8/11/11. Radio Communication Configurations Zigbee Configurations. Zigbee. XBee Wireless

XBee/XBee-PRO XTC. Radio Frequency (RF) Module. User Guide

XBee SX 868. Radio Frequency (RF) Module. User Guide

Troubleshooting CHAPTER

Sociable Objects Workshop. Instructor: Rob Faludi

Getting to Know Your Mobile WiFi Note: Thank you for choosing VIVA LTE Mobile WiFi

SonAire M3 Wireless Ultrasonic Sensor Tank Level Monitoring Solution Evaluation Kit Using Gateway s Ethernet Port

XBee SX 868. Radio Frequency (RF) Module. User Guide

IPM-01 / IPM-01H MODBUS TCP/RTU Bridge User Guide

GETTING STARTED GUIDE

Catalogue. Assembling... 1 Unpack Charge the Battery Install the Memory Card Product Basics Buttons and Connections...

INSTALLATION INSTRUCTIONS

Optec WiFi Board

XBee/XBee-PRO S (Legacy) RF Modules. User Guide

LoRaWAN Wzzard Utility Quick Guide. v /11/1

AIM: To create a project for implement a wireless communication protocol on an embedded system- ZigBee.

Lenovo N22. User Guide. included manuals before using your computer. included manuals before using your computer.

XBee/XBee-PRO S (Legacy) RF Modules. User Guide

[WIR-1286]868MHz LORA Wireless Module. Page 1. LORA 868MHz Wireless serial link [WIR-1286]

Embit Binary Interface - IEEE Specific Documentation. embit s.r.l.

XBee /XBee-PRO ZB RF Modules

Canlan INSTALLATION MANUAL

Getting to Know Your Mobile WiFi

XStream AT Commands. Advanced Manual v South 520 West, Suite 180 Lindon, UT Phone: (801) Fax: (801)

ICTP: Wireless Sensor Networks Workshop. Instructors: Rob Faludi & Jordan Husney

Thank you for purchasing the Mobile WiFi. This Mobile WiFi brings you a high speed wireless network connection.

Home automation hub installation and setup guide

XBee 868LP RF Modules. User Guide

XBee ZNet 2.5/XBee-PRO ZNet 2.5 OEM RF Modules

Power Ethernet Quick Software Guide for Power Ethernet Management Software (PEMS Version 1.4)

S05-SM User s Manual (ZigBee HA Profile) Ver. 1.02

WIR-1386 / WIR-1186M Long Range 865MHz 867MHz RF Wireless Module with WIR-METERING Mesh Stack

54Mbps g Wireless LAN. CardBus PC Card. user manual

WRE2206. User s Guide. Quick Start Guide. Wireless N300 Range Extender. Default Details. Version 1.00 Edition 1, 01/2015

Networking the printer

Eider Control INTRODUCTION EQUIPMENT ANATOMY OF AN EIDER CONTROL. Document number: 3349 Version: 03 Date: Jul 2016 USER GUIDE

RN-171-EK Evaluation Board

XBee/XBee-PRO S2C Radio Frequency (RF) Module. User Guide

xpico Wi-Fi Embedded Device Server Evaluation Kit User Guide

CLIQ.mini Installation and Setup Guide

DatraxRF Spread Spectrum Wireless Modem

LBI-38599F Maintenance Manual

WRE6505 v2. User s Guide. Quick Start Guide. Wireless AC750 Range Extender. Default Login Details. Version 1.00 Edition 1, 10/2016

CWA-854HT 54 Mbps Wireless-G High Transmission Access Point User s Guide

RN-WIFLY-EVAL-UM. WiFly Evaluation Kit Roving Networks. All rights reserved. RN-WIFLY-EVAL-UM-1.0 Version /8/2011 USER MANUAL

How to Include Your Home Control Door Lock

WPAN/WBANs: ZigBee. Dmitri A. Moltchanov kurssit/elt-53306/

Web Site: Forums: forums.parallax.com Sales: Technical:

IO Expansion Shield User Manual

Sierra Radio Systems. Mesh Data Network. Reference Manual. Version 1.0

NPort Z2150 User s Manual

Draper Commissioner User Manual

INTRODUCTION CRASH SENSOR. WELCOME TO ICEDOT! This User s Guide will help you set up your Crash Sensor as well as create an ICEdot profile.

Transcription:

Example: Enable sleep mode In this example, you will learn how to extend the battery life of an XBee ZigBee module. The example uses all three modules included in the kit to demonstrate how a ZigBee network handles messages when some modules are sleeping. You will configure one of the modules as coordinator and the other two as end devices with different sleep modes. An end device will periodically send the value of an ADC to the other end device. Since the receiver will be asleep, the coordinator will store all of its messages and forward them to the destination module once it has woken up. If you get stuck, go to the Troubleshooting links at the end of the example. Steps

1. Requirements Connect the components Configure the XBees 4. Sleep 5. What have you learned? 6. Extend the example 7. Troubleshooting

1. Requirements Three XBee ZigBee modules Three XBee Grove Development Boards Three micro USB cables One computer XCTU 6.0 or later Hardware Software For further information about XCTU, go to the XCTU walkthrough. Connect the components 1. Plug the XBee modules into the XBee Grove Development Boards and connect them to your computer using the micro USB cables provided. For further information on how to connect your hardware, go to the Assemble the hardware section. After connecting the modules to your computer, open XCTU. Make sure you are in Configuration working mode. Configure the XBees To transmit data wirelessly between your XBees, you must configure them to be in the same network. Remember that in the ZigBee protocol, one device must be the coordinator and the rest can be routers or end devices. In this case, you will have two end devices configured to sleep using different sleep modes: one with cyclic sleep (XBee B) and the other with pin hibernate sleep (XBee C). The coordinator is in charge of storing the messages sent from XBee B to XBee C while XBee C is asleep. It forwards the messages once it wakes up. 1. Restore the default settings of all XBees with the Load default firmware settings button at the top of the Radio Configuration section. Use XCTU to configure the following parameters: Param Effect XBee A XBee B XBee C ID 2015 2015 2015 Defines the network for a radio to attach to. This must be the same for all radios on your network. JV Enabled [1] Enabled [1] Verifies if a coordinator exists on the same channel to join the network or to leave if it cannot be found. CE Enabled [1] Sets the device as coordinator. DH 0013A200 Defines the destination address (high part) to transmit the data to.

DL SL of XBee C Defines the destination address (low part) to transmit the data to. Use the address 0000000000000000 to address the coordinator. NI COORD ED_CYCLIC ED_PIN Defines the node identifier, a human-friendly name for the module. The default NI value is a blank space. Make sure to delete the space when you change the value. AP API enabled [1] API enabled [1] API enabled [1] Enables API operating mode. SP 384 384 Defines the duration of time spent sleeping. 384 (hexadecimal) = 900 (decimal) x 10 ms = 9 seconds. SM Cyclic sleep [4] Pin Hibernate [1] Enables cyclic sleep mode on XBee B and pin hibernate sleep mode on XBee C (both end devices). ST 7D0 Defines the period of inactivity (no serial or RF data received) before going to sleep. 7D0 (hexadecimal) = 2000 (decimal) x 1 ms = 2 seconds. SO 2 Keeps the module awake during the entire period. D2/D3 ADC [2] Sets the DIO2/AD2 or DIO3/AD3 pin as ADC in XBee B, depending on if the XBee module is THT or SMT. This pin is connected to a potentiometer. Configure the D2 parameter as ADC [2] only if XBee B is surface-mount (SMT). However, if XBee B is through-hole (THT), you have to configure the D3 par ameter as ADC [2] instead of the D IR 3E8 Configures XBee B to send an IO sample every second (1000 ms = 3E8 in hexadecimal). keep the default value. Write the settings of all XBees with the Write radio settings button at the top of the Radio Configuration section. 4. Sleep With this configuration, ED_CYCLIC sends the value of the potentiometer to ED_PIN every time it wakes up. The coordinator stores all the D_CYCLIC samples sent to ED_PIN until it wakes up. To verify, perform the following steps in XCTU: 1. Select ED_PIN module (receiver). Switch to Consoles working mode. Open the serial connection with the module. 4. To request the module to sleep, click the DTR radio button from the top of the console to deactivate it (notice that the CTS indicator is also deactivated):

The DTR pin is the same as the Sleep_RQ pin. When the DTR option is deactivated, the module goes to sleep; when DTR is activated, the module wakes up. 5. After 20 seconds or so, activate the DTR button: 6. Check that the module receives a series of IO Samples (IO Data Sample RX Indicator): When the module wakes up, it immediately receives several IO samples instead of receiving one every second ( parameter). IR This happens because the coordinator stores the samples that ED_PIN is not able to receive while it is asleep. Once ED_PIN wakes up, the coordinator sends all IO samples at once. 7. Select one frame and check its details in the right panel. You will see the value of the potentiometer (DIO3_AD3) and other details related to the frame. 8. 9. Repeat step 4 and rotate the potentiometer of the board where ED_CYCLIC is attached. Wait for another 20 seconds and check that the new packets that arrive contain a different value for the DIO3_AD3 pin. If you leave the receiver module (ED_PIN) awake, ED_PIN receives an IO sample every second while the ED_CYCLIC is awake ( ST val ue is two seconds). After that, ED_CYCLIC goes to sleep for nine seconds ( SP parameter). Then the cycle starts over again.

Don't forget to close the serial connection with the module when you finish the example. 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 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 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 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 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: Sleep Mode ( SM): Pin sleep mode (SM = 1) pull high pin 9 by connecting it to 3 volts to put the module to 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 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 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 only applicable for cyclic sleep modes. 6. Extend the example If you're ready to move beyond this exercise and extend the example, try the following: Connect a battery to ED_CYCLIC (XBee B), ED_PIN (XBee C), or both and move the modules away from COORD (XBee A). Combine this feature with a real sensor to create a low-power sensor network. 7. Troubleshooting If you are encountering problems, these suggestions may help:

General How do I find the serial port of my module? You can remove the XBee Grove Development Board from the USB port and see which port name disappears from your port list. The name that disappears is your XBee board. Many people figure out which port is right via trial and error, but you can also use XCTU to find it: 1. Open XCTU and discover the radio modules attached to your computer by clicking 4. on the top-left corner. Select all ports to be scanned. Click Next and then Finish. Once the discovery process has finished, a new window notifies you how many devices have been found and their details. The serial port and the baud rate are shown in the Port label. An error saying that the port is already in use by other applications is displayed. The serial port where the local XBee module is connected can only be in use by one application. Check that the connection with the module in the XCTU console is closed and there are no other applications using the port. The error 'Device driver software was not successfully installed' is displayed. Sometimes when you connect the XBee Grove Development Board into you computer, the operating system cannot install the driver automatically. If you get that error, try to remove and re-insert the board into your computer. If the OS is still unable to install the driver, remove and re-insert the board into another USB port. As a last resort, install manually the USB drivers following the instructions that appear in the step 4 of the Downloading and installing XCTU section. How can I physically identify the XBee modules? Once you have added the modules to XCTU, a simple way to identify them is to read the radio settings of each one and check the Rx and Tx LEDs of the XBee Grove Development Boards. These LEDs indicate that the XBee module is receiving (Rx) or transmitting (Tx) information through the serial port. When you read or write the settings of a module, its Rx and Tx LEDs blink, so you can identify which module is connected to each serial port.

An error is reported when installing XCTU. XCTU requires Administrator permissions XCTU Check that you have Administrator access on the machine where you are installing XCTU. On Windows systems, a User Account Control dialog may appear when you install XCTU or try to run the XCTU program. You must answer yes when prompted to allow the program to make changes to your computer, or XCTU will not work correctly. Note that you may also need to talk to your network manager to gain permission to install or run applications as administrator. No radios are found when discovery is performed or no serial ports are listed. Check cables Double check all cables. The USB cable should be firmly and fully attached to both the computer and the XBee Grove Development Board. When attached correctly, the association LED on the adapter will be lit. Check that the XBee is fully seated in the XBee Grove Development Board When the XBee is correctly installed, it should be pushed fully into the board and no air or metal should be visible between the plastic of the adapter socket and the XBee headers. Also, double check that all ten pins on each side of the XBee made it into a matching hole in the socket. Check the XBee orientation The angled "nose" of the XBee should match the lines on the silk screening of the board and point away from the USB socket on the XBee Grove Development Board. Check driver installation Drivers are installed the first time the XBee Grove Development Board is plugged in. If this process is not complete or has failed, try the following steps: 1. 4. Remove and re-insert the board into your computer. This may cause driver installation to re-occur. Remove and re-insert the board into another USB port. (Windows) Open Computer management, find the failing device in the Device Manager section and remove it. You can download drivers for all major operating systems from FTDI for manual installation. Check if the modules are sleeping The On/Sleep LED of the XBee Grove Development Board indicates if the module is awake (LED on) or asleep (LED off). When a module is sleeping, it cannot be discovered in XCTU, so press the Commissioning button and will wake up for 30 seconds. After resetting an XBee to factory defaults, XCTU reports errors for the KY and DD settings. This is a known issue with the 6.1.2 versions of XCTU or less. When the Invalid settings dialog appears, it is safe to continue to write settings. AES Encryption Key (KY) is a setting that must be set by the user when encryption is used and does not apply with factory settings. Device Type Identifier (DD) is a diagnostic parameter which is not used in the operation of the radio and can safely be set to any value. Enable sleep mode example ED_PIN does not receive any message. Ensure that the module is joined to the network. To verify this, check that the Associate LED of ED_PIN is blinking when the DTR button is activated. If not, reset the module and wait a few seconds.