4. LPRF In Practice - Wireless Sensor Networks

advertisement
1
4. LPRF in Practice
Thomas Watteyne @ EDERC 2010
4
Hardware - Overview
sensors
micro-controller
battery
mote
Thomas Watteyne @ EDERC 2010
radio
5
Hardware - Criteria
• Micro-controller
• Radio-chip
– Reasonably fast
– Low-power
– Multiple I/O options
– Reasonable amount
of memory
– Timing capabilities
– Community / support
– Low-power
– Standards compliant?
– Community / Support
Thomas Watteyne @ EDERC 2010
6
Hardware - Microcontrollers
family
name
arch
speed
Power
active/asleep
2mW/MHz
RAM
8kBa
ROM
ARM7TDMI
32-bit
115-236MHz
-
ARM920T
32-bit
180-200MHz 22.4mA/250uA 16kBa 128kBa
MSP430f2274
16-bit
16MHz
390uAb/100nAb 1kB
32kB
MSP430f1611
16-bit
8MHz
500uAb/200nAb 10kB
48kB
ATmega128A
8-bit
16MHz
ARM
MSP
AVR
9.8mAc/1mAc
4kB
a
used as cache, primary memory is off-chip
at 1MHz
c at 8MHz
b
Thomas Watteyne @ EDERC 2010
128kB
Timers
I/O
used in
Game Boy
3 USART, SPI,
6 Timers,
Advance,
8 10-bit ADC,
RTC
Nintendo
JTAG
DS, iPod
UART, USB,
Ethernet, 4
extensive
SunSpot
USART, I2S,
SPI,JTAG
UART/LIN/IrD
2 timers
A/SPI and
TI eZ430
with 3 CCR
I2C/SPI
1 USART (SPI
16-bit
or UART or
TelosB,
(3CCR), 16I2C), 1 USART t-mote
bit (7CCR)
(SPI or UART)
2 8-bit, 2
2 USART, SPI
mica2
16-bit
7
Hardware - Radios
Brand
name
802.15.4
Band
sensitivity
CC2520
Yes
2.4GHz
-98dBm
Power
Tx/Rx/sleep
25.8mAa/18.8mA/30nA
CC2420
Yes
2.4GHz
-95dBm
17.4mAa/18.8mA/20nA
TelosB, MICAz,
SunSpot EPIC
CC1101
No
-94dBm
16.8mAa/17.1mA/200nA
WSN430
CC2500
TI
Atmel
a
b
used in
No
868/
915MHz
2.4GHz
-89dBm 21.2mAa/16.6mA/400nA eZ430-RF2500
AT86RF230
Yes
2.4GHz
-101dBm
16.5mAb/15.5mA/20nA
AT86RF231
Yes
2.4GHz
-101dBm
14mAb/12.3mA/20nA
at 0dBm transmission power
at 3dBm transmission power
Thomas Watteyne @ EDERC 2010
IRIS
8
Hardware - Motes
name
eZ430-RF2500
eZ430-RF2480
MICAz
IRIS
TelosB
RZ USBstick
deUSB2400
TI CC2531EMK
micro-controller
MSP430f2274
MSP430f2274
AtMega128L
AtMega128L
MSP430f1611
AT90USB1287
AT91SAM7S256
CC2531
radio
battery price
CC2500
2 AAA $20 e.a.
CC2480A1 2 AAA $30 e.a.
CC2420
2 AA $99 e.a.
AT86RF230 2 AA $119 e.a.
CC2420
2 AA $99 e.a.
AT86RF230 USB $39 e.a.
AT86RF231 USB
€35 e.a
CC2531
USB $49 e.a.
Thomas Watteyne @ EDERC 2010
13
Software - Options
Name
Footprint
license
real-time
community
TinyOS
(UC
Berkeley)
overhead
opensource
best-effort
scheduler
large (academia)
Contiki
(SICS,
Sweden)
overhead
opensource
best-effort
scheduler
large (academia)
Think
(Orange
Labs)
overhead
opensource
experimental
scheduler
modest
uC-OS II
free
hard real-time
overhead academic
scheduler
use
From
scratch
optimal
opensource
Thomas Watteyne @ EDERC 2010
-
large (industry)
-
16
Development Tools
•
Firmware development is complex
–
–
–
–
–
•
not complicated!
develop top-down, always keep an eye on where you’re going
the vast majority of the cases, you’re wrong (not the compiler,
not the protocols)
bugs are always due to simple errors
build from atomic building blocks
Multi-dimensional Debugging
–
–
–
–
–
–
–
choose a meaning for each LED, and stick with it
print out error codes, not text
Use the extension pins with an oscilloscope, the easiest way to
measure time
Use a spectrum analyzer to see on what channels you are
occupying
Use a sniffer to see the packets flying through the air
A GUI is faster than lines text
Use a JTAG debugger whenever possible
Thomas Watteyne @ EDERC 2010
17
Development Tools
• Choosing a scope
–
–
–
–
–
analog channels for energy (put resistor in series with power source)
the more digital channels, the better
you don’t need a fast scope
some oscilloscopes will interpret SPI, I2C, UART (e.g. Tektronic MSO2024)
cheap USB scopes available
• Spectrum analyzers
– are expensive
– can be replaced by a sniffer
– can be replaced by the poor man’s spectrum analyzer
• Sniffer
– CC2531 EMK ($49)
• Graphical User Interface
– Python+PySerial is a good candidate
Thomas Watteyne @ EDERC 2010
Download