190 likes | 384 Views
Wireless Sensor Networks:. An overview and experiences. Matthew Grove <m.grove@rdg.ac.uk> PEDAL Seminar Series, January 9th 2008. Outline. Introduction - what are wireless sensor networks? What have we been doing with them? Terminology. Some sample hardware from Crossbow.
E N D
Wireless Sensor Networks: An overview and experiences.Matthew Grove <m.grove@rdg.ac.uk>PEDAL Seminar Series, January 9th 2008
Outline • Introduction - what are wireless sensor networks? What have we been doing with them? • Terminology. • Some sample hardware from Crossbow. • Commonly used software architecture. • An example application - greenhouse monitoring. • Hardware and software experiences. • Summary and recommendations. • Further reading.
Introduction • “A Wireless Sensor Network is a wireless network consisting of spatially distributed autonomous devices using sensors to cooperatively monitor physical or environmental conditions, such as temperature and sound at different locations”. • We bought a development kit in October 2006 - the aim was to work with Soil Science and get a reasonable understanding of the technologies and capabilities. • Over the past year we have been writing code and generally experimenting with the hardware. • The insights and experiences are being used for proposals and knowledge transfer within the University (like this talk).
Terminology • WSN - Wireless Sensor Network. • Mote - a wireless sensor node. Sensors are connected to sensor nodes. • Patch - a group of motes. • Mesh - mesh networking is a common way of doing comms with wireless sensors.
Wireless Sensor Board Hardware • There are several manufacturers. The motes we have been using are from Crossbow. • Pictured below are a Mica2 Mote, Mica2Dot Mote, UK stamp and American quarter.
Specification for the Mica2 Mote Processor • Program Flash memory: 128 K • Measurement Flash: 512 K • Wired Communications: UART • Current Draw (Sleep): 8 mA (<15 μA) Radio • Frequency (in UK) 433 Mhz • Data Rate: 38.4 Kbaud • ~ Outdoor Range: 150-200 M Misc • Battery: 2x AA • UI: 3 LEDs
Other Hardware • Programming boards: Used to upload programs to Motes. We have serial and Ethernet programmers. They can also be used as a base station linking the Motes to a PC. • Gateways: Act as a bridge between the Motes and another network. Our gateway is a 400 MHz board running embedded Linux.
Software Motes • Run TinyOS (event based embedded OS). • Applications are written in embedded C (nesC). • Lots of code snippets and some good tutorials. • Tool chain available for *nix and Windows. • Familiar to anyone who uses GCC and Make. • Simulators available for limited debugging and testing. Base Station / Gateway • Java libraries provided. • Tools available to automatically make Java stubs to convert Mote messages into Java objects. • Can use your normal Java development process and IDE.
Monitoring the temperature in greenhouses on campus Simple Example Application Lyle Building SSE Car Park Greenhouse 1 Greenhouse 2
Setup For Greenhouse Monitoring • Two Mica2 Motes with temperature sensor boards, one for each greenhouse: • Both Motes periodically measure temperature. • Mote 1 sends its measurements directly back to a base station in the Lyle building. • Mote 2 sends the measurements via Mote 1 because it is too far away for direct communications with the Lyle building. • An embedded Linux base station on the top floor of Lyle building inserts the measurements into a database. • A web application providing a user interface for people to analyse the temperature measurements.
Tasks for the Greenhouse WSN • Build enclosures for the motes to protect them from the environment in the greenhouse (humidity etc). • Calibrate the motes and store that information in the database. • TinyOS nesC application for measuring the temperature to run on the motes. • Some code can come from existing open source applications. • Conserve the batteries. • Route messages between motes. • Convert raw ADC sensor values into engineering units. • Java base station: • Receive messages from the motes and store the measurements in an SQL database. • PHP / AJAX web-client: • Dynamically visualise the data (graphs). • Allow the user to run queries on the data (for instance view measurements for a specific date).
Hardware Experiences • The connectors on the Crossbow Mica2 motes are a nightmare to work with. • There is no accurate hardware clock onboard these motes, this means more complex software is needed for motes to wake up from low power states simultaneously. • The UI for a mote is 3 LEDs and if you attach one you can have a buzzer. This makes it difficult for motes to communicate with humans. • Transmission distance outside is around 200 meters line of sight (next slide). The way to determine where you will need to place motes for reliable communications is to get out there and do a survey with some motes.
Transmission Distance 200 metres line of sight
Software Experiences • ‘Normal’ concurrency and communications problems seen in distributed systems. TinyOS is event driven and messaging over the radio has no guaranteed quality of service. • It is relatively simple to write applications that leave the radio on full power all the time, complexity of code increases the more you try and conserve power. • An end-to-end application is requires several programs to be written likely in different languages. • Debugging outside of the simulator can be very tough.
Web-Based User Interfaces Live AJAX Charts Dynamic Plots in a JSR168 Portlet
Summary and Recommendations • WSN software is not accessible for non computer scientists. • Tools need to be improved if application scientists are going to use WSNs to replace existing wired solutions in the field. • Make the motes self-configuring, it makes deploying them easier. • If you buy motes get these features: • USB interfaces. • An accurate hardware clock (we have not found an off-the-shelf solution to this).
Further Reading • My research blog - http://acet.rdg.ac.uk/~mjeg/blog.php • Reading Wireless Sensor Networks project - http://acet.rdg.ac.uk/projects/resn/ • Crossbow Motes - http://www.xbow.com/Home/HomePage.aspx • TinyOS - http://www.tinyos.net/