Choosing a sensor-network technology involves many design tradeoffs and thorough field testing.
Whether you use a handful or thousands of sensors in a wireless network, communications can occur in many ways. But each approach requires a thoughtful analysis of distances between sensor nodes, node-power requirements, protocols, and network layouts, among other characteristics.
WiFi or ZigBee might seem attractive for a sensor network, but each has shortcomings. "The widespread use of WiFi means engineers could design wireless sensor networks that connect to WiFi access points," said John Schwartz, technology strategist at Digi International. "But the sensors would have to detect available access points, identify one, and enter a user name and password, which complicates an embedded application. Or they'd have to add a add a dedicated WiFi access point for the sensor network."
Likewise, ZigBee gets a lot of attention. "But in most sensor applications, ZigBee isn't the best choice," noted Hardy Schmidbauer, wireless marketing manager at Silicon Laboratories. "ZigBee nodes will cost more, decrease battery life, and offer less range than proprietary sub-GHz technologies using frequency shift keying (FSK)." In most cases, a proprietary point-to-point or star-type network that uses a sub-GHz transceiver will work better and cost less.
"The 802.15.4 standard gives you access to capabilities such as sensing inactivity in a channel prior to a transmission, backing off and retrying if a radio-frequency channel appears occupied, getting acknowledgments from transmitters, and so on," said Colin Faulkner, product marketing manager at NXP Semiconductors. "And you can find a wide range of ready-to-use devices that comply with the 802.15.4 standard."
"For most sensor networks, a star topology offers a simple and effective way to communicate," said Schmidbauer. "But if you must place nodes beyond the range of a network's master node, or if you have more than, say, 32 nodes, things get complicated and a mesh network might work better. Any mesh-type sensor network must 'heal' itself, automatically recognize new nodes, configure itself, and operate at low power." During healing a disconnected node automatically attempts to establish a wireless communications via an alternate path.
"The network operating environment also helps product designers determine the type of network configuration," said Schwartz. "In a factory where you have sensors close together you might use a point-to-point or a star network because it's simple to implement. Use the simplest wireless network to do the job."
When you need to employ a network with many sensors, a tree network also deserves consideration. NXP, for example, offers a proprietary tree-type network based on the JenNet stack and 802.15.4 transceivers. "There are subtle differences between a tree and a mesh network," explained Faulkner. "A tree network branches out from a central point, so messages propagate from that point down any branch of the tree, until they reach an end node. Devices on separate branches of the tree communicate via the central point."
"A tree network can heal itself and find an alternate route for messages that get blocked for some reason," continued Faulkner. "So tree and mesh networks exhibit similar behaviors, but a tree topology is easier to use and requires a smaller software stack, which leaves more room in a microcontroller for application code. Or you can use a less-expensive MCU."
When you think about the number of nodes in a sensor network, also evaluate data-rate requirements. "The more nodes you have the more advantageous it is to use higher data rates to prevent transmitters colliding" said Schmidbauer of Silicon Labs. "But higher data-rate transmissions compromise communication range. The lower the data rate, the smaller the bandwidth your receiver needs, which translates into better receiver sensitivity. But the lower data rate means the transmitter and receiver will stay fully powered for a longer period than they would for a higher data rate. Basically, slower transmission rates mean you get a longer communication range. If you transmit with a higher data rate you get better battery life but a shorter range."
The power requirements of remote nodes also can help you choose an appropriate communication protocol. "A WiFi transceiver, for example, must come up to full power and take time to connect with an access point before it can send data," noted Schwartz of Digi. "But a simple network protocol that uses 802.15.4 transceivers can quickly wake up, send its data, and go back to sleep. Simple protocols usually offer the best power efficiency. To extend battery life a node must stay in a sleep mode for the longest possible time."
"When you think about power sources, keep in mind that a battery's shelf-life can end before a lifetime based solely on sensor-node current-use calculations," added Schwartz. "Always consider the battery manufacturer's shelf-life information."
Power use can vary by how a sensor node operates, too. "If you have a switch-operated node, the circuit can consume as little as 100 nA in its sleep state," said Faulkner. "But if you run a timer in an MCU to wake up the node every few seconds to transmit data, the timer will use a higher current, say one or two microamps, that depletes battery charge faster.
Some large sensor networks rely on continuously powered routers because the master node must not miss a message from a remote node. That means larger batteries or mains power for the routers. "If you have a home or factory-automation ZigBee network situation and don't get the needed range you install a one or more of those routers," said Schwartz. "In a moisture-sensing network across a large field you might need a mesh network and routers because you can't otherwise get the required wireless range. But instead of using always-on routers you could use a technology such as DigiMesh or WirelessHART that supports sleeping routers."
No matter what sensor-network technology or equipment you choose, you must test it in different environments. "All too often engineers test a wireless sensor network in a lab and then try to deploy it with 1000 nodes," said Schwartz. "You have to get out in the field and test it in three or four environments to better understand how the equipment performs and to identify and fix problems."
For further reading
Faludi, Robert, "Building Wireless Sensor Networks," O'Reilly Media. 2011. http://oreilly.com/catalog/9780596807740.
WirelessHART Overview, http://www.hartcomm.org/protocol/wihart/wireless_overview.html.