Tag Archive: XBEE


DIGI International has recently introduced the new ZIGBEE S2C Module .The previous S2 & the traditional S1 both are discontinued.

The new module is powerful with both UART & SPI communication .

Operating frequency band is The industrial, scientific and medical (ISM) radio band
ISM 2.4 – 2.5 GHz

It utilizes Silicon labs EM357 transceiver

The Module is faster and has more RAM & flash memory with much reduced power consumption.

Increases the mesh capabilities & consumes under 1 micro amp sleep current.

Interface options : UART 1 Mb/s maximum (burst)  , SPI 5 Mb/s maximum (burst)

Here is the comparison chart of S1 , S2 & S2C .The Indoor/Outdoor range of S2C has also increased much more as the transmit output power is  double.Also it works on supply voltage from 2.1v to 3.6v DC.

compare

 

Here are the device types of XBEE :

Device types

ZigBee defines three different device types: coordinator, router, and end device.

clip_image001 Coordinator

ZigBee networks always have a single coordinator device. This device Starts the network, selecting the channel and PAN ID.Distributes addresses, allowing routers and end devices to join the network.Buffers wireless data packets for sleeping end device children.

The coordinator manages the other functions that define the network, secure it, and keep it healthy. This device cannot sleep and must be powered on at all times.

clip_image002 Router

A router is a full-featured ZigBee node. This device can join existing networks and send, receive, and route information. Routing involves acting as a messenger for communications between other devices that are too far apart to convey information on their own.

Can buffer wireless data packets for sleeping end device children. Can allow other routers and end devices to join the network.Cannot sleep and must be powered on at all times.May have multiple router devices in a network

clip_image003 End device

An end device is essentially a reduced version of a router. This device can join existing networks and send and receive information, but cannot act as messenger between any other devices.Cannot allow other devices to join the network.

Uses less expensive hardware and can power itself down intermittently, saving energy by temporarily entering a nonresponsive sleep mode.Always needs a router or the coordinator to be its parent device. The parent helps end devices join the network and stores messages for them when they are asleep.

ZigBee networks may have any number of end devices. In fact, a network can be composed of one coordinator, multiple end devices, and zero routers.

Modes of operation
The XBee ZigBee RF Module is in Receive Mode when it is not transmitting data. The device
shifts into the other modes of operation under the following conditions:
— Transmit Mode (Serial data in the serial receive buffer is ready to be packetized)
— Sleep Mode
— Command Mode (Command Mode Sequence is issued, not available when using the SPI port)

Now let us practically see how to configure the Radio S2C. For communication one of the Radios to be configured as COORDINATOR & the other one as Router.

The Product family of S2C is  XB24C  (the previous S2 module belongs to XB24-ZB)

These S2C modules should be able to communicate with older modules, so long as they are all running compatible firmware (i.e. DigiMesh, ZB, etc..)

Following is the pin configuration of S2C.

S2C_PINS

 

To configure the XBEE you need an USB XBEE Adapter which can be easily connected to the USB port of your PC.

USB

 

In case you do not have this USB board , you can use your Arduino board as USB-UART. For this you need to connect RST of Arduino to GND.This bypasses the bootloader of Arduino & the board can be used for Serial communication.Remember to connect Rx to Rx , Tx to Tx (straight & NOT reverse connection) between Arduino & XBEE while configuring.

You can watch this video on how to use Arduino to configure XBEE

https://www.youtube.com/watch?v=wtal7SWZek0

 

Let us start with the configuration.Plug the S2C modules on to the USB adapters & connect to USB ports of your PC.

Open the new XCTU Software .S2C can be configured with this new XCT. The classic old XCtu does not support the S2C module.

Click on the SEARCH icon on top to detect the USB ports.

A list of active USB COM ports will be displayed.

Select the COM ports where you’ve connected the USB adapters.To confirm you can verify your DEVICE MANAGER for the proper COM ports.

In my case one of the USB adapter is allotted COM3 & the other one COM31.

Image 1

Click on NEXT & accept the default PORT PARAMETERS .

96008N1 is the default.  9600 is the BAUD RATE , 8 Data Bits, No Parity & 1 Stop bit.

Image 2

Click on FINISH .

The XCTU scans the USB ports selected & lists the RADIOs found with their unique 64 bit address.

Image 3

Select both the devices & click ADD SELECTED DEVICES.

Now both the Radios appear on the left pane.

Image 4

