Upload
lenard-richards
View
221
Download
1
Tags:
Embed Size (px)
Citation preview
Example Distributed Sensor Network with TinyOS Motes
RPI ECSE – 6965/4694
Daniel Casner
2007 April 13th
2007 April 13th Daniel Casner 2
Outline
• Hardware
• Applications
• Implementation (software)
2007 April 13th Daniel Casner 3
Hardware
2007 April 13th Daniel Casner 4
Hardware
• 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
2007 April 13th Daniel Casner 5
Applications
• Temperature Estimation– Measure local temperature– Repeatedly average with neighbors– Converges to global average
• Event Notification– Detect an event– Notify whole network
2007 April 13th Daniel Casner 6
Initializing the Network
Storeneighbor
information
Power OnWait to hear
from neighborsIs new?
No
Yes
Broadcastexistence Hear from
neighbor
Periodically rebroadcast our
existence
2007 April 13th Daniel Casner 7
Source Code
2007 April 13th Daniel Casner 8
Distributed averaging algorithm
1. Take a number
2. Pick a random person
3. Average your two numbers
4. Both of you store the new number• It should be between 1 and 100
5. Go to step 2 and repeat
6. When you see the same number several times in a row, sit down.
2007 April 13th Daniel Casner 9
Even node j
On the MotesOdd node i
Send current estimate to random odd neighbor
Update local estimate
Measure local temperature
Measure local temperature
Receive message
Messagetype Returned
estimateNACK
Receive message
Average with local estimate
Send NACK
Send update
Is busy?NoYes
2007 April 13th Daniel Casner 10
Deadlock
1
4 2
3
Now what?
2007 April 13th Daniel Casner 11
With Even/Odd Roles
1
4 2
3
2007 April 13th Daniel Casner 12
Source Code
2007 April 13th Daniel Casner 13
Multi-hop event routingAt each node: Node i
Network initialization(identify all neighbors)
Initialize sensors
Send event notification to all
neighbors k ≠ j ≠ i
Node j
Detect eventReceive event
notification from neighbor
2007 April 13th Daniel Casner 14
Source Code
2007 April 13th Daniel Casner 15
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
2007 April 13th Daniel Casner 16
2007 April 13th Daniel Casner 17
Mica2 Specifications
2007 April 13th Daniel Casner 18
Demonstrations
Off / Initializing
Neighbor discovery
Switching modes
Temp estimation
Photo event
detection
Event detected