Musical Chairs and Magic Carpets - PowerPoint PPT Presentation

1 / 57
About This Presentation
Title:

Musical Chairs and Magic Carpets

Description:

So far, we have concentrated on the use of a variety of sensors to ... Not suitable for beginners. http://www.at91.com/ 24. AYB. 4/05. Microcontrollers: Misc ... – PowerPoint PPT presentation

Number of Views:204
Avg rating:3.0/5.0
Slides: 58
Provided by: joepar
Category:

less

Transcript and Presenter's Notes

Title: Musical Chairs and Magic Carpets


1
MAS836 Sensor Technologies for Interactive
Environments
Lecture 10 Digital Sensor Processing and Modules
2
The Next Steps
  • So far, we have concentrated on the use of a
    variety of sensors to measure human interaction
  • However, a measurement alone is of little value
  • Therefore, we consider the next steps
  • Conversion of the data into a computer-readable
    format
  • Processing (if desired) within the computer
  • Communication of that data to other devices

3
One Approach
  • There are numerous possible data flows patterns
  • We will concentrate on one
  • Each step involves different technologies and a
    number of issues
  • They will be covered in data flow order
  • We will also discuss other networking protocols
    beyond RF transmission

4
Analog Processing (1)
  • Most analog signal processing was covered in
    first three lectures
  • Some issues are of special importance when
    preparing data for analog to digital conversion
  • Or just to get the most out of it in general
  • Three issues are quickly touched upon
  • Obviously there are many more
  • Just as important for looking at data using other
    techniques (e.g. oscilloscope)

5
Analog Processing (2)
  • Output Range
  • Voltage output should fill the input range of the
    analog to digital converter (ADC)
  • In general, also need to consider uni-/bipolar
  • Output Bandwidth
  • Amplifier (and similar) should attenuate outside
    frequencies of interest (both high and low)
  • Take both sensor and data bandwidth into account
  • Output Impedance
  • Usually need to buffer data to avoid unnecessary
    loading of next portion of measurement chain

6
Analog to Digital ConversionBasics
  • Converts analog data (continuous) into digital
    values (discrete)
  • A given range is divided up into a number of
    steps, each at a discrete voltage and represented
    (in order) by an integer value

7
Analog to Digital ConversionFigures of Merit
  • Number of bits Size of the integer used to
    represent the analog value.
  • N bits provide 2N different values
  • Vref Maximum voltage of the converter
  • Vref is represented by 2N-1
  • Minimum voltage is almost always 0V
  • Sampling rate Number of individual measurements
    made in a fixed time
  • Limited by technique used
  • Impedance limit Largest input impedance at which
    the ADC will still function properly
  • Based on size of internal hold capacitor and
    sampling rate

8
Analog to Digital ConversionSuccessive
Approximation
  • Most common form of ADC
  • Bits are calculated one at a time and operation
    can be stopped at any point
  • Each bit is found by comparing the input value to
    the value represented by all the bits calculated
    so far
  • Requires a DAC

9
Analog to Digital ConversionFlash
  • Simplest, fastest form of ADC
  • Sometimes known as a parallel converter
  • Voltage ladder divides reference voltage into 2N
    steps, which are compared to the input voltage
  • Requires 2N resistors and comparators
  • Limited by resistor accuracy

10
Analog to Digital ConversionMisc
  • Highest accuracy ADCs are sigma-delta type
  • Will not go into too much detail, operation
    mostly concerns noise spectra
  • Chart shows range of ADCs discussed

11
Analog to Digital ConversionSampling Rate
  • Sampling rate raises issues beyond obvious
  • Aliasing is the folding over of higher
    frequencies when sampled at less than double
    their frequency
  • Leads to loss of data and increase in noise
  • To avoid these problems
  • Always sample at twice the highest frequency of
    interest (known as Nyquist sampling)
  • Always filter out higher frequencies before
    conversion

