Read Introductions to Sensor Network Hardware text version

2007/10/1

Wireless Sensor Network And Labs Fall 2007

1

WSN Platform

A hardware device that enable wireless sensor

network research Typical components

Microcontroller Radio Power supply Sensors and/or actuators Peripherals

2007/10/1

USB interface Storage

Wireless Sensor Network And Labs Fall 2007 2

What Do We Have

TelosB (Taroko/TmoteSky/TIP700CM) Original design: UC Berkeley

Crossbow TelosB Moteiv Tmote Sky

CHNDS Taroko Maxfor TIP700CM

2007/10/1

Wireless Sensor Network And Labs Fall 2007

3

Crossbow

Original design: UC Berkeley Commercial product: Crossbow

MicaZ

Other products from Crossbow

Mica2

Cricket Imote2 IRIS

Cricket

Imote IRIS

4

2007/10/1

Wireless Sensor Network And Labs Fall 2007

Others (Research)

BTnode (ETH Zurich) Commercialized XYZ (Yale University)

MSB (Freie Universitat Berlin) Modular Sensor Board (MSB)

2007/10/1

Wireless Sensor Network And Labs Fall 2007

5

Others (Commercial)

Dustnetworks (spun out of UC Berkeley)

iDwaRF ­ NodeBoard

Worldsens ­ WSN430

2007/10/1 Wireless Sensor Network And Labs Fall 2007 6

Others (Industrial Control)

Accsense

MicroStrain

Sensicast

2007/10/1

Wireless Sensor Network And Labs Fall 2007

7

Taroko

Original design version TelosB by UC Berkeley Modified version Taroko (CHNDS, Taiwan) TelosB (Crossbow, USA) Tmote Sky (Moteiv, USA) TIP700CM (Maxfor, Korea)

What's on Taroko

Microcontroller

TI (Texas Instruments) MSP430F1611

Radio TI Chipcon CC2420 250kbps, 2.4GHz USB interface 8M-bit flash memory Extension connectors Optional sensors Light, Humidity and Temperature

Microcontroller (MCU)

The heart of the WSN platform Control everything It is all about programming this chip

2007/10/1

Wireless Sensor Network And Labs Fall 2007

10

What Is A Microcontroller

No general definition Common features low speed

Microcontroller -> ARM/DSP -> Pentium/AMD

no hierarchical Memory Bits ­ usually 8-bit, or 16-bit Power ­ consume less power Cost ­ usually it is much cheaper Input/Output (I/O) peripherals

2007/10/1

many on chip peripherals available

Wireless Sensor Network And Labs Fall 2007 11

List of MCU

Texas Instruments (TI): MSP430 Silabs: C8051Fxxx There are many other companies making 8051 architecture microcontrollers including Intel, Atmel, Dallas Semiconductor, and etc. Microchip Technology: PIC Atmel: ATmega128 Freescale Semiconductor (Motorola): 68HCxx Many others

AMCC (IBM), Altera, Cypress MicroSystems, Infineon, Holtek, National

Semiconductor, Parallax, Rabbit Semiconductor, NEC, STMicroelectronics, Analog Devices, Xemics, ZiLOG, NXP, OKI semiconductor, Renesas Technology, Samsung, and etc.

2007/10/1 Wireless Sensor Network And Labs Fall 2007 12

Block Diagram

Microcontroller

Clock System ALU Peripherals GPIO Timer ADC

Sensors and actuators

UART

SPI I2C

External storage, other ICs, other circuits

Memory and storage

DMA

DAC USB Ethernet

Host PC, PDA, etc.

2007/10/1

Wireless Sensor Network And Labs Fall 2007

13

MSP430

16-bit Reduced Instruction Set Computer

(RISC) CPU 1K to 128K bytes Flash 128 bytes to 10K bytes RAM 14- to 100-pin I/O Ultra-low Power

2007/10/1

Wireless Sensor Network And Labs Fall 2007

14

