PHOTO 3. Once you understand how the FTDI parts work,
you’ll enjoy browsing the schematic diagram of this device. The
quad comparator module design that drives the USB-XBEE-DONGLE
CARRIER’s signal-strength LEDs is very clever. The voltage
regulator is on the hidden side of the board.
• When multiple remote devices need to be identified
by their unique address.
• When mesh networking is employed (ZigBee).
As our little peer-to-peer “network” will consist of only
two nodes, we’ll keep it simple and operate transparently.
The Personal Computer Node
The PC XBee-PRO transparent node uses a New Micro’s
USB-XBEE-DONGLE CARRIER (the one under the shaped
SCREENSHOT 1. X-CTU and the USB-XBEE-DONGLE
CARRIER are to the XBee-PRO module as MPLAB and an ICD- 3
are to a PIC. X-CTU exposes all of the module’s secrets and
stores them away, as well.
56 SERVO 05.2010
glass and lights in Photo 3) to host an XBee-PRO module
via one of the PC’s USB portals. The CARRIER uses FTDI
USB technology to interface the module’s serial I/O to the
PC’s USB portal. If you’re FTDI challenged, check back
issues of SERVO and Nuts & Volts to get a snoot full of
FTDI technical data and hands-on projects. You can get a
free schematic of the CARRIER from the New Micro’s
website. The USB-XBEE-DONGLE CARRIER is powered by 5.0
volts obtained from the PC’s USB port and provides
onboard voltage regulation for the XBee-PRO module
(which requires a nominal 3. 3 volt power source). In
addition to providing a regulated power source, the
CARRIER allows us to configure the piggy-backed XBee-PRO
module. The module’s firmware can also be upgraded using
the resources of the CARRIER coupled with the free XBee-PRO PC-based configuration application X-CTU. If you plan
to work with XBee-PRO modules, the CARRIER is a must-have tool.
Screenshot 1 is a capture of an X-CTU modem
configuration window. This view gives you an idea of some
of the XBee-PRO knobs you can twist. For instance, the
packetization timeout value for this particular XBee-PRO
module is three character times — which equates to 312.5
µS at 9600 bps. We can also change the data rate, parity
setting, and enable API mode from this view. As you can
see in the capture, X-CTU provides a terminal functionality
which comes in handy if you don’t happen to have a copy
of Tera Term Pro loaded and ready to run.
Assembling and coding the PC node is a piece of cake.
First of all, there is no real coding work to be done.
Assembling the XBee-PRO hardware entails plugging an
XBee-PRO radio into the CARRIER. Things aren’t so
straightforward on the PIC32MX795F512H side. The XBee-PRO is pinned at a 2.0 mm pitch, and our prototyping
board is drilled at 0.1 inch centers. So, the first order of
business is to adapt our module to the prototyping board.
Installing the XBee-PRO
I know what you’re thinking and yes, we could simply
purchase an XBee-PRO adapter from a vendor on the
Internet. The alternative is to dig into the stuff-I-didn’t-use-for-that-other-project box and build an XBee-PRO adapter
with sticks and rocks. Using my handy Dremel tool, I cut a
1.4” x 1.0” rectangle from a plated-through perfboard. The
XBee-PRO module will fit into a pair of 10-pin 2.0 mm SIP
sockets which I mounted on the perfboard using a quad of
right-angle header pins. The 2.0 mm sockets are hovering
over the perfboard and that gave me plenty of room to
hand-wire their pins down to it (it’s been fitted with two
rows of standard 0.1 inch pitch header pins).
The completed caveman module adapter is shown in
Photo 4. A 1.0 µF ceramic capacitor paralleled with an 8. 2
pF ceramic capacitor is recommended to be electrically
attached between pins 1 and 10 of the XBee-PRO module.
The capacitors are mounted on the hidden side of the
perfboard. The garage-brewed XBee-PRO module assembly