12
Analog to Digital ConversionError/Noise
  • The error in an ADC can be treated as a white
    noise source
  • Only if number of bits is high enough and voltage
    is in range
  • Equivalent to half of the least significant bit
  • 6(N1) dB
  • Comparison of this value and the noise in the
    system allows calculation of the maximum accuracy
    (number of bits) worth considering

13
MicrocontrollersOverview
  • A microcontroller (uC) is a small, lightweight
    CPU which is usually combined with on-board
    memory and peripherals
  • Compact and low power (relatively)
  • They are often used as a simple hardware to
    software interface as well as for in-situ
    processing
  • Often used as an analog to digital gateway
  • Allows for real-time feedback based on data

14
MicrocontrollersFeatures (1)
  • Processor speed Fundamental measure of
    processing rate of device
  • Value of interest is in MIPS, not MHz
  • Supply voltage/current Measure of the amount of
    power required to run the device
  • Multiple modes (sleep, idle, etc)
  • It is possible to adjust the voltage and
    frequency of some devices in real time, thereby
    trading off speed and power usage

15
MicrocontrollersFeatures (2)
  • Internal memory Sometimes divided between
    program and data memory, the amount of
    information that can be stored on board
  • Can sometimes be supplemented by external memory
  • I/O Pins Individual points for communication
    between the uC and the rest of the world
  • Can be digital or analog, general or special
    purpose
  • Interrupts Non-linear program flow based on
    event triggers from peripheral or pins

16
MicrocontrollersPeripherals (1)
  • Timers Internal registers (any size) in the uC
    that increment at the clock rate
  • May have prescaler
  • May be combined with range testing for interrupt
  • Watchdog timers reset processor if it hangs.
  • Comparators Input that effectively functions as
    a 1-bit ADC with a variable threshold set by an
    internal register
  • Often used for real-time data monitoring

17
MicrocontrollersPeripherals (2)
  • ADC Most ADCs used in sensor data collection are
    integrated with uC and are controlled via special
    registers
  • Watch for number of channels vs number of inputs
  • Sampling speed will not take input switch into
    account
  • Clock internally via timers (benefits?)
  • Very fast ADCs often combined with DMA
  • DAC Digital to analog converters are also
    include in some data collection driven uC
  • Mostly used for feedback and control

18
MicrocontrollersCommunication (1)
  • UART Basic hardware module which mediates serial
    communication (RS232)
  • Simplest form of communication between uC and
    computer, but limited by speed
  • Most modules are full duplex, but need to watch
    out for data registers and flags
  • USB High Bandwidth Serial Communication between
    uC and a computer or an embedded host
  • Usually requires chips with specialized hardware
    and firmware
  • Requires custom driver on the host side or
    conforming to a standard device class
  • SPI Full duplex master-slave 4-wire protocol for
    data transfer between uCs
  • Mbit transfer rates
  • Somewhat quirky protocol
  • Unlimted (almost) nodes, can change master

19
MicrocontrollersCommunication (2)
  • I2C Half duplex master-slave 2-wire protocol for
    data transfer between uCs
  • kbit transfer rates
  • Tx/Rx based on slave addressing
  • Can invert protocol with sensors as masters
  • RF Radio frequency (gt100 MHz) EM transmission of
    data
  • Built in to some newer special-purpose uC
  • Wireless spherical transmission
  • Much (much) more later

20
MicrocontrollersSilicon Labs (FKA Cygnal)
  • 8051 derivate uC with high reconfigurability
  • Many programming environments available
  • Vary from 3mm2 to 100 pin packages
  • General specs
  • Medium power
  • Max 100 MHz / 100 MIPS
  • Max 128K program space / 8K RAM
  • Max 16 bit ADC
  • UART/USB/SPI/CAN/PWM/Comparators
  • http//www.silabs.com/products/microcontroller/

