Integrated ZigBee Radio Implementation and Testing Application Note When designing embedded ZigBee (or other IEEE 802.15.4 technologies proliferate through many electronic product based protocol) radio solutions, there are several trade- applications, streamlining validation and verification of offs in the level of integration into the end-product that are ZigBee module performance is important. This application available. The challenge is to balance the level of integration note demonstrates the utility and simplicity of the Tektronix and development costs base against the performance MDO4000 Series Oscilloscope to validate and verify ZigBee requirements of the end use application. As low cost radio radio module integration. Application Note Figure 1. Tektronix MDO4000 Series Mixed Domain Oscilloscope and Microchip Radio Test Board Module. Embedded Integrated ZigBee Modules are two further options for each of integrated circuits (ICs) and modules. Embedded products are available with just the The IEEE 802.15.4 physical layer radio has proven very radio circuitry with the IEEE 802.15.4 lower level protocol popular for a wide range of short range control and data requiring a separate microcontroller or microprocessor to communications applications. The ZigBee protocol provides handle the ZigBee or other higher level software as well as a mesh network of devices so that large areas and hundreds the application. Alternatively, there are ICs as well as modules or even thousands of devices can communicate. At least in that have a microcontroller built in to run the ZigBee or other theory, ZigBee compliant devices from different sources can protocol software. Many of these ICs and modules have communicate with each other. There are a variety of vendors uncommitted I/O pins so that a complete product may need of IEEE 802.15.4 protocols that typically offer fewer features little more than the module and sensors and/ or actuators and and simpler software that might work in a specific application an enclosure. In addition, modules are available with power with limited or specific functionality. amplifiers and receiver low noise preamplifiers (LNA). The Applications for these radio systems include home and power amplifier and LNA can substantially increase the radio commercial building automation, energy monitoring and range, though at higher cost and power consumption. control, security systems, medical monitors, and a wide variety For any of these choices, a printed circuit test board will be of commercial and industrial products. needed to support the IC or module. A power supply with A rich support structure has developed around this set of sufficient peak power and freedom from noise will also be communications standards at both bare integrated circuit needed. If a chip level radio is selected, the appropriate level and modules which typically come complete with the antenna interface circuits will also be needed. antenna and FCC or other regional agency approval. There 2 www.tektronix.com/mdo Integrated ZigBee Radio Implementation and Testing added to the development process because the product needs to be in close to final form and the software also needs to be essentially complete before the approval testing can begin. 3. Form Factor – Designing a custom radio from the IC level provides flexibility in the configuration of the radio circuitry. With a custom design, the radio can use spaces that no module can fit into given the overall configuration of the product. Generally the available modules have all of their parts on one side of the printed circuit board so that the module can be soldered to the main board. In a custom Figure 2. Examples of typical ZigBee radio options from different vendors can be design, parts can be placed in any configuration and on supplied with different levels of integration, from radio IC to fully integrated module with microcontroller, power amplifier, antenna, and LNA. both sides of the board. 4. Protocol Flexibility – Many manufacturers of modules Figure 2 shows from left to right a radio only IC (the Microchip and of ICs with an embedded microcontroller do not Technologies MRF24J40), a radio only module with a 100 mW provide access to the source code of the ZigBee or other power amplifier and LNA (Microchip MRF24J40MB), a radio communications software. This means that if there is a and microcontroller IC (Ember EM357), and a radio module desire or need for custom features there is little recourse if with microcontroller and external power amplifier and LNA the vendor does not provide this feature. (Ember EM357-MOD). 5. Special Requirements – For some applications, there may be a need for hardware capabilities beyond what is available ZigBee Design Considerations in modules or ICs that have the radio and microcontroller While there are a variety of end-use applications and integrated. While it is always an option to add a second thousands of products that use ZigBee technologies, there are microcontroller, the total cost can be increased beyond also a number of trade-offs in selecting from among the types what is needed. In other cases, it may be desired to provide of radio systems for any one application. These include: capabilities not commercially available. For example, the US regulations allow up to 1 Watt of radio output power, but 1. Cost – There is a substantial trade-off of material cost vs. there are few, if any, modules with this capability. the cost of engineering and agency approval for modules compared to ICs. Modules cost substantially more that the 6. Antenna Type and Placement – There are modules radio ICs with their support components and assembly available with antennas on the printed circuit board either labor even in large quantities. Part of the extra cost lies in as a printed pattern like on the Microchip module or a the duplicated printed circuit board material, but most of “chip” antenna like on the Ember module, with an external it is in offsetting the engineering cost of the module and in antenna. An antenna on the module can have impaired providing a return to the module manufacturer. However, performance if the antenna is inside of a shielding enclosure engineering the radio circuitry and gaining agency approval or if it is located too close to other components in the has substantial cost. For IC based designs, ZigBee Alliance end package design. There are modules available with testing and approval adds to the cost if this protocol is to connectors for external antennas. However, it is only legal be used. Experience suggests that the cost break even to use antennas that have been certified with the module. If between integrating ICs vs. modules is typically around there is a reason, such as the need for higher gain, to use 10,000 to 25,000 units. an antenna not supported by the module vendor, agency approval with its accompanying cost and time are required. 2. Development Time – Pre-certified modules can be marketed as soon as the product is ready. Agency approvals for IC level designs can take as little as a month, but often much longer than that. Generally this time is www.tektronix.com/mdo 3 Application Note RF Input 4/ SPI Bus Ch 1 Voltage Ch 4 Current Radio Test Module Board Radio Module PC R S MCU -2 Controller 32 4 SP RF I B u s Tested Power + + + + Supply Test Board - - - Power Regulator - or Battery Figure 3. Test connection between the (Microchip Technologies MRF24J40MB and Explorer 16 demonstration board) ZigBee radio module/test board and the MDO4000 Series Mixed Domain Oscilloscope. Test Validation of the integrated radio Software in the microcontroller (whether integrated or separate) needs to provide the higher levels of the protocol Once the approach to the radio implementation is selected, (ZigBee or other) as well as control the power to the radio, the appropriate printed circuit board laid out, and any and run other aspects of the product. In many applications necessary software written, there are a number of tests to be timing of the radio transmission is critical so that the radio is performed to assure good communications: not transmitting while some other power consuming part of For many applications, there will be serial communications the product is running and draining the power supply voltage between the radio system and other parts of the product. For below acceptable levels. example, the Microchip IC and modules use a four wire SPI To illustrate some of the tests that should be carried out connection to control the radio IC and any related components to verify radio operation, a Microchip Technologies IEEE such as a power amplifier. SPI commands are needed to set 802.15.4 amplified radio module (MRF24J40MB) is used internal registers for the selection of the frequency channel, the with an Explorer 16 demonstration board. The screen shots output power level, and many other operating parameters. SPI are taken with the Tektronix MDO4000 Series Multi Domain is also used to control general purpose port pins for control of Oscilloscope which allows simultaneous time correlated a power amplifier, or other devices. SPI is also used to send viewing of RF, analog, and digital signals. Setup and data the data packet to the IC or module and sends the command commands are sent from a PC to allow manual control. Figure to transmit the packet. Received data is returned through the 3 shows the test setup. Note that a direct connection to the SPI bus as well. radio is used to facilitate power and other measurements. A calibrated antenna could equally have been used to take the RF measurements. 4 www.tektronix.com/mdo Integrated ZigBee Radio Implementation and Testing y a pl s Di n ai m o D e m Ti Spectrum Time y a pl s Total Power and Di Occupied Bandwidth n ai m o D y c n e u q e r F Figure 4. Time Domain and Frequency Domain displays. Orange Bar represents the spectrum time of the frequency domain display relative to the time domain measurements. Some of the critical tests to verify radio operation are: example, using the default Kaiser FFT function (Shaping Factor 2.23) and the RBW of 11 kHz, the spectrum time is RF and Power Supply Measurements – The Tektronix approximately 200 us. Moving the spectrum bar across the MDO4000 Series Mixed Domain Oscilloscope is unique in that time domain window allows the spectrum and measurements it allows simultaneous viewing of the radio spectrum and the to be taken at any time during the packet transmission. This power supply as shown in Figure 4. acquisition correlates just after turn-on of a radio packet The channel spacing for IEEE 802.15.4 (including ZigBee) is transmission. 5 MHz. The 20 dB channel bandwidth should be significantly The Tektronix MDO4000 Series Oscilloscope RF acquisition less than the channel spacing. The measured occupied can perform Power and Occupied Bandwidth measurements bandwidth of 2.3 MHz shown in the Figure is well within the of the RF signal. Because it also acquires a time record of the specification. The output power is expected to be in the RF acquisition, a digital down conversion process can be used range of 20 dBm. The screen shows the output spectrum to produce the I (Real) and Q (Imaginary) data. Each I & Q in the lower part of the screen and direct measurements of data sample represents the instantaneous deviation of the RF bandwidth and power. The test cable drop is about 2 dB in input from the current Center Frequency. With this analysis, this frequency range, so the power measurement is in the the RF Amplitude versus Time can be computed from the range of what is expected. recorded data. The Orange Bar at the bottom of the top half of the screen indicates the time period in which the spectrum trace is displayed. The spectrum time is defined as the Window Shaping Factor divided by the resolution bandwidth. In this www.tektronix.com/mdo 5 Application Note Drain Voltage vs Time Current Draw vs Time RF Amplitude vs Time Trace Spectrum Time Figure 5. Measurements of power and occupied bandwidth, with correlated RF amplitude vs time, and measurements of the power supply current and drain voltage. Figure 5 shows the added trace of the RF Amplitude versus The Orange Trace (Trace A) in the upper part of the screen time added to the display of Figure 4. This demonstrates that shows the RF signal amplitude versus time. The input current the events of the current and voltage measurements shown in rises in two steps. In the first step, the radio IC is turned on. Figure 5 correlate to the turn-on of the RF transmission. There is then a delay to allow the frequency synthesizer to stabilize before the power amplifier is turned on. The rise of RF The Green Trace (Trace 4) shows the current drawn by the power coincides with the second part of the current step. The module. During packet transmission, the current draw is turn-on period appears to be approximately 100 us. almost 200 mA (note the direct measurement of 174 mA), so the power supply must be designed to support this load. The Yellow Trace (Trace 1) shows the effect of this current draw on the supply voltage. The drop is only about 70 mV which should be fine (note the direct peak to peak measurement of 72 mV). 6 www.tektronix.com/mdo Integrated ZigBee Radio Implementation and Testing Increased Supply Voltage Drop Slight increase in Noise Figure 6. Spectrum and measurements with resistance in series with the module power source to study low power performance behavior. In Figure 6, a 1.5 Ohm resistor is placed in series with the channel noise can be seen in the spectrum display. The module to simulate the effect of a depleted battery. The lower output can also be seen on the amplitude versus time current drawn by the module is only a few milliamps lower, but (Trace A). It is often necessary to understand the performance the voltage drop is about 230 millivolts. Note that the output of radio transmitters during low battery conditions or power is reduced by 1 dB as measured by the RF power conditions when the power supply becomes current limited to measurement and there is a slight increase in the adjacent understand the margins of radio compliant performance. www.tektronix.com/mdo 7 Application Note Digital SPI bus decode Logic lines of SPI bus Figure 7. Packet decode of SPI Digital signals (SPI - MOSI and MISO) added to display. Digital Commands – Radio ICs and modules will need to In Figure 7, the analog, digital, and RF acquisitions have been be set up to meet the operating requirements of the specific set trigger on the drain current of Trace 4 occurring above application and any protocol specific setups. The MDO allows 130 mA level. All the time domain measurements in the upper decode of the SPI commands to the ZigBee module. Figure 7 display left of center show the events that occur prior to the shows the digital capture of the SPI commands in the same current exceeding this level at RF turning on. This includes time frame as Figure 4. Decode is enabled, but is not readable digital decode, analog (voltage and current), and RF vs time. in this time scale. From this information, it is easy to see that a digital command occurs roughly 600 microseconds before the RF event turn-on. 8 www.tektronix.com/mdo Integrated ZigBee Radio Implementation and Testing Zoom display enables view of SPI bus decode Figure 8. Magnified view of digital trace and decode. Notice the spectrum time is now viewing the RF Spectrum before the transmission is turned on. The traces in purple show where the decoded data is in FIFO which has been determined to occur about 600 the time domain. In Figure 8, the MDO Wave Inspector pan microseconds later. The digital waveforms are shown, but and zoom functions are used to allow reading of the digital the automatic decode is much easier to read than the digital waveforms and the decoded data. signals. The SPI(MOSI) trace shows the commands to the module in Other commands and data read back on SPI(MISO) can be hex format. In this case the command {37} is the command read or triggered to confirm correct commands and verify to the Transmit trigger (TXNMTRIG) register and the argument operation of the radio. {01} tells the module to send the packet in the transmitter www.tektronix.com/mdo 9 Application Note Turn-on delay Triggered on SPI command Figure 9. Subsequent acquisition triggered on SPI command shows delay between command and radio turn-on. The unique architecture of the Tektronix MDO Series Mixed In the previous example from Figure 7, the command delay Domain Oscilloscope allows simplified measurements between to turn-on was about 600 us. The actual event in Figure 9 is SPI command triggering and correlated RF events. In Figure 9, almost three times longer. This demonstrates the behavior the trigger event is now changed to the SPI command {37}, of the ZigBee radio is actually complying to one of the PHY the radio Transmit trigger command. Markers on the Time layer performance requirements of IEEE 802.15.4. The ZigBee Domain display show the SPI command to current draw (at radio uses a pseudo-random delay between command and the beginning of the RF Tx turn-on) is now 1.768 ms. turn-on event to enable the radio to listen for other ZigBee radio transmitters or other radio interference channels. 10 www.tektronix.com/mdo
Description: