Sensor application development using Crossbow sensor products
Sensor application development using Crossbow sensor products. Aiyaz Paniwala CSCI5931. Topics. Overview of Crossbow Wireless Sensor equipment Description of the MoteWorks platform Requirements for the Application Building A Simple Sensing Application.
Sensor application development using Crossbow sensor products
E N D
Presentation Transcript
Sensor application development using Crossbow sensor products Aiyaz Paniwala CSCI5931
Topics • Overview of Crossbow Wireless Sensor equipment • Description of the MoteWorks platform • Requirements for the Application • Building A Simple Sensing Application
Overview of Crossbow Wireless Sensor Equipment • Sensor and Data Acquisition Boards – MTS101,MTS300,MTS310,MTS400……. • Processor/Radio Platforms or “Motes” – MPR300,MPR310,MPR400,MPR410…… • Gateways and Network Interfaces – MIB500,MIB510,MIB600………….
MTS310 • Used at our lab • Commonly used name is micasb • Sensor and Functions include : • Accelerometer • Light • Magnetometer • Microphone • Sounder • Thermistor
MPR410 • Commonly known as MICA2 • Operating frequency range is 433 – 435 MHz • Uses • Atmel ATMega128L processor • Chipcon CC1000 Radio Transciever • 512kB Nonvolatile Memory
MIB510 • Commonly known as Serial Port Programmer • Connectors on top (51 pin Hirose Connector, 19 pin Circular Connector)-MICA,MICA2,MICA2DOT • Connectors on bottom(51-pin connector bottom-side) • Programming port and Data Port (Serial RS232)
Description of MoteWorks Platform • Uses Three distinct software tiers • Mote Tier – XMesh • Sever Tier – XServe • Client Tier – MoteView • Also includes : • Low Power Operating System – TinyOS • Software Development Tools
Software Development in Moteworks • Uses nesC(network embedded systems C) programming • nesC is an extension of C • Programs are built out of components. • Specification (bidirectional interfaces) • Implementation • Components are assembled
Specification (Bidirectional Interfaces) • Interfaces provide a set of functions • Commands-These functions are to be implemented by the interface’s provider • Events – A set to be implemented by the interface’s user • This means completion of all commands is signaled by an event
Requirement for an Application • One or more MICA Motes • One gateway/programming board • A windows PC with MoteWorks
Building A Simple Sensing Application • Minimum 5 files in any application’s directory: • Makefile • Makefile.component • Application’s configuration written in nesC • Application’s module written in nesC • README(optional) • Makefile remains same • Makefile.component depends on the top level application component specified in the configuration
Top level configuration file • Saved with .nc extention • Contains the components and their wiring • The StdControl interface must always be implemented as the bare minimum for an application
Example of Configuration file • MyApp_Timer.nc • First line specifies the components • The last two lines wire the TimerC and LedC components to the application’s module. • The module controls the Timer and LED devices through TimerC and LedsC functions.
Application Module • Provides specifies the command • Uses specifies the events • Implementation initializes all the components.
Building and Running the application • Use Programmer’s Notepad. • Select Tools > make mica2 • If successful we get “writing TOS image” in output • Select Tools>shell and type in make mica2 reinstall mib510,com1.
A Simple Sensing Application • Compile and Install the Code (MyApp_Sensor.nc and MyApp_SensorM) • Two variations • if (call SendMsg.send(TOS_UART_ADDR,sizeof(XDataMsg),&msg_buffer) != SUCCESS) • if (call SendMsg.send(TOS_BCAST_ADDR,sizeof(XDataMsg),&msg_buffer) != SUCCESS)
First Variation • Uses XServe to display sensor data • In Cygwin type xserve –devide=COM1 • All the sensor data(including those not available) get displayed • We get valid values for available sensing data
Second Variation • Uses Radio hence XSniffer is used. • Connect a second Motes(node id 2) • Compile and install TOSBase.nc from /MoteWorks/apps/general/XSniffer • Make mica2 install,2 mib510,com1 • Using XSniffer detect output.
References • MoteWorks Getting Started Guide • Introduction • Introduction to TinyOS and nesC • First Steps in nesC Programming • A Simple Sensing Application • Wireless Sensor Networks • Mesh Networking Right Out of the Box • Product Information Guide : Hardware