Lesson 00 slides for one day introductory course on wireless sensor networks and TinyOS, that took place at the University of Alcalá de Henares in Madrid Spain the 18th of September 2013. This course was jointly designed by the Electronics Department of the university and Advanticsys. Find source code for the lessons here: http://www.advanticsys.com/wiki/index.php?title=TinyOS%C2%AE_Course_at_UAH_18th_September_2013
3. • A Wireless Sensor Network (WSN) is a wireless network of small
autonomous devices spatially distributed over a certain area that
cooperatively monitor physical or environmental variables through
their attached sensors, and transmit this information to a main
location.
What are WSNs?
3
4. • Advantages:
• Low cost devices
• Low power
• Easy and quick to deploy
• Scalability (increase network robustness)
• Challenges:
• Energy constrained
• Limited memory and computation
• Low Bandwidth
WSN Advantages &Challenges
4
5. • Monitoring of objects
• Monitoring of areas
• Monitoring of objects and areas
Applications
5
6. Monitoring of objects
• Structural Monitoring
• Condition-based Maintenance
• Medical Diagnostics
• Urban terrain mapping
Example:Condition-based Maintenance
Fabrication plants:
• Sensors collect vibration data, monitor wear and tear; report data
in real-time
• Reduces need for a team of engineers; cutting costs by several
orders of magnitude
Applications
6
7. Monitoring of areas
• Environmental and Habitat Monitoring
• PrecisionAgriculture
• Indoor Climate Control
• Military Surveillance
•TreatyVerification
• IntelligentAlarms
Example: Precision agriculture
• Precision agriculture aims at making agricultural operations more
efficient and cost effective, while reducing environmental impact.
• The information collected from sensors is used to evaluate
optimum sowing density, estimate fertilizers and other inputs
needs, and to more accurately predict crop yields.
Applications
7
8. Monitoring of objects and areas
•Wildlife Habitats
• Disaster Management
• Emergency Response
• Ubiquitous Computing
•AssetTracking
• Health Care
• Manufacturing Process Flows
• …
Applications
8
9. Smart Home/Smart Office
• Sensors controlling appliances and electrical devices in the house
• Better lighting and heating in office buildings.
Biomedical/Medical
• Health Monitors:Glucose /Heart rate
• Chronic disease: artificial retina/ cochlear implants
• Hospital sensors: monitor vital signs/ record anomalies
Traffic management & monitoring
•Traffic flow
• Real time routing update
Industrial & Commercial
•Agricultural crop conditions
•Inventory tracking
•Plant equipment maintenance monitoring
•Automated problem monitoring
Future of WSN
9
10. • Low cost and power computer
• Sensors
• Radio module
• Storage
• Power unit
What are Motes?
CONTROL
SENSOR 3
10
12. WSN Evolution
• First developments for military
applications
• At the end of the 90’s, the possibilities
of this technology were very evident for
researches & the industry across the
globe.
• In 2003 the IEEE 802.15.4 standard was
formulated. The first embedded
operating systems are developed
• First WSN designs are distributed
systems
• Newest designs focus on in-node
processing and actuation, and
multipoint communication
12
13. • In 2003 the IEEE 802.15.4 standard was formulated, as
an answer to the industry needs for a common
communication stack among small devices
• This stack is aimed towards low power consumption,
and low data transfer rates
• The communication stack focuses on the definition of
the frequencies of operation, and how they physically
access the medium
IEEE 802.15.4
13
15. 802.15.4
802.11
(Wi-Fi)
Bluetooth
UWB (Ultra
Wide Band)
Wireless USB IR Wireless
Data Rate
20, 40, and 250
Kbits/s
11 & 54
Mbits/sec
1 Mbits/s 100-500 Mbits/s 62.5 Kbits/s
20-40 Kbits/s
115 Kbits/s
4 & 16 Mbits/s
Range 10-800 meters 50-100 meters 10 meters <10 meters 10 meters
<10 meters (line
of sight)
Networking Topology
Ad-hoc, peer to
peer, star, or
mesh Point to hub
Ad-hoc, very
small networks
Point to point Point to point Point to point
Operating Frequency
868 MHz
(Europe)
900-928 MHz
(NA), 2.4 GHz
(worldwide)
2.4 and 5 GHz 2.4 GHz 3.1-10.6 GHz 2.4 GHz 800-900 nm
Complexity (Device
and application
impact)
Low High High Medium Low Low
Power Consumption
(Battery option and
life)
Very low (low
power is a design
goal)
High Medium Low Low Low
IEEE 802.15.4
Tech comparison:
15
16. IEEE 802.15.4 vs. ZigBee
IEEE 802.15.4 IS NOTTHE SAME AS ZIGBEE!!!
16
18. • Embedded OS run inside the mote and take care of most of most of
the operations, always focusing on achieving a low power state
• This allows the programmer to focus on developing applications,
and staying away from low power tinkering
• Among the most popular, TinyOS and Contiki lead the research
Embedded Operating Systems
18
19. Introduction to TinyOS-2.x
19
Overview
•One of the first OSs to target WSNs
– currently the most widespread
• Emphasis is on memory consumption
– both program and data memory
• Open-source w/ rich component library
• Memory efficient
• Rich tool-chain
• Large code-base and user community
20. TinyOS Features:
•TinyOS is programmed in nesC
• nesC is a C-style language
• nesC provides the programming abstractions
– component based
• Split-phase execution
– return values arrive asynchronously through events
• Tasks provide the unit of concurrency
– typically spawned by events
– can be pre-empted by asynchronous events
– FIFO scheduling
• Pre-emptive threaded model with TOSThreads
Introduction to TinyOS-2.x
20
21. • TinyOS abstracts everything as a component:
– Components can be reused
– Components can be replaced
– Components can be hardware or software
21
Introduction to TinyOS-2.x
22. Component-oriented Programming
• Object-Oriented Programming:
– Focuses on the relationships between classes that are
combined into one large binary executable
• Component-Oriented Programming:
– Focuses on interchangeable code modules that work
independently and don't require you to be familiar
with their inner workings to use them.
22
Introduction to TinyOS-2.x
23. TinyOS Architecture
Sensing Comms Other Libraries
Application
Main (scheduler)
Hardware Abstractions (ADC, CLOCK, I2C, LEDS, PHOTO, UART, SPI)
23
Introduction to TinyOS-2.x