xbee starter kit skxbee · 2019. 2. 4. · xbee starter kit skxbee user’s manual v1.0 august 2008...

23
XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the like is intended through suggestion only and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. No representation or warranty is given and no liability is assumed by Cytron Technologies Incorporated with respect to the accuracy or use of such information or infringement of patents or other intellectual property rights arising from such use or otherwise. Use of Cytron Technologies’s products as critical components in life support systems is not authorized except with express written approval by Cytron Technologies. No licenses are conveyed, implicitly or otherwise, under any intellectual property rights.

Upload: others

Post on 27-Feb-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

XBee Starter Kit

SKXBee

User’s Manual

V1.0

August 2008

Information contained in this publication regarding device applications and the like is intended through suggestion only and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. No representation or warranty is given and no liability is assumed by Cytron Technologies Incorporated with respect to the accuracy or use of such information or infringement of patents or other intellectual property rights arising from such use or otherwise. Use of Cytron Technologies’s products as critical components in life support systems is not authorized except with express written approval by Cytron Technologies. No licenses are conveyed, implicitly or otherwise, under any intellectual property rights.

Page 2: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

Index

1. Introduction 1

2. System Overview 2

3. Packing List 3

4. Board Layout 4

5. Product Specification 6

6. Hardware Interface 7

a. Microcontroller 7

b. Computer 9

7. Getting Started 16

a. Using SKXBee with Microcontroller 17

b. Using SKXBee as XBee Dongle 19

8. Warranty 21

Page 3: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

1

1. INTRODUCTION

Digi International offer simple yet reliable wireless communication for embedded applications. The XBee and Xbee-PRO OEM RF Modules were engineered to meet IEEE 802.15.4 standards and support the unique needs of low cost and low power wireless sensor networks. No more searching for surrounding device and request for connection, it can send data wireless after powering up without any extra configuration.

Two most useful advantages of these two modules are long range data integrity and

low power consumption. For XBee, it offers indoor communication range up to 30m and outdoor line of sight range up to 100m. While for XBee PRO, it offers indoor communication range up to 100m and outdoor line of sight range up to 1500m. Both power down current are less than 10 µA and for details of these modules, please refer to data sheet which can be downloaded at http://www.cytron.com.my/listProductCategory.asp?cid=281.

This document describes the use and starting guide for XBee Starter Kit, SKXBee.

Since the modules comes with small pin and required 3.3V operation, starter kits have been developed to convert it into 5V operation and offer connection to PC with USB for more user friendly solution to ease user exploring the possible development application.

SKXBee has been designed for 5V TTL logic interface, no extra voltage divider is necessary. With minimum interface, it is ready to connect to microcontroller for embedded XBee development. Furthermore, on board USB to UART converter offer easy yet reliable communication to PC for functionality test and as XBee dongle.

SKXBee can support both XBee and XBee PRO because they are interchangeable and

pin-to-pin compatible with each other. It has been designed with capabilities and features of:

• Support both XBee and XBee PRO modules • USB Plug and Play UART function • 5V powered • 5V UART interface, ready for microcontroller interface • Default baud rate of 9600bps • Long Range Data Integrity • Low power consumption • Compact yet easy and reliable platform • As serial port replacement (wireless) • Point-to-point, point-to-multipoint and peer-to-peer topologies supported • Dimension: 8cm x 4cm

NOTE: SKXBee have filtered the hardware flow control, RTS, CTS and other IO. Thus, if hardware flow is required, please use the original module.

Page 4: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

2

2. SYSTEM OVERVIEW On board USB to UART converter is design for easy communication with PC for functionality test and as XBee dongle. 5V TTL logic interface with no extra voltage divider offer straight forward interface to microcontroller for embedded wireless development.

Page 5: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

3

3. PACKING LIST Please check the parts and components according to the packing list. If there are any parts missing, please contact us at [email protected] immediately.

1. 1 x SKXBee with XBee* module. 2. 1 x B type USB cable. 3. USB driver and User’s Manual should be downloaded from Cytron Website.

Page 6: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

4

4. BOARD LAYOUT

