Download presentation
Presentation is loading. Please wait.
1
1 Thomas Watteyne @ EDERC 2010 4. LPRF in Practice
2
2 Section 4 - Overview 4. LPRF in Practice 4.1Off-the-Shelf Hardware 4.2Operating Systems 4.3Development Environment 4.4Tips & Tricks Thomas Watteyne @ EDERC 2010
3
3 4.1 Off-the-Shelf Hardware
4
4 Hardware - Overview micro-controllerradiosensors battery mote Thomas Watteyne @ EDERC 2010
5
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
6 Hardware - Microcontrollers familynamearchspeed Power active/asleep RAMROMTimersI/Oused in ARM ARM7TDMI32-bit115-236MHz2mW/MHz8kB a - 6 Timers, RTC 3 USART, SPI, 8 10-bit ADC, JTAG Game Boy Advance, Nintendo DS, iPod ARM920T32-bit180-200MHz22.4mA/250uA16kB a 128kB a extensive UART, USB, Ethernet, 4 USART, I2S, SPI,JTAG SunSpot MSP MSP430f227416-bit16MHz390uA b /100nA b 1kB32kB 2 timers with 3 CCR UART/LIN/IrD A/SPI and I2C/SPI TI eZ430 MSP430f161116-bit8MHz500uA b /200nA b 10kB48kB 16-bit (3CCR), 16- bit (7CCR) 1 USART (SPI or UART or I2C), 1 USART (SPI or UART) TelosB, t-mote AVRATmega128A8-bit16MHz9.8mA c /1mA c 4kB128kB 2 8-bit, 2 16-bit 2 USART, SPImica2 a used as cache, primary memory is off-chip b at 1MHz c at 8MHz Thomas Watteyne @ EDERC 2010
7
7 Hardware - Radios Brandname802.15.4Bandsensitivity Power Tx/Rx/sleep used in TI CC2520Yes2.4GHz-98dBm25.8mA a /18.8mA/30nA CC2420Yes2.4GHz-95dBm17.4mA a /18.8mA/20nA TelosB, MICAz, SunSpot EPIC CC1101No 868/ 915MHz -94dBm16.8mA a /17.1mA/200nAWSN430 CC2500No2.4GHz-89dBm21.2mA a /16.6mA/400nAeZ430-RF2500 Atmel AT86RF230Yes2.4GHz-101dBm16.5mA b /15.5mA/20nAIRIS AT86RF231Yes2.4GHz-101dBm14mA b /12.3mA/20nA a at 0dBm transmission power b at 3dBm transmission power Thomas Watteyne @ EDERC 2010
8
8 Hardware - Motes namemicro-controllerradiobatteryprice eZ430-RF2500MSP430f2274CC25002 AAA$20 e.a. eZ430-RF2480MSP430f2274CC2480A12 AAA$30 e.a. MICAzAtMega128LCC24202 AA$99 e.a. IRISAtMega128LAT86RF2302 AA$119 e.a. TelosBMSP430f1611CC24202 AA$99 e.a. RZ USBstickAT90USB1287AT86RF230USB$39 e.a. deUSB2400AT91SAM7S256AT86RF231USB€35 e.a TI CC2531EMKCC2531 USB$49 e.a. Thomas Watteyne @ EDERC 2010
9
9 Hardware - TelosB User-defined push reset visible light sensor IR light sensor humidity sensor expansion port internal antenna external antenna CC2420 MSP430f1611 (back) 3 LEDs (RGB) USB for programming and UART 2 AA (back) Thomas Watteyne @ EDERC 2010
10
10 eZ430-RF2500 2 LEDs pushbutton CC2500 chip antenna 26MHz crystal for radio extension ports MSP430 USB programmer: Power Debug (JTAG) Interface (serial) Thomas Watteyne @ EDERC 2010
11
11 Thomas Watteyne @ EDERC 2010 4.2 Operating Systems
12
12 Software - Requirements Reduced Memory Footprint – binary code occupies a small amount of ROM Hardware Independency – through abstraction of lower layers Re-useability – code is divided in chunks communicating through APIs Real-time – Easy to measure time (access to timer registers) – Reasonably fast – Guaranteed execution time Thomas Watteyne @ EDERC 2010
13
13 Software - Options NameFootprintlicensereal-timecommunity TinyOS (UC Berkeley) overhead open- source best-effort scheduler large (academia) Contiki (SICS, Sweden) overhead open- source best-effort scheduler large (academia) Think (Orange Labs) overhead open- source experimental scheduler modest uC-OS IIoverhead free academic use hard real-time scheduler large (industry) From scratch optimal open- source -- Thomas Watteyne @ EDERC 2010
14
14 Software - TinyOS component-based architecture – code is cut in components – components communicate through APIs component library – TinyOS has been ported to a dozen platforms – Drivers exist for different micro-controllers and radios event-driven execution model – a schedule executes tasks on a FCFS basis – tasks can be halted by interrupts Thomas Watteyne @ EDERC 2010
15
15 Thomas Watteyne @ EDERC 2010 4.3 Development Environment
16
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
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
18
18 Thomas Watteyne @ EDERC 2010 4.4 Tips & Tricks
19
19 A MAC Protocol is a State Machine IDLE RXUF RXCW BACKOFFACK RXDATA TXFIN TXACK SENTACK TXUF TXCW RXACK TXDATA RXFIN Thomas Watteyne @ EDERC 2010
20
20 Clock Drift Thomas Watteyne @ EDERC 2010
21
21 Gotcha’s - Synchronization 1.A sends packet with slot offset α 2.B records the epoch of the time of arrival β 3.B calculates the epoch of the start of the last slot (β- α) 4.B sets its counter register accordingly A B α β Thomas Watteyne @ EDERC 2010
22
22 Gotcha’s - Packet Timestamps 1.MSP430 writes packet to CC2420 with error code in timestamp 2.MSP430 triggers the start of the transmission 3.MSP430 records the time of SFD (interrupts) 4.MSP writes to correct timestamp in the Tx buffer 5.Transmission completes MSP430CC2420 Thomas Watteyne @ EDERC 2010
23
23 Synchronization Thomas Watteyne @ EDERC 2010
24
24 Integration into the Internet NSLU2 by Linksys as a gateway ($100) http://tunnelbroker.net/http://tunnelbroker.net/ for tunneling into the IPv6 cloud (free) http://sensor.network.com/http://sensor.network.com/ by Sun to store your data (free) http://code.google.com/apis/visualization/ http://code.google.com/apis/maps/ http://code.google.com/apis/visualization/ http://code.google.com/apis/maps/ to visualize your data online Thomas Watteyne @ EDERC 2010
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.