Let us configure the RADIO at COM3 as COORDINATOR first.

For this click on the COM3 RADIO to load the module settings.

 

Image 5

Once the parameter settings are loaded you can see that the product family is XB24C  (in case of old S2 it is XB24-ZB & of S1 is 802.15.4)

The function set of Firmware is ZIGBEE TH Reg , the Reg stands for Regular & not PRO. TH stands for THROUGH HOLE & not SMD.

Image 6

First thing is to set the PAN ID of the Network. This can be from 0 to FFFF hex.In my case I’m setting it to 1234.The other Radios also to be set in the same PAN ID.

Scroll down further & Enable the CE (Coordinator Enable)

 Image 7

The Destination address DH is left to default 0.

The Destination Address DL is set to hex FFFF which makes the Radio work on BROADCAST mode, so that it can communicate with all Radios in the same PANID.

The Node Identifier can be given any name like “Coordinator”.This naming  is optional.

Image 11_1

Click on the PENCIL icon on top to WRITE the changes made.

Image 8

 

Now let us configure the second Radio as ROUTER.

Click on the second Radio on the left pane to load the settings.

Image 12

The Router setting is quite simple.

Enter the PANID as 1234 , same as that of Coordinator.

Image 13

 

JV CHANNEL VERIFICATION is Enabled

CE Coordinator is DISABLED

Destination Address DL is left to default 0 . (0 is the default address of Coordinator)

rout1

 

rout2

Click on WRITE button to save the changes made.

Image 14

The modules are paired & ready for communication.

Now let us test the communication.On the XCTU window delete the second Radio .Click on the first Radio to load the settings.

Leaving the XCTU window open , start another instance of XCTU &position it to the left of the previous window.

Image 15

Click on the Search button on the new instance of XCTU & select the second Radio .

Image 16

Click on the Radio selected to load the settings.

Image 17

Now the ROUTER Radio is on the left side & the COORDINATOR Radio to the Right.

Image 18

Click the TERMINAL icon on both the windows to enter Terminal mode.

Image 19

Click on the SERIAL CONNECTION icon on both the windows to enter the serial connection mode.

Image 20

You can see the SERIAL Icon in LOCK mode & the AT CONSOLE Status changes to CONNECTED.

Now you can type any message inside console log window & see that received on the other Radio.The transmit message is in BLUE & received message in RED.

Image 21

802_1

Once the Function set is selected , click on FINISH to load the firmware.

802.15.4 firmware is like that of our classic S1 module.But setting is slightly different.

CH channel can be left to default C

PANID to be selected , say 1234 ( the other Radio to be on same ID)

DL address is FFFF

CE coordinator enable for first Radio

802_2

For the second Radio , to be set as END device

CH Channel C

PAN ID 1234 , same as Coordinator

MY address is 1 ( the coordinator MY is 0)

CE is set to END device

802_3

 

Click on WRITE button & test the modules for communication.

In this 802.15.4 Firmware POINT TO POINT communication only is possible & NO MESH Networking.

In a nutshell, the new X2C module is powerful & can work as S2 or the old S1 module.

Watch this support video :

cooltext753793315cooltext753790696

   XBEE Radios are available in wide varieties ,SERIES 1 (802.15.4 protocol), SERIES 2 (Zigbee protocol –40 mtr Range) & PRO.

In this post we shall see how to configure a pair of Series 2 XBEEs & make them communicate with each  other. When you buy a pair of XBEE s  & try to use  in your project,it is not going to work.

The XBEEs should  be configured to make them communicate.SERIES 2 configuration is different from that of SERIES 1. One of the S2 Modem is to be configured as COORDINATOR & the other one as ROUTER.

Please note that you cannot combine S2 with a S1 modem.Communication is not possible if you try to mix S1 with S2.

Always use same type of modems for your projects,But you can mix S2 with S2 PRO.PRO is   with more Power  output & does not require Line Of Sight,but very expensive.

 

                    SERIES2

 

We make use of XCTU software from DIGI to configure  XBEE Radios.

Download_XCTU & install it.

We shall use an USB type of XBEE Explorer ,which requires no external power supply & has a built in 3.3v regulator.USB A-B type of cable is used to connect this Explorer board to your PC.

Plug in the S2 XBEE module on to the explorer board in correct direction.The pin 10 of XBEE is GND & it should match the ground pin of explorer board.If you turn to the back of explorer board you can see  a broad green patch which is Ground connection & it is connected to pin 10.