A – Connecter for either XBee or XBee-Pro module. The module will be soldered properly on SKXBee and tested before it is shipped to customer. Removing XBee module from SKXBee is not encouraged and it will void the warranty. For those wanted to utilize XBee module IO, please choose XBee module only. B – Reset button for XBee module. C – 5 ways header pin for external power supply and interface to microcontroller. If this kit is connected to microcontroller board, it should be powered with 5V. Please refer to hardware installation for detail connection. D – 3.3V power indicator. This small green LED indicates the status of 3.3V from on board voltage regulator. It should be ON if either external 5V power or USB connection is connected to SKXBee. E – These are a pair of small LED, red and yellow in color. These LEDs are connected to on board USB to UART converter. It indicates the receiver and transmitter activity. It will only work if SKXbee is connected to PC or laptop through USB cable. Red LED indicates USB’s transmitter activity, while yellow LED indicate USB’s receiver activity.

Label Function A XBee module. B On board reset button for XBee module. C 5 ways header pin for external power and interface to

microcontroller. D On board 3.3V power indicator LED. It is green color. E Two LED indicators for USB’s transmitter and receiver status. F USB B type socket.

A

B

C

D

E

E

F

Page 7: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

5

F – USB B type socket. If connection to PC or laptop is required, please connect one end of USB cable (B type) to this socket, while the other end to PC or laptop USB port.

Page 8: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

6

5. PRODUCT SPECIFICATION SKXBee is designed to ease development of embedded XBee application. The specifications are as listed below:

Label Definition Function

5V* Power Input for SKXBee

External power source for SKXBee, the typical voltage is 5V. On board 3.3V voltage regulator will regulate the voltage to 3.3V for XBee module. The power is not necessary if SKXBee is connected through USB cable.

GND* Ground or negative Ground of power and signal.

XB_RX* XBee UART Receive signal

This is XBee module’s receiver pin, it should be interfaced to 5V logic UART, no divider is necessary. This is an input pin to SKXBee. It should be connected to microcontroller’s transmitter pin.

XB_TX* XBee UART Transmit signal

This is XBee module’s transmitter pin; it should be interfaced to 5V logic UART. This is an output pin from SKXBee. It should be connected to microcontroller’s receiver pin.

RESET* XBee Reset pin

Reset pin of XBee module. It should be connected to a push button to Gnd, or NPN transistor.

* All 5 pin connection should not be connected if SKXBee is connected to USB port Absolute Maximum Rating Symbol Parameter Min Max Unit

5V Power source for SKXBee 5.0 5.5 V GND Operating voltage 0 0 V XB_RX Receiver pin of XBee module 0 5.5 V XB_TX Transmitter pin of XBee module 0 5.5 V RESET Reset pin of XBee module 0 5.5 V SKXBee can only be powered by either USB or external power (5V).

SKXBee have eliminated the hardware flow control of XBee module, thus if hardware flow control is required in development or application, it is advise the get the original XBee module. SKXBee also filter all IO (digital input and output, analog input and PWM), thus if user need to use these IO function, please choose the original XBee module.

NOTE: DO NOT connect USB to SKXBee if it is connected to microcontroller. SKXBee can only be connected either to USB or microcontroller.

Page 9: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

7

6. HARDWARE INTERFACE Generally, there are 2 methods using SKXBee. It has been designed for interface to embedded system with 5V TTL (microcontroller) or connection to computer. If 3.3V interface is required, please get the original XBee module with no extra component or board. 6.1 Microcontroller One of user’s main concerns when using XBee module is the interface with microcontroller. Most common microcontroller in the market are 5V powered, and offer/accept 5V TTL logic interface. However, since XBee is designed for 3.3V system, those that use 5V system will require extra work and components before XBee module could be embedded in the system. With the experiences and user’s feedback, SKXBee is designed to ease the interface for 5V system.

a. To begin, user may connect 5V and Gnd of SKXBee to microcontroller board. Since the

5V system is powered with 5V, it should be very simple to get power source for SKXBee. Header socket can be used to connect SKXBee to microcontroller board.

b. Once the 5V is supply to SKXBee, the small green LED should light ON. c. As 2nd step, user might need to connect the XB_RX and XB_TX pin to microcontroller.

