180 likes | 280 Views
Example Distributed Sensor Network with TinyOS Motes. RPI ECSE – 6965/4694 Daniel Casner 2007 April 13th. Outline. Hardware Applications Implementation (software). Hardware. Processing ATmega128L 7MHz 64Kb RAM Radio 900 MHz 38.4 Kbps Storage Program: 128Kb flash Data: 512Kb flash.
E N D
Example Distributed Sensor Network with TinyOS Motes RPI ECSE – 6965/4694 Daniel Casner 2007 April 13th
Outline • Hardware • Applications • Implementation (software) Daniel Casner
Hardware Daniel Casner
Processing ATmega128L 7MHz 64Kb RAM Radio 900 MHz 38.4 Kbps Storage Program: 128Kb flash Data: 512Kb flash Sensors (10 bit ADC) Magnetometer (x,y) Microphone Photo Seismic Temperature Actuators Piezoelectric buzzer Hardware Daniel Casner
Applications • Temperature Estimation • Measure local temperature • Repeatedly average with neighbors • Converges to global average • Event Notification • Detect an event • Notify whole network Daniel Casner
Initializing the Network No Broadcast existence Is new? Wait to hear from neighbors Power On Hear from neighbor Yes Periodically rebroadcast our existence Store neighbor information Daniel Casner
Source Code Daniel Casner
Distributed averaging algorithm • Take a number • Pick a random person • Average your two numbers • Both of you store the new number • It should be between 1 and 100 • Go to step 2 and repeat • When you see the same number several times in a row, sit down. Daniel Casner
Odd node i Even node j On the Motes Measure local temperature Measure local temperature Receive message Send current estimate to random odd neighbor Is busy? Receive message Yes No Message type Send NACK Average with local estimate Returned estimate NACK Update local estimate Send update Daniel Casner
Deadlock 1 4 2 3 Now what? Daniel Casner
With Even/Odd Roles 1 4 2 3 Daniel Casner
Source Code Daniel Casner
Node i Multi-hop event routing At each node: Network initialization (identify all neighbors) Node j Initialize sensors Detect event Receive event notification from neighbor Send event notification to all neighbors k ≠ j ≠ i Daniel Casner
Source Code Daniel Casner
References • Source code on LMS • TinyOS – www.tinyos.net • Download • Tutorials • Examples • Crossbow – www.xbow.com • Mica2 Motes • UC Berkeley – webs.cs.berkeley.edu • Original TinyOS and Mote development Daniel Casner
Mica2 Specifications Daniel Casner
Off / Initializing Neighbor discovery Switching modes Temp estimation Photo event detection Event detected Demonstrations Daniel Casner