5 min read

In Part 1 we talked about some of the hardware that I used to create my Zigbee (XBee) controlled RC vehicles. In this part we will see how to use the software that come for free from Digi.com.

Figure 1 XCTU Boot Screen

When you start XCTU, you will always see the screen shown above. The first thing we have to do is to find out which serial port is connected to the Zigbee module. There are a number of ways to communicate serially with module.

The hardware that I would recommend is shown below and is available from Sparkfun Electronics.

Figure 2 XBee Explorer USB

This adapter has a built in FTDI USB adapter, which will install itself as a serial port on your system.

Figure 3 Select Serial Port

In this case we are using Com 9 – USB Serial Port. The next thing we have to do is to select the baud rate and other parameters. Basically 9600 baud, 8 bits, no parity and no flow control.

Figure 4 Port Parameters

Now that we have the serial port configured, we can search for XBee modules to configure. The XBee module is powered by the USB port of you host computer, so you should see some lights flash when you first plug in the adapter.

Setting Up the XBee Controller

Figure 5 Controller Setup

The figure above shows the first setup portion for the controller (the box with the joystick). The important thing to note is the DL or Destination Address Low Byte; this is the address of the XBee module in the robot. This is the module where the inputs to this XBee will be “mirrored” on the outputs of the robot’s XBee. But first we have to set them up as inputs on the controller.

Figure 6 I/O Settings

There are a few important things to be aware of in the figure above. First of all inputs D0 – D4 and D6 and D7 are configured as inputs. But the most important thing is the “DIO Change Detect” value.

This value acts like an interrupt mask. The “7E” value tells the XBee to only scan the inputs we setup for a change. And these inputs must be pulled to a steady state, either high or low, or the mast will send spurious commands to the robot.

Setting Up the XBee Receiver

Figure 7 XBee Receiver Setup

This is the setup screen for the robot. My robot’s name in this case is “Gaucho”. As you can see the corresponding I/O pins are configured as outputs on this XBee module. Also note that the lower address byte of the MAC Address is “40BF1EF1”. This is the DL byte that we have to enter into the controller setup. We are using “star” network configuration, so the controller can only talk to one robot at a time. If you want to control several robots, you will have to change this part of the address to talk to a specific robot.

The XBee module is capable of driving and LED directly, so if you buy an adapter like the one below, you can test the controller before you install the XBee receiver in your robot. This is something I HIGHLY recommend.

Figure 8 XBee Breakout Board

Summary

In this part the blog, I showed you how to set up the XBee modules using the free software from the folks at Digi. So at this point you have most of the information to start modifying / building your own XBee controlled robot.

In part three of this article we will take a look at a very large robot that I have built and christened “Gaucho”, because it began as a child’s ride on electric car (Called Gaucho)!

Figure 9 Gaucho

About the Author

Bill began his career in electronics in the early 80’s with a small telecom startup company that would eventually become a large multinational. He left there to pursue a career in commercial aviation in Canada’s north. From there he joined the Ontario Center for Microelectronics, a provincially funded research and development center. Bill left there for a career in the military as a civilian contractor at what was then called Defense Research Establishment Ottawa. That began a career which was to span the next 25 years, and continues today.

Over the years Bill has acquired extensive knowledge in the field of technical security and started his own company in 2010. That company is called William Pretty Security Inc. and provides support in the form of research and development, to various law enforcement and private security agencies.

Bill has published and presented a number of white papers on the subject of technical security. Bill was also a guest presenter for a number of years at the Western Canada Technical Conference, a law enforcement only conference held every year in western Canada. A selection of these papers is available for download from his web site.

www.williamprettysecurity.com

If you’re interested in building more of your own projects, then be sure to check out Bill’s titles available now in both print and eBook format! If you’re new to working with microcontrollers be sure to pick up Getting Started with Electronic Projects to start creating a whole host of great projects you can do in a single weekend with LM555, ZigBee, and BeagleBone components! If you’re looking for something more advanced to tinker with, then Bill’s other title – Building a Home Security System with BeagleBone – is perfect for hobbyists looking to make a bigger project!

1 COMMENT

  1. This is interesting. I’m starting out on a project to build an electric gate controlled through ZigBee. I’ve seen ZigBee switch modules online and thought maybe I could have an Arduino monitor the output for closed and open circuit. Closed circuit to open gate and open circuit to close the gate. But this doesn’t allow for any smart safety. Which I figured I could at least do with a switch that cuts power to the motor if interrupted by a panel up the end of the gate. This might give me more flexible options. Thanks for the article. Now I just have to figure it all out…

LEAVE A REPLY

Please enter your comment!
Please enter your name here