21
MicrocontrollersTI MSP430
  • Proprietary TI low-power low-cost RISC chips
  • Highly supported by TI with great program chain
  • Designed for intermittent sampling and fast
    startup
  • General specs
  • Very low power (flexible)
  • Max 32KHz / 8 MIPS
  • Max 50K program space / 10K RAM
  • Max 16 bit ADC
  • UART/SPI/DAC/LCD/PWM/Comparators
  • http//www.ti.com/

22
MicrocontrollersAtmel AVR
  • 8-bit RISC series of microcontroller chips
  • Large range of available devices covering many
    interfaces, speeds, memory sizes, and package
    sizes
  • Large hobbyist development community with many
    available toolchains and sample applications
  • General specs
  • One MIPS per MHz
  • Models available up to 20MHz
  • Max 128K program space / 8K RAM
  • ADC/LCD Driver/Motor Control
  • UART/CAN/USB/IIC/SPI/DAC/LCD/PWM/Comparators
  • http//www.atmel.com/

23
MicrocontrollersAtmel ARM7 (AT91SAM7S series)
  • 32-bit ARM microcontroller
  • Low power (for 32-bit machines)
  • Can run in 16-bit mode if needed
  • General specs
  • Lots of memory (8-64KB RAM, 32-256KB flash)
  • Variable speed up to 55MHz
  • Packed with peripherals (USB, ADC, SPI, etc.)
  • Comes in LQFP 48 and 64 packages
  • Not suitable for beginners
  • http//www.at91.com/

24
MicrocontrollersMisc
  • Analog Devices ADUC8xx
  • More of an ADC with a uC attached
  • Some models include 24 bit sigma-delta converter
  • Useful with IEEE 1451 (see later)
  • http//www.analog.com/IST/SelectionTable/?selectio
    n_table_id212
  • Chipcon CC1xxx
  • More of an RF transceiver with a uC attached
  • Variety of frequency ranges and modulation
    schemes
  • http//www.chipcon.com/index.cfm?kat_id2

25
Digital Signal ProcessingBasics
  • A discrete time (and often discrete value) stream
    xn is convolved with a discrete time impulse
    response hn to produce an output yn
  • xn is usually acquired from a continuous time
    signal x(t) using an ADC
  • hn is the response to a single input of 1 at
    time 0
  • Can be finite (FIR) or infinite (IIR)
  • Can be described as a difference equation and
    easily implemented

26
Digital Signal ProcessingConsiderations
  • Why would I want to do this?
  • Trivially reconfigurable in real-time
  • Off-line processing
  • Power savings
  • Ease of implementation (for some impulse
    response)
  • What are the drawbacks?
  • Non-parallel
  • Memory intensive
  • Stability issues can be complex

27
Digital Signal ProcessingAlgorithms (1)
  • Simplest and most common DSP algorithm is the
    running average
  • Acts as a smoothing filter
  • Pseudo-lowpass
  • This is the N-point version
  • Can you implement this in two operations per
    cycle?

28
Digital Signal ProcessingAlgorithms (2)
  • A wide variety of frequency filters (HP/LP/BP)
    can be constructed as both FIR and IIR filters
  • FIR more stable
  • IIR require fewer data point
  • See MATLAB for more details
  • Fast Fourier Transform allows quick (
    ) conversion from time domain to frequency domain
    (for N power of two)

where
29
Radio Frequency TransmissionBasics (1)
  • Radio frequency (RF) electromagnetic transmission
    is the use of high frequency radiation to
    transmit data wirelessly between devices
  • Can be very high speed (50 Mbits)
  • Can have enormous range (10 km)
  • Does not require line-of-sight
  • The system which we will use will tend to be
    lt1Mbit and have a range of lt100m, but all of the
    same principles apply (ex power management)