usb_xbee1      XBEE

Connect this board to one of the USB ports of your PC using the A-B cable.Same way , make use of another explorer board with second  XBEE & connect it to another USB port of PC.

Open up the Device Manager & confirm that your boards are recognized and allotted ports.

device

 

If the USB explorer boards are not recognized by Windows,you’ve to install the FTDI  drivers.Download drivers Here.

Now fire up the first instance of XCTU. You can see XCTU has recognized the COM ports to which modems are connected.

CONNECT1

Select the first port COM13 & confirm that the baud rate entry is 9600 ,Flow control – None ,Data Bits – 8, Parity – None & Stop Bits – 1.

Also ensure that “Enable API “ is NOT checked. Press the Test/Query button.

Now the XCTU confirms the presence of first modem.

Keep aside this window & fire up the second instance of XCTU.In the new window select the other port , COM14 . Settings are same as for the first modem.

Click Test/Query button to see that the second modem connection is confirmed.

Keep side by side both windows as below :

connect2

Now we shall see the first modem setting ,which is to be configured as COORDINATOR.

Click on Modem Configuration button of the left window (COM13).Make sure  the “Always Update Firmware” is checked & then click on Read button.

 

con3

If you are working on XCTU for the first time ,it will start Updating Source files .This may take 5 – 10 minutes.

update

If the source is up to date ,you see the configuration of modem when you click Read.

Select from the drop down Function set as “ZIGBEE COORDINATOR AT “ .

Note that it is Coordinator AT  & not API. Make sure that type of XBEE is XB24-ZB ,which means

Zigbee Protocol S2 modem.

Under Networking ,change the PAN ID to some four digit number,say 3312. You can leave it as 0,it doesn’t matter

for a point to point communication.

COORD1

Under Addressing folder click on Set next to NI-Node Identifier & enter COORDINATOR.

You can enter what ever name you like.To be precise enter as COORDINATOR & click OK.

COORD3

Also ,under Addressing folder you can see the unique Serial Number of the XBEE in 2 parts

Serial Number HIGH & LOW.

This is the same serial number you see at the back (pin side ) of the XBEE.

pin_side

Note down this number,as you’ve to feed it as Destination address of the other XBEE.

COORD2

Now click on the Write button  to fuse the changes we made on to the Modem.

WRITE

Now we shall configure the second modem as ROUTER.

Click on Read button of COM14 window .

From the drop down Function Set select “ZIGBEE ROUTER AT” & confirm the modem type as XB24-ZB.

Click on PAN ID & enter the same number we’ve given for the first modem (3312).

ROUT1

Under Addressing folder click NI –Node Identifier & enter name as ROUTER.

ROUT2

 

Now it is time to declare the Destination address for the modems.On COM14 window under addressing

click DH – Destination Address High & enter as 13A200 ,

which is the SH –Serial Number High of first modem.

click DL – Destination Address Low  & enter 408ADA92 ,

which is the SL –Serial Number Low of first modem.

Note that yours is different Serial number ,as you see at the bottom of your XBEE.

ADDRESS1

Click the Write button on the COM14 window.

Now click on COM13 window (COORDINATOR modem) & enter the address DH & DL ,

which is the serial number SH & SL of COM13 – Router modem

 

ADDRESS2

Don’t forget to click the Write button to enable the changes made.

ADDRESS3

Now the configuration setting is over.To test the connection click on Terminal in both the windows.

Type in some text inside COM13 (COORDINATOR) ,it will be reflected inside COM14 (ROUTER)

window.Same way type in some text inside COM14 , it will be received inside COM13.Once you configure

the modems ,you need not bother which one is Coordinator & which one is Router.

COMMN_OK

You can also test the AT commands.

Type in 3 consecutive +++ symbol & wait to get OK.Do not type Enter,just wait to get into command mode.

Type ATDL to get the Destination Low address

  ATSL to get the Serial Number LOW

ATID to get the PAN ID

ATCN  to Quit the Command mode.If you do not enter anything for 10 seconds,it will automatically

come out of command mode.

ADDRESS5

 

You can remove the XBEEs from the explorer boards & use it to interface with a Microcontroller chip.

You’ve to use pins 2 & 3 (TX/RX) of XBEEs to connect with a Microcontroller .

Watch this video  :

CONFIGURING SERIES 2 XBEES using XCTU

 

For availability of DIGI XBEE Radios & Explorer boards contact :

cooltext753793315                 cooltext753790696