Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sensing Platforms and Microcontroller Architecture Tutorial Lecture 3 September 9, 2004 EENG 460a / CPSC 436 / ENAS 960 Networked Embedded Systems & Sensor.

Similar presentations


Presentation on theme: "Sensing Platforms and Microcontroller Architecture Tutorial Lecture 3 September 9, 2004 EENG 460a / CPSC 436 / ENAS 960 Networked Embedded Systems & Sensor."— Presentation transcript:

1 Sensing Platforms and Microcontroller Architecture Tutorial Lecture 3 September 9, 2004 EENG 460a / CPSC 436 / ENAS 960 Networked Embedded Systems & Sensor Networks Andreas Savvides andreas.savvides@yale.edu Office: AKW 212 Tel 432-1275 Course Website http://www.eng.yale.edu/enalab/courses/eeng460a

2 Today  Overview Sensing Platforms  Embedded Processor Study Case: OKI ARM Processor  Supplementary reading for this lecture Kaiser & Pottie Chapter 13 Zhao & Guibas Chapter 7

3 Need for Sensing Platforms Fundamental Problems Close coupling between fundamental research questions and the physical world Experimental Systems In situ data collection Architectural requirements Numerous unknown factors and conditions with no prior knowledge Sensing channels not well characterized - very complex environment dynamics Power consumption hard to characterize – need to understand battery behaviors and how SW & HW components affect power consumption

4 Wide Spectrum of Devices  Sensors with inplantable RFIDs  Smart-dust size nodes Typically they act as data-collectors or “trip-wires” Cannot afford to have massive processing and communication  Mote-size devices  More powerful gateway nodes etc  For some applications, form factor is also dictated by the size of individual sensors  Many designs out there, each design has its own philisophy

5 Some platforms & applications  Seismic monitoring, personal exploration rover, mobile micro-servers, networked info-mechanical systems, hierarchical wireless sensor networks [NIMS, UCLA][Robotics, CMU] [Intel + UCLA] [CENS, UCLA] [Intel + UCLA] [Slide from V. Ragunanthan]

6 A Generic Sensor Network Architecture PROCESSING SUB-SYSTEM COMMUNICATION SUB-SYSTEM SENSING SUB-SYSTEM POWER MGMT. SUB-SYSTEM ACTUATION SUB-SYSTEM

7 Base Case: The Mica Mote (The most popular sensing platform today) AVR 128, 8-bit MCU DS2401 Unique ID 51-PIN I/O Connector Transmission Power Control Hardware Accelerators Radio Transceiver (CC1000 or CC2420) Power Regulation MAX1678(3V) Co-processor External Flash Digital I/OAnalog I/O Programming Lines For more information refer to the TinyOS Website http://www.tinyos.net

8 What is Stargate?  A single board, wireless-equipped computing platform Developed at Intel Research  Leverages advances in computation, communication and storage to facilitate wireless systems research

9 System architecture

10 Computation sub-system  PXA255 processor based on the XScale microarch. Successor to the StrongARM family Variable clock (100 - 400 MHz), less than 500 mW power Several sleep modes, rich set of peripherals

11 Wireless DPM: Hierarchical radios  Three vastly different wireless radios supported  Combined to form power-efficient, heterogeneous communication subsystem Hierarchical device discovery and connection setup scheme leads to up to 40X savings in discovery power Technolog y Data Rate Tx Current Energy per bit Idle Current Startup time Mote 76.8 Kbps 10 mA430 nJ/bit7 mALow Bluetooth1 Mbps45 mA149 nJ/bit22 mAMedium 802.1111 Mbps300 mA90 nJ/bit160 mAHigh IEEE 802.11 Bluetooth Mote Energy per bit Startup time Idle current

12 Other power management features  Wake on wireless: Bluetooth based remote wakeup BT module awake, rest of the system is shutdown Incoming BT packet causes wakeup On-demand power management (event-driven apps) BT module in “wake on wireless” mode draws ~ 3mA  Motion detection for wake up Passive small-bead mercury switch connected to GPIO Movement causes switch to close and wakeup system Can also be used to trigger wireless scanning for APs

13 UCLA iBadge