30
Radio Frequency TransmissionBasics (2)
  • Data is transmitted on a carrier wave of a fixed
    frequency
  • The center frequency of this transmission is
    known as the carrier frequency
  • Data is introduced into the carrier through means
    of a modulation scheme
  • Often, multiple transmitters want (need) to share
    the channel, requiring channel access schemes
  • Transmissions are made more robust to (non-flat)
    interference through spread spectrum techniques

31
Radio Frequency TransmissionFigures of Merit
  • Transmitter power Measured in dBm (dB referenced
    to 1 mW), the fundamental measurement of the
    power in a signal
  • Most unlicensed transmitters are 0dBm
  • Receiver sensitivity The smallest signal which
    can be adequately detected
  • Usually around 90dBm
  • BER Bit error rate, the frequency with which
    data is received incorrectly
  • Can be in 10-9 range for simple short
    transmissions

32
Radio Frequency TransmissionModulation OOK/ASK
  • On-Off Keying (OOK) is the most trivial of all
    modulation schemes.
  • The transmitter is turned on to full power to
    send 1 and off to send 0
  • Can therefore be driven directly with a UART
  • Most power efficient since transmitter is only on
    50 of the time (on average)
  • Amplitude Shift Keying (ASK) is similar to the
    above, except the transmitter power is merely
    lowered for a 0 bit
  • Necessary for faster transmission

33
Radio Frequency TransmissionModulation - BPSK
  • Binary phase shift keying (BPSK) uses a carrier
    continuously broadcast at the same amplitude
  • A 1 is indicated if there is a 180? phase shift
    in the bit window, otherwise the bit is 0
  • Allows for better carrier lock at receiver
  • We see at right that OOK is equivalent to
    multiplying the carrier by the data, while BPSK
    is XOR

34
RF Channel Sharing Protocols
  • Time Division Multiple Access (TDMA)
  • Frequency Division Multiple Access (FDMA)
  • Carrier Sense Multiple Access (CSMA)
  • Frequency Hopping Spread Spectrum (FHSS)
  • Direct Sequence Spread Spectrum (DSSS)

Laibowitz and Paradiso, Embedded Wireless
Transceivers and Applications in Lightweight
Wearable Platforms, Circuit Cellar, February 2004
35
Radio Frequency TransmissionChannel Access
TDMA/FDMA
  • Time division multiple access (TDMA) divides the
    channel up into chunks of time, with a different
    transmitter for each chunk
  • Requires master receiver to allocate chunks and
    keep synchronization
  • Frequency division multiple access (FDMA) divides
    the channel up into chunks of frequency, with a
    different transmitter for each chunk
  • Master not necessarily required

36
Radio Frequency TransmissionChannel Access
Hybrid/CSMA
  • Hybrid schemes divide the spectrum in both time
    and frequency
  • Because of startup energies and guard zones, this
    can actually be more energy efficient, though
    somewhat cumbersome
  • For low duty cycle transmitters, we can avoid
    masters and complicated schemes by using carrier
    sense multiple access (CSMA)
  • Listen before you talk
  • Hidden node problem

Tx1
Tx2
Rx
Tx2 Range
Tx1 Range
37
Radio Frequency TransmissionSpread Spectrum -
DSSS
  • Direct sequence spread spectrum (DSSS) expands
    the frequency range of a signal by modulating
    (xor) it with a much faster
  • sequence known as a chip
  • Chips must be orthogonal to each other
  • Receiver must have same noise (chip) generator
  • Processing gain is the SNR gain from the
    modulation and counteracts the SNR drop from
    spreading the transmitter energy
  • Provides immunity to localized (in frequency)
    noise

38
Radio Frequency Transmission Walsh Codes
(Orthogonal)
39
Radio Frequency Transmission Spread Spectrum -
FHSS
  • While DSSS spreads at greater than the data rate,
    frequency hopping spread spectrum (FHSS) spreads
    at a much lower rate
  • Shifts happen 10 bits (or so)
  • Again, receiver must know sequence
  • Originally invented during WWII by Hedy Lamar and
    George Antheil to avoid jamming of
    radio-controlled torpedoes
  • Player piano rolls used to synchronize
  • Overall, in both spread spectrum techniques, all
    other sequences appear to be noise at the receiver

