Wireless personal-area networks (WPANs) are exceptionally useful for sensing, monitoring, and control applications. Cost-effective WPANs have the unique potential to implement wireless connectivity in many end products where this functionality wasn’t considered previously. A thorough, fact-based, logical, and organized evaluation of key WPAN design factors can closely manage system financial objectives, increasing end product value with a positive rate of return, while still achieving key wireless design objectives.
Sensing, monitoring, and control solutions drive specific consideration factors for WPAN implementation. Ranges for low-cost wireless networks in sensing, monitoring, and control applications encompass those distances of 300 m or less and data rates of 250 kbits/s or less. In WPAN end node designs, it’s often necessary to extend battery life to the optimum to meet product needs.
By proactively analyzing several key factors before design work begins, the embedded engineer can enhance the results of the final wireless network implementation. Developing and examining these key factors in a matrix format will aid the design engineer in the component and solution selection analysis process.
Reference design schematics, bills of materials, and other application information may also be gathered as a baseline for design initiation. An example wireless UART (universal asynchronous receiver/transmitter) reference design is included with this article.
It’s recommended that the embedded engineer consider review of the following areas in relation to WPAN design requirements: integration, wireless networking topologies, radio (RF modem or transceiver), performance, operating voltage, data rates, range, channel flexibility, output power, sensitivity, power management, peripherals, clocking, multitier software, ease of hardware and software design, antenna design, and packaging.
Also, when considering an integrated solution or a discrete solution, the microcontroller (MCU) should be evaluated with the following factors in mind: CPU features, performance, memory options, power management, clock source options, analog-to-digital conversion, peripherals, packaging, in-circuit debug and programming capabilities, and ease of software and hardware design. Such analysis will provide an organized perspective for engineering decisions, an avenue toward design success, a fast time-tomarket, and an easier implementation of cost-effective wireless networking.
A variety of implementation alternatives for low-cost wireless networking can offer the engineer a high level of flexibility in the design process. As one alternative, consider solutions from one-stop-shopping providers that offer various configurations of standalone transceivers to be used with a wide selection of microcontrollers (Fig. 1). As a second and equally effective alternative, consider the newest solutions that offer integrated transceiver/MCU products. Reusing design components and engineering investment may be important as designers work on multiple, yet similar, end products. Therefore, a structured evaluation of solution options can be both cost- and resource-efficient. Well-thought-out research can mold a basis for several end products to be designed from a single foundation (Fig. 2).
The 2.4-GHz ISM band supports multiple short-range wireless networking technologies. Each alternative has been developed to optimally serve specific applications or functions. The networking topologies most commonly associated to the 2.4-GHz frequency range are Bluetooth, Wi-Fi, and ZigBee, as well as other proprietary solutions (see the table).
Each solution is suitable for WPANs. However, some offer extended capabilities that align best with sensing, monitoring, and control application needs. Non-standards-based proprietary solutions may be considered, too. But such solutions may pose some risk to the designer since they’re vendor-dependent and could be subject to change.
ZigBee, an IEEE 802.15.4 standardsbased solution as defined by the ZigBee Alliance (www.zigbee.org), was created to address networks that require low power consumption, low data rates, reliability, and security. The ZigBee solution accommodates network-specific support mesh networking, network recovery and healing, device interoperability, and vendor independence. The ZigBee solution frequencies are typically in the 868/915-MHz or 2.4-GHz spectrums.
ZigBee technology solutions have a 250-kbit/s data rate. Power consumption must be extremely low to optimize battery life for months or even years of operation (often equivalent to the shelf life of the battery) using alkaline or lithium cells. ZigBee technology theoretically supports up to 65,000 nodes. Common applications in sensing, monitoring, and control that are best supported by a ZigBee technology solution include personal and medical monitoring; asset management, status, and tracking; security, access control, and safety monitoring; fitness monitoring; process sensing and control; energy management; home automation; heating, ventilation, and air-conditioning sensing and control; building automation; industrial automation; and many others.
Some WPANs may be as simple as single point-to-point or star configurations. Depending on the application, other proprietary wireless solutions similar to ZigBee may offer the best match of ease of design versus system capability.
One low-complexity example is the simple media access controller, or SMAC. Look for solutions in this space where the vendor offers easy-to-use source code to speed time-to-market for simple networks. The IEEE802.15.4 standard-compliant media-access-controller (MAC) solution supports more complex configurations with packet and streaming data modes, beaconed and non-beaconed networks, and 128 AES data encryption.
Providers that offer multiple levels of stack capability give embedded engineers the opportunity to reuse their design software for a variety of WPANs, including those with varying levels of complexity. Multiple stack solutions act as the foundation on which the embedded engineer can easily set up the radio and focus most of the design effort on the application software.
Continue on Page 2
RADIO (TRANSCEIVER)/RF MODEM
Several RF modem features should be considered for implementing low-cost wireless networking systems. Most cost-effective WPAN RF modem solutions recommend power supplies from 2.0 to 3.4 V.
For lightweight wireless networks, low data rates are adequate to support monitoring, sensing, and control functions. They also help manage system power consumption. As mentioned, 250-kbit/s or less O-QPSK data in 2-MHz channels (with 5-MHz spacing between channels) with full spreadspectrum encode and decode is most often selected for these application types.
In these environments, the transceiver wakes up, then listens for an open channel, transmits small packets of data at lower data rates, and finally shuts down until the next event is indicated. The sequencing, fast power on latency, lower data rates, and small data packets allow an 802.15.4 transceiver to select time increments in which the data transmission will be most effective.
As noted, for sensing and control subsystems, data transmission range and power requirements are best supported with WPAN software stack solutions. Typical range is 0 to 10 m. However, many solutions offer line-of-sight ranges well beyond 300 m.
It’s important to review the number and types of transceiver channels available in relation to the planned design. Selectable transceiver channels offer designers the option to take advantage of channels that minimize noise, particularly staying away from the more crowded 2.4-GHz Wi-Fi channels. For noisier operating environments, experienced vendors will offer three to four suggested 2.4-GHz channels, which have less noise potential.
It’s recommended that designers look for typical transmit output power in the 0- to 4-dBm range. Receive sensitivity, typically in the -90-dBm range, will offer adequate capabilities for sensing, monitoring, and control functions. Buffered transmit and receive data packets simplify data management for the low-cost MCUs that will be used with the transceiver. The radio or transceiver should also offer link quality and energy detect functions for network performance evaluation.
Multiple power-down modes offer power-saving features to minimize system power consumption. These typically include off current, hibernate current, and doze currents in the single-digit microampere ranges. Programmable output power also allows designers to reduce power consumption in a range or environment that doesn’t need as much power to transmit and receive. Ensuring these functions are offered in the selected solution will aid in maximizing battery life in battery-operated full-function/coordinator or end node devices, often to the full shelf life of the battery.
Another important task is to look for additional essential peripherals, such as internal timer comparators, that help reduce MCU resource requirements. These could include general-purpose input/output ports (GPIOs), which come in various configurations and counts. GPIO depends heavily on interface requirements with other devices in the application.
In solutions that offer the flexibility of a transceiver with a separate MCU, the serial peripheral interface (SPI) port handles communications. As would be expected, when the radio and MCU are integrated into a single package or chip, the transceiver communicates to the MCU through the onboard or internal SPI command channel.
Also, integrated solutions that include low-noise amplifiers (LNAs), power amplifiers (PAs) with internal voltage controlled oscillators (VCOs), an integrated transmit/ receive switch, on-board power-supply regulation, and full spread-spectrum encoding and decoding reduce the need for external components in the system and lower overall system cost.
A wide array of system clock configurations provides flexibility in end system design. Options that allow either an external clock source or crystal oscillator for CPU timing are most suitable. A 16-MHz external crystal is typically required for modem clocking. Capability to trim the modem crystal oscillator frequency helps to maintain the tight standards required by the IEEE 802.15.4 specification.
Depending on the complexity and requirements of the end design, the designer is best served by vendors who offer multiple network software topology alternatives and multiple hardware configurations, which are often based on memory sizes. These may include a simple MAC configuration that utilizes 4-kbyte and higher MCU flash memory. Fully 802.15.4-compliant MAC and full ZigBee-compatible topologies often utilize MCU flash memory from approximately 20 to 128 kbytes.
Continue on Page 2
Using a vendor’s reference designs and hardware- and software-development tools can help ease the design process. For hardware-development tools, simple “getting started” guides— essential boards with incorporated LEDs and LCDs for visual monitoring, cables, and batteries—provide an easy out-ofthe- box experience. With these tools, designers can set up a network in minutes and actually evaluate network and solution performance.
In the past, some software design tools—specifically those that support fully ZigBee-compliant networks—have been extremely difficult to use. To reduce the complexity of RF modem preparation, look for vendors who offer GUIbased (graphical-user-interface) software design tools that walk designers through a step-by-step transceiver setup.
Antenna design can be a complex issue, particularly for digital designers who have limited to no experience in RF design. Typically, designers would consider factors such as selecting the correct antenna, antenna tuning, matching, gain/loss, and knowing the required radiation pattern. It’s advisable to gain a basic knowledge of antenna factors through application notes provided by the transceiver vendor. However, most digital engineers prefer working with a vendor solution that provides antenna design, allowing them to focus on the application instead.
Look for antenna solutions that offer antenna design in completed Gerber files, which can be provided directly to the printed-circuit-board manufacturer for implementation. A vendor who provides such solutions eliminates the issues associated with high-quality antenna designs—good range and stable throughputs in wireless applications.
The quad flat no-lead package is the optimum small footprint packaging solution for the transceiver portion of a lowcost wireless networking subsystem. The packaging considers the board space limitations often driven by sensing and control solutions. Size is particularly important for end nodes, which are often battery-operated with limited implementation space.
Figure 3 shows an example of a matrix that’s used when analyzing the radio solution. Matrix design factors can easily be extended to include the microcontroller features, functions, and performance as well.
MIX AND MATCH WITH MCUS
Several alternatives are available when selecting a sensing and control implementation scheme. Some designers select a system in package (SiP) or platform in package (PiP), which includes transceiver and MCU functionality in a single package or integrated circuit. However, should designers opt for a standalone transceiver and MCU configuration, they gain the flexibility to choose from a variety of MCUs to mix and match for multiple end product configurations.
In the latter scheme, choosing the appropriate MCU requires thorough research. It depends on matching the complexity of the sensing and control application with suitable performance factors, memory configurations, and peripheral modules.
For low-cost wireless sensing systems, 8-bit microcontrollers in the 20-MHz CPU operating frequency range (10-MHz bus clock) often provide an easy-to-implement, low-cost alternative. Background debugging and breakpoint capability to support single breakpoint (tag and force options) setting during in-circuit debug (plus two breakpoints in an on-chip debug module) create the preferred debugging environment. Many MCU solutions provide support for up to 32 interrupt/reset sources.
Memory requirements for sensing and control applications are typically 8 kbytes of flash with 512 bytes of RAM, yet they can go as low as 4 kbytes of flash with 256 bytes of RAM. Flash read, program, or erase over the full operating voltage and temperature is essential.
Various operation modes allow for precise control over power consumption, a key feature for extending battery life. Optimal MCUs in this case would support normal operating (run mode), active background mode for on-chip debug, a variety of stop modes (bus and CPU clocks are halted), and wait mode alternatives.
Consider a microcontroller with an internal clock source module containing a frequency-locked loop (FLL). The FLL is controlled by an internal or external reference with precision trimming of internal reference that allows 0.2% resolution and 2% deviation over temperature and voltage. The internal clock source module should support bus frequencies from 1 to 10 MHz. MCUs with selectable clock inputs for key modules provide control over the clock to drive the module function. In addition, look for MCUs with a low-power oscillator module that has a software-selectable crystal or ceramic resonator in the range of 31.25 to 38.4 kHz or 1 to 16 MHz and supports external clock source input up to 20 MHz.
Continue on Page 4
It’s essential that the chosen MCU offer system protection, including such options as watchdog computer-operating- properly (COP) reset with an alternative to run from a dedicated 1-kHz internal clock source or bus. Other “must have” system protection features include low-voltage detect with reset or interrupt, illegal opcode detection with reset, illegal address detection with reset, and flash block protection.
A variety of embedded peripherals will ease the implementation of the designer’s application. An eight-channel, 10-bit analog-to-digital converter (ADC) is recommended for accurate successive approximation. Consider an ADC that’s hardware-triggerable using the RTI counter and features automatic compare, asynchronous clock source, temperature sensor, and internal bandgap reference channel.
Other essential peripherals for sensing and control applications include an analog comparator module (ACMP) with an option to compare internal reference; serial communications interface (SCI) module; SPI module; inter-integrated circuit (IIC) bus module; two-channel timer/ pulse-width modulator for input capture, output compare, buffered edge-aligned PWM, or buffered center-aligned PWM; 8-bit modulo timer module with prescaler; and 8-pin keyboard interrupt module with software-selectable polarity on edge or edge/level modes.
There are multiple small-footprint MCU packaging options that satisfy sensing and control design requirements. These help optimize limited board space, particularly in end node, battery-operated functions. A few of the microcontroller packages that meet these considerations include low-pincount plastic dual-in-line (PDIP), quad flat no-lead (QFN), thin shrink small-outline (TSSOP), dual flat no-lead (DFN), and narrow-body, small-outline IC (NB SOIC) packages.
It’s also prudent to consider, as part of the MCU selection, hardware and software design tool ease of use, documentation clarity, reference designs, available application code, and other design support offerings.
Similarly, for the RF or modem side of the design, an effective integrated development environment (IDE) for MCUs should include GUI-driven tools with built-in features and utilities that simplify coding and project file management to expedite the design process. Expert tools that abstract the hardware layer and generate optimized, MCU-specific C code tailored to the application allow the designer to concentrate on application concepts. Fast and easy debug as well as flash programming capability need to be considered. It also helps to have access to features so designers can create reusable software components for reuse between projects.
SUBSYSTEM REFERENCE DESIGN
A reference design for sensing, monitoring, and control subsystems can prove valuable as an application baseline from which to evolve design-specific requirements. The Wireless UART reference design, for example, uses a SiP solution—the MC13211 RF transceiver from Freescale Semiconductor. Schematic files for the Freescale 1321X-SRB sensor reference board, bill of materials, Gerber files, software project files (.mcp), and other design support materials are provided at www.Freescale.com/zigbee under “Reference Designs.” The 1321X-SRB (Fig. 4) includes the Freescale MMA7260Q tri-axis acceleration sensor as part of the reference design.
The reference design thus contains all components necessary to set up working networks in a matter of minutes for proof of concept. It can be developed using the unlimited use license for the SMAC code base. Using Freescale’s BeeKit wireless connectivity toolkit and CodeWarior IDE (a free 32-kbyte version download), you can begin your application software development from the .mcp file (Wireless_Uart.mcp) provided with the reference design.
To set up your new project, simply
download the complimentary BeeKit GUI
radio setup software tool from http://www.freescale.com/webapp/sps/site/prod_summary.jsp?
code=BEEKIT_WIRELESS_CONNECTIVITY_TOOLKIT&nodeId=01J4Fs25657103&fpsp=1&t ab=Design_Tools_Tab. Select BEEKITDOWNLOADPACKAGE. ZIP (last item) and install the BeeKit from the easy-touse instructions included with the tool download package. Once BeeKit starts, you will see the step by step instructions. A solution explorer and wizard allow for quick configuration of parameters before creating the project, reducing the need to manually configure parameters and sort through individual files. A comprehensive code base provides wireless networking libraries, application templates, and sample applications.
Once you’ve created the project, you can customize (if desired) and the BeeKit will validate any customized project selections to ensure that none are conflicting. Once the radio solution is set up, export the project in an .xml file and import into CodeWarrior to start your application software development.
If you’re working from different reference designs from other providers, supporting files are typically available from the supplier through Web downloads. All downloads should include necessary schematics, bills of materials, Gerber files, software, and other documentation for complete reference-design implementation.
Through organized research and analysis, a clear choice emerges for the wireless networking application solution. Embedded systems designers can generate the information to make a logicbased decision on how to incorporate value-added wireless networking features into their end product. The proactive effort invested in developing a matrix analysis will save significant design time and expense by reducing false starts and the chance for error.