CHANGES – Visit this page
for news of recent developments in EEE Zigbee tools & documentation
Introduction to Zigbee network characteristics and
performance
Some collated hardware
& software datasheets
The supported Zigbee
modules are Meshnetics/Atmel Zigbit. These are cheap (£18 from OneCall).
They can be programmed using a high quality free toolchain. However for many
applications they will not need to be programmed (see below).
I have a few MeshBean 2 development boards that will work as
controllers or endpoints or routers.
The department can make PCBs which have Zigbit modules and
serve as either controller boards (with USB interface to PC) or endpoint
boards. All these boards use built-in aerials on the Zigbit Modules. The
home-made boards can be programmed in exactly the same was as the development
boards. Variants are available with LCD interfaces.
The boards are very simple circuits and the endpoint PCB can
be adapted to include other hardware. All PCB designs are available as EAGLE
CAD files. Uptodate documentation & board CAD files is available from
Atmel
RZRAVEN development kits include a USB radio dongle and AVR Raven boards which
are fairly cheap and contain LCDs controlled by an additional AtMega3290P
microprocessor. (NB
use of these boards is now deprecated – EEE z-avr-lcd boards running SerialNet
will be a better solution). BitCloud (see below) will run on
RZRAVEN. An application for writing to
LCD is available. Code can be developed by programming the additional
microprocessor - simpler than using BitCloud since the Zigbee stack is handled
transparently by the other processor. However no equivalent of SerialNet
exists. Note that RZRAVEN and SerialNet nodes cannot be driven from a single
controller - however RZRAVEN and Zigbit endpoints can be mixed and driven from
a single controller via BitCloud. See below for more information on software.
AVR Raven boards have been used for a number of projects fro which code on the
web may be available. The ArchRock
code provides an IP interface from PC to AVR Raven over Zigbee, which can be
used with provided firmware on the AMega3290P and AVRUSBSTICK to provide simple remote LCD write commands.
The sample code for this can very easily be developed to add extra I/O commands
that communicate with the 3290P. The ArchRock sample 3290P code for
writing to the LCD is available and can be expanded to include other commands
and/or a user application. Note that 3290P I/Os are available. See the extended
note on using ArchRock code.
Zigbit
Module Hardware Limitations
Zigbit modules expose a limited number of the microcontroller
I/Os as pins:
v 9 spare GPIO, 2 spare IRQ
lines
v 4 ADC lines + 1 line for
supply voltage control (up to 9 lines with JTAG disabled)
v UART with CTS/RTS control
v USART
v I2C
v SPI
v Wire
v Up to 30 lines
configurable as GPIO if other functions are not used
NB - See also SerialNet software limitations below which are
much greater than hardware limitations.
v Any
module can be programmed using JTAG (a very cheap compatible USB JTAG interface
for programming is AVR Dragon from Rapid Electronics).
v Many
modules will come pre-loaded with bootloader. Otherwise bootloader can be
loaded using JTAG as above. This allows serial port programming - useful for
controller boards.
v See AVR2052 for full information on
software and hardware necessary to get started programming modules. SEE AVR Toolchain Howto for local guide.
v See AVR Serial Howto & AVR LCD Howto for details on how to
interface to Serial links & LCDs from microcontrollers
Method 1
Use SerialNet
application on both controller & endpoints, as in Figure 1. Links on boards
select whether board is controller, router or endpoint. Zigbee mesh network
forms automatically. PC controls everything using AT commands - see Reference.
It is possible to write C under windows on a PC that can communicate with &
control Zigbee boards, any language that can control COM (serial) ports will
also be capable, Visual Basic, Python, Matlab, etc.
Figure 1
See SerialNet Usage document for more
information.
Method 2
Add a local microprocessor which interfaces with Zigbit module
via USART. See Notes on how to do this..
This method is much more flexible since I/O is no longer
limited to that on Zigbit module and (more importantly) local processing is
possible which allows much more efficient use of the Zigee channel. SerialNet
makes Zigbee use easy.
Method 3
It is possible (but more complex) to write applications under
BitCloud which run on Zigbit modules and perform local processing. This is much
more work than method 2 but results in smaller hardware footprint. Not recommended
for projects except for good programmers – even then the fastest route to
functional system will be method 2.
Method 4
A few projects will require much greater bandwidth than is
available from Zigbee/SerialNet. The solution is to use the underlying 802.15.4
stack. This protocol is actually less complex (and therefore easier) than
Zigbee. It allows star and tree topology but not mesh. SerialNet does not work.
See Atmel web pages for available software. Support may be limited.
Further Information
See SerialNet usage
guide for further discussion & information.
See Atmel
AVR2052 Quick Start Guide and other documentation found in the BitCloud SDK for Zigbit
or RZRAVEN. Latest versions of the SDK can be found on the Atmel website.
Other modules. Many other vendors sell Zigbee modules (XBee
etc). For student projects the advantage of Zigbit is that the tool chain is
good quality and free, and full Zigbee operation is possible. Also this
technology is used in the department. However note that method 2 above
decouples the Zigbee module from the rest of the design. Almost any Zigbee
module that comes pre-programmed with a serial interface (like SerialNet) can
be used. However you are on your own doing this.
Old Information from Meshnetics (obsolete software & dev kits)
Browse v2.0 README with links to documentation on web
Install dev kits with code and other dev tools from Zigbit Tools v2.0. (you will need to run the Development kit 2.0 executable to obtain all the documentation).
Browse HTML version of the v2.0 dev kit documentation
Linked here for browsing (from old dev kits, may be out of date):
Download WinAVR (as windows executable installer) from sourceforge
Download AVR studio 4.x from Atmel