40
Radio Frequency TransmissionBands
  • Low frequency unlicensed bands at 433 and 915 MHz
    are often used by low power ASK devices (such as
    those from RFM)
  • Can only transmit for 36 seconds each hour (1)
  • The high frequency unlicensed bands at 2.4 GHZ
    and 5.8 GHz are used by high speed spread
    spectrum devices
  • Eg. Wireless LAN
  • Both bands known as ISM (industrial scientific
    and medical)

41
Radio Frequency TransmissionUsage Notes
  • RF components are enormously sensitive to
  • Placement
  • ground plane and traces
  • Power supply
  • Antenna can also have huge effect
  • Quarter-wave whip best, but large for lower
    frequencies (c?f)
  • Helical antennae attenuate by 5dB, printed whip
    by 10dB
  • Need to match impendence to transmitter output
    (50?)

42
Available RF Modules
43
The RFRAIN Card
  • Made by Mat Laibowitz for the UbeR-Badge
  • GP RF card based on the Chipcon CC1010
  • Circa 70 kbps
  • CSMA Scheme

44
The CC2500 Daughtercard
  • Made by Mat Laibowitz for the Plug and other
    projects
  • GP RF card based on the Chipcon CC2500
  • Circa 500 kbps
  • CSMA Scheme, but can be used with other methods

45
Sensor Networking ProtocolsImportance
  • Allow for easier creation of sensor networks,
    including central node which understands and
    processes the data
  • Increase user acceptance of modules by
    trivializing their setup
  • Allow for remote collaboration through searching
    protocols and shared open sensors
  • Decentralize the processing of the data to reduce
    communication costs

46
Sensor Networking ProtocolsOverview
  • Our previous discussion considered sensor modules
    which did not talk to each other or have any
    response more complicated than continuous
    collection, processing and transmission of data
  • Sensor networking protocols allow
  • Modules to describe their own data
  • To establish clusters on the fly
  • To be remotely interrogated and controlled by
    master devices over a variety of communication
    systems

47
Some Sensor Net Architectures
  • Berkeley Motes
  • Current version favors size and integration over
    modularity
  • Commercial Version from Crossbow (also Kris
    Pisters Blue Motes)
  • Concentrates on ad-hoc networking application
  • http//webs.cs.berkeley.edu/tos/hardware/hardware
    .html
  • Smart-Its
  • Only single attachment possible to main board
  • Not mechanically strong
  • http//www.smart-its.org/
  • Tower
  • Individual boards are quite large, unsuitable
    for compact apps
  • Mostly a pedagogical tool.
  • http//gig.media.mit.edu/projects/tower/
  • Millenial Net
  • MIT ME Spinoff (lower-end)
  • http//www.millennial.net/
  • Ember
  • Media Lab Spinoff (higher-end)
  • http//www.ember.com/

48
Intelligence at the Extremities
Star Topology
  • Local processor detects, processes or compresses
    local features
  • High data rates possible with limited node
    densities
  • Wearable, medical applications

Peer-Peer
  • Feature extraction via local communication
  • Results routed out node-node
  • Potentially scalable to very high density
  • Electronic skins, sensate media

49
Sensor Networking Protocols802.15
  • IEEE 802.15 standard defines specifications for
    wireless personal-area network (PAN)
  • Defined as a number of devices communicating
    solely amongst themselves in a 10m radius
  • Transmission is in the 2.4 GHz band
  • Master-slave protocol with automatic discovery
  • TDMA or CSMA channel sharing
  • Number of sub-standards based on transmission
    speed, number of nodes, and packet size

