1 thomas watteyne @ ederc 2010 4. lprf in practice
Post on 19-Dec-2015
216 views
TRANSCRIPT
5
Hardware - Criteria
• Micro-controller– Reasonably fast– Low-power– Multiple I/O options– Reasonable amount
of memory– Timing capabilities– Community / support
• Radio-chip– Low-power– Standards compliant?– Community / Support
Thomas Watteyne @ EDERC 2010
6
Hardware - Microcontrollersfamily name arch speed Power
active/asleep RAM ROM Timers I/O used in
ARM
ARM7TDMI 32-bit 115-236MHz 2mW/MHz 8kBa - 6 Timers, RTC
3 USART, SPI, 8 10-bit ADC, JTAG
Game Boy Advance, Nintendo DS, iPod
ARM920T 32-bit 180-200MHz 22.4mA/250uA 16kBa 128kBa extensiveUART, USB, Ethernet, 4 USART, I2S, SPI,JTAG
SunSpot
MSP
MSP430f2274 16-bit 16MHz 390uAb/100nAb 1kB 32kB 2 timers with 3 CCR
UART/LIN/IrDA/SPI and I2C/SPI
TI eZ430
MSP430f1611 16-bit 8MHz 500uAb/200nAb 10kB 48kB16-bit (3CCR), 16-bit (7CCR)
1 USART (SPI or UART or I2C), 1 USART (SPI or UART)
TelosB,t-mote
AVR ATmega128A 8-bit 16MHz 9.8mAc/1mAc 4kB 128kB 2 8-bit, 2 16-bit 2 USART, SPI mica2
a used as cache, primary memory is off-chipb at 1MHzc at 8MHz
Thomas Watteyne @ EDERC 2010
7
Hardware - Radios
Brand name 802.15.4 Band sensitivity PowerTx/Rx/sleep used in
TI
CC2520 Yes 2.4GHz -98dBm 25.8mAa/18.8mA/30nA
CC2420 Yes 2.4GHz -95dBm 17.4mAa/18.8mA/20nA TelosB, MICAz, SunSpot EPIC
CC1101 No 868/915MHz -94dBm 16.8mAa/17.1mA/200nA WSN430
CC2500 No 2.4GHz -89dBm 21.2mAa/16.6mA/400nA eZ430-RF2500
AtmelAT86RF230 Yes 2.4GHz -101dBm 16.5mAb/15.5mA/20nA IRIS
AT86RF231 Yes 2.4GHz -101dBm 14mAb/12.3mA/20nA
a at 0dBm transmission powerb at 3dBm transmission power
Thomas Watteyne @ EDERC 2010
8
Hardware - Motes
name micro-controller radio battery priceeZ430-RF2500 MSP430f2274 CC2500 2 AAA $20 e.a.eZ430-RF2480 MSP430f2274 CC2480A1 2 AAA $30 e.a.MICAz AtMega128L CC2420 2 AA $99 e.a.IRIS AtMega128L AT86RF230 2 AA $119 e.a.TelosB MSP430f1611 CC2420 2 AA $99 e.a.RZ USBstick AT90USB1287 AT86RF230 USB $39 e.a.deUSB2400 AT91SAM7S256 AT86RF231 USB €35 e.aTI CC2531EMK CC2531 CC2531 USB $49 e.a.
Thomas Watteyne @ EDERC 2010
13
Software - Options
Name Footprint license real-time communityTinyOS
(UC Berkeley)
overhead open-source
best-effort scheduler large (academia)
Contiki(SICS,
Sweden)overhead open-
sourcebest-effort scheduler large (academia)
Think(Orange
Labs)overhead open-
sourceexperimental
scheduler modest
uC-OS II overheadfree
academic use
hard real-time scheduler large (industry)
From scratch optimal open-
source - -
Thomas Watteyne @ EDERC 2010
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