14 iBadge Functional Units  Main Processing Unit ATMega128L Microcontroller from Atmel Responsible for power management, localization, and interfaces different functional units  Localization Unit: Relative and absolute positioning responsible for obtaining precise 3D location of iBadge in the classroom estimates its 3D location using an ad-hoc localization process  Speech Processing Unit: Consists of TI DSP and CODEC Performs speech codec and front end processing of the real time speech of the children Two modes (Simple Coding or Front End Processing) of operation based on power requirements and user request.

15 iBadge Functional Units (Continued)  Power Management/Tracking Unit: Battery Monitors (DS2438) keep track of energy usage of various functional units CMOS switches provides control to turn on/off different part of the circuits  Orientation/Tilt Sensing Unit Accelerometer combined with magnetometer provides the orientation of the children with earth’s magnetic field  Environment Sensing Unit Temperature, Humidity, Atmospheric Pressure, and Light Intensity

16 Medusa MK-2 PALOS ARM/THUMB 40MHz Running Palos RS-485 & External Power MCU I/F Host Computer, GPS, etc ADXL 202E MEMS Accelerometer UI: Pushbuttons

17 Ultrasonic Ranging Subsystem USND TX Start 4ms 15ms (for max range) RF TX Start RF Signal 4ms Start Symbol Detected (start timer) TransmitterReceiver Ultrasound Detected Ultrasound Signal RF Reception Complete

18 Telos: New OEP Mote*  Single board philosophy Robustness, Ease of use, Lower Cost Integrated Humidity & Temperature sensor  First platform to use 802.15.4 CC2420 radio, 2.4 GHz, 250 kbps (12x mica2) 3x RX power consumption of CC1000, 1/3 turn on time Same TX power as CC1000  Motorola HCS08 processor Lower power consumption, 1.8V operation, faster wakeup time 40 MHz CPU clock, 4K RAM  Package Integrated onboard antenna +3dBi gain Removed 51-pin connector Everything USB & Ethernet based 2/3 A or 2 AA batteries Weatherproof packaging  Support in upcoming TinyOS 1.1.3 Release  Codesigned by UC Berkeley and Intel Research  Available February from Moteiv (moteiv.com) *D. Culler, UC Berkeley

19 ENALAB XYZ Sensor Node  Sensor node created for experimentation Low cost, low power, many peripherals Integrated accelerometer, light and temperature sensor  Uses an IEEE 802.15.4 protocol Chipcon 2420 radio  OKI ARM Thumb Processor 256KB FLASH, 32KB RAM Max clock speed 58MHz, scales down to 2MHz Multiple power management functions  Powered with 3AA batteries & has external connectors for attaching peripheral boards  Designed at Yale Enalab and Cogent computer systems, will be used as the main platform for the course

20 Manufacturers of Sensor Nodes  Millenial Net (www.millenial.com)www.millenial.com iBean sensor nodes  Ember (www.ember.com)www.ember.com Integrated IEEE 802.15.4 stack and radio on a single chip  Crossbow (www.xbow.com)www.xbow.com Mica2 mote, Micaz, Dot mote and Stargate Platform  Intel Research Stargate, iMote  Dust Inc Smart Dust  Cogent Computer (www.cogcomp.com)www.cogcomp.com XYZ Node (CSB502) in collaboration with ENALAB@Yale  Mote iv – Telos Mote  Sensoria Corporation (www.sensoria.com) WINS NG Nodes  More….

