Hardware Reference
In-Depth Information
Setting Up a Sensor Network
When starting the development of a sensor network, decide what information needs to be collected. This will help
when qualifying sensor types. After determining the information to be collected, make a list of the requirements
for the environment that the sensor network is to be deployed in. The environment has the biggest impact on what
technologies to use; in an urban environment, power may be more readily available than in a rural or wilderness
environment, where power may have to be generated or batteries extensively used. Wireless is probably the easiest
type of node to deploy, but may have some reliability issues in environments with high electromagnetic interference;
in such cases, shielded cabling may need to be run. The communication method also needs to not interfere with the
sensor readings. If RF information is being collected, wireless may have to be avoided or the interference may have to
be zeroed out of the information. In some special cases, fiber optics may be the best choice.
The sensor's resolution is one factor that can determine the resolution of the whole network. The resolution can
also be determined by the collection rate required by the system being monitored, with the amount of data collected
to be sufficient for the application. The requirements need to be considered when starting to develop a sensor
network. Systems that monitor machinery may require continuous sensor output every few milliseconds or even
seconds, while networks measuring tidal flow may only need to be read every few minutes or even once an hour to
achieve sufficient resolution. Some other requirements to plan for are how the collected data will be processed. The
network will need sufficient processing power if the data needs to be processed in real time. The network will need to
store the data if it's to be processed at a later time than when it is collected.
Sensor networks do not need to be complex or use a lot of hardware in the initial development stages. Usually
a sensor network has one gateway for the data and one to a few different node types to collect the data. Building a
sensor network can start with a one or two nodes and a gateway and be planned to be expandable. In the initial stages
of development, the passing of data is more important than the data itself. The data can be simulated to provide a
constant to compare how successful the data transmission is.
The example in this chapter sets up a simple sensor network that demonstrates the integration of some of the
technologies and concepts introduced in earlier chapters. The example is not a complete project to make a fully
working sensor network.
The example creates a simulated sensor node with three different sensors that transmit predefined data for each
sensor to the Mega ADK for logging and further retrieval by the Android device. The XBee modules are set up as router
and coordinator in API mode with a baud of 115200. The pan ID needs to match on both XBees, but there is no need
for the destination address to be set. The code implements a bit of error correction to ensure that the data is logged
properly to the SD card and the serial connections stay synced. The Android device will be set up to pull a log from the
Mega ADK and display the data via a graph. The Arduino connects the Android device, SD card, and XBee to create
a data gateway. The Arduino also responds to the sensor node to confirm data was received or that the packet was
malformed. Figure 8-1 shows the configuration of the Arduino Mega ADK.
 
Search WWH ::




Custom Search