Presentation Title Here - · PDF fileoxygenation level of blood that is passing through it....
Transcript of Presentation Title Here - · PDF fileoxygenation level of blood that is passing through it....
1
Case studies of applications of
MSP430
Atul Lele, Ramakrishna Reddy K,
MSP430 Design,
Texas Instruments India Pvt Ltd.
LECTURE - 9
17-10-2011
2
Outline of today’s session
• What have we learnt so far
• Agenda for this session
– Biomedical Applications
– Metering Applications
– Wireless Applications
• Wrap-Up
• Q&A
17-10-2011
What have we learnt so far
• Motivation for Low Power Embedded Systems
• MSP430 Architecture
• MSP430 families
• Programming MSP430 using Code Composer Studio (CCS)
• Interrupts and Low Power Modes (LPM)
• Peripherals – DMA
– LCD
– Interfacing LCD
Biomedical applications
• Therapeutic Instruments
– Takes certain action based on the measurements
– The Microcontrollers must satisfy the 0 defective parts
per million (DPPM) criteria
– Ex: Automated External Defibrillator (AED)
• Diagnostic Instruments
– Only measures a physiological parameter
– Ex: Thermometer, Blood Glucose Meter (BGM),
Cholesterol meters, Thermometer, Electrocardiogram
(ECG), Heart rate monitor, Pulsoximeter
Pulsoximeter
• The Pulsoximeter is a medical instrument for
monitoring the blood oxygenation of a patient
• By measuring the oxygen level and heart rate, the
instrument can sound an alarm if these drop
below a pre-determined level
• Especially useful for new born infants and during
surgery
Source: focus.ti.com/lit/an/slaa274a/slaa274a.pdf
Theory of Operation
• The calculation of the level of oxygenation of blood (SaO2) is based on
measuring the intensity of light that has been attenuated by body
tissue
• SaO2 is defined as the ratio of the level oxygenated Hemoglobin over
the total Hemoglobin level (oxygenated and depleted)
• Body tissue absorbs different amounts of light depending on the
oxygenation level of blood that is passing through it. This
characteristic is non-linear
SaO2 = HbO2
Total Hemoglobin
Source: focus.ti.com/lit/an/slaa274a/slaa274a.pdf
Theory of Operation (Continued)
Log(Iac,λ1) SaO2 α Log(Iac, λ2)
R = R ;
• Two different wavelengths of light are used such that
– λ1 which is absorbed by tissue in proportion to the amount of SaO2 Eg.
Red
– λ2 that is least absorbed by any tissue, Eg. Infra red (IR)
• Each source is turned on and measured alternately
• By using two different wavelengths, the mathematical complexity of
measurement can be reduced
Iac,λ1 – Current measured at the detector with first light source (λ1)
Iac,λ2 - Current measured at the detector with second light source (λ2)
Note: There are a DC and an AC component in the measurements. It is assumed that the DC component
is a result of the absorption by the body tissue and veins. The AC component is the result of the absorption
by the arteries
Source: focus.ti.com/lit/an/slaa274a/slaa274a.pdf
System Operation
• The two LEDs are time multiplexed at 500 times per second The PIN diode is alternately excited by each LED light source
• The PIN diode signal is amplified by the built in operational amplifiers OA0 and OA1. The ADC12 samples the output of both amplifiers
• The samples are correctly sequenced by the ADC12 hardware and the MCU software separates the infra-red and the red components
• The SaO2 level and the heart rate are displayed on an LCD
• Apart from the MCU, LCD panel, sensor probe and four transistors, only passive components are needed for this design
Source: focus.ti.com/lit/an/slaa274a/slaa274a.pdf
MSP430 in Metering applications
• Water meter
• Gas meter
• Automated Meter Reading (AMR)
• Advanced Metering Infrastructure (AMI)
• Heat Cost Allocation
• Energy meter (1-phase, 2-phase, 3-phase)
Energy Meter (E-Meter)
• An energy meter is a device that measures amount of electrical energy consumed
• The energy is measured in kilo-watt-hours (kWh)
• Energy is the product of instantaneous voltage and current over time E= v*i*t
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
Types of Energy Meters
• Electromechanical meters – Most commonly used meters today
– Operates by counting number of revolutions of an aluminium disc
– The aluminium disc rotates at a speed proportional to the power usage
– Reading of meter is done manually
– Limited accuracy
• Electronic meters – Extremely favorable metrology with absolutely no moving parts
– Uses microcontrollers, DSP processors or ASIC for the metrology
– Extremely accurate measurements with digital display
– Robust tamper protection
– Self-energy consumption is negligible
– Some of the latest meters have automatic meter reading (AMR)
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
Types of measurements
• Single phase measurement – Common in most residential complexes
– One voltage and one current
– Supports low to medium load
• Dual phase measurement – Not common
– Two voltage separated by 180 degrees
– Supports medium to large load
• Three phase measurement – Industrial, agricultural, urban residential
– Consists of 3 separate phases or wires to distribute AC current
– Each phase is 120 degrees out of phase with the others
– It is more efficient to transmit current via 3-phases that are out of phase than a single phase system
– Especially designed for applications that service large loads
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
Why choose MSP430?
• Low-power + High performance
• Modern 16-bit RISC CPU
• Up to 192KB Flash and up to 16KB RAM
• Powerful clock system: Up to 25MHz, <6μs clock start-up
• Powerful analog front-end to form a System-on-Chip (SoC)
• Intelligent peripherals that boost performance
• 0.1μA power down / 0.8μA standby mode
• Integrated LCD driver with charge pump to support up to
160 segments
• Embedded emulation
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
MSP430 for E-metering
• Powerful 16-bit A/D converter (SD16, SD16_A) – Programmable gain amplifier
– Supports differential input
• Multiple SD16/SD16_A for simultaneous sampling of voltage and current channels
• Hardware multiplier to support up to 32-bit x 32-bit multiply for better accuracy
• Multiple communication peripherals that support a variety of wired and wireless protocols
• Enables tamper detection (anti-tampering)
• Calculates a comprehensive set of parameters with the use of a CPU independent metrology engine (Embedded Signal Processor, ESP)
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
System-on-Chip (SoC) solution
• Single-chip solution in place
of multi-chip
• Interfaces to a variety of
current sensors
• Support for various
wired/wireless protocols
• Metrology engine in
Hardware/Software
Analog
Front
End
(AFE)
Hardware
Multiplier Metrology
LCD Driver
Communication
Peripherals
Display
Wired & wireless
interfaces
MSP430
Calibration
Sensors
Shunt/
Current Transformer/
Rogowski Coil
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
http://en.wikipedia.org/wiki/Rogowski_coil
Voltage Sensor - Resistor
• Simple and extremely cheap
• Values of R1 and R2 chosen depending on Vmains and desired range for Vin to A/D
• No level shifter necessary for differential inputs
• Gain amplifier stage not required
110V/ 230V 60Hz or 50Hz Mains
i
R1
R2
Vin
to MSP430
R2
R1 + R2 Vin = Vmains
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
Vmains
Line
Neutral
Current Sensor - Shunt
• Commonly used current sensor
• Simple to design, based on Ohm’s law
• Inexpensive
• Always in micro-ohms range to support a wide dynamic range of currents
• No magnetic effects
• Absolutely no inherent phase shifts
• Can be used only with single phase measurement systems
110V/ 230V 60Hz or 50Hz Mains
imains RSh
Vin
to MSP430
Vin = imains RSh
• In almost all cases, resistance is not constant, stable or perfectly linear over temperature
• Limited accuracy, resistor tolerances a concern for high precision meters
• No electrical isolation provided
• Self-heating due to power dissipation is a concern, posing limitations
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
Vmains
Line
Line
Current Sensor – Current Transformer
(CT)
• Provides electrical isolation protecting the measuring device
• Current in secondary is proportional to current in primary.
• With zero losses, the secondary current is the primary current divided by N (number of turns on the core)
• Provides best accuracy
• Subject to internal phase shift that needs to be compensated
• Burden resistor (load) control the maximum input current to CT
• Load must never be disconnected from secondary when current is flowing at the primary
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
Line
Line
Phase error due to CT
• CT introduces additional phase shift between V and I
• Phase compensation needed is measured during
calibration time
• A simple FIR filter is used to provide this compensation
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
SD16 Overview
• MSP430FE42x &
MSP430FE42xA
• Multiple channels
• Single external
input per channel
• Up to 256 OSR
• 1MHz modulation
frequency
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
PGA = Programmable Gain Amplifier
SD16_A Overview
• MSP430F47x4
• Multiple channels
• 30kHz to 1.1MHz
modulation
frequency
• Modulation
frequency divider
• Up to 1024 OSR
• Temperature
sensor
• AVCC measure
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
Analog Input Range
Depends on
• VREF
• PGA gain setting
• Applies to all
inputs in a
channel & OSR
settings
Note: Diagram shows the differential input voltage VIN
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
VREF/2
GAINPGA VFSR =
Hardware Multiplier
• Ideal for energy calculation to multiply voltage and current
readings
• Signed and unsigned multiply
• Signed and unsigned multiply and accumulate (MAC)
• 16-bit HW multiplier
– supports 16×16 bits, 16×8 bits, 8×16 bits, 8×8 bits
• 32-bit HW multiplier
– supports in addition all combinations with 24-bit and 32-bit data
– supports fractional mode for operands
• DMA trigger available on devices with DMA module
• Available for all devices on MSP430 E-metering portfolio
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
MSP430 Communication peripherals
• Flexible on-chip synchronous and asynchronous interfaces
– Asynchronous UART, IrDA
– Synchronous SPI, I2C
• High speed protocols possible
– Up to 16 MHz frequency available
• Support for Smart metering
– Automatic Meter Reading (AMR)
– Advanced Metering Infrastructure (AMI)
– Power line communication (PLC)
– Radio Frequency communication
• Easy interface to wired and wireless devices
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
MSP430 E-meter Metrology Portfolio
ESP430
MSP430FE42x
MSP430FE42xA
MSP430FE42x2
No ESP430
MSP430F47xx
MSP430F471xx
Merits
1. Ease of use
2. Faster time to market
3. Comprehensive sets of results
De-merits
1. Limited flexibility
2. Limited set of communication peripherals
3. 8MHz CPU frequency
Merits
1. Flexibile metrology
2. Better control of accuracy
3. 16MHz CPU
4. Variety of communication peripherals
De-merits
1. Effort of implementation
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
MSP430 E-metering metrology engine
ESP430 • Embedded signal
processor present on all devices that have an “E” in its nomenclature
• Energy metrology engine running parallel to CPU activity
• Dedicated use of SD16s and Hardware multiplier
• Combines analog and digital signal processing
• Returns energy, power, voltage, current and power factor measurements
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
MSP430FE42x(A) Energy meter
Tamper
Detection
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
MSP430FE42x(A) Energy meter
Tamper
Detection
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
Load current
MSP430FE42x(A) Energy meter
Tamper
Detection
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
Load voltage
MSP430FE42x(A) Energy meter
Tamper
Detection
Source: focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
Return current
MSP430 in Wireless applications
• Alarm system, smoke/fire detector
• Home control and automation
• Wireless asset tracking
• Wireless Sensor Networks (WSN) with
ChipCon (CC) RF interfaces
Wireless Sensing Application
C Gateway Repeater
CO Sensor Occupancy
Sensor
Door
Lock
Smoke
Alarm
Glass
Break
Sensor
Occupancy
Sensor
Smoke
Alarm
Repeater
Peer to Peer message
Message to
Access point
Message repeated
through range extenders
Access point
Range Extender
End Device
Key
Fob
CO Sensor Glass
Break
Sensor
Range can be extended through repeaters. The circles represent the RF
range of the gateways and the extended RF range of repeaters.
Source: Borrowed from Gill Instruments presentation on MSP430
Applications of Wireless Sensor Networks
(WSN)
Emergency response
Asset tracking
Manufacturing process flow
Wildlife habitats
Ubiquitous computing environments
Source: Borrowed from Gill Instruments presentation on MSP430
Precision Agriculture
Saving watering and fertilizing expenses
Increasing crop yield
Improving fruit size
Timing crop ripeness to match best price in the market
Saving labor expenses by wireless automatic data collection
Crop specific researches
Basic Measurements: Leaf CO2 exchange rate & Leaf transpiration rate & temperature Air CO2 concentration Absolute air humidity Soil moisture Sap flow rate
Source: Borrowed from Gill Instruments presentation on MSP430
Available Global Frequencies
Power and other restrictions apply to different regions
http://processors.wiki.ti.com/index.php/Low_Power_RF_Solutions_Workshop
Low Power Wireless Protocols
• Standards Based
– Wi-Fi
– Bluetooth
– ZigBee (standard, Pro, Z-Accel)
– 802.15.4 (MAC)
– RFID
– Wireless USB
– RF4CE • Proprietary
– 6LoWPan (IPv6 over 802.15 networks)
– SimpliciTI™
– BlueTooth LE
– WHART
– EnOcean
– OneNet
– Others …
http://processors.wiki.ti.com/index.php/Low_Power_RF_Solutions_Workshop
Short-Range Wireless Communications
1000m
Headsets
PC Peripherals
PDA/Phone
Building Automation
Residential Control
Industrial
Tracking
Sensors
Home Automation / Security
Meter Reading
Data Rate
(bps) 100k 1M 10M 10k 1k
Range
100m
10m
1m
ZigBee/IEEE 802.15.4
PC Networking
Home Networking
Video Distribution
Wi-Fi/802.11
Proprietary Low Power Radio
Gaming
PC Peripherals
Audio
Meter Reading
Building Mgt.
Automotive
UWB
http://processors.wiki.ti.com/index.php/Low_Power_RF_Solutions_Workshop
Network Topologies
STAR
MESH
PAN COORDINATOR
FULL-FUNCTION DEVICE
REDUCED-FUNCTION DEVICE
CLUSTER
TREE
Source: Borrowed from Gill Instruments presentation on MSP430
eZ430-RF2500
USB
Powered
Spy Bi-Wire &
UART Interface
MCU pins
accessible
2x LEDs
MSP430F2274
Button CC2500
Chip
Antenna
Emulation Removable
Target Board
eZ430-RF Emulator
• Supports all MSP430
Spy Bi-Wire devices – Compatible with original eZ430-F2013
and -T2012 target boards
• MSP430 Application UART – Allows communications from PC Virtual
COM port to MSP430 target
– Available in or out of a debug session
Detachable Target Board
• Separate emulator to
debug remotely
• Includes 2xAAA batteries
and expansion board
for instant deployment
• Easy interface to external
sensors and projects
• Separate target boards
orderable by 2Q 2008
MSP430 + LPW for Applications
• A perfect fit for low power
wireless solutions
– Designed for low power
– Simple connection through SPI
• Compatible with ALL
MSP430 devices
• Standard based protocols
(ZigBee / 802.15.4) and
proprietary stacks available
*transmitter only
MSP430 FG461x
F261x F241x
F23x/F24x
F22xx
F41x
Suggested Devices High End General Purpose Cost Efficient
CC2xxx (CC2420, CC2500, 2520, 2550*) 2.4GHz
CC1xxx (CC, 1100, 1150*, CC1101) <1GHz Low Power
Wireless
Z-Accel
• ZigBee Certified Network Processor solution
• MSP4302274 + CCZACC – Communicates over SPI or
UART
• Easy to Use: SimpleAPI – 10 API Calls
– Device configuration
– Binding of devices
– Sending and receiving data
MSP430 + CC2560 (Bluetooth)
• Integrates CC2560 and MSP430BT5190
• Pre-flashed eZ430-RF2560 SDK with MindTree’s Ethermind Bluetooth stack, serial port profile (SPP) and embedded sample applications running on FreeRTOS
• Interactive sample PC game for demonstration of Bluetooth use in a remote control application using accelerometer data
• Removable USB stick enclosure, 2 LEDs, 3 pushbuttons
52
Wrap-Up
• MSP430 in a Pulsoximeter
• MSP430 in a single-phase Energy meter
• MSP430 in Wireless Sensor Networks (WSN)
17-10-2011
53
References
• Few slides on the applications were borrowed
from Gill Instruments presentation on MSP430
• Processors wiki on TI LPRF solutions http://processors.wiki.ti.com/index.php/Low_Power_RF_Solutions_Workshop
• MSP430 for E-meter Kevin Yoon http://focus.ti.com/asia/download/TechDay09kr_Track1_2.pdf
• A Single-Chip Pulsoximeter Design Using the
MSP430, Vincent Chan, Steve Underwood, http://focus.ti.com/lit/an/slaa274a/slaa274a.pdf
17-10-2011