Clock

An oscillate signal generated by some hardware All processors, as well as many peripherals require

clocks Clock frequency is the speed of the processor Usually, higher speed consume large energy

2007/10/1

Wireless Sensor Network And Labs Fall 2007

15

Crystals

A small block of quartz Apply a voltage, it will vibrate For a block of given size, it will vibrate at a given and

fixed frequency

They require a drive circuit to make them go

2007/10/1

Wireless Sensor Network And Labs Fall 2007

16

Generate Clock

Oscillator module include crystal and drive circuit

Internal drive circuit + crystal most common case

Digitally Controlled Oscillator a oscillator circuit constructed by some electrical components can control its frequency frequency varies with temperature, voltage, and from device to device

2007/10/1 Wireless Sensor Network And Labs Fall 2007 17

MSP430 Clock system

Flexible clock sources Always-on low frequency crystal (eg. 32.768KHz) On-demand high speed DCO (up to 8MHz) DCO on and stable in < 1s

2007/10/1 Wireless Sensor Network And Labs Fall 2007 18

Flexible Clock Sources in MSP430

Oscillator consume energy Higher the speed, larger the energy consumption Use high speed DCO for CPU for high speed peripherals wake up and get things done, go to sleep as soon as possible Use low frequency crystal oscillator for peripherals that require always on Save energy

2007/10/1 Wireless Sensor Network And Labs Fall 2007 19

An Example: RTC

Real-Time clock (RTC) software routine that records second, minute, and hour Calendar clock second, minute, hour, day, month, year. Implementation configure a timer (counter), use low frequency osc. (32.768KHz) as clock source when the timer counts to 32768 (exactly 1 second), it generates an interrupt processor wake-up, execute the RTC routines

2007/10/1 Wireless Sensor Network And Labs Fall 2007 20

Low Power RTC

· Watch Battery CR2032 ·Capacitor: 230 mAh · Lifetime = 230 mAh / 0.83 A = (230000 / 0.83) hours = 277108 hours (approx.31 years)

2007/10/1

Wireless Sensor Network And Labs Fall 2007

21

Memory

RAM (Random Access Memory) volatile storage store variables, stack, and etc. Flash non volatile storage store program code, and data Info Segments (only MSP430) A special segment in flash Usually use to store parameters

2007/10/1 Wireless Sensor Network And Labs Fall 2007

Memory Map of MSP430

22

Peripherals

To communicate with the external world Sensors switches, light, temperature, accelerometer, infrared, humidity, pressure, acoustic, camera, and etc. Actuators and output controls motor, on/off control, LEDs, LCD display, and etc. Other ICs or circuit flash memory IC, SD card, USB flash disk, DSP processor, and etc. Host PC, PDA, Industry PC, and etc.

2007/10/1 Wireless Sensor Network And Labs Fall 2007 23

Ways to Communicate

Programmed I/O The processor accepts or delivers data at times convenient to it Interrupt-driven I/O External events control the processor by requesting the current program be suspended and the external event be serviced Direct Memory Access (DMA) DMA allows data to be transferred from I/O devices to memory directly without the continuous involvement of the processor

2007/10/1 Wireless Sensor Network And Labs Fall 2007 24

MSP430 Roadmap

2007/10/1

Wireless Sensor Network And Labs Fall 2007

25

MSP430F1xx

2007/10/1

Wireless Sensor Network And Labs Fall 2007

26

MSP430F4xx

2007/10/1

Wireless Sensor Network And Labs Fall 2007

27

MSP430F4xx

ASSP: Application Specific Standard Product

2007/10/1

Wireless Sensor Network And Labs Fall 2007

28

MSP430F2xx

2007/10/1

Wireless Sensor Network And Labs Fall 2007

29

2007/10/1

Wireless Sensor Network And Labs Fall 2007

30

Typical Structure of Our Program

# include # define ....... main () { System and Peripherals initialization for(;;) // forever loop { 1. wait for interrupt(sleep) 2. do something after return from interrupt } }

