Introduction: XBee Mesh Network Construction

Picture of XBee Mesh Network Construction

Introducing the XBee radio module.

For those who dabble within the realm of arduino, raspberry pi, or any number of electronic hobbies; the XBee module allows for an integrative capability to allow for wireless communication within your project. Applications for this module are only limited by your imagination. XBees can be used to both transmit and receive data via wirelessly (no internet required) to include command signals for remotely operated vehicles. This instructable will delve into building a self healing mesh network that will allow for a remotely operated vehicle to be controlled at extended ranges in an underground tunnel network.

Step 1: The XBee Mesh Kit

Picture of The XBee Mesh Kit

The kit being used for this project is the XBee mesh kit (Part Number: XKB2-Z7T-WZM) from www.digi.com. The XBees used are the Series 2 model (this is critical as a series 1 model only allows communication between a maximum of 2 modules). This kit comes with 3 XBee radios included and since the system is modular in terms of expansion, you can add as many radios as you like.

Note: XBees are also commonly referred to as "Zigbees" and come in many different models from several manufacturers. Therefore, this instructable may not provide favorable results if applied to a different model.

Step 2: XCTU

Picture of XCTU

In order to create a Mesh Network System with the XBee radios, we will first need the program XCTU which is free to download from a quick google search. Once the program is installed, plug one of your XBee radios into one of the explorer boards provided in the mesh kit (as pictured), then connect the explorer board to your PC with the included cable.

Step 3: XBee Configuration

Picture of XBee Configuration

Once the XBee explorer board is connected, the necessary software should install automatically and you will be ready to configure your mesh network.

First, you will need to select the "discover modules" icon in the top left portion of XCTU which is displayed as an XBee module with a magnifying glass. Select this icon and you should see a discovery options menu (pictured above). When this menu appears, you must select which COM port you wish to search to discover the XBee module. COM3 is nearly always an internal module and is therefore non accessible for you to plug any devices into, so it should be disregarded. Select the COM port which holds the XBee and click "Next".

Note: for ease of use, disconnect all USB devices (other than mouse and keyboard) from your computer so as to ensure that the correct COM port is selected. COM ports are specific to the explorer board that is connected to the PC, therefore if your board appears as COM20 on your scree, it will continue to display as such even if you connect it into a different USB port on your computer.

Step 4: XBee Configuration 2

Picture of XBee Configuration 2

Once you have pressed "next" on the discover menu, you will have the option of customizing your search settings. This is reserved for more advanced uses and should be left at the default setting especially if the XBee module has yet to be configured. Click "Finish" and allow the system to discover the module.

Note: On this section, there are options for searching different baud rate settings. The baud rate at default is set to 9600, but if you reconfigure the XBee module to run at a higher baud rate (usually reserved for controlling R/C vehicles, then you will have to select the according baud rate when discovering the module in the future.

Step 5: XBee Configuration 3

Picture of XBee Configuration 3

Once your XBee module has been discovered, you should be greeted with the screen pictured above. In this picture, the XBee is configured to be a coordinator. In order for your mesh network to function correctly, you must have at least a coordinator node (which will act as your ground station to transmit command signals), and a router/end device (which is what is meant to receive the signal). The number of routers established in between is up to you. When the module is selected on the left side, all of the system parameters will display on the right side panel.

For best results on this project, be sure to update the firm ware on your XBee to DigiMesh 2.4 TH (this can be done by clicking the "update" icon just above the system parameters section), otherwise you will be faced with system parameters different from the ones that will be listed shortly.

Step 6: XBee Configuration 4

Picture of XBee Configuration 4

Once your XBee firmware has been updated, simply follow the parameter settings indicated in the imaged above. Most importantly, the first two parameters (Channel and Network ID) must be the same for all modules in your system. They can be set to any value you wish, but these items act as the frequency with which your XBees will communicate. Follow along with the following images to configures the coordinator module.

Step 7: XBee Configuration 5

Picture of XBee Configuration 5

Note: In this section, in order coordinate you XBee to function as an end device. Simply select the "End Device" Option from the CE Coordinator End Device line.

Step 8: XBee Configuration 6

Picture of XBee Configuration 6

Step 9: XBee Configuration 7

Picture of XBee Configuration 7

Step 10: XBee Configuration 8

Picture of XBee Configuration 8

Step 11: XBee Configuration 9

Picture of XBee Configuration 9

Step 12: XBee Configuration 10

Picture of XBee Configuration 10

Step 13: XBee Configuration 11

Picture of XBee Configuration 11

Step 14: XBee Configuration 12

Picture of XBee Configuration 12

Step 15: XBee Configuration 13

Picture of XBee Configuration 13

Step 16: XBee Router Configuration

Picture of XBee Router Configuration

To configure an XBee to function as a router, simply repeat the discovery actions that were performed with the coordinator, and set the parameters the way. The only difference between the parameters of the coordinator and Router are shown in the following images referencing specific sections.

Step 17: XBee Router Configuration 2

Picture of XBee Router Configuration 2

Step 18: XBee Router Configuration 3

Picture of XBee Router Configuration 3

Step 19: XBee Router Configuration 4

Picture of XBee Router Configuration 4

Step 20: Testing Communications

Picture of Testing Communications

When all XBees have been configured, connect them to your PC at the same time (a second explorer board will be necessary from the kit). The pictures above indicate communication between the coordinator and a router, but the same traffic is to be expected between the coordinator and end device as well.

In order to test the communications, discover both modules as instructed earlier.

Then in the top right corner of the program, select the icon that resembles a computer monitor. this is the telemetry communication section.

Selecting each module, ensure that the "connect" action is highlighted in greed by selecting it, this opens communication traffic between the modules.

Step 21: Testing Communications 2

Picture of Testing Communications 2

Once the modules are connected, being typing characters into the blank space of the section. You will immediately see your characters displayed in blue as they are being transmitted. Once you are finished with your message, select the router module from the left hand side. If the message was received, then an identical string of characters should appear in red in the blank space you had typed in earlier as shown above.

Step 22: Testing Communications 3

Picture of Testing Communications 3

To ensure that two-way communication has been achieved, begin typing characters in the blank space with the router selected this time. You should now see blue text appearing under the red text that was received earlier. Once complete, select the coordinator again and confirm that the characters were received and show in red text (again, displayed above).

CONGRATULATIONS!!

You just created an XBee transmission network that is capable of sending and receiving data in a self healing system. From here you can add as many routers as you like to fit your needs.

Step 23:

Comments

Swansong (author)2017-05-03

Thanks for sharing :)

About This Instructable

1,650views

44favorites

License:

More by Patchu101:XBee Mesh Network Construction
Add instructable to: