Projects :: Constructing a wireless sensor network
Pebble-sized, low-power, embedded computers self-organized in loose networks. This concept, that not so long ago belonged in science fiction magazines, came to life with the advent of cheap, mass-producible embedded computers and sensors. With industrial, scientific, agricultural and even military applications, wireless sensor networks, sometimes referred to as 'smart dust', are a fascinating solution to many previously insurmountable or exceedingly difficult problems.
Our mentor presented a 3-day flash overview of wireless communications, later focusing on wireless sensor networks. We discussed IEEE 802.11 networking, Bluetooth, cellular telephone networks, and IEEE 802.15.4, with an emphasis on basic wireless communication theory including signal modulation schemes and antennae characteristics.
We then discussed various routing concepts and algorithms (specifically AODV and DSR), reliable delivery, and various present-day applications for wireless sensor networks. We implemented and tested a simple routing algorithm on a Telos rev-A series wireless sensor network.
Our project consisted of two main parts. The first one was theoretical; we were introduced to the basics of wireless networks, network topologies and routing algorithms.
This part was based on readings from the book “Wireless communications and networks” by Stallings, and lectures by our mentor. We received a thorough treatment of cellular networks, one of the most complex instances of mass-deployed wireless network communication. Our mentor also delivered a set of comprehensive lectures on spread spectrum technology, and covered essentials about antenna characteristics and signal propagation, including modes of transmission, propagation effects, and fading.
This part of the project also introduced us to reading scientific papers, which we haven't done before. We have now read several of them and found there was a surprisingly wide range of the quality of scientific works.
We were reading about:
- Wireless network routing protocols
- The Roofnet network
- Microsoft's RADAR technology
Wireless network routing protocols
There are currently two types of wireless networks. The first is known as an infrastructured network. This type of network has some set of fixed gateways (base stations). The second type is the infrastructureless network, also known as an ad hoc network. The article we read examined routing protocols for these networks.
Routing protocols can be categorized as:
- Table driven
- Source-initiated (demand-driven)
Roofnet is a wireless network constructed at MIT, currently consisting of 38 nodes placed over 6 km2. The name came from antennas that are placed on the roofs of buildings in Cambridge, MA.
In the process of developing Roofnet, MIT scientists created a special channel emulator that enabled them to make multiple measurements on a simulated wireless network whose signal characteristics were fully controllable. The two particularly interesting discoveries of Roofnet were the peculiar spatial distribution, and time variation of loss rates in the network.
RADAR is Microsoft R&D's in-building user location tracking system. It can be thought of as an in-building GPS, with a maximum error of only several meters. The user's position is determined by 3 base station (triangulation) . But there are significant hardware and noise problems which makes RADAR generally unusable in practice.
2. Practical part
In this part of the project we were working on our own wireless sensor network. The network consisted of ten Telos rev A 2004-04-17 motes.
To start programming our motes we first had to set up a Cygwin environment on the Windows computers we were working on. Cygwin provided a Unix-like environment which enabled us to upload the TinyOS operating system and programs we developed to the motes. We programmed the motes in NesC, a C dialect that was developed for sensor networks, and which supports the TinyOS programming model and the requisite sensor mechanisms. NesC largely uses standard C semantics (including pointer arithmetic), but differs from C notably in its introduction of components which are 'wired' together through their interfaces.
After we read the NesC tutorial, we started creating simple programs. Blink application was the first program we made. We managed to connect different components of the hardware (LED and Timer). After that we created simple sensing application in which we connected the previous hardware components with the Hamamatsu TSR (total solar radiation) sensor. With this application, our Telos turned off its LED every time the light intensity went below a certain threshold.
After developing simple, standalone applications, we started working on communication between our motes. First we created a program that would let one node continuously send data, and another continuously receive it. We then wrote a program that allowed three motes to communicate with each other, each mote both sending and receiving information. This program also included obtaining readings from the on-board TSR sensor.
Each mote “belonged to” a color (red, green or blue), and each mote started with all three of its LEDs on. When light intensity dropped below a predefined threshold on each mote, it would send a signal to the other two motes, and they would turn off the LED of the color of the first mote.
And finally we created a spanning-tree based routing algorithm. In this algorithm there is one node that is a base station. Before nodes can transmit data to the base, they must find a route to the it. The base station would periodically send a "tree formation" message through the network to build a network topology (each node gets a parent). Nodes always chose the parent with the smallest hop distance to the base, and packets are transmitted from each node to the base station by the established routes - each node forwards the packet to its parent until it reaches the base station.
Results and conclusion
In the theoretical part we have been introduced to the basics of wireless networks, network topologies and routing algorithms. In the practical part we made several programs in NesC and one routing algorithm, which we tested on the Telos sensors and Harvard Mote Lab.
References and Resources
First briefing, second briefing and final presentation (all in MS PowerPoint).
- “Wireless communications and networks” by William Stallings
- “Link-level measurements from an 802.11b Mesh Network”, Daniel Aguayo, John Bicket, Sanjit Biswas, Glenn Judd, Robert Morris, SIGCOMM 2004.
- “A review of current routing protocols for ad-hoc mobile wireless networks”, E. Royer and C. K. Toh, IEEE Personal Communications 1999.
- System architecture for wireless sensor networks by Jason Hill, PhD thesis, UC Berkeley, May 2003.
- “RADAR: An In-Building RF-Based User Location and Tracking System”, P. Bahl and V. N. Padmanabhan.
- NesC tutorial
Sensor networks team: David Abram, Nino Antulov Fantulin, Danko Komplen, Jelena Slobodnjak and Ivan Krstic. See photos.