2007/10/1 Wireless Sensor Network And Labs Fall 2007 31

1. Peripherals initialization routines () 2. Other sub-functions ()

Internal/External Events (ISR) Interrupt Service Routines () { 1. Quickly do something or Setting flags }

Initialization

Configure hardware into a proper state How to configure set registers Registers each hardware subsystem has some registers store configuration, status, buffer, and etc set these registers properly in order to get it works How to set the registers properly MSP430x1xx family user `s guide

2007/10/1 Wireless Sensor Network And Labs Fall 2007 32

Interrupt

A specific internal/external event occur Mostly, it is defined by you

some exceptions, for example ­ reset

Usually, you have to handle it immediately You have to define how to react while this event occur

2007/10/1

Wireless Sensor Network And Labs Fall 2007

33

maskable/non-maskable

Non-maskable interrupts Interrupts that cannot be disable eg. reset, oscillator fault Maskable interrupts Interrupts that can be disable in the program Most of the interrupts you need to handle is maskable

2007/10/1

Wireless Sensor Network And Labs Fall 2007

34

What happen when it occur

main() { for(;;) { MCU is executing or sleeping } } 1. 2. 3. 4. Set interrupt flag Main program suspended Store state variables Jump to ISR

(ISR) Interrupt Service Routines () { 1. Quickly do something or setting flags } 2. Restore state variables 3. Return to main program, resume process

Interrupt flag: a special register indicates a particular interrupt occur State variables: information CPU will need to resume to normal processing

2007/10/1 Wireless Sensor Network And Labs Fall 2007 35

Where to Jump

Interrupt vector a special segment in the memory store the address of the ISR by following code Address of

#progma vector=0xFFFA __interrupt void Timer_B0 (void)

where is the interrupt vector

Interrupt Vector

Memory Map of MSP430

specified in datasheet

2007/10/1

Wireless Sensor Network And Labs Fall 2007

36

More than one

More than one interrupts occur simultaneously serve higher priority first When one interrupt is being serve, it will disable the

other interrupts

means the other ISR cannot execute before this one

finish if more than one occur while serving one interrupt

wait until it finish, serve the highest priority one first

You can enable interrupt in the ISR not recommended

2007/10/1 Wireless Sensor Network And Labs Fall 2007 37

Masked twice

While interrupt A is being serve, interrupt B occurred,

twice

when interrupt A is finished, the ISR of interrupt B will

be serve, only once you miss one event!!

KEEP YOUR ISR SHORT!!!!

2007/10/1

Wireless Sensor Network And Labs Fall 2007

38

Protect Your Data

Example:

Packet receive interrupt occurred { 1. packet stored in a receive buffer 2. copy receive buffer to temporal buffer 3. return } In main program In { main program { 1. disable global interrupt 1. 2. copy temporal buffer to some data structure 2. process data 3. enable global interrupt } 4. process data }

2007/10/1 Wireless Sensor Network And Labs Fall 2007

Another packet receive interrupt occurred in the middle of copying data

39

How To Program

FET (Flash Emulation Tool) A tool that allow you to program and debug MSP430 Connects to the JTAG port on MSP430 A generic term used in MSP430 world JTAG (Joint Test Action Group) IEEE 1149.1 standard: "standard Test Access Port and Boundary-Scan Architecture" A standard interface defined for testing and debugging

2007/10/1 Wireless Sensor Network And Labs Fall 2007 40

Video

2007/10/1

Wireless Sensor Network And Labs Fall 2007

41

2007/10/1

Wireless Sensor Network And Labs Fall 2007

42

Something To Note

You won't get very far without at least a very

rudimentary understanding of electronics But electronics is a vast and complex field What we provide here is just some very basic principles We assume you have some common sense about electronics We will try to make it as simple as possible

2007/10/1

Wireless Sensor Network And Labs Fall 2007

43

Voltage, Current and Power

Voltage Symbol: V Unit: Volt, (V) Current Symbol: I Unit: Ampere, (A) Power P=V*I Unit: Watt, (W)

2007/10/1 Wireless Sensor Network And Labs Fall 2007 44

DC and AC

DC: Direct Current

Definition: current that travels in one direction we usually refer to constant voltage

AC: Alternating Current

Definition: opposed to DC we usually refer to varying voltage

DC component vs AC component

DC component: average of signal AC component: the varying signal

2007/10/1

Wireless Sensor Network And Labs Fall 2007

45

Relationship between V and I

Ohm's Law V=I*R Resistor Most widely used element Symbol: R Unit: Ohm () Schematic symbol:

Variable resistor

2007/10/1 Wireless Sensor Network And Labs Fall 2007 46

Resistors in series

Resistors in series

=

I1 I2

R = R1 + R2

V1

V2

I

V

R1 V1 V R1 R 2 R2 V2 V R1 R 2 I I1 I 2

2007/10/1

Wireless Sensor Network And Labs Fall 2007

47

Resistors in parallel

Resistor in parallel

=

V V1 V2 V R1 I1 I R1 R1 R 2 V R2 I2 I R2 R1 R 2 I I1 I 2

Wireless Sensor Network And Labs Fall 2007 48

R

1 1 R1 1 R2

R1 R 2 R1 R 2

I1

V1

I2 I

V2 V

2007/10/1

Capacitors

Capacitor store charge Symbol: C Unit: Farads (F) Typical range we use is from F to pF Circuit symbols Bipolar: no polarity Unipolar: has a positive and a negative lead

2007/10/1

Wireless Sensor Network And Labs Fall 2007

49

Charge and discharge

Apply a voltage charging Remove voltage discharging Provide a temporary voltage and current source Decoupling Stable the DC voltage source

2007/10/1

Wireless Sensor Network And Labs Fall 2007

50

Diodes

Vanode

Vcathode

Pass a current in one direction, block it from another Forward voltage drop A voltage different between anode and cathode Example

For a typical voltage drop of 0.7V If Vanode is 3.3V, than Vcathode is 2.6V

This value will be specified in datasheet

2007/10/1

Wireless Sensor Network And Labs Fall 2007

51

LEDs

Light-emitting diode (LED) Limited amount of current can pass through Will damage if current is too large Need a current-limiting resistor

I

3.3V Vanode Vcathode

R

Ground

Vcathode 3.3V Vvoltage _ drop 1.7V R V 1.7 85 I 0.02

If voltage drop of this LED is 1.6V, and we want 20mA

pass through

2007/10/1 Wireless Sensor Network And Labs Fall 2007 52

Other components

Crystals Symbol Switches symbols Inductors symbol

2007/10/1

Wireless Sensor Network And Labs Fall 2007

53

Understanding Schematic

Component

Net Labels

Power Ports

Nets Crossing

Nets Cross Multiple Sheet

54

2007/10/1

Wireless Sensor Network And Labs Fall 2007

Real Schematic -- Taroko

2007/10/1

Wireless Sensor Network And Labs Fall 2007

55

Reading Datasheet

Every component should have a datasheet Contain every information about the component If you are designing you own embedded system Read it thoroughly and feel you understand Go back and reread it Get the latest datasheets and errata Lets take a look at the MSP430F1611 datasheet

2007/10/1

Wireless Sensor Network And Labs Fall 2007

56

Information

Introductions to Sensor Network Hardware

56 pages

Find more like this

Report File (DMCA)

Our content is added by our users. We aim to remove reported files within 1 working day. Please use this link to notify us:

Report this file as copyright or inappropriate

302687


You might also be interested in

BETA
Analog Dialogue
Microsoft Word - ESA2011_SmartHome_SCSmith
Microsoft Word - 11_Varchola.doc
04-T01-653 230/280 Spec Sheet
Introductions to Sensor Network Hardware