21 Other Sensor Node Projects  Augmented off-the-shelf systems PC104 computers (used in some habitat monitoring applications) iPAQ PDAs (used for prototypes @ UCLA/CENS)  Networked Infomechanical Systems (NIMS) www.cens.ucla.edu  Dedicated embedded sensor nodes and SOCs MIT uAMP nodes (http://www-mtl.mit.edu/research/icsystems/uamps/) Berkeley BWRC picoradio node (http://bwrc.eecs.berkeley.edu/Research/Pico_Radio) ISI Pasta node (http://pasta.east.isi.edu)http://pasta.east.isi.edu

22 Power Perspective Comparison of Energy Sources With aggressive energy management, ENS might live off the environment. Source: UC Berkeley & CENS

23 Typical Operating Characteristics for 4 classes of Sensor Nodes Source: J. Hill, M. Horton, R. King and L. Krishnamurthy,”The Platforms Enabling Wireless Sensor Networks”, Communications of the ACM June 2004

24 Many ways to Optimize Power Consumption  Power aware computing Ultra-low power microcontrollers Dynamic power management HW oDynamic voltage scaling (e.g Intel’s PXA, Transmeta’s Crusoe) oComponents that switch off after some idle time  Energy aware software Power aware OS: dim displays, sleep on idle times, power aware scheduling  Power management of radios Sometimes listen overhead larger than transmit overhead  Energy aware packet forwarding Radio automatically forwards packets at a lower level, while the rest of the node is asleep  Energy aware wireless communication Exploit performance energy tradeoffs of the communication subsystem, better neighbor coordination, choice of modulation schemes

25 XYZ Node:why build a new node? Research and education node to do tasks not doable with existing nodes Need for 32 bit computation for distributed signal processing protocols oE.g Localization protocol stacks and optimizations Need to be closer to the Sensors oDo fast sampling and processing close to the sensors –E.g real-time acceleration or gyro measurements –Acoustic sampling and correlation – need memory, peripherals and processing to be close to the computation resource – simplifies programming Accommodate custom form factors and interfaces for experimenting with mobile computing applications oMobility support interfaces (stronger connectors, output for motor contollers) oWearable applications – small package Very low power, long term sleep modes

26 XYZ’s Architecture

27 XYZ: Communication Subsystem  Chipcon CC2420 Zigbee RF Transceiver 2.4 GHz IEEE 802.15.4 @ 250Kbps Programmable output power RX/TX data buffering Digital RSSI support DSSS modulation Security features oCTR encryption/decryption oCBC-MAC authentication oCCM encryption and authentication oAll security operations are based on AES encryption using 128 bits

28 XYZ: Supervisor Circuitry & Low Power Sleep OKI μC RTC DS1337 Voltage Regulator 3 x AA batteries 2.5V 3.3V I2CI2C WAKEUP Enable Interrupt (SQW) DS1337 Real Time clock datasheet: http://pdfserv.maxim-ic.com/en/ds/DS1337.pdf  Step 1: The μC selects the total time that wants to be turned off and programs the DS1337 accordingly, through the 2-wire serial interface.  Step 2: The DS1337 turns-off the μC and uses its own crystal to keep the notion of time.  Step 3: The DS1337 wakes up the μC after the programmed amount of time has elapsed.  Note that the DS1337 RTC can disable the voltage regulator and completely turn-off the sensor node!

29 XYZ: On Board Sensors Light Accelerometer Temperature OKI μC ADCADC AIN0 AIN1 AIN2 X Y PIOE5(EXINT0) 2-axis accelerometer datasheet (ADXL202E): http://www.rotomotion.com/datasheets/ADXL202E_a.pdf Temperature Sensor datasheet (TMP05): http://www.analog.com/UploadedFiles/Data_Sheets/192632828TMP05_6_prk.pdf Light Sensor datasheet (TSL251R): http://www.goblack.de/desy/digitalt/sensoren/tsl-250/tsl250r.pdf

30 Current Efforts on XYZ Peripheral Boards  Ragobots @ UCLA  Suspended nodes and camera support @ Yale, ENALAB

31 Operating System: SOS – Dynamic Software Re- configuration(NESL UCLA)  Remotely insert binary modules into a running kernel Partial system reconfiguration without interrupting system operation Superior performance than virtual machines No stop and re-boot unlike differential patching  Design challenges Dealing with severe resource constraints Reliable operation of the dynamically evolving system Hardware Abstraction Msg Passing Scheduler Memory Manager Static SOS Kernel Dynamic Loadable Binary Modules Dynamic Loadable Binary Modules [Slide from Simon Han, Nesl, UCLA]

32 Computation: OKI ML67Q5002  OKI ML67Q5002 32-bit ARM7TDMI core (16-bit THUMB mode) Built-in memory: oSRAM 32Kbytes oBoot ROM 4Kbytes oFLASH memory 256Kbytes Provided interfaces: o4 channels of 10-bit resolution ADC. oDMA support. oSPI, SIO, I2C, UART, PWM interfaces o42 configurable GPIO pins oVariety of external and internal configurable interrupts o6 hardware timers

33 Features ARM7TDMI ROM-less (ML675001) 256KB MCP Flash (ML67Q5002) 512KB MCP Flash (ML67Q5003) 8KB Unified Cache 32KB RAM Interrupts 25 + 1 FIQ I2C (1-ch x master) DMA (2-ch) Timers (7 x 16-bit) WDT (16-bit) PWM (2 x 16-bit) UART (2-ch)/ SIO (1-ch) GPIO (5 x 8-bit) ADC (4-ch x 10-bit) up to 66MHz -40 ~ +85  C Package 144 LFBGA 144 QFP XYZ Computation: The OKI ARM ML675001/67Q5002/67Q5003 [Slide from OKI Semiconductor]

34 OKI ARM ML675001/67Q5002/67Q5003 ARM7TDMI

35 What does ARM7TDMI Mean?  Based on an ARM7 core Von Neuman Architecture oSame address and data bus Approximately 1.9 Clock cycles per instruction T – Thumb architecture extension – 2 instruction sets oARM 32-bits oThumb 16-bits D – Core has debug extensions M – Core had an enhanced multiplier (32x8) with instructions for 64-bit results I – Core has EmbeddedICE Logic Extensions

36 CPU States  CPU can be either in ARM or THUMB states User can implicitly change the processor state from ARM to THUMB All exception handling happens in ARM mode If an exception happens during Thumb mode, the the processor transitions to ARM to execute the instruction and returns to THUMB at the end of the exception handler  THUMB mode trades-off performance for code density Cheaper memory and lower power consumption for embedded systems

37 FLASH Starts here External SRAM starts here Internal RAM starts here

38 MCU Basics: What are interrupts?  Asynchronous breaks in the program execution Press of a button, expiration of a timer, DMA interrupt indicating the completion of a memory transfer  When an interrupt occurs, the processor will transition to the corresponding interrupt handler to service the interrupt and then resume execution  The OKI processor has an 8-level interrupt priority mechanism Total of 24 types of interrupts that can happen during instruction execution o1 fast external interrupt o4 external interrupts o19 Internal interrutps –E.g System timer, watchdog timer, DMA interrupts etc  The chip has mechanisms for dealing with interrupts Interrupts are enabled and disabled through registers for each peripheral

39 MCU Basics:Many flavors of Microcontrollers  From embedded x86 processors 16 and 32-bit processors all the way down to tiny 4-bit processors  Some of the popular 8-bit families AVR, 8051, Z80, 6502, PIC, Motorola HC11  16-bit families Hitachi, Dragon  Many embedded Java controllers are also emerging

40 Hardware Timers(16-bit) Controls the mode (interval or one-shot) Starts and stops the timer Enables/disables the interrutps for this timer Holds value to compare against Holds the value that initializes the timer at startup

41 Clock Divider

42 Steps in Setting up a Hardware Timer Example using hardware TIMER0 1.Stop timer & disable interrupts by writing to control register (TIMECNTL0) 2.Write the timer starting value to the base register (TIMEBASE0) 3.Write the stop value in the compare register (TIMECOMP0) 4.Start the timer by writing to the control register (TIMECNTL0) This will start the timer. An interrupt will occur when the counter register reaches the value of the compare register Note: After the interrupt is handled, the status register (TIMESTAT0)needs to be cleared to use the timer again.

43 How to you access peripherals?  You can access peripherals and GPIO by reading/writing registers  Typically one would write device drivers and then use higher level abstractions  You will need this knowledge to write device drivers for different peripherals and to assess the real-time capabilities of your software

44 How do you program the OKI ARM?  Use the JTAG  Use Micromonitor with a serial connection to write to FLASH Works well, be careful not to over-ride micromonitor  Use the programmer utility from OKI Least reliable method

45 Projects Discussion look at the handout…


Download ppt "Sensing Platforms and Microcontroller Architecture Tutorial Lecture 3 September 9, 2004 EENG 460a / CPSC 436 / ENAS 960 Networked Embedded Systems & Sensor."

Similar presentations


Ads by Google