ZigBit Development Kits ATZB-EVB-24-SMA, ATZB-EVB-900-SMA, ATZB-EVB-A24-SMA, ATZB-EVB-24-PCB, ATZB-EVB-24-A2 ZigBit Development Kits User Manual User Manual Rev. [0.
1 Introduction Intended Audience and Purpose This document is intended for engineers and software developers working with the ZigBit™ Development Kit (ZDK). The Kit is used to evaluate the performance and features of ZigBit modules and the BitCloud software, and to implement custom applications on top of BitCloud API. Safety and Precautions The product contains electronics, which are electrically sensitive. Please take necessary precautions when using such devices.
[6] ZigBit™ OEM Module. Application Note. ZigBit Power Consumption Testing. Atmel Doc. AN-481~01 [7] BitCloud™ Software 1.0. Serial Bootloader User’s Guide. Atmel Doc. P-ZBN-451~02 [8] ZigBit™ OEM Module. Application Note. Using ZigBit Module with Analog Sensors. Atmel Doc. AN-481~06 [9] BitCloud™ Software 1.0. Range Measurement Tool User’s Guide. Atmel Doc. P-ZBN-451~01 [10] ZigBee Specification. ZigBee Document 053474r17, October 19, 2007 [11] Serial asynchronous automatic dialing and control.
Abbreviations and Acronyms AC/DC Alternating Current / Direct Current converter ADC Analog-to-Digital Converter API Application Programming Interface Channel Mask Channel mask is a number that defines the set of working channels Coordinator Within ZigBee networks, the ZigBee coordinator is responsible for starting the network and for choosing certain key network parameters. The network may be extended through the use of ZigBee router.
OEM Original Equipment Manufacturer OTA Over-The-Air upgrade PAN ID Personal Area Network Identifier.
802.15.4 The IEEE 802.15.4-2003 standard applicable to low-rate wireless Personal Area Networks [12] 2 Development Kit Overview ZigBit™ Development Kit (ZDK) is a simple, out-of-the-box solution designed for full range of WSN prototyping and development. It comes complete with ATZB-EVB (MeshBean) development boards containing ZigBit modules and a variety of tools to test the wireless network features and performance and to develop customized wireless solutions based on BitCloud Software.
Table 1. ATZB-EVB (MeshBean) Board Specifications Parameter Value RF Compliance Operating Band TX Output Power RX Sensitivity RF Transceiver Antenna versions MCU Microcontroller RAM Flash Memory EEPROM Performance Power Power Supply Over-Voltage Protection Reverse Polarity Protection Operating Voltage Range Voltage Supervisor Miscellaneous Sensors 2.4 GHz IEEE 802.15.4-2003 [12] 2400–2483.5 MHz from -17 dBm to +3 dBm -101 dBm AT86RF230 2.
LED Indicators Switches Buttons Size Operating Temperature Range 3 programmable color status LEDs external power supply status LED 3 DIP switches 2 programmable buttons 60 x 63 x 24[1] mm -40°C to 85°C. Minor degradation of clock stability may occur beyond the -20°C to +70°C range. 3.1 ATZB-EVB (MeshBean) Featured Components ZigBit Module ZigBit module is an ultra-compact, low-power, high sensitivity 2.4GHz 802.15.4/ZigBee OEM module from Atmel. ZigBit module is based on Atmel’s Z-Link 2.4GHz platform.
UID (Unique Identifier) is HEX value, 8 bytes long. UID is used for setting unique MAC address of the node. UID is hardware defined value. It is programmed into a chip (Silicon Serial Number DS2411R+ by Maxim/Dallas) at the factory. UID is unique, and cannot be overwritten. In order to ensure the presence of UID on the board it is required to execute Hardware Test application (see Section 4.7 for details).
Figure 1.
Connectors and Jumpers The board connector pinouts and jumper settings are presented in Table 2 through Table 7. IMPORTANT NOTE: All manipulations with connectors or jumpers should be done when the board is not powered! Table 2. Expansion slot pinout Pin Name I/O Description 1 UART_RTS Input Request to Send Pin. RS-232 level. 2 UART_TXD Input Transmit Data Pin (meaning that the host device will transmit data to this line). RS-232 level. 3 UART_CTS Output Clear To Send signal from the module.
Pin Name I/O Description 14 USART_CLK Input 15 GND This is Clock Data Pin for USART0 interface of the ZigBit module. It is connected directly to the USART0_EXTCLK pin of the module. Digital logic level. For details, refer to ZigBit datasheet [1]. Digital/analog ground 16 ADC_INPUT1 Input ADC input. This pin is connected directly to the ADC_INPUT_1 pin of the module. For details, refer to ZigBit datasheet [1]. 17 ADC_INPUT2 Input ADC input.
NOTE: JTAG connector pinout is compatible with ATmega JTAGICE mkII incircuit emulator connector. Table 4. J1 jumper settings: current measurement Jumper Description position J1 is mounted This position is used for normal operation. J1 is open In this position, the ZigBit module is not powered while remaining parts of the board are powered. This position is used to measure current consumption of the ZigBit module (see Section 3.8).4.8 Table 5.
Table 7. Serial interface pinout Signal Expansion slot pins RXD 4: UART_RXD Serial port pins (PC side) 2 TXD 2: UART_TXD 3 CTS 3: UART_CTS 8 RTS 1: UART_RTS 7 GND 5, 6, 15, 19, 20: GND 5 Buttons, Switches and LEDs The board includes 2 buttons, 3 DIP switches, one Reset button that generates a hardware reset signal, 3 software-defined LEDs (green, yellow and red) and a LED indicating powering the board from the USB.
BitCloud is fully compliant with ZigBee PRO and ZigBee standards for wireless sensing and control. It provides an augmented set of APIs which, while maintaining 100% compliance with the standard, offer extended functionality designed with developer's convenience and ease-of-use in mind. The topmost of the core stack layers, APS, provides the highest level of networkingrelated APIs visible to the application.
SerialNet application lets the AT-commands be interpreted locally or forwarded for execution on remote nodes; Hardware Test (see Section 4.7) is a simple application which tests major ATZB-EVB (MeshBean) board components for correct operation; Range Measurement Tool is an application intended to measure radio performance of ZigBit-based devices and/or to make comparison with platforms of other manufacturers.
Hard disk free space JTAG emulator Software Operating system USB driver IDE 50 MB JTAGICE mkII emulator with cable Windows2000/XP CP210x USB to UART Bridge VCP Driver AVR Studio 4.14 + WinAVR Serial Bootloader utility Java virtual machine Microsoft .NET framework Java Runtime Environment (JRE) 5 Update 8, or more recent Version 2.0 Service Pack 1, or more recent Necessary to upload and debug firmware onto the ATZB-EVB (MeshBean) board through JTAG (see Appendix B).
4.3 Installing the Development Kit In order to install the Development Kit, insert the ZDK Software and Documentation CD into your PC CDROM. The ZDK installation wizard should start automatically. Specify the installation path and follow the instructions. As a result the ZDK file structure under the selected path will be generated on the PC, which is described in 10.7.
Figure 3. COM port drivers in the Windows Device Manager window To resolve possible problems see Section 4.4. NOTE: USB to UART Bridge VCP driver for Windows platform is also available from the manufacturer’s site: http://www.silabs.com/tgwWebApp/public/web_content/products/Micro controllers/USB/en/mcu_vcp.htm. Java Runtime Environment (JRE) is also available from http://java.sun.com/javase/downloads/index.jsp. There may be other Java instances already installed on your computer before the use of ZDK.
Current version of the AVR Studio [16] with Service Pack can be freely downloaded from the Atmel’s website (http://www.atmel.com). Simply launch the downloaded installer programs and follow the setup instructions. The WinAVR suite of development tools can be downloaded from http://sourceforge.net/projects/winavr. To install WinAVR follow the setup instructions. 4.4 Connecting the Board to PC The board can be connected to host PC via USB port, using USB 2.0 A/mini-B cable supplied within the Kit.
4.5 Powering the Boards The boards can be powered by a pair of AA-size batteries, via the USB port, once connected for data transfer, or via AC/DC adaptor. The nominal voltage is 3 V. Using AC/DC adaptor disconnects AA batteries automatically. Using USB port disconnects the AC/DC adaptor. In order to make accurate measurements of sensor parameters, battery power is recommended. USB power is not stable enough, which can affect transmission of power level or RF parameters.
Type the “AT” command and press Enter key. The board responds to Hyper Terminal with “OK“. Now, a user can play various networking scenarios by sending AT commands fully described in [3]. A simple networking scenario for building WSN, transmitting data between the WSN nodes and accessing the nodes’ interfaces is presented in the Examples Section of the document [3]. 4.7 Testing the Board Controls and Sensors To check the onboard controls and sensors the Hardware Test application can be used.
Figure 4. Hyper Terminal Hardware Test report 4.8 Measuring Power Consumption The board allows measuring power consumption of the ZigBit module. To perform the measurements, simply connect ammeter to the clamps denoted as CM+ and CM- and remove jumper J1. Make sure that the board is powered by batteries only. However, such measurement would not be absolutely correct, because power is consumed by the interfaces and the peripherals connected to ZigBit.
The pattern of antenna is wide. The following facts should be considered. In far-field zone, it is a horizontal plane normal to the dipoles where electromagnetic radiation appears stronger. Contrarily, at distances of several centimeters the pattern is more complex. Approximate field patterns are given in the ZigBit datasheet [1]. Handle the external antenna with care to avoid mechanical damage. 5 WSNDemo Application 5.
5.2 Programming the Boards First, WSNDemo image should be loaded onto the board. The location of WSNDemo image file is listed in 10.7. WSNDemo image file can be uploaded into the boards in one of two ways: by means of Serial Bootloader utility (see Section 5.3) or in AVR Studio, using JTAG emulator. JTAGICE mkII from Atmel [17] 2 (see Section 5.3.1) is recommended. IMPORTANT NOTE: Be careful selecting the method of the node programming.
5.3 Using Serial Bootloader To program a board using Serial Bootloader perform the following steps: Connect ATZB-EVB (MeshBean) to the PC via USB or serial port, depending on the position of jumper J3 (see Table ). 5. Run Serial Bootloader. In command line, specify the image file as WSNDemo.srec (see 10.7), the COM port and the optional command line parameters. See [7] for details. 6. Press reset button on the board. 7. Release reset button on the board.
Option Value EESAVE Disabled BOOTSZ BOOTRST Boot Flash size=1024 words start address=$FC00 Disabled CKDIV8 Enabled CKOUT Disabled SUT_CKSEL Int. RC Osc.; Start-up time: 6 CK + 65 ms Figure 5. Fuse bits setting Make sure the following hex values appear in the bottom part of Fuses tab: 0xFF, 0x9D, 0x62.
If the node is to be programmed with the use of Serial Bootloader, enable additionally the BOOTRST option. Make sure the following hex value string appears at the bottom of Fuses tab: 0xFF, 0x9C, 0x62. By default, each of the boards (MCU) is preprogrammed with this fuse setting. In addition, JTAG can be used to restore the device's ability to respond to Serial Bootloader commands. Serial Bootloader firmware can be reprogrammed with JTAG by selecting bootloader.
NOTE: While WSNDemo is running, channel mask can be changed anytime by sending the command through WSN Monitor (see Section 0). The channel mask which has been issued from WSN Monitor and received by a node is permanently stored in the node’s EEPROM, regardless of power-offs. To restore the default channel mask in EEPROM repeat a node reinitializing procedure described above in this section or use Serial Bootloader. Table 12.
Joined to network ON + receiving data + sending data (coordinator only) Sleeping (end device only) blinking blinking OFF OFF OFF If you power ON the coordinator, it switches to an active state, even though no child node is present. This is normal, it means that the coordinator is ready and child nodes can join the network with coordinator’s PAN ID. By default, coordinator uses predefined PAN ID valued as D170, which is recognized by all routers.
5.6 WSN Monitor WSN Monitor is a PC-based GUI application for WSNDemo that is used to display WSN topology and other information about WSN network. See WSN Monitor screen in Figure . It contains the Topology Pane, Sensor Data Pane, Node Data Pane and Toolbars. Figure 6. WSN Monitor GUI Topology Pane displays the network topology in real time, which helps to the user monitor the formation and evolution of the network while the nodes join, send data or leave.
Node titles are defined in the NodeNames.txt file. By default, it is located in the following subdirectory: "./Evaluation Tools/WSNDemo (WSN Monitor)/resources/ configuration/”. Notice: the full path to the file depends on the root directory which has been specified during installation of the Development Kit (see Section 4.3). NodeNames.txt contains one “-- NodeNames --” header string which is followed by a number of strings each of which contains 64-bit MAC address and the title of each node.
coordinator and router and 30 sec is recommended for end device. Those timeouts cover 3 periods between packet sending. Figure 9. WSN Monitor Connection/Settings menu Node Reset A node can be reset by means of the WSN Monitor using the Tools/Send Command menu (see Figure 8). A node can be identified by its MAC address or it can be selected from the list of the nodes (using the combo-box) which are currently present in the Network Topology Pane. Figure 10.
The network operation is supported on 16 upper channels in 2.4 GHz band, which are numbered from 11(0x0B) through 26(0x1A). Use Tools/Send Command window to set channel mask. By default, current channel mask is displayed there (see Figure 8). NOTE: Channel mask is a bit field which defines the channels available. The 5 most significant bits (b27,... , b31) of channel mask should be set to 0. The rest 27 least significant bits (b0, b1,...
When router is rejoining, the network indication LED, namely LED3, is blinking. Upon having router joined, LED3 is ON. When end device is rejoining, the network indication LED, LED3, is blinking. Upon having end device joined, LED3 turns ON. LED1 flashes shortly to indicate sending a packet, LED1 flashes briefly to indicate having received acknowledgement. Next, all LEDs get turned OFF when end device is falling to sleep.
Due to flexibility of AT-commands, you can create other network scenarios addressing the specific needs of your application. The examples are recommended as a starting point in evaluation of SerialNet. A variety of terminal programs provide capability to enter AT-command scripts and to analyze the responses from a board. In order to run the SerialNet application, follow step-by-step instructions from the Examples section of the document [3].
management routines are responsible for gracefully shutting down all stack components and saving system state when preparing to sleep and restoring system state when waking up. Hardware Abstraction Layer (HAL) includes a complete set of APIs for using onmodule hardware resources (EEPROM, app, sleep, and watchdog timers) as well as the reference drivers for rapid design-in and smooth integration with a range of external peripherals (IRQ, I2C, SPI, UART, 1-wire).
file will be produced as EEPROM is not needed for Blink. To test the minimum application, upload any of the image files into a ATZB-EVB (MeshBean) board, following the instructions which are given in Section 7 or in 10.8, correspondingly. You can modify the code to extend the application’s functionality by using other BitCloud API functions. Make sure that your application code satisfies the programming conventions specified in [5]. Play with the other API demos (see Section 8.
# Stack parameters being set to Config Server --------CS_AUTONETWORK = 1 # If CS_AUTONETWORK is 1 CS_CHANNEL_MASK should be declared CS_CHANNEL_MASK = "(1l<<0x15)" # Parameter is used only for RF212 CS_CHANNEL_PAGE = 0 CS_RF_TX_POWER = 3 CS_END_DEVICE_SLEEP_PERIOD = 5000 CS_NEIB_TABLE_SIZE = 8 CS_MAX_CHILDREN_AMOUNT = 7 CS_MAX_CHILDREN_ROUTER_AMOUNT = 2 CS_ROUTE_TABLE_SIZE = 25 CS_ADDRESS_MAP_TABLE_SIZE = 25 CS_ROUTE_DISCOVERY_TABLE_SIZE = 10 CS_APS_DATA_REQ_BUFFER_SIZE = 4 CS_APS_ACK_FRAME_BUFFER_SIZE = 3
with AVR Studio and just execute Build/Rebuild All item from the main menu. The WSNDemoApp.hex and WSNDemoApp.srec image files will be then generated. Low-Power, Peer-to-peer and Ping-Pong applications are described in details in [4]. 9 Troubleshooting In case of any operational problem with your system please check the power first, and make sure that all of your equipment is properly connected. Check if your PC conforms to the minimum system requirements (see Section 4.2).
WSN Monitor shows NO DATA in the Sensor Data Graph Pane. No node is selected. Select the required node by mouseclicking on it. Node titles displayed on the Topology Pane do not show node destinations. The displayed titles do not necessarily relate to the node functions but they can be redefined by user anytime. These names are stored in the node title file (see Section 4.5) along with MAC addresses mapped to the nodes. At WSN Monitor startup, all node’s LEDs are blinking, or none of them is flashing.
This equipment generates uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation.
./Bootloader/GuiBootloaderSetup.msi Binary image file containing bootstrap code ./Bootloader/bootloader.hex ./Evaluation Tools/Hardware Test/ HardwareTest.srec Hardware Test image files ./Evaluation Tools/Hardware Test/ HardwareTest.hex ./Evaluation Tools/WSNDemo (Embedded)/WSNDemoApp.srec WSNDemo image files ./Evaluation Tools/WSNDemo (Embedded)/WSNDemoApp.hex ./Evaluation Tools/WSNDemo (WSN Monitor)/WSNMonitorSetup.exe WSN Monitor installer .
./Sample Applications/Lowpower Source and image files for Low Power sample application ./Sample Applications/Peer2peer Source and image files for Peerto-Peer sample application ./Sample Applications/SerialNet/SNE_Demo Source and image files for SerialNet Extension Demo sample application. Source code is available with Complete Support Package only. Source and image files for PingPong sample application ./Sample Applications/Pingpong ./Evaluation Tools/RangeTest/range_tool.
Using AVR Studio both flash memory and EEPROM of a board can be separately programmed with images having Intel HEX format. EEPROM image has .eep extension while flash image has .hex extension. To upload firmware, follow the instructions from the device manufacturer’s manuals [16], [17], [18]. A sample pop-up window is shown in Figure . Figure 13. AVR Studio dialog box for firmware upload using JTAG The well-known command line utility, avrdude, which is a part of WinAVR environment (http://sourceforge.
10.9 Minimum Application Source Code /********************************************* ************** blink.c Blink application. Written by V.Marchenko ********************************************** *************/ #include "appTimer.h" #ifdef _SLIDERS_ #include "sliders.h" #endif //#ifdef _SLIDERS_ #ifdef _BUTTONS_ #include "buttons.h" #endif //#ifdef _BUTTONS_ #ifdef _LEDS_ #include "leds.h" #endif //#ifdef _LEDS_ #include "zdo.h" #ifndef BLINK_PERIOD #define BLINK_PERIOD 1000 // Initial blink period, ms.
#define BLINK_INTERVAL (BLINK_PERIOD / 2) // Blink interval. #define MIN_BLINK_INTERVAL (MIN_BLINK_PERIOD / 2) // Minimum blink interval. #define MAX_BLINK_INTERVAL (MAX_BLINK_PERIOD / 2) // Maximum blink interval. #ifndef _BUTTONS_ #define BSP_KEY0 #define BSP_KEY1 #endif //#ifndef _BUTTONS_ 0 1 #define HALF_PERIOD_BUTTON BSP_KEY0 // Button that reduces blink interval to a half. #define DOUBLE_PERIOD_BUTTON BSP_KEY1 // Button that doubles blink interval. static HAL_AppTimer_t blinkTimer; // Blink timer.
********************************************** *************/ void APL_TaskHandler(void) { #ifdef _LEDS_ BSP_OpenLeds(); // Enable LEDs #endif //#ifdef _LEDS_ #ifdef _BUTTONS_ BSP_OpenButtons(NULL, buttonsReleased); // Register button event handlers #else // Configure blink timer changeBlinkTimer.interval = 10000; // Timer interval changeBlinkTimer.mode = TIMER_REPEAT_MODE; // Repeating mode (TIMER_REPEAT_MODE or TIMER_ONE_SHOT_MODE) changeBlinkTimer.
button = HALF_PERIOD_BUTTON; } #endif //#ifndef _BUTTONS_ /********************************************* ************** Description: blinking timer fire event handler. Parameters: none. Returns: nothing. ********************************************** *************/ static void blinkTimerFired() { BSP_ToggleLed(LED_RED); BSP_ToggleLed(LED_YELLOW); BSP_ToggleLed(LED_GREEN); } /********************************************* ************** Description: button release event handler.
} else if (DOUBLE_PERIOD_BUTTON == buttonNumber) { blinkTimer.interval *= 2; if (blinkTimer.interval > MAX_BLINK_INTERVAL) blinkTimer.interval = MAX_BLINK_INTERVAL; } blinkTimerFired(); // Update LED status immediately. HAL_StartAppTimer(&blinkTimer); // Start updated blink timer. } /********************************************* ************** Description: just a stub. Parameters: are not used. Returns: nothing.
/********************************************* ************** Description: just a stub. Parameters: none. Returns: nothing. ********************************************** *************/ void ZDO_SleepInd(void) { } //eof blink.c Makefile # Components path definition ------------------------COMPONENTS_PATH = ../../Components # Application makerules including -------------------include $(COMPONENTS_PATH)/..
# Stack libraries paths ----------------------------LIB_PATH = \ -L$(COMPONENTS_PATH)/../lib \ -L$(PDS_PATH)/lib \ -L$(CS_PATH)/lib \ -L$(BSP_PATH)/lib ## Stack include paths ------------------------------INCLUDES = \ -I$(SE_PATH)/include \ -I$(APS_PATH)/include \ -I$(NWK_PATH)/include \ -I$(ZDO_PATH)/include \ -I$(MAC_PHY_PATH)/include \ -I$(HAL_PATH)/include \ -I$(HAL_HWD_PATH)/include \ -I$(BSP_PATH)/include \ -I$(CS_PATH)/include \ -I$(PDS_PATH)/include \ -I$(TC_PATH)/include \ -I$(SSP_PATH)/include # L
all: pds cs \ $(PRJ_NAME).elf $(PRJ_NAME).srec $(PRJ_NAME).hex $(PRJ_NAME).bin \ size pds: @echo @echo -------PDS library creation----------------------make all -C $(PDS_PATH) cs: @echo @echo -------Configuration Server library creation------make all -C $(CS_PATH) $(PRJ_NAME).o: %.o: %.c @echo @echo -------Application executable creation------------$(CC) -c $(CFLAGS) $(INCLUDES) $^ -o $@ $(PRJ_NAME).elf: $(PRJ_NAME).o $(CC) $(CFLAGS) $(INCLUDES) $(PRJ_NAME).
# Cleaning... ----------------------------------------clean: @echo @echo -------Application cleaning----------------------rm -rf $(PRJ_NAME).elf $(PRJ_NAME).hex $(PRJ_NAME).srec $(PRJ_NAME).o $(PRJ_NAME).map $(PRJ_NAME).
11 EVALUATION BOARD/KIT IMPORTANT NOTICE This evaluation board/kit is intended for use for FURTHER ENGINEERING, DEVELOPMENT, DEMONSTRATION, OR EVALUATION PURPOSES ONLY. It is not a finished product and may not (yet) comply with some or any technical or legal requirements that are applicable to finished products, including, without limitation, directives regarding electromagnetic compatibility, recycling (WEEE), FCC, CE or UL (except as may be otherwise noted on the board/kit).
Disclaimer Headquarters International Atmel Corporation 2325 Orchard Parkway San Jose, CA 95131 U.S.A. Tel: (+1) (408) 441-0311 Fax: (+1) (408) 487-2600 Atmel Asia Limited Unit 01-5 & 16, 19F BEA Tower, Millennium City 5 418 Kwun Tong Road Kwun, Tong, Kowloon HONG KONG Tel: (852) 2245-6100 Fax: (852) 27232-1369 Atmel Munich GmbH Business Campus Parkring 4 D- 85748 Garching b. MUNICH Tel.: (+49) 89-31970-111 Fax: (+49) 89-3194621 Atmel Japan 9F, Tonetsu Shinkawa Bldg.