Home
Marcos Augusto Menezes Vieira Orientador: Diógenes Cecílio da
Contents
1. Figure 4 19 Different encoding strategies 16 The FSK frequency separation is programmed at FSEP 1 0 registers The RSSUIF pin is optional pin to interface to MCU An analogue RSSI signal is available at this pin The RSSI should be turned off when not in use as the RSSI circuitry consumes around 0 3mA in receive mode The RSSI is connected to an ADC which is a microcontroller built in peripheral The RSSI output ranges between 1 2 and 0 V The RF output power is programmable and controlled by the PA POW register Controlling trans mit power and measuring the RSSI has many advantages The output power can be programmed to reduce the energy that is used to communicate to relatively close neighbors It allows a sensor node to adjust the number of neighbors It minimizes interference and also can be used to determine the relative position of the sensor node Figure 4 20 illustrates the programmable output power capability The signal Table 4 13 shows some values for output powers and the typical current consumption The minimum output power is 20dBm and the current consumption is 8 6mA At 0 dBm the current consumption is 16 8 mA The maximum output power is SdBm and the current consumption is 25 4 ma 4 6 3 CC1000PP Chipcon has designed the CC1000PP plug and play module Figure 4 21 which is available in the CC1000 Development Kit to serve as a reference design and enable very quick prototyping of an RF system The CC1000PP m
2. AIO4091B CHAPTER 4 BEAN HARDWARE COMPONENTS 47 Pin Decio O oo A TMS A test mode select input that is sampled on the rising edge of the IMS Toxo seur te eal sat achine cool PAP Cote TDI TDO The output test data stream that is sampled on the falling edge of the TCK An active low asynchronous reset Table 4 10 JTAG interface pin 4 5 2 Debugging For debugging four LEDS are added to the prototype design Thus the sensor node can map sixteen states to be debugged The current consumption of the LEDS can be as high as the radio channel so it is advised to use them only for debug purpose A JTAG Joint Test Action Group IEEE1149 1 interface is used to program and debug the mi croprocessor JTAG was designed to supplement the board tester by connecting all the testpoint in the board to individual bits of a long shift register JTAG is an open standard However the JTAG standard only defines the communications protocol to use in the processor How the JTAG connects the core elements and extension are specific of a particular manufacturer Because the JTAG implementation is a serial protocol it requires few microprocessor I O pins Table 4 10 describes the pin for the IEEE 1149 1 JTAG interface A RS 232 interface could be added to the design but since we already have the JTAG interface it was not really necessary 4 5 3 Serial Number It is desired that each sensor node have a unique identificat
3. 16 byte buffer_rx QUEUE_SIZE 7 byte buffer tx QUEUE SIZE 18 byte value 20 led test 2 led on RED LED led off RED LED for is0 is8 itt led display i 2 P lt PY 25 queue test 26 queue Init amp q test buffer QUEUE SIZE n for i 0 1 lt QUEUE_SIZE i queue_Enqueue amp q_test i 28 2 3 for i 0 i lt QUEUE_SIZE 5 i value queue_Dequeue amp a test EN for i 0 i lt QUEUE SIZE 15 i queue Enqueue amp q test i QUEUE SIZE 32 3 radio amp spi test 34 35 queue Init amp g rx buffer tx QUEUE SIZE 36 queue Init amp q tx buffer rx QUEUE SIZE y rf init amp q rx amp q tx 0x89 38 rf send byte 0xF0 CHAPTER 5 BEAN API 72 and connects directly to the computer It permits to execute different programs directly from the PC using the microcontroller It is a tool to debug software in execution time A compiler and simulator are also development tools needed in embedded system design project The mspgcc is a free cost GNU License project that constructed a GCC toolchain for the Texas Instruments MSP430 family This includes the GNU C compiler GCC the assembler and linker binutils and the debugger GDB It does not include an IDE Integrated Development Environment but any text editor can be used A tool to permit to use the FET adapter to debug an execution program is being developed but it is not completely available nowadays There is no interrupt Input O
4. EP A Ny E Nie AGES Figure B 1 All BEAN Components Layout 104 APPENDIX B LAYOUT o IN TT Gor Figure B 3 BEAN Top Layout 105 Figure B 4 BEAN Components Layout 106 Appendix C API C 1 void void C 2 void byte void void void void C 3 void void Clock delay word ticks short Delay word ticks LED led init led get num leds led on byte led led off byte led led toggle byte led led display byte display value Memory EEPROM Disable void EEPROM Init void 107 APPENDIX C API 108 void EEPROM Instr byte instr byte EEPROM Get Status void void EEPROM Set Status byte s void EEPROM Write dword address byte buf word length void EEPROM_Erase dword address void OSP EEPROM Bulkerase void C 4 1 Wire unsigned char OWTouchReset void void OWWriteBit unsigned char bit unsigned char OWReadBit void void OWWriteByte unsigned char data unsigned char OWReadByte void unsigned char OWTouchByte unsigned char data void OWBlock unsigned char data unsigned int data len 4d t get lwire addr void clock t readClock void void setClock const clock ptr clock void enableClock void disableCiock unsigned char isClockEnable APPENDIX C API id void usDelay unsigned int no of usec C 5 Radio void rf init queue ptr rx queue ptr tx byte freq v
5. 7 1 A 1 B 1 B 2 B 3 B 4 D 1 D 2 D 3 BEAN Savings sra oh A wba gee EG ire deen ach deo 85 BEAN board a pr gest a SS ee au ee a ud RR Ee 87 BEAN Schematic 2 LL 103 All BEAN Components Layout 0 00 cece eeee 104 BEAN Bottom Layout 000 c cece e eee 105 BEAN Top Layout aa ssa bek bh se shes as dob avn gle eee eh tee de 105 BEAN Components Layout 106 Radio Board Bottom Layout angaa LLL LLL 111 Radio Board Top Layout aLL LLL LL 111 List of Tables 1 Or amento energ tico do BEAN L LLL XX 2 Or amento Energ tico do BEANedoMica2 xxi 3 Consumo em mA hora XXi 4 Capacidade da bateria em meses xxi 5 Economia de BEAN LL LLL XX 2 1 Sensor Node Platforms 0 0000 LLL 11 4 1 Microcontroller Comparison 00 0000 eee eee 24 4 2 MEU Port Mappings cas EE aes ie chews LL 29 42 MCU Port Mapping 0 2 0 LLL 30 4 2 MCU Port Mapping ie ie Re aoe we Sk BS Pes Sow bo ee Pps 31 4 2 MCU Port Mapping 00 0000 cece eee ee eee eee 32 4 3 Comparison of energetic sources o 33 4 4 Battery technology Comparison 000 000 cc eee ee eee 33 4 5 Radio components eee eee ee ee 41 4 6 Sensor types specifications 2 ee es 43 4 7 Sensor bus comparison ee ce eee 45 4 8 Memory Comparison 000000 cece eee eens 46 4 9 Memory Pin Description 0
6. 84 National Semiconductor Lmx3162 single chip radio transceiver datasheet 85 SensorNet Sensornet project website http www sensornet dcc ufmg br inde html March 2004 o 86 MicroStrain Microminiature Sensors V link analog input datalogging transceiver http www microstrain com 87 SoftBaugh Inc Softbaugh http www softbaugh com March 2004 88 A Spyropoulos and C Raghavendra energy efficient communications in ad hoc networks using directional antennas in Proceedings of IEEE INFOCOM 02 June 2002 89 Willian Stallings Wireless Communications and Networks Prentice Hall 2002 90 Berkeley WEBS Wireless Embedded Systems Tinyos website http www tinyos net 91 AGILENT TECHNOLOGIES 83f8851 datasheet 92 Telos Telos wireless sensor node http www moteiv com info php March 2004 93 Texas Instruments MSP430x1xx Family User s Guide http www s ti com sc psheets slau049d slau049d pdf 2004 94 Texas Instruments http wwws ti com March 2004 95 Tim Wilmshurst An introduction to the design of small scale embedded systems Palgrave 2001 BIBLIOGRAPHY 100 96 97 98 99 100 101 102 K H Torvmark Chipcon Application Note AN009 CC1000CC1050 Microcontroller interfac ing http www chipcon com October 2002 Luiz Filipe Menezes Vieira YATOS e WISDOM Plataforma de Software para Redes de Sensores Master s thesis Departamento de Ci
7. General purpose digital VO pin Green Led P1 7 TA2 General purpose digital VO pin Yellow Led P2 0 ACLK General purpose digital VO pin Dclk Radio P2 1 TAINCLK 21 I General purpose digital VO pin RTC INT RealTimeClock P2 2 CAOUTITAO 22 1 General purpose digital VO pin PWMO P2 3 CAO TAI 23 1 General purpose digital VO pin PWMI P2 4 CA1 TA2 General purpose digital VO pin 1 Wire Real Time Clock P2 5 Rosc General purpose digital VO pin External Memory Hold Ed ES BE dia ed Ed EEN DMAEO a ES E P2 7 TAO General purpose digital I O pin External Memory Write P3 0 STEO 28 General purpose digital VO pin External Memory Chip Select P3 1 SIMOOSDA 29 SPI Mode External Memory P3 2 SOMIO SPI Mode External Memory VO 29 PSSUCLKOSCL 31 SPIMode External Memory PS4UTADO 32 O UART mode nata O PSSURKDO 33 1 UART mode sensoro SS 34 1O ER P3 6 UTXDI 3 General purpose digital VO pin I2C sensor bus P3 7 URXD1 a General purpose digital I O pin I2C sensor bus General purpose digital VO pin sensor bus General purpose digital VO pin sensor bus ge General purpose digital I O pin sensor bus ES General purpose digital VO pin sensor bus General purpose digital VO pin sensor bus General purpose digital VO pin sensor bus General purpose digital VO pin sensor bus CHAPTER 4 BEAN HARDWARE COMPONENTS 31 OE
8. Table 5 1 1 Wire Operations Read time slot Reset the 1 Wire bus slave devices and ready them for a command CHAPTER 5 BEAN API 66 e ROM Function Command e Clock Function Command The transactions on the 1 Wire bus begin with an initialization sequence The initialization se quence consists of a reset pulse transmitted by the master followed by presence pulse transmitted by the slave DS2417 The presence pulse lets the master microcontroller know that the DS2417 is on the bus and is ready to operate After the master has detected the presence of a device it can issue one of the ROM function commands that the DS2417 supports All ROM function commands are eight bits long The ROM functions implemented in the driver are 27 e Read ROM This command allows the bus master to read the DS2417 8 bit family code unique 48 bit serial number and 8 bit CRC e Skip ROM This command can save time in a single drop bus system by allowing the bus master to access the clock functions without providing the 64 bit ROM code e Match ROM The match ROM command followed by a 64 bit ROM sequence allows the bus master to address a specific DS2417 on a multidrop bus Only the DS2417 that exactly matches the 64 bit ROM sequence will respond to the following clock function command After the ROM functions the master issue one of the Clock Function Commands The Clock functions implemented in the driver are e READ CLOCK The read
9. Y z e 1 1 8 4 15 4 1 To operate at 3 3 V the frequency should be 7 358Mhz BEAN was designed to use the LEXTICLK with a 32 768 Hz watch crystal and the DCO at 7 358Mhz CHAPTER 4 BEAN HARDWARE COMPONENTS 29 ads dtl s st Dica N 00 00 96 67 00 06 64 63 08 61 al Ps Pe vaAs 2 ef Ps sucx peva f 3 Ps saom Pe yas a al P8 1 8MO 1 S AB DACO PS O STE1 P6 7 A7 DAC1 SVSIN ol Pa TTBCLK Veer 7 aal Pautas XIN of Pass XOUT TCLK e col P4 4 TB4 Verner U Pastas Vasr Vengr U 11 PATEL P1 0 TACIK 12 37 Pa TB P1 1 TA0 13 P4 0 1B0 Pt atai 14 sef Pa 7 URXx01 sel PaeuTxO uu 3 Figure 4 6 Pin Designation 45 Figure 4 6 45 shows the pin designation of MSP430 Table 4 2 illustrates the MCU port map ping showing the port name port number if input or output or programable and what function the port was mapped to Table 4 2 MCU Port Mapping woe 6 Analogsuppiywohage SSCS ws el om TT wee 1 Diaso O ws e lewa TT PLO TACLK 12 1 General purpose digital VO pin enable interrupt IntO sensor bus MEMES 14 su O 6 6 P1 1 TAO General purpose digital VO pin enable interrupt Intl sensor bus P1 2 TA1 ECA P1 3 TA2 Is P1 4 SMCLK General purpose digital VO pin Red Led CHAPTER 4 BEAN HARDWARE COMPONENTS 30 SSC Table 4 2 MCU Port Mapping E P1 5 TAO General purpose digital VO pin Orange Led PL 6 TA1 18 O
10. a compact and simple event based operating system Mica2Mote is one of the most commercialized sensor nodes 22 One of the Mica2Mote advantage is the expansion bus that allows the connection of devices called sensor boards Separating the sensor boards from the radio and microcontroller allows the Mica2Mote to be generic and capable of a variety of applications The Mica Weather Board stacked to the proces sor board via the 51 pin extension connector includes temperature photoresistor barometer humidity 6 CHAPTER 2 RELATED WORK 7 and thermopile sensors Other advantage of Mote s family is that it uses a hardware component to generate an unigue identifier number Mica2Dot Figure 2 4 is a small version of Mica2 with all Mica2 capabilities except for the voltage regulator and the expansion board which has only 18 pins Many sensor boards are available such as magnetometer board battery adapter sounder ranging board and ultrasound ranging board Telos 92 Figure 2 7 is the next generation Mote platform It will use a different microcontroller and Zigbee radio channel which is an IEEE 802 15 4 radio providing only 50 meter range The radio has an internal FIFO allowing the microcontroller to sleep while receiving a packet A more complete discussion on the radio device is presented at section 4 3 Telos has an optional external memory and uses an USB component to connect to a PC For the gateway the Mica s family has the MI
11. However it is important to consider that moving between these operating modes involves a power and latency overhead The main idea behind DVS is to change the power to match the workload avoiding idle cycles DVS reduces the power consumed by a processor by lowering its operating voltage By varying the voltage along with the frequency it is possible to obtain a quadratic reduction in power consumption The problem is the fact that future workloads are non deterministic For this approach the microcon troller should permit to change its voltage supply and clock Some works have been using StrongARM SA 1100 MCU since it can vary voltage and frequency from 59MHz 0 79V to 251Mhz 1 65V BEAN is capable of using DPM technique because BEAN s MCU and radio can change their operating modes BEAN may partially apply the DVS technique since it is capable of changing its frequency only but not its supply voltage and software module will be necessary CHAPTER 6 ENERGY ISSUES 6 4 Low Power X Energy Efficiency As pointed by Srivastava 57 it is important to differentiate low power from energy efficiency Low powerisa quality of a device that consumes low energy per clock and energy efficiency is a device that consumes low energy per operation For example ATMega128L 4MHz consumes 16 5 mW and ARM Thumb 40 MHz consumes 75 mW But ATMegal28L 4MHz efficiency is 242 MIPS W spending 4nJ Instruction and ARM Thumb 40 MHz efficiency is 480 MIPS W s
12. Table 4 2 MCU Port Mapping LE CIO a P4 7 TBCLK 43 i General purpose digital VO pin sensor bus P5 0 STE1 44 I General purpose digital VO pin Chp ou Radio PS 1 SIMO1 as O SPI mode Dio Radio P5 2 SOMII 46 I SPI mode Dio Radio PS 3 UCLK1 47 O SPI mode Delk Radio 48 TO General purpose digi VO pin ale Radio 29 _ General purpose dig VO pin Pk Radio f General purpose digital VO pin Pasta Radio wor O SVSOUT P6 1 Al P6 2 A2 P6 3 A3 P6 4 A4 P6 5 A5 P6 6 A6 DACO P6 7 A7 DACI SVSIN 12 bit ADC Sensor Bus 12 bit ADC Sensor Bus C Reset input jag coneco SSS 1 resto Ju cometas MM 1 West data input jag conector i 4 a l TCK 5 7 54 7 dd Pepi VREF VeREF CHAPTER 4 BEAN HARDWARE COMPONENTS 32 DE Table 4 2 MCU Port Mapping N 8 1 mu peer osno PROUTTCLK 9 VO Output terminat of crystal oscillator EL xN sa Jr Input port for crystal oscillator XT2 s2 jo XT20UT Output terminal of crystal oscillator XT2 4 2 Power The power supply block usually consists of a battery and a dc dc converter and has the purpose to power the node since the sensor node needs energy to monitor the environment Since we are constructing a prototype we opted to use an external power supply A voltage regulator could be added whose purpose is to maintain the output voltage at a fixed value Below we
13. desligado A corrente 16 9mA ea pot ncia S1mW e Lendo a mem ria o MCU est no modo ativo a mem ria no modo de leitura e o resto desligado A corrente 44mA e a pot ncia 13 2mW e Escrita na mem ria o MCU est no modo ativo a mem ria est no modo de escrita e o resto est desligado A corrente m xima 15 4mA e a pot ncia 46 2mW e Modo de Sensoriar o MCU est no modo ativo o sensor espec fico est ligado e o resto desligado Este modo dependente de qual placa de sensores est sendo usada Breve Resumo em Portugu s XX Microcontrolador 1 8 3 6 V Down 0 luA Atoa 1 3uA Ativo 400uA R dio 2 1 3 6 V Down 0 2uA Transmitir 16 5mA Receber 9 6mA Mem ria 2 7 3 6 V Down 1044 Standby 50uA Ler 4mA Escrever 15mA Rel gio de Tempo Real 2 5 5 5 V 0 2004A Tabela 1 Or amento energ tico do BEAN Tabela 1 mostra o consumo de corrente e tens o da maioria dos componentes do BEAN Apenas para compara o o BTnode 52 gasta SOmW no modo down e 450mW no modo de comunica o Claramente BEAN mais econ mico Para comparar a plataforma duas aplica es ser o definidas No primeiro cen rio o n sensor ir coletar e transmitir dados dos sensores e repassar dados recebidos Este cen rio opera em 1 do tempo MCU est no modo ativo Neste per odo l a entrada do sensor tenta receber pacotes 3 do per odo e transmite em do per odo Ele nunca usa mem ri
14. or create a logbook It is also possible to create a real time clock with the microcontroller but it is also desired to put the microcontroller in the low power mode to save energy This solution would make the software very complex A more simple approach is to add a real time clock The DS2417 time chip 27 offers a simple solution for storing and retrieving vital time infor mation with minimal hardware It contains a unique serial number and real time clock calendar implemented as a binary counter It uses the 1 Wire protocol thus only one pin is required for communication with the device The DS2417 has clock accuracy 2 minutes per month at 25 C and uses a binary time date representation with Isecond resolution Figure 4 12 shows the DS2417 package and Table 4 11 the pin description CHAPTER 4 BEAN HARDWARE COMPONENTS 49 Ground Pin Data input output Open drain ISS Interrupt pin Open drain E 56 VDD Power input pin 2 5V to 5 5V X1 X2 Crystal pins Connections for a standard 32 768kHz quartz crystal Table 4 11 DS2417 Pin Description 4 12 4 5 5 Measuring Energy A differential in BEAN s project is that it is possible to measure the power consumption of each component radio MCU sensor bus external memory and overall We add a shunt resistor in the power supply of each component allowing the measurement of the power consumption To our knowledge this is the first sensor node prototype whi
15. the antenna is taken explicitly into account The antenna gain has as great influence to the transmitter power and sensitivity Based on the radio link budget it is possible to estimate the range Philstar TRF6901 MICRF CC2420 PH2401 103 003 Modulation OOK FSK N A FSK OOK Type ASK OOK ASK Current Receive Mode Carrier 300 to 2 45GHz 2 4GHz 868 to 800 to 2 4GHz AAA 12mA 16 5mA lt 20mA 32mA 27 5mA 17 4mA 868MHz 915MHz OdBm 3 8mA 9 6mA 27mA lt 20mA 18mA 4mA 19 7mA 868MHz 868MHz 1 8mA 2 4kbps Receiver 97dBm 110dBm 93dBm 84dBm 99dBm 95dBm 94dBm Mmm a Transmitter OdBm 20 to 7 5dBm 2dBm 9dBm 24 to pl el Operating 3V 2 1 V to 3 0 to 1 8V 1 8to 4 75Vto Voltage 3V 3 6V 5 5V 3 6V 5 5V 115 2 kbps Throughput OOK up to IMbit s Upto 30 kbps 76 8 kbit s 200 kbps ASK 115 2 kbps Table 4 5 Radio components CHAPTER 4 BEAN HARDWARE COMPONENTS 42 4 3 3 3 Wake up Radio Challenge An important challenge for the communication block unit is the design of a wakeup radio a low power radio that can receive very simple communication and in particular detects whether a communication with its own node is desired In this case it can power up the main radio that will then receive the actual communication In PCs external events such as keyboard presses or arrival of network packet result in the entire system waking u
16. the power budget of BEAN is presented CHAPTER 1 INTRODUCTION Chapter 7 presents the conclusions and new ideas for future works Chapter 2 Related Work Intellectuals solve problems geniuses prevent them Albert Einstein This section surveys the current state of the art for sensor node platforms depicting platforms components and operating systems Table 2 1 99 The majority of the components will be analyzed in this work Most of the related work uses battery as power supply unless otherwise specified At Berkeley the Smart Dust project 49 aims at developing sensor nodes of millimetric size Their focus is on miniaturization of sensor nodes so that it has the size of a dust particle Since this is a long term project the first step was the development of the Mote s family WeC Mote Figure 2 6 and CCR mote were the first two types of sensor node developed in this project CCR mote used laser as communication media and WeC Mote used radio The laser communication presented some problems that will be discussed in section 4 3 Berkeley project opted to use radio devices Then they developed Rene Mica Mote Figure 2 3 and finally to Mica2 Mote Figure 2 4 The designer claims that the advantage of the latter is its more robust radio Another advantage is that it does not need a co processor to reprogram the sensor node since Mica microcontroller needs an extra processor to help reprogram its memory Mote family uses TinyOS 37
17. 0 ee 46 4 10 JTAG interface pin LL 47 4 11 DS2417 Pin Description 27 cell 49 4 12 CC1000 Pins aires a esa AM ES do sis Bed as TE Sk hea e do GA Ed 51 4 13 Output power settings and typical current consumption at 868 Mhz 56 ix LIST OF TABLES X EE EK 4 14 Pin description of Radio Connector 0000 e ee 57 4 15 BEAN Overview ari qo SE EG geht Eon A VR 4 59 5 1 1 Wire Operations ua a BES RE EE ER DE Ah vate RA ei 65 5 2 Memory InstructionSet ee eee eee 68 5 3 Development Tools ee eee eee 73 6 1 BEAN Power Budget 82 6 2 Mica2 Power Budget 83 6 3 Power budget of BEAN and MicaZ L LL LLL 84 6 4 Computed MA 85 6 5 Months per battery Capacity aa LLL 85 7 1 Sensor Node Prices a suas gis ia A AR LLL AO 88 7 2 MSP430F161x au E Ga deme LLL 90 E l Radio Board Components 00000004 ee ee 113 E 2 Bean Components Breve Resumo da Disserta o em Portugu s 1 Introdu o Redes de Sensores Sem Fio RSSFs s o redes com grande n mero de micro sensores compactos com capacidade de comunica o sem fio chamados de n s sensores O objetivo destas redes coletar dados A disponibilidade de dispositivos sensores de baixo consumo processadores embutidos e circuitos integrados de comunica o est permitindo o projeto de n s sensores Figura 1 ilustra uma RSSF Cada ponto representa um n sensor Cada dispositivo sensoria o meio ambiente processa e transmite os dados
18. 000000 eee LLL 57 4 7 Project Decisions SERE EE rales ws aed foie ana da oh cheat hos 57 5 BEAN API 60 ETE EE E ack oh Bayt OE RO N ee 61 5 1 1 SPI Driver Lili 62 5 1 2 SWS TOER le a 64 5 1 3 LED Driver as teat boy a ke ERAS ER SE RE EE 66 5 1 4 Queue Driver ini gta Se De BE BR ER LEDE SERE ad 67 5 1 5 Memory Driver id SE EE ESE EER Ge cas ge de pends Mon cal 67 5 1 6 Radio Driver CONTENTS iv mm es a AN 5 1 7 Case Study ER Quito poa PERE ee DA GR or qu 70 5 2 Development Tools SS L 70 6 Energy issues 74 6 1 Background 4 0 is EER GR MEES 74 6 1 1 Battery behavior pasa a ho ADE DER E ER DE ER 76 6 1 2 Radio Energy Model 76 6 2 CMOS technology auaa aa SS SS 78 6 3 Energy Management Techniques gaa L LL L LL LLL 79 6 4 Low Power X Energy Efficiency oo LLL LL L LL LLL 80 AA OE NE RE ME doe ace CURAS 81 6 6 Power Budget ee N ERG Be ER le EE EE DS EER ee 81 7 Final Considerations 86 ds MEE IE EIER HOS N FO 86 dae RUMEN WORS Aa Ek ee Be RS ee EA SE age ee ER EE AS 88 7 2 1 Sensor boards oi 5 de 8 a RS a LL 88 renas Rade ss AE RE ALCA OE E RR BRA end RAE TD E SRS 89 12 BEANIAPI S oo RR ode ae ad don OS ODE Be 89 1 24 New Platforms yoo ceca ck 8 BR RE da 90 References ae A Schematic 102 B Layout 104 C API 107 RE TE AE N EN he Reh N 107 EI ED SERE Er AG n Goole dio RE A ls EE IE ee ee 107 ES MEM SS Ke a os SR DEERE SR RE Seuss ih Wks SR NE o 107 ek EES AE EIS EA
19. 100 99 5 current full operation Table 6 3 Power budget of BEAN and Mica2 Table 6 4 shows the values per components of the computed mA hour of the two scenarios in each platform The BEAN processor is more economic than the Mica2 processor Table 6 5 shows the lifetime in number of months for each scenario and platform depending on the battery type capacity In scenario 1 using a 300mA hr BEAN can collect data for almost 26 months Figure 6 4 shows quantitatively the saving percentage of BEAN compared to Mica2 in the two scenarios BEAN can consume almost 50 less than Mica2 The major savings are due to BEAN processor and external memory CHAPTER 6 ENERGY ISSUES Platform BEAN Mica BEAN Mica Logger Memory 001 OW 00545 01324 Sensor Board 0 05495 005495 0 005 0 005 Total current mA hr 0 16222 0 25485 0 15972 0 3173 Table 6 4 Computed mA hr Example Duty Cycle 1 C woo aa w an 109 1000 856 545 87 ans 25 69 1635 2605 1313 Table 6 5 Months per battery Capacity Figure 6 4 BEAN Savings Chapter 7 Final Considerations I never think of the future it comes soon enough Albert Einstein 7 1 Conclusion Wireless sensor networks present fascinating challenges for the application of distributed signal pro cessing and distributed control These systems challenge the applications of appropriate techniques t
20. S Berger Embedded Systems Design An Introduction to Processes Tools and Tech niques CMP Books 2002 6 Michael Barr Programmable Logic What s it to Ya Embedded Systems Programming June 1999 7 Michael Barr Programming Embedded Systems in C and C O Reilly 1999 8 Edoardo S Biagioni and Kent Bridges The application of remote sensor technology to assist the recovery of rare and endangered species Special Issue on Distributed Sensor Networks for the International Journal of High Performance Computing Applications 16 3 August 2002 http www pods hawaii edu Bluetooth The official bluetooth wireless info site http www bluetooth com March 2004 9 ka 92 BIBLIOGRAPHY 93 10 Mobile Info Bluetooth Mobile Info Bluetooth WebSite http www mobileinfo com Bluetooth how works htm March 2004 11 Stephen Brown and Jonathan Rose FPGA and CPLD Architectures A Tutorial IEEE Design and Test OF Computers 1996 12 M Broxton J Lifton D Seetharam and J Paradiso Pushpin Computing System Overview a Platform for Distributed Embedded Ubiquitous Sensor Networks In Pervasive Computing 2002 August 2002 13 Davide Bruni Luca Benini and Bruno Ricc System lifetime extension by battery manage ment an experimental work In Proceedings of the international conference on Compilers architecture and synthesis for embedded systems pages 232 237 2002 14 CENS CENS center for e
21. S Yuen Design of a wearable sensor badge for smart kindergarten In Proceedings of the 6th International Symposium on Wearable Computers 2002 56 M Bhardwaj and A Chandrakasan and T Garnett Upper Bounds on the Lifetime of Sensor Networks 2001 57 Mani Srivastava Sensor node platforms amp energy issues Mobicom Tutorial 2 2002 BIBLIOGRAPHY 97 58 D Maniezzo K Yao and G Mazzini Energetic trade off between computing and communi cation resource in multimedia surveillance sensor network In 4th International Workshop on Mobile and Wireless Communications Networks pages 373 376 Stockholm Sweden Septem ber 2002 59 Brian Merritt I2C Interfacing of the MSP430 to a 24xx Series EEPROM http www ti com December 2000 60 St microelectronics M25P40 Data Sheet http www st com 2002 61 Millennial Net Millennial net wireless sensor networks February 2004 http www millennial net 62 Mspgcc Gcc toolchain for msp430 http mspgec sourceforge net March 2004 63 AMPS u Adaptive Multi Domain Power Aware Sensors http www mtl mit edu research icsystems uamps March 2002 64 Anton Muehlhofer Application Report slaal03 MSP430 Flash Self Programming Technique http www ti com November 2000 65 Job Mulder Peeros preemptive eyes real time operating system Technical report University of Twente April 2003 66 National Science Foundation Report of the National
22. Vitorino Luiz Filipe Menezes Vieira Vin cius Coelho de Almeida Mar cos Augusto Menezes Vieira Ant nio Ot vio Fernandes Di genes Cecilio da Silva Jr and Claudionor Nunes Coelho Middleware for wireless sensor networks In Poster session of the Student Forum SBCCI Chip in Sampa 2003 S o Paulo Brasil September 2003 BIBLIOGRAPHY 101 103 Thiemo Voigt Hartmut Ritter and Jochen Schiller Utilizing solar power in wireless sen sor networks In The 28th Annual IEEE Conference on Local Computer Networks LCN Bonn K nigswinter Alemanha September 2003 104 A Wang and A Chandrakasan Energy efficient system partitioning for distributed wireless sensor networks May 2001 105 Erik Welsh Walt Fish and J Patrick Frantz Gnomes A testbed for low power heterogeneous wireless sensor networks http cmclab rice edu sensors May 2003 106 WINS Wireless integrated network sensors http www janet ucla edu WINS March 2004 107 Xilinx Xilinx Programmable Logic Devices FPGA amp CPLD http www xilinx com March 2004 Appendix A Schematic The BEAN project used the layout tool Eagle 29 102 APPENDIX A SCHEMATIC 103 Trio es de RIN OR du 25 e an MI 38 ENE owe 68 amp grid ON9 ONS 3 99 i ONA EIE EELEEER HERE mi NSP430F 149P SEL 920 sha u 7 ef e HI ene el la a E e Y Figure A 1 BEAN Schematic Appendix B Layout A
23. bene fits of the IEEE 802 15 4 and ZigBee standards include extended battery life over current wireless standards mesh and star network topologies and cost effectiveness Range for ZigBee products is expected to be 30 meters in typical homes compared to 10 meters for Bluetooth products without additional power amplifier 3 CHAPTER 2 RELATED WORK BTNode Ericsson ROK ATmegal28L TinyOS 64KB ae ee LAMPS LMX3162 StrongARM RedHat 512 KB Connexant StrongARM pC OS II 4MB PushPin IrDA Cygnal Bertha N A transceiver C8051F016 l in 83F8851 GNOMES Bluetooth or MSP430F149 Ed AE ec Mow TRIGO rsovsesss wa ms SE Flash 4 Mbit Fash taninos 32 KB 8 Mbit 4 Mbit Flash N A N CC2420 MSP430F149 TinyOS Nymphs CC1000 ATMEGAIZ8L MantisOS 64kB EEPROM ESB TRIO MSP430F149 8kB EEPROM NI N ATMEGA128L AT91FR4081 ARM THUMB AtMEGA 103L TMS320VC5416 Medusa TR1000 1 MB Flash MK 2 IBadge TR1000 Bluetooth ROK101007 i o A A A BRA MSP430F169 YATOS 9 4M bit Table 2 1 Sensor Node Platforms 11 CHAPTER 2 RELATED WORK 12 Figure 2 1 EYES Figure 2 2 Medusa2 Figure 2 8 uamp Figure 2 7 Telos CHAPTER 2 RELATED WORK 13 Figure 2 11 Nymph Figure 2 13 Spec Figure 2 12 ESB Chapter 3 Sensor Node Architecture Hardware is the part of a computer system that can be kicked and s
24. caso especial de sistema embutido e se beneficiar do grande conhecimento j existente Um estudo comparativo xi Breve Resumo em Portugu s xii Area Monitorada N Sensor Esta o Base Figura 1 Rede de Sensores Sem Fio de componentes de prateleira como microcontroladores tipos de bateria componentes de r dio que s o muito importantes para o projeto do sistema apresentado O foco do projeto em componentes individuais e n o em detalhes a n vel de subsistemas Escolha do hardware assim como as solug es de software s o apresentadas neste trabalho Uma API application programming interface bem definida que pode ser usada em outros projetos tamb m apresentada Um n sensor composto de unidade de pot ncia unidade de processamento unidade de sensores e unidade de comunica o A unidade de pot ncia prov energia para o funcionamento do n sensor A unidade de processamento respons vel por coletar e processar sinais capturados dos sensores e transmiti los para a rede Sensores s o dispositivos que produzem uma resposta mensur vel dado uma mudan a em uma condi o f sica como temperatura e press o O canal de comunica o sem fio prov um meio para transmitir sinais dos sensores para dentro da rede ou para o mundo exterior e tamb m para estabelecer e manter a RSSF O consumo de energia e ser a primeira m trica no projeto de um n sensor Enquanto que existe a Lei de Moore qu
25. configured to operate from either the watch CHAPTER 4 BEAN HARDWARE COMPONENTS 28 EA f MHz Supply voltage range during fiash memory prog Ing Figure 4 5 Frequency versus Supply Voltage 44 crystal or the DCO depending on peripheral requirements SMCLK is software selectable for individual peripheral modules The clock distribution and divider system is provided to fine tune the individual clock require ments All basic clock module configurations are under software control The Basic Clock Module includes two or three clock sources e LFXTICLK low frequency high frequency clock source One oscillator that can be used with low frequency watch crystals standard crystals resonators or external clock sources e XT2CLK high frequency clock source This optional high frequency oscillator can also use standard crystals resonators or external clock sources in the 450 kHz to 8 MHz range e DCOCLK clock source The digitally controlled oscillator DCO is an integrated RC type oscillator in the Basic Clock Module The DCO frequency can be tuned by software Using the DCO it is possible to control the operating frequency The operating frequency depends on the supply voltage as show in Figure 4 5 44 The MCU operates between 1 8 and 3 6 V To program the MCU the supply voltage should be above 2 7 V We can model the graph using the line equation Let s y be the frequency MHz and x the supply voltage V
26. control register UCTL selects the required mode e SYNC 0 UART asynchronous mode selected e SYNC 1 SPI synchronous mode selected This module supports three pin and four pin SPI operations via SOMI SIMO UCLK and STE ports We configured to operate on three pin SPI mode The MCU can be the slave or master Fig ure 5 2 illustrates the MSP430 as the master of the communication This configuration is used to communicate to the external memory Figure 5 3 illustrates the MSP430 as the slave of the commu nication This configuration is used to communicate with the radio The USART peripheral module has separate shift registers for receive URXBUF and transmit UTXBUF CHAPTER 5 BEAN API 64 SPI Receive Buffer Data Shift Register DSR gt Receive Shin Register MSB tsa MSE 158 SCLK COMMON SPI MSP430 USART Figure 5 3 MSP430 USART as Slave in Three Pin or Four Pin Configuration 93 5 1 2 1 Wire Driver 1 Wire is an interface protocol that supplies control data and power over a single wire connection It was projected to simplify designs Although only a single wire is used a 1 wire device may have a variety of built in functions such as identification sensor control or memory The 1 Wire protocol was implemented via software The system requirements for proper Operation of the software solution are e The communication port is bidirectional its output is open drain and there is a weak pull up on the line This i
27. data rate of 200 kbps It also has the possibility to measure RSSI Its main disadvantage is the high energy consumption to transmit 40mA CHAPTER 4 BEAN HARDWARE COMPONENTS 40 Micrel MICRF receiver family comprises 418 to 433 MHz and 900 MHz band devices Its ad vantage is that the architecture eliminates the need for manual tuning of each unit You can set the receiver to periodically wake up and check for incoming signals Another option is to use a radio module by Conexant Systems Inc The RDSSS9M Digital Cord less Telephone DCT chipset uses a 900 MHz spread spectrum RF communications link The chipset has an embedded 65C02 microcontroller that performs all control and monitoring functions required for direct sequence spread spectrum communication 12 chips bit as well as data exchange with the processor module The radio operates on one of 40 channels in the ISM frequency band selectable by the controller The RF portion of the radio is capable of operating at multiple transmit power levels between 1 and 100 mW enabling the use of power optimized communication algorithms CC2420 is the newest Chipcon product The CC2420 is a single chip 2 4 GHz IEEE 802 15 4 compliant RF transceiver designed for low power and low voltage wireless applications Its antenna is of only 2 9 cm It has many advantages that facilitate the channel design It has a true SPI bus to interface the microcontroller an internal FIFO is the slave of the communication
28. discuss some idea that can be used in future works It might be possible to extend lifetime of a sensor node by extracting energy from the environment for example light vibration and RF Amirtharajah et al have demonstrated a MEMS system that extracts electric energy from vibrations 4 Nowadays CMOS transistors and solar cell s arrays can be co fabricated The Icarus process 40 combines solar cells high voltage CMOS and SOI Silicon on insulator MEMS structures on the same die With the addition of isolation trenches devices and MEMS structures can be electrically isolated and solar cells can be stacked to yield high voltages Table 4 3 74 shows a comparison of energy sources based on a combination of published studies theory and experiments Continuum Control Corp 21 has launched the iPower energy harvesters These devices extract electric energy from mechanical vibrations motion or impact and store it for use by wireless sensors or other electronic devices 4 2 1 Batteries Batteries supply energy to the sensor node It is important to choose the battery type since it can affect the design of a sensor node Battery Protection Circuit to avoid the overcharge overdischarge CHAPTER 4 BEAN HARDWARE COMPONENTS 33 Power Density Solar outdoors 15mW cm direct sun IN wEREER a Solar indoors 0 006mW cm standard office desk aa N E 0 01 0 1mW em Acoustic noise 3E 6mW cm a 75dB EE SEWE 1 8mW shoe inserts 80m
29. e BS 16 eo 27 Frequency versus Supply Voltage 44 nna LaL 28 Pin Designation SL 29 Different modulation for RF 48 2 00 0 aaa LLL LL 36 VO phases of O QPSK 18 37 Ratio of receiver packet per distance for TR1000 and CC1000 components 47 38 Rayleigh Ladies 39 M25P40 60 oo EE RE OR N AE A 46 PSLT BT tat EE ER EE N OE ERG 48 A new methodology to evaluate on the fly the power consumption of WSN algorithms 49 CC1000 Application Circuit 16 lccccccccll LLL LLL 50 CC1000 MCU Hardware Interface DO Sag OR FEE IE Da 51 SPI Configuration Interface 96 LLL LLL 52 SPI data Interface 96 ee LL LL 53 Connection MCU USART Modules to other BEAN Components 54 Different encoding strategies 16 o o 55 Programmable output power allows changing radio PANO id als te tls as ccs 56 CC1000PP 17 n eken de Me Gute SE DE ose dees hd othe 56 BRAIN APL amp te iS En A a SEE Ee oes 61 MSP430 USART as Master External Device With SPI as Slave 93 63 MSP430 USART as Slave in Three Pin or Four Pin Configuration 93 64 1 Wire waveforms A 65 MT TEE E EER OR OR EE ae 67 Read Data Bytes READ Instruction Sequence and Data Out Sequence 60 69 Radio driver using Ps 69 Radio Driver using State Machine 19 0 0 cece ee 70 Current per unit time of a set of tasks SS 75 Radio Model ssa de le ise SERS Gruhn L 77 LIST OF FIGURES viii o mmol NM 6 4
30. modulation has the advantage of allowing the trans mitter to idle during the transmission of a zero therefore conserving power The disadvantage of OOK modulation arises in the presence of an undesired signal The data at FSK modulation is transmitted using different tones FSK modulation is commonly believed to perform better in the presence of interfering signals However it is usually more difficult and expensive to implement Both OOK and ASK receivers require an adaptable threshold or an automatic gain control AGC in order to ensure an optimal threshold setting The FSK modulation does not usually require this because it incorporates a limiter that keeps the signal envelope amplitude constant over the useful dynamic range 48 Figure 4 7 48 shows the different modulations discussed Baseband unipolar Baseband polar OOK signal FSK signal Figure 4 7 Different modulation for RF 48 GFSK is similar to FSK but uses a Gaussian filter Ina GFSK modulator everything is the same as a FSK modulator except before the pulses go into the FSK modulator it is passed through a Gaussian filter to make the pulse smoother limiting its spectral width 15 The purpose of the GFSK is to make a more bandwidth efficient system 20 CHAPTER 4 BEAN HARDWARE COMPONENTS 37 T gt E N phase p D D p D b wm PROL 2T Figure 4 8 VO phases of O QPSK 18 The modulation format O QPSK is shaped as a half sine transmitted
31. ncia da Computa o Universidade Federal de Minas Gerais Belo Horizonte MG Brasil April 2004 Luiz Filipe Menezes Vieira Marcos Augusto Menezes Vieira Linnyer Beatrys Ruiz Antonio Alfredo Ferreira Loureiro Ant nio Ot vio Fernandes Di genes Cecilio da Silva Jr and Jos Marcos S Nogueira Efficient incremental sensor network deployment algorithm In XXI Simp sio Brasileiro de Redes de Computadores SBRC Gramado RS Brasil May 2004 Marcos Augusto Menezes Vieira Di genes Cecilio da Silva Jr and Claudionor Nunes Coelho Survey on Wireless Sensor Network Devices IEEE International Conference on Emerging Technologies and Factory Automation ETFA 2003 September 2003 Marcos Augusto Menezes Vieira Luiz Filipe Menezes Vieira Antonio Alfredo Ferreira Loureiro Ant nio Ot vio Fernandes Linnyer Beatrys Ruiz and Di genes Cecilio da Silva Jr and Jos Marcos S Nogueira Como obter o mapa de energia em rede de sensores sem fio uma abordagem tolerante a falhas In Workshop Comunicacao Sem Fio S o Lourengo MG October 2003 Marcos Augusto Menezes Vieira Luiz Filipe Menezes Vieira Antonio Alfredo Ferreira Loureiro Ant nio Ot vio Fernandes Linnyer Beatrys Ruiz and Di genes Cecilio da Silva Jr and Jos Marcos S Nogueira Scheduling nodes in wireless sensor network A voronoi approach In The 28th Annual IEEE Conference on Local Computer Networks LCN Bonn K nigswinter Alemanha September 2003 Breno Augusto Dias
32. necessary to send a DP instruction The DP instruction drains from the memory a current of 4mA and it is 1 byte long After this there is a necessary tap time that is 3us and the memory current is at standby mode Then let t be the time of inactive at down mode The memory current at down mode is 104A To go to active mode again it is necessary to send a RES instruction which is 1 byte long After this there is a waiting time of tre time of 3us Figure 6 3 shows the current consumption of both processes We will assume the transmission is at IMHz per byte 8MHz bit The time relation is t 2 transmission byte tdpttres t Thus t 8u t The energy spent at down mode will be Eam 4MA Lus 3us SOLuA t 1OLA 4MA 1 us 3 us S0uA V 8000 3004 10t u V It is better to go to down mode when the energy spent at down mode is lower than the energy spent at standby mode SOu t V gt 8000 300u 10t u V Using the time equation t 200 s Thus it is better to go to down mode if the memory will be inactive for at least 200s 6 6 Power Budget In this section we discuss and analyze the power budget for BEAN and compare to Mica2 platform Table 6 1 shows the current consumption and voltage of the major components of BEAN The values are taken from datasheets and are estimated Assuming the BEAN operates on 3V the energy budget can be obtained using the formula pre sented at section 6 1 BEAN will be usually in one of the following stat
33. objetivo destas redes coletar dados A disponibilidade de dispositivos sensores de baixo consumo processadores embutidos e circuitos integrados de comunica o est permitindo o projeto de n s sensores Figura 1 ilustra uma RSSF Cada ponto representa um n sensor Cada dispositivo sensoria o meio ambiente processa e transmite os dados para um observador externo chamado de esta o base Rede de Sensores Sem Fio tem o potencial para v rias aplica es e algumas j s o realidade Por exemplo em uma metr pole para monitorar tr fego e condi es das ruas em engenharia para monitorar pontes e estruturas de pr dios em florestas para detec o de fogo 81 na agricultura de precis o em servi os de recupera o de desastres em servi os de manuten o como usinas nucleares e na biomedicina 83 O objetivo deste trabalho projetar uma plataforma computacional que inclui componentes de hardware e software que servir de prot tipo para rede de sensores sem fio Este prot tipo de n sensor ser chamado Brazilian Energy Efficient Architectural Node BEAN Neste documento as considera es de projeto e escolha de componentes para o prot tipo de RSSF ser o discutidas Um estudo dos n s sensores atuais apresentado investigando e analisando alguns dos desafios de arquitetura impostos a estes dispositivos incluindo uma pesquisa das plataformas dos n s sensores e t cnicas de ger ncia de energia RSSF pode ser vista como um
34. of a sensor node prototype for the SEN SORNET project 85 and also that there is no computational platform for wireless sensor network in the Brazilian national market since it is a recent research topic Finally it is very important the development of this technology having the complete knowledge from the hardware to the software As stated by NSF 66 WSN is one of the greatest networking research challenges present nowadays 1 4 Text Organization This work is organized in seven chapters Chapter 2 discusses related work for sensor node platforms depicting platforms components operating systems and their contributions Chapter 3 presents the system architecture of a generic sensor node prototype pointing to BEAN architecture Chapter 4 comments about hardware components used by BEAN A comparative study of COTS such as microcontrollers battery types and radio devices for system design is presented This chapter also discuss the project decisions for BEAN Chapter 5 discusses the software components called BEAN API It includes a set of device drivers to control and configure the hardware components Chapter 6 discusses energy issues presenting a basic version of an energy model for a sensor node We discuss the difference between power and energy between low power and energy efficiency and two power saving schemes We also discuss the minimum required time for the memory device to go to the power down mode saving energy Finally
35. paci ncia pelas id ias e pelos ensinamentos que sempre me passou Ao Prof Antonio Ot vio pelo apoio desde o in cio quando eu ainda era aluno de gradua o pela amizade e considera o Aos professores e funcion rios do DCC em especial aos professores A Alfredo Claudionor Linnyer Newton M rio pelos ensinamentos e sugest es que contribu ram para a minha forma o Aos meus amigos de gradua o da Turma 98 membros da Powertec amigos do Laborat rio Engetron e LECOM especialmente Gustavo gms Alex Cadu Romeo Daniela Breno Vitorino Vin cius Makish Otaviano Ajmendes Valdeci Felipe Maia pela amizade equipe de desenvolvimento C sar e Rangel vitoriosa equipe ACM pelo esfor o e dedica o Aos membros do OSV e Bier e organizadores do lbum de figurinhas pelos momentos de lazer A todos os outros amigos como o Nacif Ana Tom Rafael Bruno M rcia Lidia Ao PNM Programa Nacional de Microeletr nica processo 13 3555 2002 0 pela bolsa de es tudos Texas Instruments do Brasil pelo kit de desenvolvimento e amostras e ao projeto Sensornet 55 2111 02 3 pelo apoio financeiro parcial Finalmente Ci ncia e ao glorioso Clube Atl tico Mineiro Contents List of Figures v List of Tables viii Breve Resumo da Disserta o em Portugu s xi 1 Introduction 1 1 1 OE RIES N EE LLL 2 1 2 Embedded System si 402s dah Qund ace 4 6 L EE 3 1 3 Objective and Motivation SS 3 1 4 Te
36. para um observador externo chamado de esta o base Rede de Sensores Sem Fio tem o potencial para v rias aplica es e algumas j s o realidade por exemplo em uma metr pole para monitorar tr fego e condi es das ruas em engenharia para monitorar pontes e estruturas de pr dios em florestas para detec o de fogo 81 na agricultura de precis o em servi os de recupera o de desastres em servi os de manuten o como usinas nucleares e na biomedicina 83 O objetivo deste trabalho projetar uma plataforma computacional que inclui componentes de hardware e software que servir de prot tipo para rede de sensores sem fio Este prot tipo de n sensor ser chamado Brazilian Energy Efficient Architectural Node BEAN Neste documento as considera es de projeto e escolha de componentes para o prot tipo de RSSF ser o discutidas Um estudo dos n s sensores atuais apresentado investigando e analisando alguns dos desafios de arquitetura impostos a estes dispositivos incluindo uma pesquisa das plataformas dos n s sensores e t cnicas de ger ncia de energia RSSF pode ser vista como um caso especial de sistema embutido e se beneficiar do grande conhecimento j existente Um estudo comparativo xi Breve Resumo da Disserta o em Portugu s 1 Introdu o Redes de Sensores Sem Fio RSSFs s o redes com grande n mero de micro sensores compactos com capacidade de comunica o sem fio chamados de n s sensores O
37. structural analysis and GPS for coordinating sensors with location It also has a sensor bus that allows for additional application specific sensor boards The RS232 interface is used to communicate with a computer It can use Ethernet via its HOBBIT board A communications header allows for CHAPTER 2 RELATED WORK 7 Tn and thermopile sensors Other advantage of Mote s family is that it uses a hardware component to generate an unique identifier number Mica2Dot Figure 2 4 is a small version of Mica2 with all Mica2 capabilities except for the voltage regulator and the expansion board which has only 18 pins Many sensor boards are available such as magnetometer board battery adapter sounder ranging board and ultrasound ranging board Telos 92 Figure 2 7 is the next generation Mote platform It will use a different microcontroller and Zigbee radio channel which is an IEEE 802 15 4 radio providing only 50 meter range The radio has an internal FIFO allowing the microcontroller to sleep while receiving a packet A more complete discussion on the radio device is presented at section 4 3 Telos has an optional external memory and uses an USB component to connect to a PC For the gateway the Mica s family has the MIB600CA an Ethernet Interface Board 22 The MIB600CA provides Ethernet 10 100 Base T connectivity to the MICA2 family of motes for com munication and in system programming The MIB600CA allows remote access to sensor network d
38. up to 76 8 kbit s It has an internal bit synchronizer that simplifies the design of a high speed radio link with the microcontroller In power down mode the CC1000 current consumption is 0 2 uA Another great advantage is that it is possible to control the output power thus specifying the desired range of the radio saving energy and decreasing interference problems It is also possible to measure the received signal power with the RSSI signal hence it is possible to have an idea how distance the sensor nodes are from each other At the sensor unit BEAN is generic since it has a well defined expansion bus being capable of a large number of applications For the near future BEAN will use the temperature sensor TMP37 26 to develop an application very similar to the Sensornet project experiment BEAN external memory should be energy efficient not too slow and operate on low power mode BEAN uses as an external memory the ST M25P40 a serial flash memory that is fast and can be switched to a low power mode when it is not used BEAN has an unique serial number and a Real time Clock that allows the microcontroller to go to the low power mode without loosing time control The Dallas Semiconductor DS2417 is used BEAN has shunt resistors in the power supply track for each component to measure the power consumption radio MCU sensor bus external memory and overall BEAN was designed to use the MCU clock module LEXTICLK with a 32 768 Hz crystal a
39. 1 nJ por instru o Al m de energia outras vantagens do BEAN s o pre o e a n o necessidade de um dispositivo dedicado BEAN gen rico porque ele possui um barramento bem definido sendo capaz de um grande n mero de aplica es necess rio apenas uma placa de sensores espec fica para a aplica o BEAN tamb m suporta o estudo de outros tipos de r dio porque BEAN tem um barramento de r dio bem definido Este projeto tamb m inclui o desenvolvimento de componentes de software a BEAN API Um modelo b sico de energia para n sensor e o or amento energ tico do BEAN tamb m s o discutidos Chapter 1 Introduction The Universe is written in mathematical language Galileo Galilei Wireless sensor network WSN is composed of hundreds or thousands of autonomous and com pact devices called sensor nodes The objective of this network is to collect data The availability of integrated low power sensing devices embedded processors wireless communication kits and power equipment are enabling the design of sensor nodes Figure 1 1 illustrates a WSN Each dot represents a sensor node Each device senses the environment processes and usually transmits the data to an external observer called base station Wireless Sensor Network has the potential for many applications and some already exists for ex ample in a large metropolis to monitor traffic density and road conditions in engineering to monitor bridges 50 and buildings
40. 5 6 Read Data Bytes READ Instruction Sequence and Data Out Sequence 60 CC1000 RADIO SPI Port Registers INTERFACE Figure 5 7 Radio driver using SPI by driving Chip Select S High Chip Select S can be driven High at any time during data output Any Read Data Bytes READ instruction while an Erase Program or Write cycle is in progress is rejected without having any effects on the cycle that is in progress 5 1 6 Radio Driver The radio driver configures the radio properties like output power frequency and physical layer configuration and it also controls the transmission and reception of packets The radio driver defines two queues one for the transmit buffer and one for the receive buffer The hardware supports two options to communicate to the radio using bit banging or SPI The advantage of SPI is that it is faster and allows the microcontroller to do other tasks The transmission is at byte level as illustrated in figure 5 7 For example if transmitting at 76Kbps the bit banging mechanism uses the microcontroller every 13us while in the SPI mode it is about 105 us The drawback is that it needs a more complex initial configuration For now the radio is using bit banging with a state machine Figure 5 8 as suggested in 19 However for the near future an SPI module will be used CHAPTER 5 BEAN API 70 RX Buffer si empty Pushbutton pressed Le Finshed sending data in buffer Valid
41. 7 ACM Press 2000 BIBLIOGRAPHY 96 47 Jaein Jeong DOT3 radio stack Network Embedded Systems Technology Winter Retreat 2003 48 John Anthes OOK ASK and FSK Modulation in the Presence of an Interfering signal Appli cation Report for RF Monolithics March 2004 49 Kahan J M and Pister K S J Next Century Challenges Mobile Networking for Smart Dust Technical report University of California Berkeley Dept of Electrical Engineering and Computer Science 2001 50 Sukun Kim Structural health monitoring of the golden gate bridge http www cs berkeley edu binetude ggb January 2004 51 John Lach David Evans Jon McCune and Jason Brandon Power efficient adaptable wireless sensor networks Military and Aerospace Programmable Logic Devices MAPLD Interna tional Conference September 2003 52 Martin Leopold Mads Bondo Dydensborg and Philippe Bonnet Bluetooth and Sensor Net works a Reality Check In Proceedings of the first international conference on Embedded networked sensor systems pages 103 113 2003 53 Joshua Lifton Deva Seetharam Margo Seltzer and Joseph Paradiso Bertha The os for push pin computers Technical report MIT Media Lab May 2002 54 Linnyer Beatrys Ruiz MANNA Uma Arquitetura para o Gerenciamento de Redes de Sensores Sem Fio Ph d thesis Universidade Federal de Minas Gerais December 2003 55 I Locher S Park M B Srivastava A Chen R R Muntz and
42. AN is very energy efficient since BEAN s MCU is one of the most energy efficiency microcontroller spending about 0 361 nJ instruction CHAPTER 7 FINAL CONSIDERATIONS 88 CHAPTER 7 FINAL ONDER SS ae ss OS Sensor Node Price FOB veer 22004 Mica2 190 00 130 00 135 00 Millennial 500 00 70 00 Table 7 1 Sensor Node Prices We do not compare the size of the sensor nodes because BEAN is a prototype and uses a two layer PCB while Mica2 uses four layer PCB Besides energy another advantage of BEAN is the price The total price of BEAN includes the components and PCB lt is overestimate since some samples were used Table 7 1 contains the current FOB price for each sensor node The price does not include the antenna and importation costs Finally BEAN does not need a gateway node to be programmed BEAN is generic since it has a well defined expansion bus being capable of a great number of applications It just needs a specific sensor board to fit many applications BEAN also supports the study of other radio devices since it has a well defined radio bus This project also includes the development of software components the BEAN API It is com posed of an application programming interface API and the components that implement it The API is a set of functionalities to control configure and provide services of the hardware components through a well define interface We also presented a basic
43. B600CA an Ethernet Interface Board 22 The MIB600CA provides Ethernet 10 100 Base T connectivity to the MICA2 family of motes for com munication and in system programming The MIB600CA allows remote access to sensor network data via TCP IP Berkeley project also constructed Spec Mode Figure 2 13 a general purpose sensor node that is customized for miniaturization achieving reduced size 38 The PicoRadio project 73 at Berkeley Wireless Research Center is another project at Berkeley The objective is to develop a low cost and low power sensor node Its focus is on the radio hardware link and network layer stack Medusa Mk 2 14 Figure 2 2 and iBadge 55 are sensor nodes from UCLA These sensor nodes use more than one processor and iBagde also include a Bluetooth chip Mk 2 is also equipped with a set of ultrasound transceivers that are used to perform high accuracy distance measurements between adjacent nodes iBadge includes a speech processing unit a microphone a localization unit an environment sensing unit with humidity light pressure temperature sensors and a orientation unit composed of accelerometer and magnetic sensors iBadge was used in a smart Kindergarten to create a development problem saving environment for early childhood education Generalized Network Of Miniature Environmental Sensor GNOMES is a project from Rice University 105 Its MCU is the MSP430F149 Texas Instruments It has an accelerometer expansion for
44. E AE EA ME id CHAPTER 2 RELATED WORK 10 me ee ee ee ee es CC1020 radio It also has a temperature sensor and 2 Axis accelerometer MicroStrain 86 has launched one of the newest sensor node It has a 8 bit microcontroller Flash EEPROM for sensor data logging ADC of 16 bit resolution and a radio transceiver But the major contribution is an energy harvester MicroStrain is developing an energy harvesting scherne based on storing cyclic strain energy by rectifying piezoelectric fiber output into a capacitor bank When the capacitor voltage reaches a preset threshold power is transferred to an integrated wireless sensor node 77 The IEEE 802 15 4 42 specification is a cost effective low data rate lt 250 kbps 2 4 GHz and 868 928 MHz wireless technology designed for short range and personal area networking Target markets for the IEEE 802 15 4 Standard include industrial control and networking home automation and control inventory management human interface devices as well as wireless sensor networks The IEEE 802 15 4 Standard is the basis of an application and network layer protocol known as ZigBee 3 The ZigBee Alliance is an association of companies working together to create software inter operability certification and testing for IEEE 802 15 4 systems The IEEE 802 15 4 Standard details the Physical Layer PHY and Medium Access Control MAC specifications and offers the building blocks for different types of networking Key
45. Great Duck Island Project 71 some issues about sensors were learned Some of the readings from the Mica Weather Board were out of range The solutions were to use all digital calibrated sensors increase sensor accuracy and reduce startup time It has also have to decouple the entire circuit from the power lines 4 4 1 Sensor Bus It was desirable to construct a sensor node prototype that is easily expandable to support a variety of applications The solution is to define a sensor bus The expansion connector sensor bus provides a user interface for additional sensor boards Hence to fit an application it is only necessary to construct a specific sensor board and connect it to the expansion connector of BEAN For example for the localization application a sensor board with ultrasound for a weather station a sensor board with temperature light and humidity sensors to collect vibration data a sensor board with accelerometers The BEAN sensor bus should be small but also complete and generic The sensor bus signals can CHAPTER 4 BEAN HARDWARE COMPONENTS 44 be classified in the following types e power power type that includes digital and analog power and ground e interrupt interrupt signals are capable of generating interrupt at the MCU e UART USART interface include the Rx and Tx signals and also the clock signal for the USART interface e PW digital I O that control power of peripheral sensors ADC analog inputs for
46. March 2004 35 W Heinzelman A Chandrakasan and H Balakrishnan Energy efficient communication pro tocol for wireless microsensor networks In Proccedings of the Hawaii Conference on System Sciences January 2000 36 Hi Tech Software Hi Tide C Compiler http www ht soft com March 2004 37 Jason Hill A software architecture supporting networked sensors Master s thesis University of California Berkeley December 2000 38 Jason Hill Spec Node http www cs berkeley edu jhill spec index htm March 2004 j 39 S Hollar Cots dust Master s thesis University of California at Berkeley 2000 40 S Hollar A Flynn C Bellew and K S J Pister Solar powered 10mg silicon robot January 2003 41 IAR Iar system http www iar com March 2004 42 IEEE Standards Association IEEE Standards http standards ieee org March 2004 43 Imagecraft C embedded Development Tools Icc430 http www imagecraft com software March 2004 44 Texas Instruments MSP430 Data Sheet http wwws ti com sc psheets slas272c slas272c pdf 2001 45 Texas Instruments Mixed Signal Microcontroller Rev E http www s ti com sc ds msp130 169 pdf 2003 46 Chalermek Intanagonwiwat Ramesh Govindan and Deborah Estrin Directed diffusion a scalable and robust communication paradigm for sensor networks In Proceedings of the 6th annual international conference on Mobile computing and networking pages 56 6
47. Marcos Augusto Menezes Vieira Orientador Di genes Cec lio da Silva BEAN Uma Plataforma Computacional para Rede de Sensores Sem Fio Disserta o apresentada ao Curso de P s gradua o em Ci ncia da Computa o da Universidade Federal de Minas Gerais como requisito parcial para a obten o do grau de Mestre em Ci ncia da Computa o Belo Horizonte 15 de Abril de 2004 UNIVERSIDADE FEDERAL DE MINAS GERAIS FOLHA DE APROVACAO Plataforma Computacional para Rede de Sensores Sem Fio MARCOS AUGUSTO MENEZES VIEIRA Disserta o defendida e aprovada pela banca examinadora constitu da pelos Senhores Departamento dg Ci ncia da Computa o UFMG Prof CLAUDIONOR JOSE NUNES COELHO JUNIOR Departamento de Ci ncia da Computa o UFMG AJA Profa Bufo BED Ys Ruiz Departamento de Inform tica PUC PR Belo Horizonte 15 de abril de 2004 Resumo Redes de Sensores Sem Fio RSSFs s o redes com grande n mero de micro sensores compactos com capacidade de comunica o sem fio chamados de n s sensores Uma RSSF tem o potencial para um grande n mero de aplica es que varia desde coletar dados do meio ambiente at aplica es milita res O objetivo deste trabalho projetar uma plataforma computacional chamada BEAN Brazilian Energy Efficient Architectural Node que inclui componentes de hardware e software e servir de prot tipo para uma RSSF Desafios na arquitetura como poder computacional
48. N 108 C 5 Radio CONTENTS v _a_ __ _ _ __ Q ___Z NV CA E A KAREE AS E ek ele eat O Dea 109 SES OE a OR SE Dia de Be e o chk he 110 Radio Board 111 Bill of Materials 113 Glossary 115 List of Figures 1 1 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 2 9 2 10 2 11 2 12 2 13 3 1 3 2 4 1 4 2 A E ta asa xii Diagrama de Blocos do Prot tipodoN6Sensor xiv POPE ae athe SG bea A Sra Do a Bar REA ad NE cl caia ate ES xviii Wireless sensor network naaa LL 2 BYES ea edee TE a HE KO a A a a 12 MOIS ap uuni HE BA wl OE ER N EN ONE oa 12 ie ER DE ED ORE ER E Od os de dd le eat 12 Mical and Mica2 dot ee eee 12 PUSHIN ie ia AE De ED Be DE Boa GE SEG 12 Ee TE ER RA ee i EE OO N N 12 TIGE N ek oa ae Saved ie ei EE ES Ee BR SO a ts 12 HAMD DA a ER A A gh ae ed A Sige PS A e a 12 UNS AAA A A a a HE a 13 BTn de si E RN 13 A 13 PODE EN RE EO SE OER OE 13 ET TE EE N ON N EE N N 13 Block Diagram of Sensor Node Prototype SS 15 System architecture and challenges of a sensor node nonan ana 19 Typical Current Consumption vs Operation Modes 93 25 Register Overview Aa ma gs eN ed Deed be BR Hh ab ae eens 26 vi LIST OF FIGURES 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 4 12 4 13 4 14 4 15 4 16 4 17 4 18 4 19 4 20 4 21 5 1 5 2 5 3 5 4 5 5 5 6 5 7 5 8 6 1 6 2 6 3 vii Low Power CPU 44 onau LL 26 Functional block diagram of MSP430xx16x lA o EK
49. ND CAPACITOR TANT 3 3UF 35V 20 SMD__ 049 CAP 033UF 50V CERAMIC X7R 0603 478 1159 1 ND_ CAPCERM4 7PFSOVNPO0603 0209 _478 1161 1 ND_ ___ CAP CERM 6 8PF 50V NPO 0603 0 209 Em E SS ES EE Single ChiptansceiverCCIOO 5 EES ss N E E A 226714 nd Radio CONNECTOR HEADER VERT 100 10POS 30AU EE AN Table E 1 Radio Board Components 113 APPENDIX E BILL OF MATERIALS 114 E TO e E e A BEAN board Digikey number Description Price unit ES id NN IF n receptacle connector Sensor h2161 nd CONN RECEPT 31POS 1MM SMD TIN EN ANNO Sensor h2173 nd CONN HEADER 31POS 1MM SMD TIN 2 260 sk ia ES 2 160 Memory 497 1624 1 ND IC SRL FLASH 4MBIT 3 6V 8 SOIC using CAPAS CONN HEADER 2POS 100 VERT TIN E wman CONN TERM FEMALE 22 30AWGTIN 0087 DT wminda CONN HOUSING POS 100 MI PRESS 0190 C AND SHUNTLPW HANDLE2POS30AU 0o16 ATT DE APRA CS 1000 pec2277et nd CAP 1UF25V CERAMIC X7R 0603 0046 lu po2io6ctnd CAPACITOR IOUF IOV TEH SER SMD 110 AO UNA NN EE 100 PS TI T00GCT ND RES 100 OHM 10W 5 0603 MP 008 31TATOGCEND 311 100GCTE ND Resistor shunt RROSQIODCT nd RES 10 OHM I 16W 5 0603SMD 0081 ETNIA ee ee ee ee ee REA DR EE SS EE EE O Diodo Schotky bats fscend DIODE SCHOTTKY 30V 200MASOT23 0181 reset button SW400 ND_ SWITCHTACT MMMOM100GF 0200 EET AE TSE ss Led Green 404 1021 1 ND LEDGREENOS0SSMD_ 0 165 Ma EE EE EE RE T
50. PLDs such as CoolRunner II 107 that consumes as low as 144A standby current their consump tion is not as low as a sensor node should be For example CoolRunner II operating at 1 8V and 20MHz needs a current supply of 17 22 mA WSNs are dependable on the application scenario The architecture of CPLD is not very flexible being applicable for small application and is not capable of implementing a CPU For a specific application which needs a complex controller CPLD may be an option An Field Programmable Gate Array FPGA consists of an array of logic blocks surrounded by programmable VO blocks and connected with programmable interconnect 6 FPGAs offer narrower logic resources than CPLDs but offer a higher ratio of flip flops 11 Because of all the extra flip flops reaching millions of gates the architecture of an FPGA is much more flexible than that of a CPLD 11 Nowadays FPGA presents some major disadvantages First their consumption is not as low as a sensor node should be Another disadvantage is that today is not possible to tum off separate blocks of FPGAs In addition to consuming more power the FPGAs are not compatible with traditional programming methodologies i e no C compiler It does not mean that FPGAs are not a good solution for the near future Maybe with the development of ultra low power FPGAs FPGAs will be a good solution for sensor node monitoring a planet since they have the advantage of being reprogrammable an
51. SP430 The microcontroller used in our project is the MSP430F169 produced by Texas Instruments It is a good option for sensor nodes since it is a 16 bit 8 MIPS providing more computational power than 8 bit microcontrollers and also ultra low power It has 60kbytes of program memory and 2kbytes of data memory It is equipped with a full set of analog and digital processors It has embedded debugging and in system flash programming through a standard JTAG interface and is supported by a wide range of development tools including gcc 62 and LAR Embedded Workbench 41 The MSP430 family has six different operating modes and is fully supported during interrupt event handling There are the active mode AM and five Low Power Modes LPMO LPM1 LPM2 LPM3 and LPMO LPM4 An interrupt event awakes the system from each of the various operating modes and returns using the RETI instruction to the mode that was selected before the interrupt event occurred The current consumption of each operation mode is shown in Figure 4 1 The micro controller can be configured to consume only the energy necessary to its works through the selected operation mode More information can be found at 93 The MSP430 is a RISC microcontroller that employs a von Neumann architecture therefore all programs and data share a single address space The CPU has sixteen registers that provide reduced instruction execution time This reduces the register to register operation execu
52. Science Foundation Workshop on Fun damental Research in Networking http www cs virginia edu jorg workshop April 2003 67 University of Colorado at Boulder Mantis Multimodal networks of in situ sensors http mantis cs colorado edu 68 P Lettieri and M Srivastava Advances in Wireless Terminals February 1999 69 Sung Park and Mani B Srivastava Dynamic battery state aware approaches for improving battery utilization In International Conference on Compilers Architectures and Synthesis for Embedded Systems pages 225 231 2002 BIBLIOGRAPHY 98 70 Padmanabhan Pillai and Kang G Shin Real time dynamic voltage scaling for low power embedded operating systems In ACM Symposium on Operating Systems Principles pages 89 102 2001 71 Joseph Polastre Design and implementation of wireless sensor networks for habitat monitor ing Master s thesis University of California at Berkeley 2003 72 Quadravox AQ430 Development Tools http www quadravox com AQ430 htm March 2004 73 J Rabaey J Ammer J L da Silva Jr and D Patel Pico radio ad hoc wireless networking of ubiquitous low energy sensor monitor nodes Proceedings of the IEEE Computer Society Annual Workshop on VLSI WVLSI 00 pages 9 12 April 2000 74 Jan M Rabaey M Josie Ammer Julio L da Silva Danny Patel and Shad Roundy Picoradio supports ad hoc ultra low power wireless networking Computer 33 7 42 48 2000 75 Vijay Raghu
53. Sight Low Power Mode Medium Access Control Micro Adaptive Multi Domain Power Aware Sensors Multimodal Networks of In situ Sensors Main clock Microcontroller Control Unit Micro Electro Mechanical Systems Million Instruction Per Second Master In Slave Out Master Out Slave In APPENDIX F GLOSSARY 117 a EER EER SERE a ee De N RE EE NIE er NASA NiMH OOK O OPSK PA PAL PALE PCB PCLK PDATA PHY PLL National Aeronautics and Space Administration Nickel Metal Hydride Non Retum to Zero On Off key Offset Quadrature Phase Shift Keying Power Amplifier Programmable Array Logic Programming Address Latch Enabled Printed Circuit Board Programming Clock Programming Data Physical Layer Phase Locked Loop Page Program Pulse Width Modulation Random Access Memory Read Status Register Read Electronic Signature Radio Frequency Radio Frequency Identification Read Only Memory Real Time Clock Receive Signal Strength Indicator Receive Serial Clock Sector Erase Slave In Master Out Sub Main Clock Short Messages Service Start Of Frame Silicon on insulator APPENDIX F GLOSSARY 118 SOMI SPI SS TDMA TPU UART USART VCO WRDI WREN WRSR WSN YATOS Slave Out Master In Serial Peripheral Interface Slave select Time Division Multiple Access Time Processing Unit Transmit Universal Asynchronous Receiver Transmitter Universal Synchronous Asynchronous Receiver Transmitter Voltage Controlled Oscilla
54. Status Register WRSR Write Enable WREN Write Disable WRDI or Deep Power down DP instruction Chip Select S must be driven High exactly at the byte boundary otherwise the instruction is rejected and is not executed That is Chip Select S must driven High when the number of clock pulses after Chip Select S being driven Low is an exact multiple of eight To exemplify the instruction set we describe the Read Data Bytes READ instruction The device is first selected by driving Chip Select S Low The instruction code for the Read Data Bytes READ instruction is followed by a 3 byte address A23 A0 each bit being latched in during the rising edge of Serial Clock C Then the memory contents at that address is shifted out on Serial Data Output Q each bit being shifted out at a maximum frequency fR during the falling edge of Serial Clock C The instruction sequence is shown in Figure 5 6 60 The first byte addressed can be at any lo cation The address is automatically incremented to the next higher address after each byte of data is shifted out The whole memory can therefore be read with a single Read Data Bytes READ instruction When the highest address is reached the address counter rolls over to 000000h allowing the read sequence to be continued indefinitely The Read Data Bytes READ instruction is terminated CHAPTER 5 BEAN API 69 3 me in 6 0123450 7 8 01 20 29 90 91 32 333 35 NI 38 9 Figure
55. Wiem IE6mWh em Table 4 3 Comparison of energetic sources Rechargeable Volumetric density Wh Alkaline Mn02 AA Silver Oxide EE ME L Mn02 E Ee E 7 150 EE CNS Sealed Lead Acid Ys 5 SE Yes No Yes Table 4 4 Battery technology Comparison problem power voltage regulator and other components may be added to the sensor nodes There are many types of batteries being available Batteries can be divide into primary non rechargeable and secondary rechargeable They can also be classified according to electrochemical material used for electrode such as NiCd NiZn AgZn NiMh and Lithium Ion Table 4 4 based on 68 and 34 compares most common batteries s types NiMh and Lithium Ion are the most commercialized rechargeable batteries The battery type will depend on the application If there is not a harvest energy source non rechargeable battery is a good choice since they have higher energy density Among the rechargeable batteries Li based batteries appear to be the best choice However there are a number of other con siderations and the proper choice of battery technology is not obvious without a detailed examination of the application operational profile For instance in a pulse discharge scenario a Li battery would CHAPTER 4 BEAN HARDWARE COMPONENTS 34 perform poorly while a NiCd would perform well due to the large differences in the intemal resistance of these battery types Fu
56. a externa Para o segundo cen rio o n sensor atua como repetidor mantendo um log de eventos Ele opera em 1 do tempo Neste per odo recebe pacotes em 3 do per odo e transmite em 1 do per odo Escreve na mem ria externa usando do per odo e tamb m l a mem ria externa do tempo para armazenar os pacotes recebidos e manter consist ncia dos dados Os sensores n o s o utilizados Tabela 2 mostra o consumo de corrente das plataformas BEAN e Mica e os ciclos do cen rios Assume se o mesmo consumo de corrente na placa de sensores para as duas plataformas Tabela 3 mostra os consumos de energia por componentes em mA hora calculado para os dois cen rios para cada plataforma O processador BEAN mais econ mico que o processador Mica2 Tabela 4 mostra o tempo de vida em n mero de meses para cada cen rio e plataforma depen dendo do tipo de capacidade da bateria No cen rio 1 usando uma bateria de 300mA hr BEAN pode coletar dados por quase 26 meses Tabela 5 mostra quantitativamente a economia de BEAN comparado com Mica2 nos dois cen rios BEAN pode consumir quase que 50 a menos que Mica2 A economia principal do processador e mem ria externa do BEAN Breve Resumo em Portugu s xxi Cen rio 2 Mica2 Cen rio 1 mA mA Processador corrente opera o completa 0 4 8 1 corrente dormindo 0 0013 0 008 99 corrente recebendo 8 8 0 75 corrente transmitindo 12 12 0 25 corrente dorm
57. able E 2 Bean Components Appendix F Glossary ACLK Auxiliary clock ADC Analog to Digital Converter AGC Automatic Gain Control AM Active Mode API Application Programming Interface ASK Amplitude Shift Key BEAN Brazilian Energy Efficient Architectural Node CCR Corner Cube Reflectors CMOS Complementary Metal Oxide Semiconductor COTS Component Off The Shelf CPLD Complex Programmable Logic Device CRC Cyclic Redundancy Check DAC Digital to Analog Converter DCLK Data Clock DCO Digitally Controlled Oscillator DCT Digital Cordless Telephone DIO Data Input Output DP Deep Power down DPM Dynamic Power Management DVS Dynamic Voltage Scheduling EPROM Erasable and Programmable ROM 115 APPENDIX F GLOSSARY 116 SS er on II EI EEPROM ESB EW FET FOB FPGA FSK GFSK GND GNOMES GPS Rc IC IDE VO ISM JPL JTAG LED LNA LOS LPM MAC uAMPS MANTIS MCLK MCU MEMS MIPS MISO MOSI Electrically Erasable Programmable ROM Embedded Sensor Board Embedded Workbench Flash Emulation Tool Free On Board Field Programmable Gate Array Frequency Shift Key Gaussian Frequency Shift Key Ground Generalized Network Of Miniature Environmental Sensor Global Positioning System Inter Integrated Circuit Integrated Circuit Integrated Development Environment Input Output Industrial Scientific and Medical Jet Propulsion Laboratory Joint Test Action Group IEEE1 149 1 Light Emitting Diode Low Noise Amplifier Line of
58. alternately in the I and Q channels with one half chip period offset This modulation format is used in the IEEE 802 15 4 stan dard This is illustrated in Figure 4 8 18 The data at phase modulation is transmitted systematically shifting the carrier wave in uniformly degree at spaced intervals For more information see Stallings 89 Mathematical models of the modulations schemes dis cussed above are presented 4 3 3 2 Off the shelf radio components RFM TR1000 is a hybrid radio transceiver 76 that is very well suited for wireless sensor network application it has low power consumption and small size The TR1000 supports RF data transmission rates up to 115 2 kbps and operates at 3 V In the 115 2 kbps ASK the power consumption for the receiver is almost 14 4 mW for the transmitter is 36 mW and in sleep mode 15 mW The disadvantage is that the transmitter output power maximal value is 0 75 mW It is necessary to amplify the signal spending more energy The MICA platform constructed using RFM Monoliths TR1000 was not capable to handle a great number of sensor nodes since the lost packet ratio increased with the distance between the sensor nodes as stated in 47 Figure 4 9 47 illustrates this fact Chipcon s CC1000 is a very low power CMOS RF transceiver qualified for data rates up to 76 8 kbit s It has an internal bit synchronizer that simplifies the design of a high speed radio link with the microcontroller The signal interfac
59. and sensors The power supply block has the purpose to power the node and usually consists of a battery and a dc dc converter The communication block consists of a bi directional wireless communication channel Most of the platforms use a short range radio Other solutions include laser and infrared media The processing unit is composed of internal memory to store data and applications programs a microcontroller to process data and an Analog to Digital Converter to receive signal from the sens ing block The storage unit is an external memory device that works as a secondary memory keeping a data log The debugging interface is used to program and test the sensor node for example pro gramming interface LEDs serial interface JTAG IEEE 1 149 1 This block can be omitted in a final sensor node product The sensing unit block links the sensor node to the physical world and has a group of sensors and actuators that depends on the application of the wireless sensor network CHAPTER 3 SENSOR NODE ARCHITECTURE 16 3 2 1 Processing Block A very interesting guestions is should there be a dedicated processing element for each VO device or should the processing of the I O devices be centralized For example besides the single CPU unit other approach is to use two general purpose processors one handling the communication block and one handling the other devices Sensor nodes may act as a router forwarding packets meant for other nodes Sriva
60. ardware ADC O driver usado para medir entradas anal gicas e providas pelos sensores ou n vel de tens o e 1 Wire O m dulo 1 Wire implementa o protocolo 1 Wire Ele usado para comunicar com o componente DS2417 Breve Resumo em Portugu s xix e Digital Clock Este m dulo configura o rel gio do MCU provendo uma maneira de configurar o rel gio interno como m ltiplos do rel gio b sico de 32 KHz SPI Driver O m dulo de SPI configura o hardware SPI Este protocolo usado pela mem ria externa e r dio e Memory Driver O driver de mem ria controla a mem ria externa M25P40 e Radio Driver Este driver configura as propriedades do r dio como pot ncia de sa da freqii ncia e tamb m controla a transmiss o e recep o de pacotes Este driver define duas filas uma para O buffer de transmiss o e uma para o buffer de recep o 5 Quest es Energ ticas Nesta se o um modelo de energia para n sensores apresentado Valores s o baseados em da tasheets dos fabricantes BEAN normalmente estar em um dos estados a seguir e Modo Down tudo est desligado e o MCU est no modo de opera o LPM3 A corrente 10 5uA e a pot ncia 31 54 W e Modo de Recep o o MCU est no modo ativo o r dio no modo de recep o e o resto est desligado A corrente de 10mA e a pot ncia de 30mW e Modo de Transmiss o o MCU est no modo ativo o r dio est no modo de transmiss o e o resto est
61. ase program memory into RAM Interested people should read 64 The Scatterweb project 82 and XNP component of TinyOS 90 have support for this application Many new applications as for example mobile code would use it BEAN needs the development of an entire protocol stack New protocols for data link network transport application layer needed to be designed An interesting work is to communicate BEAN with Mica2 since they have the same physical layer 7 2 4 New Platforms Construct a board that permits the BEAN to communicate with a PC for data collection and analysis Two simple solutions are connecting using a R 232 or USB The RS 232 serial interface would have level converters that allow free connection with PCs or notebooks A component choice for RS 232 driver and receiver is the st3232 A component choice for USB is FT232BM The expansion board already support the connection to the UART receive and UART transmit signals that communicate directly to the MCU hardware module If the PC board uses this option then the external memory should not be used The technology grows very fast as stated in Moore s Law new COTS with increased perfor mance more memory available more energetically economical devices are constantly appearing in the market Device Flash KB RAM KB 1KU Price March 25 2004 MSPBOFISIO 32 s ss MSPasorieri 48 10 5865 MSP430FI612 55 5 8 95 Table 7 2 MSP430F161x For t
62. at the USARTO Module but it is not being used If projecting a MCU it would be interesting to construct three SPI module one UART module and one I2C module so the radio could connect to using SPI modules the external memory using the other SPI and the sensor bus using the I2C and UART modules 4 6 2 3 Other features The CC1000 supports two encoding strategies NRZ non return to zero and Manchester as illus trated in Figure 4 19 The NRZ map the data value 1 onto the high signal and the data value 0 onto low signal The Manchester encoding merges the clock with the data signal by using the exclusive or XOR function The Manchester code usually result in less transmission error but it only uses half of bit rate The CC1000 includes a Manchester violation bit available at the CHP_OUT pin if the LOCK register is correctly configured CC1000 allows programming the operating frequency The operation frequency is set by pro gramming the frequency word in the configuration registers There are two frequency words registers termed A and B which can be programmed to two different frequencies One of the frequency words can be used for RX local oscillator frequency and other for TX transmitting frequency in order to be able to switch very fast between RX mode and TX mode They can also be used for RX or TX at two different channels Frequency word A or B is selected by the F_REG bit in the MAIN register CHAPTER 4 BEAN HARDWARE COMPONENTS 55
63. ata via TCP IP Berkeley project also constructed Spec Mode Figure 2 13 a general purpose sensor node that is customized for miniaturization achieving reduced size 38 The PicoRadio project 73 at Berkeley Wireless Research Center is another project at Berkeley The objective is to develop a low cost and low power sensor node Its focus is on the radio hardware link and network layer stack Medusa Mk 2 14 Figure 2 2 and iBadge 55 are sensor nodes from UCLA These sensor nodes use more than one processor and iBagde also include a Bluetooth chip Mk 2 is also equipped with a set of ultrasound transceivers that are used to perform high accuracy distance measurements between adjacent nodes iBadge includes a speech processing unit a microphone a localization unit an environment sensing unit with humidity light pressure temperature sensors and a orientation unit composed of accelerometer and magnetic sensors iBadge was used in a smart Kindergarten to create a development problem saving environment for early childhood education Generalized Network Of Miniature Environmental Sensor GNOMES is a project from Rice University 105 Its MCU is the MSP430F149 Texas Instruments It has an accelerometer expansion for structural analysis and GPS for coordinating sensors with location It also has a sensor bus that allows for additional application specific sensor boards The RS232 interface is used to communicate with a computer It can use Et
64. but can also generate interrupt signals the RSSI Receive Signal Strength Indicator is digital and a packet sniffer software to debug already exists Although the power consumption in receive mode is higher than CC1000 it is necessary a study to determine what device spend less energy per bit since CC2420 has an internal FIFO which allows the MCU to sleep more time and the data rate is 250kbps speding less energy per bit transmitted The modulation is O QPSK having a different physical layer thus it is not compatible with CC1000 The disadvantages are that it has a small range less than 50m and being IEEE 802 15 4 compliant does not allow the study of new algorithms at data link layer MAC and LLC since they are already defined Table 4 5 summarizes this discussion presenting the characteristics of the radio COTS devices The dBm is a relative power unit defined as the ratio of the power in Watts to one milliwatt as in Equation 4 2 For example O dBm is equal to ImW of power Power dBm 10 log Power in Watts 0 001 Watt 4 2 The receiver sensitivity and transmitter power are important to determine the range Range is usually estimated with statistics 19 The radio link budget tells how much loss exits between the CHAPTER 4 BEAN HARDWARE COMPONENTS 41 EE EA A EI e a transmitter and the receiver and is given by 19 Pg TX Transmitter Power TX antenna Gain RX antenna Gain RX sensitivity 4 3 In this budget model
65. cally steerable directional antenna 88 This ap proach would save more energy reduce the probability of detection lower the interference signals and would need the design of new wireless sensor network protocols BEAN allows the development of other radio boards A great RF work is to extend the radio range Chipcon 19 suggested using an external LNA Low Noise Amplifier to improve sensitivity and an external PA Power Amplifier to increase the output power The extemal LA would add only 1mA to the power budget and the external PA would increase the output power to 14dBm about 1400m Chipcon suggested using the Philips transistors BFG403W for LNA and BFG425W for PA Since Bean is a generic prototype sensor node it is possible to connect it to other radio s device An interesting work is to construct a radio board with the CC2420 device A new radio device driver will also be needed We called this sensor node BeanZig since it would be compatible with ZigBee standard 7 2 3 BEAN API An interesting work is to design a module that allows a sensor node to self program The sensor node could be reprogrammed by air using the radio module However when accessing a flash memory array for an erase program operation the CPU cannot simultaneously execute the code in the flash array Thus the MCU cannot execute code and modify its memory contents at the same ad CHAPTER 7 FINAL CONSIDERATIONS 90 time The problem can be solved coping the er
66. ceived the packets from the sender again This happened because radio signal is propagated through waves Radio waves from the sender take different paths while they travel and their phase can change when they reflect on some obstacles Waves of opposite phase cancel each other and the resulting signal becomes weaker than the sensitivity of the receiving node thus packets cannot be detected This phenomenon is called Rayleigh fading and illustrated in Figure 4 10 47 More complex devices like CDMA cellular phone use multiple antenna of different phase to avoid this problem but CC1000 cannot use this method because it has only a antenna However using multi hop solves this problem The radio component depends on the frequency band of the application If a higher frequency band is desired the LMX3162 84 radio is an option LMX3162 is a monolithic integrated radio CHAPTER 4 BEAN HARDWARE COMPONENTS 39 Some obstacle e g building ESE Receiver 777 Ox e gt a a e T a Figure 4 10 Rayleigh fading 47 transceiver optimized for use in ISM 2 45 GHz band wireless systems Bluetooth is a standard that specifies a small form factors low cost short range radio links 9 The Bluetooth standard specifies the radio link baseband link and the link manager protocol Blue tooth devices are classified into 3 power classes The first power class is designed for long range 100m
67. ch hardware component The RTC and Serial Number hardware components communicates to the MCU through the 1 Wire software protocol The external memory and radio communicates to the MCU through the SPI module Timers are configured using the Digital Clock and Timer Driver To measure the power consumption and the sensor signals it is necessary to use the ADC which is controlled by the ADC Driver The Figure 5 1 also explains the iteration between software modules Memory and Radio software components need the SPI driver The radio also needs to be configured and uses the Queue module The API communicates to an upper layer that is an operating system being concurrently developed for BEAN called Yet Another Operating System HATOS 97 It is a low power operating system de 60 CHAPTER 5 BEAN API 61 sign to attend the requirement of WSN such as memory and energy constrains It is event driven has a scheduler with priority mechanism and uses the BEAN API Hence the developer has acesses to important hardware functionalities implemented in BEAN_API such as changing the microcontroller operating mode Timer MCU Driver Config ee EE Y O Sensor Hardware Radio Radio Driver Config SPIConfiguraion Software EE Analog Digital Figure 5 1 BEAN API 5 1 Drivers The major software components are e MCU Config The MCU configuration block allows changing the MCU operating mode The MCU has six differen
68. ch such feature BEAN is also capable of measuring it own overall power consumption Using a jumper the user can configure BEAN to measure at port number 6 5 its power consumption or the ADC signal 5 from the sensor bus Another interesting option is to connect the BEAN sensor bus to the energy measure points of another BEAN This would lead to a new methodology to evaluate on the fly the power consumption of Wireless Sensor Network algorithms and since the action of measuring the power consumption will be done by the another BEAN the measurement will be independent and not corrupted Figure 4 13 illustrates this new methodology BEAN measuring BEAN ee 2 x algorithm 5 MA A S Figure 4 13 A new methodology to evaluate on the fly the power consumption of WSN algorithms CHAPTER 4 BEAN HARDWARE COMPONENTS 50 CHAPTER 4 BEAN HARDWARE COMPONENTS So 4 6 Interfacing CC1000 and MSP430 4 6 1 CC1000 Application Circuit Figure 4 14 CC1000 Application Circuit 16 Few components are required for CC1000 to implement a radio channel A typical application circuit is shown at Figure 4 14 We identify five blocks The first block is an optional filter The second part is used to mach the transmitter and receiver to 50 Ohms antenna impedance The third block is composed of voltage supply de coupling capacitors These capacitors should be placed as close as possible to the voltage supply pins of CC1000 Block number four is an inductor
69. clock command is used to read the device control byte and the con tents of the real time clock counter e WRITE CLOCK The write clock command is used to set the real time clock counter and to write the device control byte 5 1 3 LED Driver The led driver functionality is to turn on tum off or change the LED states BEAN can signal sixteen states via four LEDs red green orange yellow Users should use them only for debugging purpose since it consumes energy CHAPTER 5 BEAN API 67 J AE pu Figure 5 5 Queue 5 1 4 Queue Driver The queue driver implements a circular queue abstract data type The radio driver uses this module Figure 5 5 illustrates the circular queue abstract data type It is basically composed of two pointers the initial and final data pointers Using the modulus operator turn this queue into a circular queue The major advantage of our implementation is that it is possible to define the size of the queue at execution time The queue module is independent of the radio driver and may be used by other software components 5 1 5 Memory Driver The memory driver uses the SPI driver Its purpose is to communicate and control the M25P40 device 60 which is the slave on the communication channel All instructions addresses and data are shifted in and out of the device most significant bit first Serial Data Input D is sampled on the first rising edge of Serial Clock C after Chip Select S is driven L
70. communication bandwidth there is no equivalent forecast for battery technology 1 1 WSN Architecture This section gives an overview of the WSN architecture WSNS are networks composed of a large number of sensor nodes The objective of these networks is to collect data Sensor nodes are usu ally deployed over a desire area then they wake up self test and establish dynamic communications among them composing a network 80 WSNs usually do not have an infrastructure like cellular phone or local wireless networks WSN is considered as a special type of ad hoc network since its topology is dynamic due to the fact that sensor nodes can wake up joining the network or go to sleep leaving the WSN An important characteristic is that the flow of data is typically unidirectional The information flows from source nodes to one or more access points Sensor nodes do generic tasks such as computing transmitting data and monitoring using specific sensors CHAPTER 1 INTRODUCTION 3 EA N RE RR ER Ee ER EED de A The key resource of a WSN is the stored energy Each sensor node is composed of a small battery with a limit capacity It is almost infeasible to recharge all battery since WSN can be composed of thousands of sensor nodes Therefore the WSN project focus from hardware design to network protocols is saving energy Other sensor node restrictions include memory and processing power A WSN tends to be application dependent in other words th
71. consumo de energia fontes de energia canais de comunica o e capacidade de sensoriar s o impostos aos projetistas Em nosso conhecimento BEAN o primeiro n sensor que permite medir o consumo de energia de cada componente e tamb m o primeiro prot tipo projetado no Brasil Abstract Wireless sensor networks are networks of large quantities of compact micro sensors with wireless communication capability called sensor nodes Emerging applications of data gathering range from the environmental to the military The objective of this work is to project a computer platform called BEAN Brazilian Energy Efficient Architectural Node that includes software and hardware com ponents which will be a prototype device for wireless sensor networks Architectural challenges are posed for designers such as computational power energy consumption energy sources communica tion channels and sensing capabilities In our knowledge BEAN is the first sensor node that allow measuring the power consumption of each component and it is the first sensor node prototype de signed in Brazil Agradecimentos muito dif cil mencionar aqui todas as pessoas que t m me apoiado durante este tempo Aos meus pais Helo sa Beatriz e Jos Augusto pelo esfor o para que me proporcionassem uma boa forma o e educa o Aos meus irm os Alessandra e Luiz Filipe que sempre estiveram por perto Ao Prof Di genes por todo apoio que me deu pela amizade pela
72. course at UFMG 23 The radio board used the CC1000PP design as a guideline and its interface matches BEAN radio bus The schematic and layout are presented in Appendix D and were performed by the student C sar Almeida Khouri 4 7 Project Decisions In this section we discuss the major project decisions taken during the design of BEAN project BEAN major requirement is to be energy efficient thus BEAN project focus on energy efficient COTS BEAN MCU needs to be energy efficient with different operating modes and fast wake up time It does not need to have extremely power computability as a 32 bit microcontroller The MCU should has an embedded JTAG interface to facilitate the programming and debugging phases BEAN MCU choice is the MSP430F169 since it has a 16 bit CPU and is ultra low power It has six different CHAPTER 4 BEAN HARDWARE COMPONENTS 58 operating modes that are fully supported during interrupt event handling The MSP430 consumes less than 400 mA in active mode operating at 1 MHz in a typical 3V system and can wake up from a 2 mA standby mode to fully synchronized operation in less than 6 ps BEAN communication channel needs to be bi directional to support different operating modes to be energy efficient allows setting the output power and have relatively slow date rate The range should be between 1 to 250 meters BEAN Radio choice is the Chipcon CC1000 CC1000 is a very low power CMOS RF transceiver qualified for data rates
73. d reconfigurable eliminating the deployment cost in space applications In terms of energy microcontrollers are a better solution than FPGAs Microcontrollers may be designed to be optimal and it is possible to turn their functional blocks off In addition FPGAs are not capable of turning off separate blocks Even with this feature turning off a FPGA block does not mean turn off a functional block because it will depend on the partitioning algorithm Finally since a FPGA block must be generic to implement any logical module it will not be power optimized as a microcontroller CHAPTER 4 BEAN HARDWARE COMPONENTS 22 4 1 2 Microcontrollers A microcontroller is very similar to a microprocessor The main difference is that a microcontroller is designed specifically for use in embedded systems 7 In general microcontrollers are micropro cessor with additional peripheral or support devices 5 Microcontroller includes not only memory and processor but also non volatile memory and interfaces such as ADCs UART SPI counters and timers In this way it can iterate with sensors and communication devices such as short range radio to compose a sensor node Some of the advantages of the microcontroller s higher levei of integration as stated in 5 are e Lower cost one part replaces many parts e More reliable fewer packages fewer interconnections Faster signals can stay on the chip Nowadays there are many types of microcontroller
74. de n mero de sensores robusto e f cil de programar A seguir s o apresentados as considera es de projeto caracter sticas e requisitos do projeto do BEAN e Efici ncia de energia N s sensores devem ser eficientes quanto a energia N s sensores t m uma quantidade limitada de energia que determina o tempo de vida destes dispositivos Como invi vel recarregar milhares de n s cada n sensor deve ser o mais eficiente poss vel quanto ao consumo de energia Portanto energia restri o principal sendo a m trica principal para an lise e Baixo custo N s sensores devem ser baratos Como uma RSSF pode conter centenas a mi lhares de n s sensores estes dispositivos devem ser baratos e Comunica o Sem Fio O n sensor precisa ser sem fio Em v rias aplica es o ambi ente que est senso monitorado n o ter uma infra estrutura de comunica o instalada A instala o de cabos pode ser muito dif cil ou caro Portanto os n s sensores deve ter um canal de comunica o sem fio e F cil de Programar Como este componente ser um prot tipo ele ser constantemente re program vel para o desenvolvimento de protocolos de comunica o e aplica es em RSSF Portanto a programa o deve ser f cil Breve Resumo em Portugu s xiv SSS Processador _ Sensores Figura 2 Diagrama de Blocos do Prot tipo do N Sensor e Expans vel O projeto de hardware deve ser expans vel pois o n sensor de
75. e can also be configured for a UART serial interface taking benefit of the hardware UART in a microcontroller In power down mode the CC 1000 current consumption is 0 2 uA The CC1000 is designed primarily for FSK systems in the ISM SRD bands at 315 433 868 and 915 MHz One advantage over TR1000 is that it can easily be programmed for operation at CHAPTER 4 BEAN HARDWARE COMPONENTS 38 100 0 80 0 60 0 40 0 20 0 0 0 Ratio of received packets 0 200 400 600 800 1000 1200 1400 Distance ft Figure 4 9 Ratio of receiver packet per distance for TR1000 and CC1000 components 47 other frequencies between 300 MHz and 1000 MHz Another great advantage is that it is possible to control the output power thus specifing the desired range of the radio saving energy and decreasing interference problems It is also possible to measure the received signal power with the Receive Signal Strength Indicator RSST hence it is possible to have an idea how distance the sensor nodes are from each other The Mica2 and Mica2 Dot platforms use this radio component Figure 4 9 47 illustrates their study showing the ratio of received packet per distance of the CC1000 radio component Their study was very important since it illustrates the difference between these radio components Looking at the range test results in Figure 4 9 the graphs consistently had dips at 300 and 900 ft Once the sender moves farther from that distance the receiver re
76. e hardware and software require ments and the operation modes vary according to the application 1 2 Embedded System Embedded system as defined in 7 is a combination of computer hardware and software and per haps additional mechanical or other parts designed to perform a specific function They are present in equipments such as electric coffee machines cameras and cellular phones Opposite to personal com puters that are capable of executing innumerous tasks they are designed for specific functionalities such as controlling the sparks in a car engine or controlling a microwave oven Using microcontrollers and microprocessors for these tasks allows automation of manual tasks Many microcontrollers have been developed for specific applications in a way to aggregate a set of small functionalities For exam ple advanced mathematical functions do not need to be present in a coffee machine microcontroller The small cost of these devices allows their uses at a great number of equipments Embedded systems compromise cost with functionalities In this way a minimal hardware and software should be utilized to attend system requirements and minimize cost Sensor nodes can be seen as a special case of embedded systems and benefit from the large body of knowledge already present 1 3 Objective and Motivation The objective of this work is to design an embedded system that includes software and hardware components which will be a testbed protot
77. e is used the MISO signal pin must be set as an input when reading data from the CC1000 as illustrated in Figure 4 17 When receiving the microcontroller software must handle byte synchronization This involves detecting a start of frame SOF unique identifier which is sent after the preamble When this word is detected the serial interface is enabled and from there on out the receiver is byte synchronized with the transmitter The MSP430F169 has two USART Modules Each module can be configured exclusively to work as SPI module or UART module One module USARTO was connected to the external memory and sensor connector Thus only one SPI module was available for the radio interface We chose to use the SPI module to connect the radio data interface The radio configuration interface is connected using general VO in other words the communication process will be done using bit banging For debugging purpose it is also possible to communicate to the radio data interface using bit banging An additional connection to an interrupt enable port port2 0 was connected to the radio device CHAPTER 4 BEAN HARDWARE COMPONENTS 54 Figure 4 18 Connection MCU USART Modules to other BEAN Components These connection are illustrated in Figure 4 18 The memory device uses the USARTO in the mode SPI and the sensor bus as UART thus it is not possible to use both simultaneously The MSP430F16xx family also has an I2C interface embedded
78. e nowhere close to being ideal charge storage units 13 The main non idealities of real life battery cells are e Battery output voltage is not constant over a discharge It drops progressively as the cell dis charges and then plummets very rapidly when the charge is exhausted Because of this fact batteries cannot be directly connected to electronic circuits but their output voltage must be shifted and stabilized by feedback based DC DC conversion circuitry e Capacity depends on the current load At high currents the effective capacity i e the total amount of charge that can be extracted from a battery decreases Thus it is important not to assume that the charge can be extracted from a cell at an arbitrarily high rate Most batteries are in fact rated for maximum discharge current but at this load level capacity is significantly degraded e Batteries have some limited recovery capacity when they are discharged at high current loads If a battery is discharged at high current for a short period and then it is allowed some rest time at low load its output voltage goes up e Nominally equal battery cells can have a significant difference in terms of internal resistance output voltage and discharge curve 6 1 2 Radio Energy Model A main characteristic for the radio channel in WSN is the energy consumption in transmit and receive modes Here a simple radio energy model that is widely used as for instance 56 35 100 58 is p
79. e prediz que a complexidade de dispositivos microeletr nicos dobra a cada dezoito meses e a Lei de Gilder que prediz um crescimento de comportamento similar ao exponencial na largura de banda n o existe uma predi o equivalente para a tecnologia de baterias No nosso conhecimento BEAN o primeiro n sensor que permite medir o consumo de energia de cada componente BEAN tamb m um dos primeiros projetos a usar o novo microcontrolador MSP430F169 93 da Texas Instruments Finalmente BEAN o primeiro n sensor projetado no Brasil Breve Resumo em Portugu s xili As motiva es principais para este trabalho s o a necessidade de um prot tipo de n sensor para o projeto Sensornet 85 e tamb m n o existe uma plataforma computacional para RSSF no mercado nacional brasileiro pois este um t pico recente Finalmente muito importante o desenvolvimento da tecnologia tendo conhecimento completo desde o hardware at o software Como especificado no documento do NSF 66 RSSF uma das grande reas de pesquisa atualmente 2 Arquitetura do N Sensor 2 1 Caracter sticas e Requisitos Nesta se o ser o discutidas algumas caracter sticas e requisitos do prot tipo do n sensor Este projeto n o tem a inten o de projetar um dispositivo que ser compar vel a um n sensor real Enquanto que um produto real tamanho e custo s o requisitos essenciais o foco deste projeto em um sistema f cil de expandir com um gran
80. e the source code for the specific hardware They must know much more about their development tools and how they work than a desk top developer For example the source code is dependent on the compiler For each different tested compiler we needed to declare interrupt routines in different ways The embedded systems developer must know how the system uses memory what happens at startup how interrupts and exceptions ure handled To test an embedded system program is usually more complicated than generic PC software A desktop programmer usually just needs a compiler a debugger and an execution environment This is not true for embedded systems developers They need more complex and expensive tools like specific compilers development kit In Circuitry Emulator an interface to on chip hurdware debugging resource ROM Emulator logic analyzer and others The radio development kit also needs an oscilloscope and an spectrum analyzer The embedded system developer also faces a dilemma between efficiency and modularity Al though it is desired to have both characteristics it is not always possible For example an interrupt service routine should be as fast and possible Thus it does not pass any parameter The solution is to use global variables killing your modular design The key is compromise BEAN can consume almost 50 less than the current state of the art Mica Mote sensor node The major savings are due to BEAN processor and external memory BE
81. e transmitting device generates its own laser signal whereas in passive communication the laser signal is generated through a secondary source CHAPTER 4 BEAN HARDWARE COMPONENTS 35 Hollar 39 reports that the active laser consumes 50 mA at 3V and could established communication with distances up to 21 4 km The passive cost of transmission is limited to the energy required to deflect one of the mirrors which in the case of the MEMS corner cube reflectors CCRs used in COTS Dust amounts to 100 pJ bit 39 4 3 2 Infrared Infrared communication is usually directional Since sensor nodes will be deployed randomly a good solution adopted by PushPin project 12 is to use a diffuser made of sandblasted polycarbonate tubing to create a more omni directional communication range within a plane But the node still needs to be aligning within a plane PushPin project adopted the IrDA transceiver 83F8851 91 Its disadvantage is a short range of about Im Its maximum current consumption in transmission mode is 10mA and in receive mode is 25 mA The advantage of infrared is no need for antenna 4 3 3 Radio frequency RF RF communication is based on electromagnetic waves One of the most important challenges in RF communications devices is the antenna size To optimize transmission and reception an antenna should be at least 1 4 where A is the wavelength of the carrier frequency Assuming a sensor node with a quarter wavelength of 1 mm the RF carr
82. ernal printed circuit board PCB tracks Every time the device swings to logic 1 Cz charge up with Q Cz Voo Let f be the switching frequency so this happens f times per second Thus the Ic charging current is Ic Q f C V f Hence the power Pc is Vcc lc C V2 f Transient power dissipation Pr is due to current that flows through both CMOS output transistors CHAPTER 6 ENERGY ISSUES 79 as they are partially turned on during the process of switching It is given by Pr Cpp V2 f Where f is the switching frequency and Cpp is a value specified for a particular CMOS IC The guidelines for minimizing power consumption in CMOS circuits are e Define all inputs clearly as logic 0 or 1 e Minimize clock frequencies e Minimize the power supply voltage e Ensure fast logic transitions e Minimize load and interconnection capacitances 6 3 Energy Management Techniques There are two major power saving schemas dynamic power management DPM 104 and dynamic voltage scheduling DVS 70 The basic idea behind DPM is to shutdown the devices when not needed and get them back when needed Turning off some components gives good energy savings but in many cases it does not know beforehand when to tum on or off a particular device A solution is a stochastic analysis to predict future events An embedded operating system that is able to support DPM is also needed For this approach the devices should have the states active sleep and idle
83. es e Down mode everything is tumed off and the MCU is on the LPM3 operating mode The current is 10 5uA and the power is 31 5uW CHAPTER 6 ENERGY ISSUES current Figure 6 3 Memory Current Consumption at Standby and Down Mode Real Time Clock 2 5 5 5 V Table 6 1 BEAN Power Budget 82 CHAPTER 6 ENERGY ISSUES 83 Down Siandby 20uA Read 10mA Table 6 2 Mica2 Power Budget e Receive mode the MCU is on the active mode the radio is on receive mode and everything else is turned off The current is 10mA the power is 30mW e Transmit mode the MCU is on the active mode the radio is on transmit mode and everything else is turned off The current is 16 9mA the power is SImW e Memory reading the MCU is on the active mode the memory is on reading mode and every thing else is turned off The current is 4 4mA the power is 13 2mW e Memory writing the MCU is on the active mode the memory is on writing mode and every thing else is turned off The current is 15 4mA the power is 46 2mW e Sensing mode the MCU is on the active mode a specific sensor is on and everything else is turned off This mode is dependent on which sensor board device is being used To know the average power consumption just multiply the power consumption by the percentage of time in each mode cycle time Just for comparison the BTnode 52 spends SOmW on down mode and 450mW at communica tion
84. he future BEAN may be update For instance TI announced that they will produce a new series of MCU Table 7 2 show the newest microcontrollers and their respective flash size RAM size and price per thousand units The newest device will have up to 10 KB of RAM The MSP430F1610 is the best option since it will have up to 10 KB of RAM BEAN was already designed to support this device Construct a real life sensor node using our design The debugging interface could be omitted The components used should be the same The difference in the project is that an effort at miniaturization il CHAPTER 7 FINAL CONSIDERATIONS 91 of the layout should be made More than two layers could be used using both side of integrated circuit to fix the components Bibliography 1 H Abrach S Bhatti J Carlson H Dai J Rose A Sheth B Shucker J Deng and R Han Mantis System support for multimodal networks of in situ sensors In 2nd ACM International Workshop on Wireless Sensor Networks and Applications WSNA pages 50 59 2003 2 National Aeronautics and Space Administration NASA Sensor webs jet propulsion lab http sensorwebs jpl nasa gov March 2004 3 ZigBee Alliance Zig bee standards http www zigbee com March 2004 4 R Amirtharajah S Meninger J O Mur Miranda A Chandrakasan and J Lang A microp ower programmable dsp powered using a mems based vibration to electric energy converter 2000 5 Arnold
85. hernet via its HOBBIT board A communications header allows for CHAPTER 2 RELATED WORK 8 IIA AA variable communications boards and an expansion port for connection with additional boards The communication uses Bluetooth or 900 MHz radio GNOMES are designed to be battery powered with an alternative power source for recharging the batteries 750mAH NiMH cell such as solar panels It also has an external Real Time Clock PushPin 12 Figure 2 5 is a sensor node that is part of an MIT project Pushpin s requirements also meet the wireless sensor network needs It uses a different approach for communication using an infrared link lts operational system Bertha 53 is an interesting work since it fits in the 8051 microcontroller and its purpose is for distributed system The power supply is via power bus Some sensor nodes have already been developed with GPS interface Multimodal Networks of In situ Sensors MANTIS sensor node called Nymphs 67 Figure 2 11 is claimed by their authors to be the first sensor node that supports GPS 1 Mantis is a project from the University of Colorado that uses ATMEGA as the microcontroller They are developing their own operating system called MantisOS which is a multi threaded OS They have a clear well defined and documented API BTnode Figure 2 10 is a sensor node from the Smart its project 52 It uses a Bluetooth radio and a bluetooth stack component for TinyOS have being developed for this pro
86. ier frequency is 75 GHz which is out of the range of modem low power RF electronics It is also necessary to reduce energy consumption with modulation filtering demodulation etc RF communication advantages are its ease of use integrality and well established in the commercial marketplace which make it an ideal testing platform for sensor node Several aspects affect the power consumption of a radio including the type of modulation data rate and transmission power In general radios can operate in three distinct modes of operation transmit receive idle Most radios operating on idle mode results in high power consumption almost equal to receive mode thus it is important to shutdown the radio 4 3 3 1 Modulation Here we discuss some popular modulation schemes On Off key OOK Amplitude Shift Key ASK Frequency Shift Key FSK Gaussian Frequency Shift Key GFSK and Offset Quadrature Phase Shift Keying O QPSK CHAPTER 4 BEAN HARDWARE COMPONENTS 36 CHAPTER 4 BEAN HARDWARE COMPONENTS 3 ASK modulation offers the advantage of being more immune to interfering signals than OOK and is easier to implement at a lower cost that FSK modulation In ASK the data is transmitted using the carrier amplitude OOK is the special case of ASK modulation where no carrier is present during the transmission of a zero OOK modulation is a very popular modulation used in control applications Due to its simplicity and low implementation costs OOK
87. indo 0 002 0 002 99 Escrever 15 35 0 0 25 Ler 4 10 0 0 25 Dormir 0 01 0 02 100 99 5 Placa de Sensores corrente opera o completa 5 5 corrente dormindo 0 005 0 005 Tabela 2 Or amento Energ tico do BEAN e do Mica Calculado mA hr Ciclo Cen rio 1 Ciclo Cen rio 2 BEAN Processador 0 00529 0 08792 0 00529 Logger Mem ria 001 002 0 05745 0 1324 Tabela 3 Consumo em mA hora Capacidade da bateria mA hr Ciclo Cen rio 1 Ciclo Cen rio 2 2 ae 136 217 1097 1000 856 545 87 4387 3000 2569 1635 2609 1313 Tabela 4 Capacidade da bateria em meses __ Economia de BEAN 36 35 15 66 Tabela 5 Economia de BEAN Breve Resumo em Portugu s xxii 6 Conclus o Uma plataforma computacional foi projetada chamada BEAN que inclui componentes de software e hardware usada como prot tipo de um n sensor Ele permite testar e demonstrar algoritmos para RSSF Este sistema embutido capaz de realizar todas as tarefas que um n sensor real deve realizar e tamb m tem as mesmas caracter sticas como restri es de energia mem ria e processamento BEAN pode consumir quase que 50 menos que o atual estado da arte Mica2 Mote BEAN eficiente na quest o de energia porque a MCU do BEAN um dos microcontroladores mais eficientes em termos de energia que existe atualmente gastando cerca de 0 36
88. io de tempo real permite o n sensor medir o tempo ou criar um livro de log Tamb m poss vel criar um rel gio de tempo real com o microcontrolador mas tamb m desej vel colocar o microcontrolador em baixo consumo de energia para economizar energia Esta solu o tamb m faria o software mais complexo A abordagem mais simples adicionar um compo nente de hardware desej vel que cada n sensor tenha um identificador nico como um n mero Uma solu o em software escrever um n mero no componente de mem ria na fase de programa o Embora isto seja uma solu o uma solu o via hardware mais elegante O componente DS2417 27 oferece uma solu o simples para armazenamento e recupera o da informa o de tempo com um hardware m nimo Este componente contem uma identificador nico e um rel gio de tempo real implementado como um contador bin rio Ele usa o protocolo 1 Wire onde apenas um pino necess rio para alimentar e comunicar com este dispositivo 4 Componentes de Software O projeto do BEAN tamb m inclui o desenvolvimento de componentes de software BEAN API composto de uma API application programming interface e os componentes que a implementam A API um conjunto de funcionalidades para controlar configurar e prover servi os dos componentes Breve Resumo em Portugu s cs Driver Timer Driver Os Led Ms CC1000 iwi ae Driver Config 1 Wire eee tal eee SPIConfigwation L Time
89. ion such as a number A software solution is to write a number in the memory device at the programming phase Although this is an option a hardware solution is more elegant Dallas Semiconductor devices such as DS2401 offer a unique ROM code that contains a 64 bit number We opted for a hardware solution using the DS2417 27 which contains the same unique serial number feature The 64 bit number where the first eight bits are a 1 Wire family code the next 48 bits are a unique serial number and the last eight bits are a Cyclic Redundancy Check CRC of the first 56 bits CHAPTER 4 BEAN HARDWARE COMPONENTS 48 6 PIN TSOC PACKAGE TOP VIEW Figure 4 12 DS2417 4 12 is uniquely produced by Dallas Semiconductor This number assures absolute traceability because no two parts are alike facilitating device management This serial number does not necessarily have to be the identification number for a WSN protocol A 48 bit number is usually too large to be sent in a sensor node packet A solution is to use a bit mask but this solution does not guarantee uniqueness Other approach is to use smaller identification number and the WSN management could keep a conversion table between the identification protocol number and the 48 bit serial number 4 5 4 Real Time Clock It is desired to know the time when an event happens like keeping record when a sensor signal was read Adding a real time clock allows the sensor node to time and date stamp
90. ional communication channel e Distributed processing Each sensor node should be able to process local data using filtering and data fusion algorithms to collect data from environment and aggregate this data transform ing it to information BEAN has a microcontroller for this purpose e Programmability Since this component will be a test prototyping it will be often repro grammed for development of communication protocols and applications for WSN Hence the programming should be easy BEAN chooses a microcontroller with embedded debug e Expandability The hardware design must expandable with a number of sensors to support a variety of applications BEAN project defined a generic sensor bus and radio bus for future expansion e Size For demonstration purposes the devices should be reasonable small But size is of less important in our project since it does not need to be as small as a real life wireless sensor nodes 3 4 Challenges Figure 3 2 illustrates some challenges for WSNs Each block has its unique challenge The storage block was included in the processing unit and the debugging interface is not needed in a real life sensor node A power management layer is required to control the main resource of a sensor node its energy level The power management layer could use the knowledge of battery s voltage slope to adapt dynamically the system performance 69 Another advantage is that other energy source can be added and the p
91. istance d the consumed energy over a single hop will be Esingle k amp d 6 9 However if using two hops of distance d 2 the total dissipated energy to transmit k will be Emuu 2 k amp d 2 2 amp d 4 6 10 Thus Emuti Esingle 2 The above example illustrates the advantage of using multiples hops since the energy savings is 50 6 2 CMOS technology The MSP430 is an ultra low power MCU that uses CMOS Complementary Metal Oxide Semicon ductor technology This is not a coincidence since the logic family more suitable for low power circuits is CMOS This section describes the power dissipation of CMOS to fulfill our understanding on how to minimize the power consumption It is based on Tim s book 95 The power dissipation of a CMOS gate under normal operation is due to three factors quiescent power dissipation capacitive power dissipation and transient power dissipation Quiescent power dissipation is due to leakage currents in the circuit when it is not switching It is very small at room temperature so that in most cases it can be neglected At high temperature situations it can however contribute significantly to the overall consumption It is a technology dependent factor Capacitive power dissipation Pc is due to the charging and discharging of load and stray capac itances each time a device switches This load capacitance Cz is distributed within the device transistors as well as the ext
92. iver The radio driver configures the radio properties like output power frequency and physical layer configuration and also it controls the transmission and reception of packets The radio driver defines two queues one for the transmit buffer and one for the receive buffer 5 1 1 SPI Driver Serial Peripheral Interface SPI is a 4 wire full duplex synchronous serial data link that defines the following signals e SCLK Serial Clock synchronizes master and slave e MOSI Master Out Slave In Data from master to slave e MISO Master In Slave Out Data from slave to master e SS Slave Select enable disable communication to slave CHAPTER 5 BEAN API 63 Figure 5 2 MSP430 USART as Master External Device With SPI as Slave 93 1 SPI was originally developed by Motorola and is used for interconnecting peripherals to micro processors The data is serially transmitted to other SPI devices There is only one master active at a time The speed transfers depends on the system clock Actually this is a 3 n wire interface where n is the number of devices at the bus MSP430 has a USART peripheral module that connects to the CPU as a byte oriented peripheral module It connects the MSP430 to the external system environment with three or four external pins This module can work as USART UART or SPI The USART peripheral module is a serial channel that shifts a serial bit stream of 7 or 8 bits in and out of the MSP430 Bit SYNC in
93. ject Martin 52 shows that the Bluetooth device is suggested for applications that are active over a limited time period with few unpredictable bursts of very heavy network traffic taking advantage of the high throughput The European Research group EYES 28 developed a prototype for low end sensor node Fig ure 2 1 The processor used in this prototype is the MSP430F149 produced by Texas Instruments The sensor node is also equipped with an auxiliary serial EEPROM memory of 8 Megabits used for application and data storage They are also developing an operating system for wireless sensor net work called Preemptive EYES Real Time Operating System PeerOS 65 The project has also the idea to connect specific sensor board to the sensor node but their expansion bus is not available Since the radio do not have a great range it has to add to the design an external amplifier The sensor node is programmable using a RS232 interface The Embedded Sensor Board ESB Figure 2 12 is the sensor node for the Scatterweb project 82 It uses the MSP430 processor and the REM TR1001 76 radio component The sensor is also embed ded in the board thus it is not possible to change the application It has many sensors that includes microphone tilt vibration luminosity temperature and infrared movement sensor The actuators are LEDs and a beeper Besides the transceiver it also has infrared sender and receiver hence ESB can receive IR commands fr
94. m Portugu s xvi 3 3 Comunica o A fun o de comunica o entre os n s sensores realizada pelo CC1000 16 fabricado pela Chipcon O CC1000 um transceptor de baixo consumo CMOS qualificado para transmiss o de dados de at 76 8 Kbit s No modo de baixo consumo a corrente do CC1000 0 2 A O CC1000 projetado para modula o FSK na banda ISM BEAN configurado para trabalhar na faixa de 915 MHz poss vel controlar a pot ncia do sinal de sa da e portanto especificar qual o alcance do r dio economizando energia e diminuindo interfer ncia O transceptor tamb m pode medir a intensidade do sinal de recep o RSSD fornecendo uma id ia de qu o distantes os n s sensores est o entre si Para permitir o estudo e desenvolvimento de outros r dios foi definido um barramento de r dio para o BEAN no qual contem dez pinos Usando o barramento de r dio poss vel modificar o projeto do canal de r dio sem alterar BEAN 3 4 Barramento de Sensores desej vel que o prot tipo do n sensor seja f cil de expandir para permitir uma variedade de aplica es A solu o encontrada definir um barramento de sensores O barramento de expans o prov uma interface de usu rio para placa de sensores adicionais Portanto para servir em uma aplica o espec fica basta construir uma placa de sensores espec fica e conect la ao barramento de sensores do BEAN Por exemplo para uma esta o metereol gica uma placa com
95. mbedded networked sensing medusa project http www cens ucla edu Project Descriptions Sensor Node Plat forms 2004 15 Palo Wireless Resource Center Palo wireless website http www palowireless com March 2004 16 Chipcon SmartRF CC1000 Preliminary Datasheet rev 2 1 http www chipcon com files CC1000 Data Sheet 2 1 padf 2002 17 Chipcon SmartRF CC1000PP Plug and Play Module User Manual Rev 1 22 http www chipcon com February 2003 18 Chipcon CC2420 Datasheet http www chipcon com 2004 19 Chipcon Chipcon Application Note ANO20 Remote Keyless Entry Reference Design http www chipcon com 2004 20 Chipcon Chipcon corporation CC1020 low power FSK transceiver http www chipcon com 2004 21 Continuum Control Corporation iPower http www powerofmotion com April 2004 22 Crossbow Mica2 wireless measurement system February 2004 http www xbow com Products New product _overview htm BIBLIOGRAPHY it aas 22 E YA 23 C sar Almeida Khouri Cria o de uma canal de r dio frequ ncia para a comunica o de n s sensores em uma rede de sensores sem fio Technical Report February 2004 24 Dallas Semiconductor Application Note 126 1 Wire Communication Through Software http www maxim ic com 25 Vin cius Coelho de Almeida Luiz Filipe Menezes Vieira Breno Augusto Dias Vitorino Mar cos Augusto Menezes Vieira Ant nio Ot vio Fernandes Di genes Cecili
96. mode Clearly BEAN is more economic Table 6 2 shows the Mica2 power budget Mica2 does not have an external Real Time Clock The Mica2 power budget includes the sensor board consumption To compare the platform we define two applications examples In the first scenario the sensor node will collect transmit and forward receiving data It operates for 1 of the time MCU is on the active mode In this period it reads the sensor input tries to receive packet 3 of this period and transmits in 4 of this period It never uses the external memory CHAPTER 6 ENERGY ISSUES 84 In the second scenario the sensor node acts as a repeater keeping a log of events It operates for 1 of the time In this period it tries to receive packet of this period and transmits in 1 of this period It writes to external memory using period and also reads the external memory of the time to save the received packets and keep consistency of data It does not use the sensors Table 6 3 shows the current consumption of the platforms and the two duties cycle scenarios We will assume the same current consumption for the sensor board since BEAN does not have yet a sensor board and the consumpticn depends on the sensor device mA mA current full operation 0 4 8 oos 99 99 current in receive 8 8 0 75 0 75 current transmit 12 12 0 25 0 25 current sleep 0 002 0 002 99 99 Logger Memory max Write 35 0 0 25 Read 10 0 0 25 Sleep 0 02
97. n hardware multiplier CHAPTER 4 BEAN HARDWARE COMPONENTS 27 XIN XOUT TCLK Oe Dis Abo AN gg ASTAMI Pi mm m Pe 14 r 1 4 PEPEE A lis ati mamas S A E E EOS PR PS A E elke Teer 87 Teer as TY a BANTO 7 usant morg Parola Es Figure 4 4 Functional block diagram of MSP430xx16x 44 USART s Watchdog Timer General Port Input Output and multiple Input Output with extensive interrupt capability and others The Basic Clock Module of MSP430 is design for low power consumption applications Appli cations should use low clock frequency for energy conservation and time keeping but it also should use high clock frequency for fast reaction to events and fast burst processing The faster it finishes the processing the more time at low power mode it has The Basic Clock Module addresses the above conflicting requirements by allowing the designer to select from the three available clock signals e ACLK Auxiliary clock For optimal low power performance the ACLK can be configured to oscillate with a low 32 786 Hz watch crystal frequency providing a stable time base for the system and low power stand by operation ACLK is software selectable for individual peripheral modules e MCLK Main clock MCLK is used by the CPU and system The MCLK can be configured to operate from the on chip digitally controlled oscillator DCO which is only activated when requested by events e SMCLK Sub main clock The SMCLK can be
98. nathan Curt Schurgers Sung Park and Mani B Srivastava Energy aware wireless microsensor networks In JEEE SIGNAL PROCESSING MAGAZINE March 2002 76 REM Monolithics ASH Tranceiver http www rfm com 2004 77 Tod Riedel Power considerations for wireless sensor networks http www sensorsmag com articles 0304 38 March 2004 78 Rowley Associates CrossWorks for MSP430 http www rowley co uk March 2004 79 Linnyer Beatrys Ruiz Luiz Henrique Correia Luiz Filipe Menezes Vieira Daniel F Macedo Eduardo Nakamura Carlos Mauricio Figueiredo Marcos Augusto Menezes Vieira Ed uardo Habib Mechelane Daniel Camara Antonio Alfredo Ferreira Loureiro Jos Marcos Nogueira and Di genes Cecilio da Silva Jr Arquitetura para redes de sensores sem fio Mini curso XXII Congresso da SBC May 2004 80 Linnyer Beatrys Ruiz Jos Marcos Nogueira and Antonio A F Loureiro Manna A manage ment architecture for wireless sensor networks In IEEE Communication Magazine volume 41 February 2003 BIBLIOGRAPHY 99 81 Sam Madden and Wei Hong and Rob Szewczyk TASK in Redwood Trees http today cs berkeley edu retreat 1 04 January 2004 82 ScatterWeb Project Scatterweb WebSite http www scatterweb com March 2004 83 Loren Schwiebert Sandeep K S Gupta and Jennifer Weinmann Research challenge in wire less networks of biomedical sensors In Mobile Computing and Networking pages 151 165 2001
99. nd the DCO at 7 358Mhz The operating voltage is 3 3 V Table 4 15 summarizes BEAN major components The schematic and layout are presented in Appendix A and B and were performed by the under graduate student Rangel Fl vio Resende Leite under a Sensornet Project grant CHAPTER 4 BEAN HARDWARE COMPONENTS 59 _ ___ ___m ____ _ _ a PD ee MSP430F169 60 KB KB Storage 25P40 Chip Communication Type 4Mbit Communication CC1000 Up to 76 8Kbps FSK Radio Speed Modulation Type RTC DS2417 DS2417 Table 4 15 BEAN Overview Chapter 5 BEAN API Computer science is no more about computers than astronomy is about telescopes E W Dijkstra The BEAN project also includes the development of software components BEAN API is com posed of an application programming interface API and the components that implement it The API is a set of functionalities to control configure and provide services of the hardware components through a well define interface Appendix C details the API parameters Figure 5 1 shows the BEAN API It is composed of drivers that control the hardware and provides a set of functionalities to the upper layer Although timers ADCs I O pins are peripheral units of the microcontroller they were separated in the figure to better explain the hardware software iteration Although all software runs inside the MCU the figure try to explain which software driver controls ea
100. o construct cheap processing units with sensing nodes considering energy constraints We have designed a computer platform called BEAN that includes software and hardware com ponents which is a wireless sensor node prototype It allows to test and demonstrate energy efficient networking algorithms to be developed in the Sensornet project This embedded system is capable of performing all tasks of a wireless sensor node with energy memory and processing power restric tions Figure 7 1 shows BEAN PCB with its MCU on it We presented the design considerations and components choices investigating and analyzing some of the architectural challenges posed by these devices like computational power energy con sumption energy sources communication channels and sensing capabilities In this document the state of the art for sensor node including a survey of sensor node platforms and energy management techniques were also discussed Many ideas for future work will be also presented indicating that BEAN has more uses and appli cations We hope this prototype is the first of a new family of wireless sensor network devices 86 CHAPTER 7 FINAL CONSIDERATIONS 87 Figure 7 1 BEAN board During the development of this project we found many difficulties We also conclude that to pro gram an embedded system is quite different from programming a Personal Computer The embedded systems developer must direct the tools concerning how to translat
101. o da Silva Jr and Claudionor Nunes Coelho Microkernel for nodes of wireless sensor networks In Poster ses sion of the Student Forum SBCCI Chip in Sampa 2003 S o Paulo Brasil September 2003 26 Analog Devices Tmp35 tmp36 tmp37 low voltage temperature sensors data sheet http www analog com 27 DS2417 Datasheet DS2417 1 Wire Time Chip with Interrupt http www maxim ic com 28 S Dulman and P Havinga Operating system fundamental for the eyes distributed sensor network In Progress 2002 Utrecht Netherlands October 2002 29 EAGLE EAGLE Layout Editor http www cadsoft de March 2004 30 EM MicroElectronics Em microelectronics website http www emmarin com March 2004 31 Ember Embedded RF Ember Embedded RF Wireless Sensor Networks http www ember net March 2004 32 Deborah Estrin Ramesh Govindan John Heidemann and Satish Kumar Next century chal lenges scalable coordination in sensor networks In Proceedings of the 5th annual ACM IEEE international conference on Mobile computing and networking pages 263 270 ACM Press 1999 33 K A Delin et al Sensor web in antarctica Developing an intelligent autonomous platform for locating biological flourishes in cryogenic environments 34th Lunar and Planetary Science Conference March 2003 IBLIOGRAPHY B 95 34 Harding Energy Inc Nickel metal hydride batteries handbook section 3 http www hardingenergy com
102. o it is also slow M24MO01 will spend 20 ms to write 256 bytes thus 40 ms mA per 256 written bytes The M25P40 60 will spend 22 5mA ms per CHAPTER 4 BEAN HARDWARE COMPONENTS 46 M25P40 24164 AT45DB041 M24MOI Type EEPROM Flash Flash Bus DC SPI Re 15 35mA Sms 32 bytes 10ms 128 bytes Table 4 8 Memory Comparison 1SmA 1 5 Sms 256 bytes 256 written bytes Although M24M01 has the lower write current it is not the lower power device We choose the ST M25P40 a serial flash memory that is fast and can be switched to a low power mode when it is not used Table 4 8 illustrates the above discussion 4 5 1 1 M25P40 The M25P40 is a 4 Mbit 512K x 8 Serial Flash Memory with write protection mechanisms accessed by a high speed SPI compatible bus The memory can programm 1 to 256 bytes at a time using the Page Program instruction The memory is organized as 8 sectors each containing 256 pages Each page is 256 bytes wide Thus the whole memory can be viewed as consisting of 2048 pages or 524 288 bytes The whole memory can be erased using the Bulk Erase instruction or a sector at a time using the Sector Erase instruction Figure 4 11 60 shows the memory schematic and Table 4 9 explains the pin assignment M25P40 OD Serial Data Input O Serial Data Output C S Chip Select HOLD Hold Figure 4 11 M25P40 60 Table 4 9 Memory Pin Description o n glo mi
103. odule 28x20 mm contains all RF components required for proper operation CHAPTER 4 BEAN HARDWARE COMPONENTS 56 x i x Figure 4 20 Programmable output power allows changing radio range Output Power dBm Current Consumption mA gt 86 O BE A PE A EE PAS BR O RR ES A EE Table 4 13 Output power settings and typical current consumption at 868 Mhz Figure 4 21 CC1000PP 17 CHAPTER 4 BEAN HARDWARE COMPONENTS 57 Pin Description Pin Description Ci veel 2 vec 3 PAE 4 Pama s PCR 6 Chip ou DT Bio s Dk on 10 Rss Table 4 14 Pin description of Radio Connector This includes the CC1000 as well as a reference crystal and a LC output filter In a ready built form the CC1000PP is ideal for quick prototyping The module may be connected to a prototyping board or PCB containing the rest of the system The CC1000 can in this way be tested in a complete system without having to create a custom RF PCB layout 4 6 4 Radio Connector To allow the development of other radio boards BEAN defines a radio connector as illustrated in Table 4 14 The pin description names are the radio signals from CC1000 Using a radio connector it is possible to modify the radio design without changing BEAN For instance using an adapter it is possible to use the CC1000PP module The radio channel implemented was designed as an under graduate term project at the Electrical Engineering
104. oftware is the part that can only be screamed at Unknown In this section we discuss WSN components some characteristics and requirements of a sensor node prototype and present the system architecture of a generic sensor node prototype 3 1 WSN Components WSNs can be classified according to its organization as hierarchical sensor nodes self organized in clusters or flat to its composition as homogeneous the same type of sensor node or heterogeneous different types and to its mobility as static immobile or mobile 79 In a WSN the information flows from source nodes to one or more access points An access point can be a sensor node with the same or more hardware capability The access point purpose is to collect data from the network and send to an external observer called base station 54 The project of a more computational powerful access point is outside the scope of this work Our project also does not include any mobile feature The task that sensor nodes must be able to do includes monitor their physical environmental process their measurement data and forward other sensor nodes readings 14 CHAPTER 3 SENSOR NODE ARCHITECTURE 15 Figure 3 1 Block Diagram of Sensor Node Prototype 3 2 Sensor node functional components Figure 3 1 presents the system architecture of a generic sensor node prototype It is composed of six major blocks power supply communication processing unit storage debugging interface
105. oid rf set mode byte mode byte rf recv void rf send byte data void rf send byte byte data void rf set power byte powerLevel byte rf get power void rf set freq byte newFreg byte rf get freq C 6 SPI void spi radio system init void spi radio init void spi radio rxmode void spi radio txmode void spi radio send byte data byte spi radio recv void send string using tx int char s APPENDIX C API 110 C 7 Queue void queue Init queue ptr q byte buffer byte max size BOOLEAN queue Empty queue ptr q BOOLEAN queue Full queue ptr q BOOLEAN queue Enqueue queue ptr q byte d byte queue Dequeue queue ptr q Appendix D Radio Board Figure D 1 Radio Board Bottom Layout Figure D 2 Radio Board Top Layout 111 APPENDIX D RADIO BOARD 112 drs Wes Vea Y GND GND GNO GNO Titulo Placa de R dio Numero do Documento 1 Reva 2 Data 18 12 2003 Sheet 1 1 Figure D 3 Radio Board Schematic Layout Appendix E Bill of Materials tdid vk os So EE EE DigiKey number idee is it 28 200 TKS2362CT ND INDUCTOR 2 7NH LL TYPE SMD WEE EER TKS2365CT ND INDUCTOR 4 7NH LL TYPE SMD TKS2366CT ND INDUCTOR 5 6NH LL TYPE SMD PCD1173CT ND INDUCTOR 12UH 5 FIXED SMD fn Me EE ee EE CT RROSP82 0KDCT ND RES 820K OHM 1 16W 5 0603SMD 0151 E ea NE ll Capacitors It E 399 3100 1
106. om standard remote controls ESBs communicate via the serial port with a PRE TPD ER ER EDS EDE EN EE er RE HE Pe Re do ee CHAPTER 2 RELATED WORK 9 ee AA RE due RS SE EE standard computer for application development ESBs communicate with mobile phones via the serial port to connect to a wide area mobile phone networks This enables remote configuration of ESBs via short messages SMS as well as reception of sensor data on arbitrary mobile phones world wide ESB has a battery compartment for three AAA batteries It also has a voltage controller to stabilize the input voltage to 3 V and an additional connector for a solar panel LAMPS micro Adaptive Multi Domain Power Aware Sensors project 63 Figure 2 8 and WINS 106 Figure 2 9 from Rockwell Science Center chose low power StrongARM SA 1100 microprocessor for computation uses an energy management technique uAMPS can program to change dynamically the voltage supply and clock frequency of the SA i 100 from 74 to 206 MHz and 0 85 to 1 44 V respectively WINS enables data rates of 100 kbits per second over ranges in excess of 100 meters At the link layer a Time Division Multiple Access TDMA protocol has been implemented The processor runs at 133MHz with 150 MIPS The processor consumes 300 mW the radio consumes 600 mW in transmit mode and 300 mW in receive mode and the sensor transducers consumes 100 mW The type of sensors are seismic acoustic magnetometer and acceler
107. ome piece of code are dependent on this workbench such as interrupt routines For the near future if the JTAG debugging software is completed mspgcc will be a very interest ing option but the BEAN API will need to be ported to this compiler Table 5 3 depicts the above discussion Chapter 6 Energy issues Beware of bugs in the above code I have only proved it correct not tried it Donald Knuth This chapter discusses energy issues A basic energy model for a sensor node is presented We discuss the difference between power and energy and also low power and energy efficiency Two power saving schemes are also presented We discuss the power down versus shutdown trade off for a memory device in terms of minimum idle time in order to obtain the best energy saving Finally the power budget of BEAN is presented and compared to the Mica2 Mote 6 1 Background In this section we present a background to discuss energy issues We also present a basic version of an energy model for a sensor node Power is defined as voltage times current P V xi 6 1 It is important to distinguish between Power and Energy Power is the energy consumption per unit of time as illustrated 74 pe CHAPTER 6 ENERGY ISSUES as current Figure 6 1 Current per unit time of a set of tasks Thus the energy consumption is given by E Vrixt 6 3 As stated before a sensor node consists of several components such as radio memory micro cont
108. ometer The Jet Propuision Laboratory JPL 2 from California Institute of Technology is developing a project called SensorWeb supported by National Aeronautics and Space Administration NASA The Sensor Web is an independent network of wireless intra communicating sensor nodes called sensor pods deployed to monitor and explore a limitless range of environments The engineering objective is to test the Sensor Web in harsh environments as for instance Antarctica 33 PODS 8 is a research project in University of Hawaii that built WSN to investigate why endan gered species of plants will grow in one area but not in neighboring areas They deployed camouflaged sensors node called Pods in Hawaii Volcanos National Park The Pods consist of a computer radio transceiver and environmental sensors sometimes including a high resolution digital camera relay sensor data via wireless link back to the Internet Bluetooth and IEEE 802 1 1b are chosen as channels and data are delivered in IP packets Two types of sensor data are collected weather data and image data Some commercial sensor nodes are already available Millennial Net 61 builds heterogeneous WSNs dividing the networks in sensor nodes endpoints routers and gateways Its sensor node is called i Bean its typical range is 30m and data rate up to 250 kbps Ember 31 is another commercial solution Its sensor node uses the Atmega 64L processor and TIME SON TT TO HA SS ki io SEE G
109. os sensores de temperatura luz e humidade 3 5 Depura o Para depurar quatro LEDS s o adicionados ao projeto do prot tipo O consumo de corrente dos LEDS pode ser maior que o do r dio e portanto aconselh vel us los apenas para depura o A interface JTAG IEEE 1149 1 usada para programar e depurar o microcontrolador servindo tamb m para programar a mem ria flash 3 6 Fonte de Energia Como o projeto visa a constru o de um prot tipo a op o foi usar uma fonte de alimenta o para aliment lo Breve Resumo em Portugu s xvii Um diferencial do projeto do BEAN a possibilidade de medir o consumo de energia de cada componente em particular r dio microcontrolador barramento de sensores mem ria externa e to dos Foi adicionado um resistor shunt na fonte de alimenta o de cada componente permitindo medir o consumo de energia Para o nosso conhecimento este o primeiro prot tipo de n sensor com esta vantagem Outra op o interessante conectar o barramento de sensores do BEAN com os pontos de medi o de outro BEAN Isto levar a uma nova metodologia para avaliar dinamicamente o consumo de ener gia de algoritmos de RSSF e como a a o de medir ser feita por outro BEAN a medida ser inde pendente e n o distorcida pelo ato de medir 3 7 Outros componentes desej vel saber quando um evento ocorre como por exemplo ao gravar a leitura do sinal de um sensor Adicionando um rel g
110. ose 32 bit CHAPTER 4 BEAN HARDWARE COMPONENTS 23 RISC microprocessor based on the ARM architecture that is rated as the most efficient processor in MIPS Watt The processor offers a 16KB instruction cache a 8KB data cache serial VO and JTAG interface all combined in a single chip Program and data storage are provided by IMB SRAM and 4MB of bootable flash memory Connection with the sensor modules is easily achieved using a 4 wire SPI interface The processor has three states normal idle and sleep that can be controlled to reduce power consumption The choice of MCU depends on application scenario The ideal choice of microcontroller is the one that matches its performance level with applications need Other factors that affects the selection of the proper microcontroller besides energy level include word size peripherals memory speed Physical size price availability personal experience and vendor support CHAPTER 4 BEAN HARDWARE COMPONENTS op gt q 5 as w IR f ci min els N zZ E BIS 5 Aa m ea Als x q vm E 16 60 Kb 2048B ES lt PIC16F8X MSP430F149 SrongArm 1100 MC68HCOSPV8A Characteristic AT90LS8535 ATMegal28L Table 4 1 Microcontroller Comparison CHAPTER 4 BEAN HARDWARE COMPONENTS 25 __ _ __ __ mt AM LPMO LPM2 LPM3 LPM4 Operating Modes Figure 4 1 Typical Current Consumption vs Operation Modes 93 4 1 3 Texas Instruments M
111. ow Then the one byte instruction code must be shifted in to the device most significant bit first on Serial Data Input D each bit being latched on the rising edges of Serial Clock C The instruction set is listed in Table 5 2 60 Every instruction sequence starts with a one byte instruction code Depending on the instruction this might be followed by address bytes or by data bytes or by both or none Chip Select S must be driven high after the last bit of the instruction sequence has been shifted in In the case of a Read Data Bytes READ Read Data Bytes at Higher Speed Fast Read Read Status Register RDSR or Release from Deep Power down and Read Electronic Signature RES instruction the shifted in instruction sequence is followed by a data out sequence Chip Select S can be driven high after any bit of the data out sequence is being shifted out CHAPTER 5 BEAN API 68 Description One byte Instruction Code Address Dummy Data bytes bytes bytes Write Enable 0000 0110 0 WRDI Write Disable 0000 0100 READ i READ Read Data Bytes 0000 0011 FAST Read Data Bytes 0000 1011 Ed at Higher Speed Ee pp Page Program 00000010 SE Sector Erase 11011000 BE Bulk Erase 11000111 DE Dep Poweriowa 0 1001 Ba O T Release from Deep 1010 1011 3 Read Electronic Eek ad IA Table 5 2 Memory Instruction Set In the case of a Page Program PP Sector Erase SE Bulk Erase BE Write
112. ower management can make the best use of the energy resources New network protocols are necessary including link network transport and application layers to solve problems like routing addressing clustering synchronization and they have to be energy efficient A micro kernel for sensor node is necessary Many operating systems exist for small device like handheld and PDAs but not so small as a sensor node and not aggressive on power management for long AT ME EN E A A GE Ee ee EES A CHAPTER 3 SENSOR NODE ARCHITECTURE 19 Svs oO Power Network Operating Filtering amp System amp Igori Management Protocols Sensing Sensors Figure 3 2 System architecture and challenges of a sensor node life and wireless communication as well Algorithms for filtering and data fusion are also neces sary Many other challenges exist including localization of sensor nodes and security issues such as cryptography Although WSN is a recent research topic many interesting works already exist such as microker nels 25 middlewares 102 scheduling algorithms 101 routing protocols 100 46 deployment algorithms 98 and architecture management scheme algorithms 80 for WSN Chapter 4 BEAN Hardware Components But what is it good for Engineer at the Advanced Computing Systems Division of IBM 1968 commenting on the microchip Make everything as simple as possible but not simpler Albert Einstein In thi
113. p However in sensor nodes this approach is not valid since it is highly desirable to tum off the radio because it is usually more power consumer than the other components Turning off the radio unfortunately means that a neighboring node that detected an interesting event cannot wake a node up This can lead to missed events and packets increasing latency and wasting energy Hence a radio technological challenge is to have an ultra low power communication channel to wake up neighboring nodes on demand Currently such wakeup radios are still an area of active research in chip design and communications research 4 4 Sensing Unit The sensing unit is composed of a group of sensors which are devices that produce electrical sig nals to a change in a physical condition Sensors can be classified as either analog or digital devices depending on the type of output they produce Many types of sensor exist as for example magne tometer accelerometer light temperature pressure humidity seismic sensor gas sensor for H2S Oz sonar rangers array sensors for images Given the diversity of sensors there is no typical power con sumption as illustrated at Table 4 6 The type of sensors being used in a sensor node will depend on the application purpose The sensor type can also affect the radio design since it could need a higher throughput like image sensors Magnetometers are sensors that measure magnetic fields They can measure 60 Hz fluctuations f
114. pending only 2 1 nJ Instruction Other examples taken from 14 are e 0 2 nJ Instruction for Cygnal C8051F300 32KHz 3 3V e 0 35 nJ Instruction for IBM 405LP 152 MHz 1 0V e 0 5 nJ Instruction for Cygnal C8051F300 25MHz 3 3V e 0 8 nJ Instruction for TMS320VC5510 200 MHz 1 5V e 1 1 nJ Instruction for Xscale PXA250 400 MHz 1 3V e 1 3 nJ Instruction for IBM 40SLP 380 MHz 1 8V e 1 9 nJ Instruction for Xscale PXA250 130 MHz 85V The energy consumption will be given by power V i EMcU SIE TEE id Pla GP od Using the MSP430 datasheet V 3 3V clock rate 7 3Mhz current s400uA and supposing CPI we have 0 361nJ instruction Discounting Cygnal C8051F300 due to its slow clock 32KHz and IBMAOSLP because it is a PowerPC BEAN s MCU is the most energy efficiency microcontroller In an energetic perspective MSP430 is an order of magnitude more economic than ATMEGA strengthening BEAN choice of MCU avg 2 CHAPTER 6 ENERGY ISSUES 81 6 5 Memory The memory device has a down power mode But to go to this operating mode it is necessary to send a command which spend energy In this section we will determine the minimum required time that it is necessary to go to the down mode and also save energy The memory standby current is 5SOuA Let t be the total time that memory will be inactive Let V be the memory supply voltage Thus the energy spent at standby mode will be V t 50uA To go to the down mode it is
115. pherals that include ADCs Hence initially sensor boards do not need dedicated ADCs ADCs have a limited rate to converter signals for ex ample the MSP430 family 44 is capable of 200 000 samples per seconds ksps divided in eight channels For complex sensor boards that need higher sample rates or larger channel number a dif ferent approach is to embedded ADCs directly on the sensor boards Depending on the sensor type it can change completely the sensor node design For example CHAPTER 3 SENSOR NODE ARCHITECTURE 17 eS an image sensor would need a very high bandwidth which would require a communication block redesign 3 3 Characteristics and Requirements This project does not intent to design a device that will be comparable to real life wireless sensor node While in a real product size and cost are essential requirements our design focus in a system ease to expand with a number of sensors robust and easy to reprogram Following is the design considerations characteristics and requirements when designing BEAN e Energy efficiency Sensor nodes must be energy efficient Sensor nodes have a limited amount of energy that determines their lifetime Since it is unfeasible to recharge thousands of nodes each node should be as energy efficient as possible Hence energy is the key resource being the primary metric for analysis BEAN project focus on energy efficient COTS e Power Aware The hardware should be able to estima
116. preamble and SOF dete q Finished receiving data or error detected Figure 5 8 Radio Driver using State Machine 19 5 1 7 Case Study Here we present an application example of BEAN API using the LED Queue and Radio Drivers First the example illustrates how to tum on and off the red LED and how to display a binary number using the led display function Then a queue is created and data are inserted removed and inserted again using the Queue functions Finally the radio which is initialized with an initial queue and the frequency operation sends data Appendix C presents the BEAN API 5 2 Development Tools Many development tools are available for the MSP430 family It is important to discuss this issue because when programming embedded system the source code is dependent on the development tools A complete toolset includes at least a C compiler assembler linker simulator and in circuit emulator A study of these tools is presented below The MSP430 Flash Emulation Tool FET by Texas Instruments is a tool that includes hardware and software components to develop applications The tool has an integrated software environment CHAPTER 5 BEAN API 71 Code 5 1 BEAN API aplication example source code 1 include led h include queue h include types h include radio h define QUEUE_SIZE 30 void main ee 10 byte i 12 queue_t q_test 13 queue t q rx 14 queue t q tx 15 byte buffer QUEUE_SIZE
117. r MCU E Memory Radio RTC D Figura 3 API xviii Software Hardware VO Sensor Analog Digital do hardware atrav s de uma interface bem definida A Figura 3 mostra a BEAN API Ela composta de drivers que controlam o hardware e prov um conjunto de funcionalidades para a camada acima Embora temporizadores conversores anal gico digital ADC pinos de entrada e sa da sejam unidades perif ricas do microcontrolador eles est o separados na figura para melhor explicar a integra o hardware software Embora todos os compo nentes de software atuem dentro do MCU a figura tenta explicar qual driver de software controla os componentes de hardware O hardware do rel gio e o n mero serial comunicam com o MCU atrav s do protocolo de software 1 Wire A mem ria externa e o r dio comunicam com o MCU atrav s do m dulo SPI Temporizadores s o configurados usando o Digital Clock e Timer Driver Para medir o consumo de energia e os sinais dos sensores necess rio usar o ADC que controlado pelo ADC Driver A API comunica com a camada de cima que um sistema operacional sendo desenvolvido para o BEAN Alguns componentes de software s o e MCU Config O bloco de configura o do MCU permite mudar o modo de opera o do MCU O MCU tem seis diferentes modos de opera o e s o capazes de tratar eventos de interrup o e ADC Driver A funcionalidade do ADC driver configurar e manipular o m dulo de h
118. reading analog sensor outputs e SPI serial SPI interface SIMO MISO CLK e 12C serial I C interface SDA SCLK e PWM signals for reading digital sensor outputs at pulse width format e Reset signal capable of resetting the sensor node After classifying the sensor bus signals the BEAN sensor bus was defined Table 4 7 shows the assigned sensor bus pin signals BEAN sensor bus has 31 pins It has at least a signal for each sensor signal type previously defined Although the MCU has eight ADC pins since one pin was necessary for the radio connector seven ADC pins were left for the sensor bus The BEAN PW signals are digital lines that may have other purposes than power control like reading digital sensors Table 4 7 also depicts the Mica2 51 pins and Mica2 Dot 18pins sensor bus 4 5 Other components Here we present the other components that compose BEAN 4 5 1 Extended memory Many algorithms and applications required a large number of data to be stored The amount of RAM in the microcontroller is limited The solution to this problem is to add an extemal memory device that will work as secondary storage like a harddisk in a Personal Computer CHAPTER 4 BEAN HARDWARE COMPONENTS 45 Type Platform Mica2Dot TBpins Power GND VCC terapi Ol Rx Tk E PEA E em Table 4 7 Sensor bus comparison Pwmlb a PECEREN ThermPWr Bat Mon AC AC Led1 3 Thrul 3 no connection Many types of memory de
119. resented CHAPTER 6 ENERGY ISSUES 77 E d Transmit Tx Amplifi Electronics x pres Es k Eat k d Receive Electronics i Figure 6 2 Radio Model k bit packet The radio consumes E rx etec J bit to run the receiver circuitry in other words to process the re ceiving bit In transmission mode the radio consumes ERX elec J bit to run the transmitter circuitry which process the transmitting bit The radio also dissipates energy with the transmitter amplifier amp J bit m To a distance d there is the path loss In the free space model the path loss increases with the square of the distance 19 Thus to transmit k bits at distance d the radio expends Era k d Erx etec k amp k d 6 7 To receive k bits the radio expends Enx k d ERX elec sk 6 8 Some models assume E px elec Erx etec Eelec as depicted in Figure 6 2 If two sensor nodes are far away from each other direct communication will require a large amount of transmit power from each node since the distance d is large A solution is to route the data though intermediate sensor nodes to minimize the transmit amplifier energy This is called multiple hops The optimum distance will depende on the Estec and amp factors CHAPTER 6 ENERGYISSUBS om To simplify the discussion suppose the radio energy circuitry Esec consumes too little energy and can be neglected If direct transmitting k bits over a d
120. roller power and sensors Each component has a set S of possible states s1 Sk The current consumption will be different for each state A task will have each component in a specific state Table 6 1 in the section 6 6 shows the state and current of each BEAN component The total current of a task will be the summation of each component s current Given a set of operation modes the power consumption of a sensor node will be N MV k in st 6 4 nel where V is the supply voltage 7 is the supplied current in Amperes for task n tn is the execution time in seconds N is the number of tasks Figure 6 1 shows a possible current consumption per unit time for a set of tasks The total Energy consumption supposing fixed supply volt will be E V x i t 12 tz ig tz 6 5 This model assumes that the energy needed to switch between the different states is meaningless it is already embedded in the execution time factor and the battery is a perfect energy storage device eg recharging capability is not being considered CHAPTER 6 ENERGY ISSUES 76 Let r be the transmission rate bits s The energy per bit transmission J bit is Ep V xi r 6 6 6 1 1 Battery behavior In most low power design designs as our basic energy model batteries are implicitly viewed as ideal charge reservoirs containing a fixed amount of charge and providing a fixed output voltage until the charge is fully depleted In reality batteries ar
121. rom power lines or the Earth s naturally occurring magnetic field Accelerometers use capacity sensing to measure distance between a reference mass and a proof mass The word accelerometer is a bit of a misnomer since force is the unit being measure Accelerometers can measure the magnitude and direction of Earth s gravity An orientation unit can be design combining three components between accelerometer and mag netometers Each sensor should be mutually perpendicular Rotating the orient unit each sensor de tects the Earth s magnetic field and detects the new orientation An application that uses this scheme CHAPTER 4 BEAN HARDWARE COMPONENTS 43 Type of Current Voltage Min Max Accuracy Product temor consumption range me Accuney Magnetometer 2 7 5 25 V 0 5Gauss 2mGauss AA002 02 Ear Accelerometer 600uA 3 5 25V 2g 25mg ADXL202 A eam Light 2 7 5 5V Oto26mW m2 6mW m2 H53371 ee ee sso Temperature 600uA 2 7 5 5V 20 C 100 C 0 25 C AD7418 Pressure 650uA 2 7 5 5 0 6 gauge 2 4mPSI SM5310SMI ort amara EM Humidity 200uA 4 9V 0 100 relative 2 RH HIH 3605 Table 4 6 Sensor types specifications is 39 Sensors have a startup time in other words minimum time after turned on to correct sample data It is desirable that the startup time be as small as possible because it is required to turn off the sensors to reduce energy when they are not being used In the deployment on
122. rthermore Li based battery cost is higher Among the rechargeable battery types Nickel Metal Hydride NiMH is the only environmentally friend product Its energy density is second only to Li battery types and it can be recharged at any time without experiencing voltage depression memory effect The disadvantage is that it needs overcharge overdischarge protection 4 3 Communication Sensor nodes must communication among them and also to a base station using a wireless communi cation channel We explore three possibilities laser infrared and radio frequency RF channels 4 3 1 Laser communication The advantages of laser communications are e Spend less energy than radio over larger range e Security since there is no broadcast and if a channel is intercepted it would interrupt the signal e No need for antenna The disadvantages are e Needs line of sight LOS since the laser beam of the transmitting device must be lined up to the receiver It involves not only a temporal step but also a spatial acquisition step e Sensible to atmospheric conditions e The communication is directional and due to the fact that sensor nodes will be deployed ran domly this is not an attractive solution The transmitting device uses a laser beam to send information and the receiver device uses a photodiode or CCD array Optical communication can be classified into two types passive and active communication In active optical communication th
123. s ranging from 4 to 32 bits varying the number of timers bits of ADC power consumption size of memory etc A discussion of these devices is presented below Table 4 1 shows comparison of actual microcontrollers Microcontroller Control Units MCUs have many attributes like number of bits flash memory size of memory number of ADC and timers operating voltage current consumption and power modes An important feature is the start up time since the MCU will usually go to idle mode but it is not very often divulged The EM6603 30 which is 4 bit is ultra low power MCU but its computational power is also very limited It is used for Radio Frequency Identification RFID applications The advantages of Motorola DragonBall MC9328MX1 are that it is 16 bit and has a Bluetooth Accelerator radio interface It also has a Time Processing Unit TPU a co processor unit that seems to be able to perform various real time control tasks like sampling a pin The shortcomings are performance only 2 7 MIPS no integrated memory or flash relatively large footprint 100 or 144 pins not ultra low power The ARM family has floating point computational capabilities being a possibility for devices demanding more computational power such as a gateway or a robust sensor node which can be the head of hierarchical wireless sensor network cluster One common example is the processor module Intel StrongArm SA1100 embedded controller The SA1100 is a general purp
124. s a requirement of any 1 Wire bus e The system is capable of generating an accurate and repeatable 1us delay e The communication operations must not be interrupted while being generated The four basic operations of a 1 Wire bus are Reset Write 1 bit Write O bit and Read bit The time it takes to perform one bit of communication is called a time slot Byte functions can then be derived from multiple calls to the bit operations See Table 5 1 24 below for a brief description of each operation and a list of the steps necessary to generate it Figure 5 4 24 illustrates the waveforms graphically The 1 Wire Driver is also the driver component for the RTC The protocol for accessing the DS2417 via the 1 Wire port is as follows e Initialization A O 11 Wire is a registered trademark of Dallas Semiconductor CHAPTER 5 BEAN API 65 Waveform Legend em Master Resistor pull up Slave Figure 5 4 1 Wire waveforms 24 Write 1 bit Senda 1 bitto the 1 Wire slaves Drive bus low delay 6us Write 1 time slot Release bus delay 64us send a O bit to the 1 Wire slaves Drive bus low delay 6Ous Write O time slot Release bus delay 10us Read a bit from the 1 Wire slaves Drive bus low delay 6us Release bus delay 9us Sample bus to read bit from slave Delay 5Sus Drive bus low delay 480s Release bus delay 70us Sample bus O device s present l no device present Delay 410us
125. s bits Using general purpose I O pins to handle an interface in this way is called bit banging This approach is very flexible as the user is free to use any I O pins on the microcontroller but the software is more complex and it is also slower than using a hardware solution The biggest advantage of using a hardware interface module is that the communication is faster than bit banging CHAPTER 4 BEAN HARDWARE COMPONENTS 52 CC1000 MCU General VO SCK MOSI MISO PCLK PDATA Figure 4 16 SPI Configuration Interface 96 The alternative is to use a synchronous serial interface to interface with the CC1000 An SPI mas ter interface or some types of USART Universal Synchronous Asynchronous Receiver Transmitter are suitable When interfacing with an SPI master the MISO master in slave out and MOSI master out slave in pins should be connected together The MOSI pin should be configured as an input when reading from the CC 1000 A free general VO pin can be used to interface with the PALE pin of the CC1000 as show in Figure 4 16 The other SPI signals are SCK Serial Clock and SS Slave select SS is not used when interfacing the CC1000 with an SPI interface The software driver must be careful to avoid short circuit since the MISO and MOSI are connected together If both port are configured as output and emit different signals at the same time it may damage the circuit Chipcon recommends resetting the CC1000 b
126. s chapter we will discuss the component choices for the hardware design of BEAN A com parative study of COTS for the major sensor node prototype architectural block processing power communication sensing storage and debugging interface units is presented Then we comment about interfacing the radio with the MCU Finally we summarize the major BEAN hardware project decisions 4 1 Processing Unit Since the sensor node is expected to communicate process and gather sensor data sensor nodes must have processing units The central processing unit of a sensor node determines to a large degree both the energy consumption as well as the computational capabilities of a sensor node Many different types of CPUs can be integrated into a sensor node and they are discussed in this work There are a large number of commercially available microcontrollers microprocessors and field programmable gate arrays FPGAs which allows a big flexibility for CPU implementations 20 CHAPTER 4 BEAN HARDWARE COMPONENTS 21 ES SS SS N LE A A A AR 1 E el 4 1 1 Programmable Logic Many types of programmable logic are available Complex Programmable Logic Devices CPLDs consist of multiple PAL like Programmable Array Logic logic blocks interconnected together via a programmable switch matrix 6 CPLDs are used for high performance control logic or complex finite state machines but limited to the size of a few thousand gates Although there is low power C
127. stava 75 suggested the use of an intelligent radio hardware with a dedicated CPU that enables packets that need to be forwarded to be identified and redirected from the communication block itself allowing the computing block to remain in Sleep mode saving energy Since there is no such intelligent radio hardware COTS yet it would need a processor in the communication block to determine to forward or not the received packet Thus it would not save a processor energy This approach may be interesting if the main unit consumes much more energy than the communication processor block BEAN approach is a single CPU handling multiple VO devices It is simpler and less expensive The communication block does not need a processor because BEAN has already the processing unit to process the radio packets This approach may change if the communication channel increases to a very high rate and BEAN is overloaded and incapable of processing all the radio packets The processing unit may have other approaches such as finding the high energy pieces of software and move them to dedicated hardware Lach 51 shows that implementing a JPEG compression algorithm for WSN saves energy This approach is interesting for a more robust or specific application sensor node that is not BEAN purpose 3 2 2 Sensing Block Sensors can produce analog or digital signals Analog sensors need an Analog to Digital Converter ADC In general microcontrollers have additional peri
128. structures in a forest for fire detection 81 in other environments like oceans and air resources in precision agriculture in disaster recovery service in condition based maintenance devices like powerplants in biomedicine 83 in a smart kindergarten to create a devel opment problem saving environment for early childhood education 55 Other applications include managing complex physical systems like airplane wings and complex ecosystems A sensor node is composed of a power unit processing unit sensing unit and communication unit The power unit has the purpose to power the node The processing unit is responsible to collect and process signals captured from sensors and transmit them to the network Sensors devices are devices that produce a measurable response to a change in a physical condition like temperature and pressure The wireless communication channel provides a medium to transfer signals from sensors to CHAPTER 1 INTRODUCTION 2 ed OO EO EEE SD E BEE o a Monitoring Area Sensor Node Base Station Figure 1 1 Wireless sensor network exterior world or a computer network and also an internal mechanism of communication to establish and maintain of WSN Power consumption is and will be the primary metric to design a sensor node While there is the Moore s Law that predicts doubling the complexity of microelectronic chips every 18 month 68 and Gilder s Law 68 which theorizes a similar exponential growth in
129. t operating modes and is fully supported during interrupt event handling There are the active mode AM and five low power modes LPMO LPM1 LPM2 LPM3 and LPMO LPM4 We actually only need to use two operating modes the active mode and the LPM3 since this is the most economical operating mode that does not completely turn off all clocks e ADC Driver The ADC driver functionality is used to configure and manipulate the ADC hardware module This driver is used to measure the analog input signals provided by sensors or the supply voltage level CHAPTER 5 BEAN API 62 e 1 Wire 1 Wire module implements the 1 Wire serial protocol It is used to communicate with DS2417 27 component e Digital Clock This module configures the MCU clock providing a way to set the internal clock as a multiple of the basic clock the 32 KHz oscillator e Timer Driver The MCU has a set of timers which can be configured and set using this driver e LED Driver The LED driver is a set of functions to control the state on off of four LEDs e SPI Driver A SPI module configures the SPI hardware This serial protocol is used by the external memory and radio e Queue A Queue module implements a circular queue abstract data type The radio driver uses this module The queue module is independent of the radio driver and may be used by other software components e Memory Driver The memory driver module controls the external memory M25P40 e Radio Dr
130. te what energy is left so algorithms can adapt to the available power BEAN is capable of measuring its own overall power consump tion e Low cost It is desirable that sensor nodes be cheap since WSN may have hundreds or thou sands of sensor nodes For this purpose BEAN uses only the necessary devices e Distributed sensing Using a wireless sensor network many more data can be collected com pared to just one sensor Even deploying a sensor with a large range it could have obstructions Thus distributed sensing provides robustness to environmental obstacles 32 e Wireless communication The sensor node needs to be wireless In many applications the en vironment being monitored does not have installed infrastructure for communications Laying wires may be too difficult or expensive thus sensor nodes should use wireless communication channels The data rate in WSN is low thus a short range transceiver in a license free band is sufficient e Multi hop sensor node may not reach the base station The solution is to communicate through multiple hops Another advantage is that radio signal power is proportional to r CHAPTER 3 SENSOR NODE ARCHITECTURE 18 eee where r is the distance of communication Depending on radio parameters as shown in 56 it can be more energy efficient to transmit many short distance messages than one long dis tance message Thus the sensor node should receive and transmit needing a bi direct
131. tion time to one cycle of the processor frequency Four of the registers are reserved for special use as program counter stack pointer status register and constant generator Figure 4 2 44 The remaining registers are available as general purpose registers Peripherals are connected to the CPU using a data address and control bus using specific registers for control and data transfers sharing the memory space and can be handled with all memory manipulation instructions The MSP430 consumes less than 400 mA in active mode operating at 1 MHz in a typical 3V CHAPTER 4 BEAN HARDWARE COMPONENTS 26 MDB 16 16 Bit ALU 16 RI Figure 4 2 Register Overview 44 Figure 4 3 Low Power CPU 44 system and can wake up from a 2mA standby mode to fully synchronized operation in less than 6 us These exceptionally low current requirements combined with the fast wake up time 6us enable a developer to build a system with minimum current consumption and maximum battery life Figure 4 3 shows the current consumption of an application that switches between active and stand by modes MSP430 family has a rich peripheral set It has an abundant mix of peripherals and memory sizes enabling true system on a chip designs as illustrated in Figure 4 4 44 The peripherals include a 12 bit Analog to Digital converter multiple timers some with capture compare registers and PWM output capability integrated precision comparator on chip clock generatio
132. to determine the operating range The voltage controlled oscillator VCO is completely integrated except for this inductor Finally the last block is the crystal oscillator circuit 4 6 2 Interfacing Radio and the Microcontroller This section discusses how the CC1000 can be interfaced to the MCU The only requirement is that the MCU to have enough free VO pins To configure the CC1000 three I O pins are required one bidirectional and two output pins The pins connected to PDATA Programming Data and PLCK Programming Clock can be shared with other circuitry providing these circuits are not active when the configuration interface is active The PALE Programming Address Latch Enabled signal must CHAPTER 4 BEAN HARDWARE COMPONENTS 51 Figure 4 15 CC1000 MCU Hardware Interface 96 be driven by a pin dedicated only to interfacing the CC1000 For the data interface two I O pins are required one bidirectional for DIO Data Input Output and one input for DCLK Data Clock The pin used to interface with DCLK should be able to generate an interrupt on signal edges Figure 4 15 shows the CC1000 MCU hardware interface configuration In power down mode the CC1000 pins assume the states described in Table 4 12 Table 4 12 CC1000 Pins 4 6 2 1 Configuration Interface The CC1000 is configured using the PCLK PDATA and PALE signals The configuration registers are also readable so that the user can verify settings and read statu
133. to enerate up to 4K bytes of code It is free available at Texas Instruments 94 The MSP430 Simulation Environ ment 94 is a free Texas Instruments tool that only simulates assembly instructions It also simulates VO and LCD The Hi Tide is a MSP430 C Compiler from Hi Tech Software 36 It does not include a simulator CHAPTER 5 BEAN API 73 Tool Name EW430 IAR Systems Embedded Workbench for MSP430 Highly optimized ETA C C 430 Compiler JTAG debugger 430 Simulator VS430 IAR Systems visualSTATE for 430 UML state machine design tool Rs With auto C code generation for the 430 series C Compiler Assembler Linker IDE Source Level Debugger AQ430 Quadravox Inc Complete C code development system source level debugger CrossWorks Rowley Associates Optimizing C compiler assembler linker core simulator flash downloader JTAG debugger MSPGCC GCC_ GNUCCompiler Tm kickstart 4K C Compiler Assembler Debugger Simulator Table 5 3 Development Tools JTAG interface The main advantage of this toolset is that there is a Demo Code Wizard that was of great help to initially configure MSP430 piece of code We used the EW430 C Compiler since it is the only one that includes an interrupt input output simulator The simulator was very important because we designed the software in parallel with the hardware before having a board to run the software BEAN API was developed with EW430 and s
134. tor Write Disable Write Enable Write Status Register Wireless sensor network Yet Another Tiny Operating System
135. upo de sensores e atuadores que dependem da aplica o da RSSF 3 Componentes de Hardware Nesta se o ser o discutidos as escolhas dos componentes de hardware 3 1 Unidade de Processamento O microcontrolador usado neste projeto o MSP430F 169 fabricado pela Texas Instruments Ele tem baix ssimo consumo de energia CPU de 16 bits e desempenho de 8 MIPS Ele tem 60Kbytes de mem ria de programa e 2Kbytes de mem ria de dados Ele possui uma interface de depura o padr o JTAG e tamb m possui um grande n mero de ferramentas de desenvolvimento O MSP430 consome menos que 400 mA no modo ativo operando em 1 MHz com 3V e pode acordar de um estado de repouso em menos de 6 us Ele ideal para permitir o n sensor dormir e acordar apenas quando necess rio para processar alguma coisa O processador inclui um rico conjunto de perif ricos como conversor anal gico digital comunica o serial comparadores e temporizadores 3 2 Memoria Externa Muitos algoritmos e aplica es requerem um grande n mero de dados para serem armazenados A quantidade de RAM no microcontrolador limitada A solu o adicionar uma mem ria externa que funcionar como mem ria secund ria O M25P40 60 da ST uma mem ria serial flash de 4 Mbit que r pida e pode mudar para o modo de opera o de baixo consumo quando n o for utilizada Ela gasta 1 5ms para escrever a p gina 256 bytes e no modo de baixo consumo gasta 104W Breve Resumo e
136. utput simulator available The SBSIM430 87 software development tools consists of an assembler a linker and a simula tor There is no C compiler The AQ430 72 is a proprietary IDE Its compiler does not support type casting pointer expres sions multi dimensional arrays or structures It does not include a simulator The debugging process uses the FET Adapter The CS430 Crossworks msp430 78 is a proprietary IDE It includes ANSI C compiler macro assembler linker core simulator flash downloader and JTAG debugger The C compiler supports long and long double The ICC430 from ImageCraft 43 is a C Compiler that also includes Assembler Linker and a simple IDE The compiler has a code compressor that compacts the final program by up to 20 The other ImageCraft tool is NoICE430 a C source level debugger The Embedded Workbench EW430 from IAR 41 is a proprietary IDE that includes ANSI C compiler a debugging environment and a simulator The simulator allows generation of interrupts watching internal registers and I O pins It also has the C SPY program that with the FET Adapter can debug in circuit the MCU The compiler has extension functions for interrupt and assembly code EW430 has the optional VS430 visualSTATE which is a graphical state machine design tool to model and debug MSP430 application to create system documentation and to generate C code Kickstart is a toolset with 4K C Compiler Assembler Debugger but limited
137. ve dar suporte a um grande n mero de aplica es e Tamanho para efeito de demonstra o os dispositivos devem ser pequenos Mas tamanho a restri o menos importante pois este projeto apenas um prot tipo e n o um n sensor real 2 2 Componentes funcionais do N Sensor Figura 2 apresenta a arquitetura de sistema de um prot tipo de n sensor gen rico Ele composto de seis blocos principais unidade de fonte de energia comunica o unidade de processamento unidade de armazenamento interface de depura o e sensores A unidade de fonte de energia consiste normalmente de uma bateria e um conversor dc dc e tem a fun o de alimentar o n sensor A unidade de comunica o consiste de um canal de comunica o sem fio bidirecional A maioria das plataformas usam r dio de curto alcance Outras solu es incluem laser e m dia infra vermelho A unidade de processamento composta de uma mem ria interna para armazenamento de dados e programas um microcontrolador e um conversor anal gico digital para receber sinais do bloco dos Breve Resumo em Portugu s XV sensores A unidade de armazenamento uma mem ria externa que serve como mem ria secund ria por exemplo manter um log de dados A interface de depura o usada para programar e testar os n s sensores Este bloco pode ser omitido no produto final de n sensor A unidade de processamento um bloco que liga um n sensor ao mundo f sico e tem um gr
138. version of an energy model for a sensor node and BEAN power budget 7 2 Future Work Here we list some new ideas and interesting works extending this project 7 2 1 Sensor boards Since we defined a generic bus for sensing many sensor boards can be project Unique sensor board for localization ultrasound weather condition temperature light humidity vibration accelerom eter can be project and innumerous new applications be support by our sensor node prototype CHAPTER 7 FINAL CONSIDERATIONS 89 A A A A Some sensor nodes will have to know their spatial localization Global Positioning System GPS is a navigation system composed of 24 satellites and terrestrial bases GPS receivers have been minia turized into integrated circuitry However they do not work at indoor locations It could be used in a more robust sensor node Solar panels can be connected to the sensor node given some external power supply This can change the design of new wireless sensor network protocols like the project 103 that proposed and evaluated two protocols that perform solar aware routing 7 2 2 Radio A directional antenna could be added to BEAN design Omni directional antennas have 360 degree coverage angle This approach is simpler but a lot of energy is wasted in this way since the power is broadcasted towards all directions 88 A mechanical directional antenna would consumes large amount of energy The solution is to use electroni
139. vices are available for use in embedded systems We will discuss two types of programmable non volatile memory devices EEPROM and Flash EEPROM means Electrically Erasable Programmable ROM They are internally similar to EPROMs erasable and programmable but the erase operation is accomplished electrically rather than by ex posure to ultraviolet light Any byte in the EEPROM can be erased or rewritten Once written the new data will remain in the device until is electrically erased Flash memory is the most recent advancement in memory technology It combines all the best features of the memory devices Flash memory devices are high density low cost nonvolatile fast to read and electrically reprogrammable Flash and EEPROM memory devices are very similar to a software viewpoint The major difference is that Flash devices can erase only one sector at atime not a single byte level EEPROM is relative more expensive than Flash The Scatterweb project 82 chose the memory component 24L64 The advantages of this device are that there is already a software driver by Texas Instruments for the MSP430 MCU 59 and it is low power But this component communicates through I2C thus it is slower than SPI devices For instance to write 32 bytes it spends Sms The Mica2 mote uses the AT45DB041 memory device It is a SPI bus but it can consume too much energy The M24MO01 consumes only 2mA on write mode The disadvantage is that it uses 12C to communicate s
140. with maximum output of 20 dBm and 100mW The second class is for ordinary range de vices 10m with 4dBm and 2 5 mW The third power class is for short range devices 10cm with OdBm and ImW 10 Table 4 5 compares Bluetooth device Philstar PH2401 with components already discussed Bluetooth throughput is high for a sensor node since it increases the sensor node complexity to receive data at this high speed thus not being a good solution Bluetooth can be a good solution for gateways or sensor nodes that need to transmit at high data rate such as a video application Martin 52 shows that the Bluetooth device may consume five more times than CC 1000 and it is suggested for applications that are active over a limited time period with few unpredictable bursts of very heavy network traffic taking advantage of the high throughput Chipcon has also released a new device the CC1020 It has fast data rate of 153 6 kbit s The modulation format supported are FSK ASK and GFSK An interesting work is to develop an extended finite state machine modulation scheme that changes the modulation type due to channel character istics The major drawback is the power consumption 17 3 mA to receive and 13 7 mA to transmit Realize that the receiving consumption is bigger than the transmitting consumption This is an oppor tunity for new WSN protocols TRF6900 is a Texas Instruments transceiver that operates in 850 to 950 MHz band Its main advantage is a high
141. xt Org CA Ea LL 4 2 Related Work 6 3 Sensor Node Architecture 14 3 1 WSN Components 00 00 0000 cece ce eee e beens 14 3 2 Sensor node functional components 00 0000 cece eee 15 3 2 1 Processing Block 16 3 2 2 Sensing Block 2 00 00 000 cece ee eee 16 3 3 Characteristics and Requirements 17 3 4 A A see RR ED aiken EE te no E a min 8 18 4 BEAN Hardware Components 20 4 1 Processing Unit Ve oni DEE why Bab A pce a elie AS ai N 20 4 1 1 Programmable Logic a a ELSA GERA a 21 li CONTENTS ili e a ee E 4 2 4 3 4 4 4 12 Microcontrollers 0 0000 00 e eee ee eee eee ee 22 4 1 3 Texas Instruments MSP430 0 25 BOWEN SES MOER RN 32 4 2 1 Batteries TO EE AO A 32 Communication EE ER LL 34 4 3 1 Laser communication onp aaa LL 34 TA RE OR ER ME Be 35 4 3 3 Radio frequency RF LLL 35 Sensing DIE ESE 42 4 4 1 Sensor Bus RE EA RE RA ERA E ve A alata Mere DE RC Aig 43 4 5 Other components aaa LLL 44 4 5 1 Extended memory LLL da 4 5 2 Debugging LLL LLL 47 4 5 3 Serial Number aaua LLL LL 47 4 5 4 Real Time Clock is A LLL 48 4 5 5 Measuring Energy oe ee SS 49 4 6 Interfacing CC1000 and MSP430 aa LL 50 4 6 1 CC1000 Application Circuit ee ee 50 4 6 2 Interfacing Radio and the Microcontroller 50 4 6 3 CC1000PP Seed gaa dis HE OER EE KEEL ovate det 55 4 6 4 Radio Connector 0
142. y clearing the RESET N bit in the MAIN register when the chip is first powered up All registers that need to be configured should then be programmed Registers can be programmed freely in any order The CC1000 should then be calibrated in both RX and TX mode After this is complete the CC 1000 is ready for use 4 6 2 2 Data Interface The data interface can be interfaced using general purpose I O pins The DCLK pin on the CC1000 should be connected to an input pin that can generate an interrupt to the MCU DIO should be con nected to a bi directional VO pin CHAPTER 4 BEAN HARDWARE COMPONENTS 53 CC1000 MCU Figure 4 17 SPI data Interface 96 In TX mode the interrupt should be triggered on the falling edge of DCLK When the interrupt occurs write the next bit to be transmitted to the I O pin In RX mode the interrupt should be triggered on the rising edge of DCLK When the interrupt occurs read the data from the VO pin Note that data transferred to from the MCU is always NRZ coded regardless of whether Syn chronous NRZ or Synchronous Manchester mode is selected The mode setting only affects the signal modulated onto the RF carrier The Manchester encoding decoding is performed by the CC 1000 The data interface can also be connected to a synchronous serial interface in the same way as the configuration interface In this case since the CC1000 provides the DCLK signal the microcontroller must act as a slave If an SPI interfac
143. ype device for wireless sensor networks This sensor node prototype is called Brazilian Energy Efficient Architectural Node BEAN In this document the design considerations and component choices for a testbed prototype device for WSN will be discussed We present the state of the art for sensor node architectures investigating and analyzing some of the architectural challenges posed by these devices including a survey of CHAPTER 1 INTRODUCTION 4 sensor node platforms and energy management techniques WSN can be seen as a special case of embedded system and benefit from the large body of knowledge already present A comparative study of component off the shelf COTS such as microcontrollers battery types and radio devices which are very important for system design is presented The design focus on individual components and not in subsystem level details Hardware choices will be discussed as well as software solutions Software components that act as device drivers are presented in this work We also define and present an application programming interface API that can be used in other projects To our knowledge BEAN is the first sensor node that allows measuring the power consumption of each component BEAN is also one of the most recent design that uses the newest Texas Instruments MSP430F169 microcontroller Finally BEAN is the first sensor node prototype designed in Brazil The major motivations for this work are the necessity
Download Pdf Manuals
Related Search
Related Contents
Lire ce manuel avant d`installer le logiciel ! Black Box Reloaded • Manuale dell`utente - M IMF802-C V275-S.qxp_ IM802-B V275-S 7月号(PDF:221KB) Copyright © All rights reserved.
Failed to retrieve file