How to Create a Wireless Sensor Network Using a Kit
Contributed By Electronic Products
2011-08-18
Excitement about using wireless sensor networks is increasing among engineers but many have questions about the complexity of creating sensor networks. While engineers are creating many new applications for sensor network technology, determining the cost of sensor network applications is important before beginning a new design.
I had the opportunity to meet Tyler Smith, Microchip Technology’s Marketing Manager of the Wireless Product Division at the Embedded Systems Conference and Sensors Expo in Chicago in June. He explained the company’s expansion of its MiWi™ wireless development environment (DE) for the IEEE 802.15.4 two-GHz band and other unlicensed sub-GHz spectra. The expanded DE’s MiWi PRO mesh-networking protocol can support up to 64 hops and 8,000 nodes in an integrated mesh-network topology.
The expanded DE is positioned as a complete ecosystem for designing star and mesh wireless networking products and includes the proprietary MiWi PRO star and mesh networking protocol stack, the eight-bit Wireless Development Kit (WDK) and the multi-purpose Wireless Development Studio (WDS). Users can download the company’s MiWi PRO star and mesh networking protocol stack from the company’s website at no cost. The eight-bit WDK and multi-purpose WDS are also free to download with cross-platform support for Linux, Mac OS® and Windows® operating systems.
According to Microchip Technology, the new tools simplify development of cost-effective Star and Mesh wireless products. Smith provided a WDK (DM182015-1) to test how easy development really is with the new tools. I received the kit in late June in a 10 x 4 x 8-inch box with all parts carefully packed in shielded bags.
Kit Contents
The WDK consists of two sets of five unique pieces of hardware, including three boards, a five-foot USB cable, and a five-foot RS232 cable. The Eight-Bit Wireless Development Kit Information Sheet directed me to download a user’s guide here. The 41-page PDF guide helped me quickly understand the hardware.
The network is built around the main board, a PIC18 wireless development board (WDB), which has a 48-MHz PIC18F46J50 microcontroller with embedded 32 K x 16-bit FLASH RAM program memory. The RAM is preprogrammed with the protocol stack. The WDB is approximately 2.25 x 3.5-inches and has eight well defined and easy to recognize blocks, including the six-pin serial accessory port, the USB interface port, the 28-pin PICtail port, two push buttons, an onboard temperature sensor, an onboard 25LC256 256K serial EEPROM, debug LEDs, and power supply area.
The serial accessory port provides an interface for other modules such as external sensors. It is software configured to support three- or four-wire SPI, I²C, or USART. The USB port supports v2.0 communication. The PICtail port allows users to provide power and connect RF-based daughter cards, an SPI interface, and interrupt request lines.
The push buttons (RB0 and 2) are assigned to individual interrupt lines of the controller. They aren’t driven by external pull-up circuitry to save power and so user software must enable microcontroller Port B pull-ups before the button state is evaluated. The user guide provides an example of the simple required code.
An on-board temperature sensor is powered from a port pin to save energy. The IC’s output can be measured one minute after power-up. The EEPROM shares the PICtail port’s SPI interface but has its own active-low chip select. Three LEDs provide status information when debugging the system and can be turned off to conserve power by removing a jumper.
Users can power up the board using a number of options. A USB Standard/mini cable that is approximately five feet long is included in the kit. This cable can be used to provide power through the board’s USB port. A standard coaxial-cable port allows users to plug in a nine to 16 V AC/DC converter/adapter, which is not supplied in the kit, or another similar dc supply. Users can also choose from two test points (TP301 and 302) to connect a 3.0 to 3.6-V supply. Users will also find a battery holder for two AA batteries on the back of the card, offering mobility.
The second type of board in the kit holds the MRF24J40MA RF transceiver module, which is a 2.4-GHz, IEEE Std. 802.15.4™ -compliant, surface-mount module with integrated crystal, internal voltage regulator, matching circuitry, and PCB antenna. The module operates in the non-licensed 2.4 GHz frequency band with a range of about 400 feet and is FCC, IC and ETSI compliant. The PICtail board, which is approximately two by two inches also has jumpered test points (JP1 and 2) and a two-Kbit, 10-MHz EEPROM with MAC address.
Although the kit includes a 2.4-GHz MRF24J40MA RF module board, other PICtail RF module boards are supported by the development board. Other boards are available for 433.92 MHz, 868 MHz, and 868/915 MHz, and even a 20-dBm 2.4-GHz board, which can operate over a range of about 4,000 feet. (These boards are the MRF49XA 433.92 MHz, MRF89XAM8A 868 MHz, MRF49XA 868/915 MHz, and MRF24J40MB 2.4-GHz, 20 dBm RF module boards, respectively.) The variety of boards allows users to work in the best unlicensed band for the application.
The remaining two types of board are the 1.5 x 2.25-inch LCD serial auxiliary board and the 2.25 x 2.25-inch RS232 serial accessory board. The LCD serial auxiliary board provides status readouts during development, and the RS232 serial accessory board allows users to extend the functionality of the development board.
How to Begin
After learning about the hardware in the kit, users can begin creating a sensor network outlined in chapter three of the user’s guide, which is a self-paced tutorial to lead users through a step-by-step demo set up.
First, assemble a network node by connecting the LCD serial accessory board to the development board’s serial accessory port. The six-pin connector and socket easily mate.
Next, connect the PICtail RF transceiver board to the development board. This step requires more care to ensure the board is securely seated. The wiper action ensures a good connection on all 28 pins. At this point, the node hardware is configured, but users need to perform some additional checks before powering up.
Users should ensure the JP301 jumper is correctly set. It must be removed for AA batteries, but it can be connected if a user is using a USB port. Next, instructions indicate to insert a jumper at JP201 on the development board, but the jumper may already be set up. Users also need to verify that the JP1 jumper on the LCD card is open that selects between I2C (open) and SPI (closed), given that the development board uses I2C for this demo.
Finally, after verifying that either the JP302 or 303 Current Measure jumper is closed, plug in the USB cable from a laptop PC to the development board’s mini USB port. Now it is time to test the node.
After a brief minute, the display changes to the following message:
RB0: Create NWK
RB2: Join NWK
According to the user guide, the node becomes a PAN Coordinator by pushing the RB0 push button. The user guide instructions and AN1066 App note, called the Microchip MiWi Wireless Networking Protocol Stack, indicate that it is the central hub in a star network. At this stage in the set up process, it was the first and only node in the network. But after pressing RB0, users can see that it successfully creates a network and indicates the temperature as measured by the thermistor.
The next step is to assemble and power up a second node, following the same steps as the first node. After powering up, press RB2 so it can join the network created by the first node. The system may report that it found a network, and after pressing RB0, the node successfully joins the network. Now, when pressing RB2 on either node, it indicates the temperature status on the local node. Press RB2 again to display the temperature status on the remote node. Each node is identified by its MAC address.
Users can set up a simple wireless network in less than twenty minutes using the kit. However, the kit allows users to do more using the RS232 serial auxiliary board and cable. Designers should consider exploring these options to extend the value of the network.
Disclaimer: The opinions, beliefs, and viewpoints expressed by the various authors and/or forum participants on this website do not necessarily reflect the opinions, beliefs, and viewpoints of DigiKey or official policies of DigiKey.




