Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
EE Times-Asia > RF/Microwave

Designing Z-Wave devices

Posted: 02 Nov 2012 ?? ?Print Version ?Bookmark and Share

Keywords:communication protocol? antenna filter? frequency bands?

The modules provide a SPI interface that is used to program the memory and can be used to attach an external serial SPI EEPROM. The external EEPROM can be used to store additional application data. It is not possible to use the external EEPROM for operation code. The 8051 compatible microcontroller with internal ROM typically contains and executes the application code of the device. Devices with more complex functions such as remote controlsmay use the Z-Wave chip as a companion chip for communication only but the amount of memory and computing power typically allows implementing all needed functions right into the transceiver chip itself to save cost and PCBA foot print.

For the software development a System Development Kit (SDK) is needed. They differ in the selection of hardware provided. The more expensive SDK-versions not only contain EEPROM programmer hardware but also different test hardware for sensors, actors and for different frequencies. All SDKs contain the software and documentation package. In order to access the set of documentations, software codes and tools a NDA with Sigma Designs needs to be signed. By signing the NDA the manufacturer agrees to keep all information provided in the SDK as confidential.

Figure 1: Z-Wave communication stack.

As shown in figure 1, the communication stack of Z-Wave consists of three parts. The PHY and MAC layer is specified as ITU-T recommendation G.9959. The network layer is Sigma Designs proprietary code and protected by several patents. The application layer is defined by the product manufacturer but needs to comply to the protocol to ensure interpretability and product certification.

The SDK contains all needed documentation and code to build a firmware that covers all three parts of the communication stack. The NET, PHY and MAC layer are well defined and shall not be altered by the developers. They are therefore not available as source code but as precompiled libraries only. The libraries are complemented by plenty of sample codes to show the usage of the libraries and to document the implementation of a Z-Wave compatible code.

The closed source of the libraries has its pros and cons:

Con: In case there are bugs in this library the turnaround cycle is much longer and for developers debugging is harder.

Pro: Nobody can change the lower part of the protocols. This makes sure that at least for this part all Z-Wave products interoperate without problems, since they all rely on the same well managed code base.

In order to compile a firmware for the Z-Wave modules using the Sigma Designs SDK a KEIL C compiler is needed. Although KEIL is a good and professional tool developers would certainly prefer to use the GNU tool chain as well. The precompiled libraries for the PHY and NET layer however force the usage of certain versions of the KEIL compiler and its environment. The SDK contains the following parts:?precompiled libraries for different applications, sample code,?source code for certain tools and the complete documentation of the Z-Wave protocol.

Z-Wave distinguishes different functions in the network, referred to as controllers or slaves. These different roles in the network use different functions in the protocol in Z-Wave. As a result the SDK offers different library versions for different device roles in the network. The main reason for this is memory footprint since the implementation of all functions in one library would exceed the available EEPROM space to store operation code. Most of the functions of the library, particularly the versions dealing with the network organization but also the initialization of the chip and the handling of the input and output queue of the transceiver are hidden from the developer. The main functions the developer uses are:

???Sending and receiving application commands
???Including / excluding devices
???Some network management functions
???Access to the peripherals such as watchdogs, TRIAC control etc.
The SDK also contains a skeleton to simplify the design of new applications. Various sample codes for different functions of Z-Wave simplify the use of the skeleton and help in developing applications. Unfortunately developers have almost no debugging mechanism for writing Z-Wave firmware. There is neither a JTAG in circuit debugger interface available or any emulator or simulator for the chip. The memory constrains for the 300 series add another layer of complexity and can make the development of firmware a frustrating experience. However the Z-Wave ecosystem contains several service providers that provide help and professional development services.

Design interoperable products
The communication part of the device control code needs to comply with the Z-Wave specification. The Z-Wave specification defines different roles of a device and the developer must choose one of these role types.

?First Page?Previous Page 1???2???3???4?Next Page?Last Page

Article Comments - Designing Z-Wave devices
*? You can enter [0] more charecters.
*Verify code:


Visit Asia Webinars to learn about the latest in technology and get practical design tips.

Back to Top