Of course, these two pins should be cross connected to microcontroller. In other words, XB_RX should be connected to microcontroller’s Transmitter pin (TxD), while XB_TX should be connected to microcontroller’s Receiver pin (RxD). No extra component is necessary between these connections. For details connection, please refer to sample schematic.

Page 10: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

8

d. If configuration of UART is completed, SKXBee is ready for embedded wireless development. Sending and receiving data require software or firmware development on particular microcontroller.

e. Finally, the RESET pin of SKXBee. This is an optional pin for user as there is already a

reset button on SKXBee. However, if user would like the microcontroller to reset SKXBee during run time, a transistor is required for interface between microcontroller and SKXBee. Please refer to following schematic for example of microcontroller interfacing with SKXBee.

f. Any microcontroller with UART peripheral can be used to interface with SKXBee.

Example of connection to PIC16F877A microcontroller

Page 11: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

9

6.2 Computer Another main concern during development using XBee module is to check the functionality of XBee module. Normally, user will need to develop RS232 level shifter for communication to serial port. This generates extra work just to check the functionality of XBee module. Furthermore, laptop and computer nowadays have phase-out the serial port, USB has replaced it. With these reasons, an USB to UART feature has been added to SKXBee. Now, no extra work is required to check the functionally of on board XBee module. Simply plug SKXBee to USB port of computer (PC or Laptop), install driver (1st time) and there is an extra virtual COM port ready for XBee module. Checking functionality is simple as 1, 2, 3. With this, user will have an XBee USB Dongle. No external power is required if SKXBee is connected to PC for functionality test. Anyway, the power of USB is isolated from the 5V pin (external supply). In other words, USB power is not able to supply for microcontroller board.

a. Simply connect USB cable (B type) to SKXBee USB socket, another end (A type) to PC

as shown in following figure. b. Please refer to document named “USB Driver Installation Guide” for driver installation. c. After plug in the SKXBee to computer and installation of driver, user is ready to test the

functionality of SKXBee. d. To ease the testing and configuration of XBee, X-CTU from Digi-International is

recommended. First, setup X-CTU which is a computer based software to communicate with XBee, to change configuration or transmit data. To install X-CTU Software to PC, double-clicking the “setup_x-ctu.exe” file. This file can be downloaded from SKXBee page. X-CTU has to be configured to correct baud rate (UART data speed) to enable the communication and display data from XBee module. Please follow the instruction as stated below to setup the computer.

Page 12: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

10

e. Launch the X-CTU Software and select the “PC Settings” tab. Verify the baud and parity settings of the COM port match those XBee Module (as parameter in picture below). The virtual COM Port is normally located at the last port, USB serial Port.

f. Choose the COM Port and click ‘Test/Query’ tab. The box will show as picture below.

Then, click ‘OK’.

Page 13: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

11

g. To modify or read XBee Module parameters, the module must first enter into Command Mode – a state in which incoming characters are interpreted as commands. Two commands mode options are supported: AT Command Mode and API Command Mode. But basically for functionality test, we only use AT command Mode.

h. First, select the ‘Terminal’ tab on X-CTU Software. To enter AT Command Mode, send

the 3-character command sequence ‘+++” and XBee module will response ‘OK’ which means that it has already enter Command Mode.

i. To send AT commands and parameters, use syntax shown below.

NOTE: The failure to enter AT Command Mode is most commonly due to baud rate mismatch. Ensure the ‘Baud’ setting on the ‘PC Settings’ tab matches the interface data rate of the XBee Module. By default, the BD parameter = 3 (9600bps).

Page 14: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

12

j. This preceding example would change the XBee module Destination Address (Low) to “0x1F”. To store the new value to non-volatile (long term) memory, subsequently send a “WR” (Write) command.

k. When a command is send to a module, the module will parse and execute the command.

Upon successful execution of a command, the module returns an “OK” message. If execution of a command results in an error, module will return “ERROR” message.

l. To exit AT Command Mode, send ATCN Command or if no valid AT Command are

received within the time specified by CT (Command Mode Timeout) Command, the XBee Module automatically returns to Idle Mode. So, if another command need to send, ‘+++’ should be enter so that module will enter into Command Mode again.