50
Sensor Networking Protocols802.15.1 Bluetooth
  • Designed for cable replacement for peripherals
    communicating with a single master
  • 7 nodes with 720 kbps total bandwidth
  • Overhead of 250kB
  • Power can be carefully managed (battery life on
    week scale)
  • Max data rate of 1Mb/s and power consumption at
    0.3mA in standby, 30mA maximum while transferring
    at full speed
  • Some issues
  • 7 Slaves, 1 Master (although can nest subnets
    with shared node)
  • Takes 100s of msec(!) to shift between nodes in
    Bluetooth 1
  • Single-Chip manufacturers
  • Cambridge Silicon Radio (http//www.csr.com )
  • SiliconWaves (http//www.siliconwave.com )
  • Zeevo (http//www.zeevo.com )
  • Modules
  • BlueRadios (http//www.blueradios.com/)
  • Infineon BlueMoon (http//www.infineon.com/)
  • National Semiconductor SimplyBlue
    (http//www.national.com/)

51
Sensor Networking Protocols802.15.4 Zigbee
  • Designed for monitoring of large network of very
    low duty cycle sensors
  • 255 nodes with 200 kbps total bandwidth
  • Overhead of 32kB
  • Battery life on year scale
  • Motorola NeuRFon Series of single-chip Zigbee
    transceivers
  • Coming out soon (maybe)
  • Zigbee System-On-Chip
  • Chipcon CC2431
  • Ember EM250

"Using Low-Cost Low-Power Wireless Sensor Devices
to Monitor the Health of Structures", Anthony
Allen, Ralph D'Souze, Oleg Andric, Minh Pham,
Wayne Chiou, and Lance Hester (Motorola), 4th
International Workshop on Structural Health
Monitoring, Stanford CA, September 2003.
52
Sensor Networking ProtocolsIEEE 1451 - Goals
  • Develop network independent and vendor
    independent transducer interfaces.
  • Allow transducers to be replaced/moved with
    minimum effort.
  • Eliminate error prone, manual system
    configuration steps.
  • Support a general transducer data, control,
    timing, configuration and calibration model.
  • Develop Transducer Electronic Data Sheets that
    remain together with the transducer during normal
    operation.

53
Sensor Networking ProtocolsIEEE 1451 - Standard
  • IEEE 1451 is actually a family of standards which
    define various portions of the interface between
    sensor modules and a network
  • X.1 Define NCAP block to isolate sensing and
    communication
  • X.2 Define TEDS to store data about sensor with
    sensor
  • X.3 Define multidrop bus protocol for sensors
  • X.4 Separate TEDS and

data source/communication
54
Sensor Networking ProtocolsIEEE 1451 - TEDS
  • Transducer Electronic Data Sheets (TEDS) allow
    for sensors to contain their own calibration data
    and other fundamental characteristics
  • Number of different templates
  • Simplifies integration of sensor into larger
    system and replacement if necessary
  • Standardizes interface

55
Sensor Networking ProtocolsSensorML
  • Sensor Model Language (SensorML) is an XML based
    description language for web-resident devices
  • These devices are self-describing and provide
    information necessary for discovery, processing,
    and location of sensor observations
  • System allows for
  • Search and discovery of available public sensors
  • Dynamic request and fusion of data from disparate
    sources
  • Control and handling of remote data sources
  • Direct transmission of data and processing
    information to remote sites

56
Sensor Networking ProtocolsSensorML - Format
  • The SensorML format allow sensor to identify
    themselves, give their security limitations,
    describe their measurements and specify their
    location

57
Sensor Networking ProtocolsCAN
  • Controller Area Network (CAN) was designed for
    automotive use to enable robust serial
    communications while simplifying wiring
  • Nodes share a common bus (using CSMA) and can
    send messages
  • Only on sensor/device failure
  • Continuously to update parameters
  • When instructed by master or another node
  • Message format is fairly complex, but system
    could be useful if integrated with sensors and
    processor of interest
Write a Comment
User Comments (0)
About PowerShow.com