NOTE: For modified parameter values to persist in the module’s registry after a reset, changes must be saved to non-volatile memory using the “WR” (Write) command. Otherwise, parameters will be restored to previously saved values after reset.

Page 15: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

13

m. To communicate between two SKXBee, example SKXBee1 and SKXBee2, Source Address (MY) of SKXBee1 must be match to Destination Address (DL) of SKXBee2 and Destination Address (DL) of SKXBee1 must be match to Source Address (MY) of SKXBee2.

n. Set the address for each module as shown below.

SKXBee1 : MY = 1111 SKXBee2 : MY = 2222 DL = 2222 DL = 1111

Page 16: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

14

o. After built connection between these two SKXBee, they can communicate among each other. Data sent by SKXBee1 will received by SKXBee2 and data sent by SKXBee2 will received by SKXBee1.

p. Data which is sent is in blue color and data which is received is in red color. Below is

example of data sent and received of SKXBee1 and SKXBee2 in X-CTU terminal. SKXBee1 SKXBee2

Page 17: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

15

q. There is alternative way to change the DL and MY address. Go to “Modem

Configuration” Tab, Click “Read”, after a few seconds, information gather from XBee module will be displayed shown in following figure. User may click on DL and MY to key in new address. After changing the address, click “Write” to load the new configuration into XBee module.

r. To restore XBee Module defaults setting, click ‘Restore’ button. This action may take

time. s. To verify or change other parameters of SKXBee, please refer Command Reference

Tables in Data Sheet. You can modify any parameters of the module such as period of inactivity of the module by using ATCT (Command Mode Timeout).

t. For more details of XBee communication, please refer to it data sheet.

Page 18: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

16

7. GETTING STARTED This section will show example on how SKXBee operates in real. For this project, two SKXBee are use. One is use with microcontroller and one more is use as XBee Dongle. We will learn the method to communicate wireless between PC and microcontroller by using SKXBee and XBee dongle. The PC will be used to control a 7 segment connected to the microcontroller. Do remember to configure XBee module to be paired between each other, please refer step n of section 6.2.

Page 19: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

17

7.1 Using SKXBee with Microcontroller More work will be needed if microcontroller is used as host of SKXBee. This section will show sample of using SK40A and PIC16F877A. a. Setup SK40A with PIC16F877A. Prepare a PCB board and all the components required.

Refer to the schematic and solder the components onto the PCB board. b. Load the programming to microcontroller using Bootloader (for SK40A), UIC00A (for

SK40B) or any other programmer. The default baud rate for SKXBee is 9600. Therefore in the sample program, set the baud rate of the PIC to be same as SKXBee. The sample source code can be downloaded from Cytron website, under Project DIY, PR6A: http://www.cytron.com.my/PR6A.asp

Page 20: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

18

c. Power up SK40A. Press and release reset button of SK40A. d. If all connection and setup are correctly done, SKXBee are ready to receive data through

wireless XBee dongle form PC.

Page 21: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

19

7.2 Using SKXBee as XBee Dongle a. Connect SKXBee to PC using USB B type as picture below and set the address for each

module as in section 6.2. Test the communication and go to ‘Terminal’ setting tab. b. Press reset button of SK40A as mentioned in section 7.1, followed by pressing “ok” and

“Cytron Press any number” will appear.

Page 22: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

20

c. Press any number. Data in red colour is data received while data in blue colour is data

sent. d. Numbers that have been press will appear in 7 segments display. Below is the display

when number 8 is pressed.

Page 23: XBee Starter Kit SKXBee · 2019. 2. 4. · XBee Starter Kit SKXBee User’s Manual V1.0 August 2008 Information contained in this publication regarding device applications and the

ROBOT . HEAD to TOE Product User’s Manual – SKXBee

Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

21

8. WARRANTY

� Product warranty is valid for 6 months. � Warranty only applies to manufacturing defect. � Damage caused by mis-use is not covered under warranty. � Warranty does not cover freight cost for both ways.

Prepared by Cytron Technologies Sdn. Bhd.

19, Jalan Kebudayaan 1A, Taman Universiti,

81300 Skudai, Johor, Malaysia.

Tel: +607-521 3178 Fax: +607-521 1861

URL: www.cytron.com.my

Email: [email protected] [email protected]