Freescale Semiconductor - Beyond Bits: Health and Safety

Freescale Semiconductor - Beyond Bits: Health and Safety
Designer Resource. Accelerate. Simplify.
4
Issue 4 Summer 2009
Beyond Bits
Document Number: BR8BITBYNDBITS Rev 3
Health and Safety
It’s making
the world a
smarter place.
Collaboration. Innovation. Inspiration.
Freescale Technology Forum (FTF) events around the globe bring the entire Freescale
ecosystem together to create a unique, energizing and inspiring environment of innovation
and collaboration.
FTF 2009 Global Program
Virtual FTF
July 14–16, 2009
FTF China
August 27–28, 2009
FTF India
September 2–3, 2009
FTF Japan
September 9, 2009
www.freescale.com/FTF
Shenzhen
Bangalore
Tokyo
Collaboration. Innovation. Inspiration.
For detailed information about each of these exciting events,
visit www.freescale.com/FTF
2009
Collaboration.
Innovation.
Inspiration.
Freescale and the Freescale logo are trademarks or registered trademarks of Freescale Semiconductor, Inc.
in the U.S. and other countries. All other product or service names are the property of their respective
owners. © Freescale Semiconductor, Inc. 2009
Issue 4
2
Beyond Bits
Health and Safety
Welcome to the fourth edition of Beyond Bits. This edition focuses on health and safety.
Our world is changing—the median age of the world’s population is increasing and we are living
longer. As individuals and global citizens, solutions that help us lead safer and healthier lives
are top of mind. And as engineers, we believe we can design smarter, more efficient embedded
applications that will contribute to the well-being of people around the world. To help you create
this next generation of products, we filled this publication with state-of-the-art platform solutions
and expert advice from our engineers. Freescale products—from sensors to microcontrollers to
wireless connectivity technology—are featured in this Beyond Bits to help you build advanced
applications designed to promote health and safety.
Health care providers are increasingly relying on portable medical technology and tools to assist
in advancing, maintaining and restoring health. For instance, in the article ZigBee® Technology
for Long-Term Care, we demonstrate how combining Freescale microcontroller, sensor and
ZigBee wireless technologies can help maximize the independence of long-term care patients
and minimize the effects of disability and illness. Or, read the article Wireless Sound Notification
System and learn how an IEEE® 802.15.4 wireless-based platform using Freescale components
can help visually impaired persons move about safely.
These are just two examples of the twenty articles in Beyond Bits IV that will spur your imagination
and inspire innovative design that is essential to making good lives better.
We hope you enjoy this edition.
Henri Richard
Senior Vice President, Chief Sales and Marketing Officer
Inga Harris graduated from the University of Strathclyde in 2000 with an honors degree in electronics and electrical engineering.
We want to hear from you!
Her Technical Marketer and Applications Engineering career at Freescale has predominantly been with the 8-bit MCU families with a
Send your design ideas, tips or questions to freescale.com/beyondbits.
strong focus on Consumer and Industrial markets.
Feedback
Introduction 2
Issue 4
Beyond Bits
Table of Contents
Blood Pressure Monitors
Inga Harris ______________________________________________________________________4
We want to hear
from you!
ZigBee® Technology for Long-Term Care
Send your design ideas,
tips or questions to
freescale.com/beyondbits.
Matt Maupin and Sampath Raghavan _______________________________________________ 10
Gestational Diabetes
Donnie Garcia and Alejandra Guzman Castellanos with Dr. Claudia Rentería Govillo ____________ 16
Sports Game Station
Shen Li and Ju Yingyi with Dr. Gabriela López and Dr. Sergio Rosales ______________________ 21
Telemonitoring Solutions
Dr. Jose Fernandez Villaseñor and Jesus Gaytan ______________________________________ 24
Low-Energy Wireless: Just What the Doctor Ordered
Raman Sharma ________________________________________________________________ 29
Automatic Ventilation Control
Alfredo Soto with Dr. Juan Carrillo Jiménez ___________________________________________ 32
Health Social Networks
Kurt Seifert _ __________________________________________________________________ 35
Human Factors and the Control of Medical Device-Related Error
Larry Fenningkoh and Diego Haro __________________________________________________ 39
Beyond Accidental Falls
Rogelio Reyna and Kim Tuck with Dr. Daniel Copado ___________________________________ 44
Changing the High-Complexity Paradigm
Jaime Herrero with Dr. José Fernández Villaseñor ______________________________________ 49
Reducing DICOM
Rodolfo Gonzalez ______________________________________________________________ 54
Implementation of an Electrogoniometer
Leonardo Mangiapelo ___________________________________________________________ 57
A Matter of Torque
Thomas Böhm ________________________________________________________________ 61
Position Location Monitoring
Oziel Hernandez, Varun Jain, Suhas Chakravarty and Prashant Bhargava _ __________________ 67
Beyond Isolation
Jose Palazzi _ _________________________________________________________________ 74
Low-Cost Driver Assistance
Suhas Chakravarty, Varun Jain, Nakul Midha and Prashant Bhargava _______________________ 78
3-D Facial Recognition System
Deepak V. Katkoria and Alberto Arjona ______________________________________________ 83
Making Industrial Systems Safer
Dugald Campbell _ _____________________________________________________________ 88
Wireless Sound Notification System for Visually Impaired Persons
Bogdan Holmanu ______________________________________________________________ 93
Family Product Summaries________________________________________________ 97
Table of Contents 3
4
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Inga Harris
Blood Pressure Monitors
A Freescale reference design
Introduction
Blood pressure monitors
Digital blood pressure monitors allow physicians to diagnose
A blood pressure monitor is a device used to measure arterial
hypertension (high blood pressure) and help their patients keep
pressure as blood is pumped away from the heart. Typically,
it under control. Portable blood pressure monitors help in the
from a user perspective, the monitor includes an inflatable
early diagnosis and control of hypertension by allowing patients
cuff to restrict blood flow and a manometer (pressure meter)
to cost-effectively run tests and measurements at their own
to measure the blood pressure. From a system designer’s
homes without having to visit a physician. Home monitoring can
perspective a blood pressure monitor is more complex. It
also help physicians differentiate white coat hypertension from
consists of a power supply, motor, memory, pressure sensor
essential hypertension. Table 1 illustrates how hypertension
and user interfaces, which can include a display, keypad or
awareness and control have improved over the years as
touchpad and audio, as well as optional USB or ZigBee®
concluded in the Seventh Report of the Joint National
communications interfaces.
Committee on Prevention, Detection, Evaluation and Treatment
of High Blood Pressure (2004).
Figure 1 illustrates Freescale’s blood pressure monitor
reference design RDQE128BPM, which demonstrates how
This article covers the basics of blood pressure monitoring as
the sensing, data communication and processing capabilities
well as one of the toughest challenges in any measurement
of Freescale products interact to create a complete medical
system—accurately translating signals from the analog to the
handheld solution. For more details on this reference design,
digital domain. High-resolution analog-to-digital converters
download the Blood Pressure Monitor Design Reference
(ADCs) provide good granularity (the ADC resolution is in the
Manual PDF (search for document number DRM101) from
nanovolt range) but don’t provide high accuracy because the
www.freescale.com.
errors are greater. However, various ADC techniques (i.e. over
sampling and calibration) can be used to increase the accuracy
of results in measurement-based applications.
Blood pressure varies between systolic (SBP) and diastolic
(DBP). Systolic is the peak pressure in the arteries, which
occurs near the beginning of the cardiac cycle when the
Trends in Awareness, Treatment and Control of High
Blood Pressure in Adults Ages 18–74*
National Health and Nutrition Examination Survey, Percent
ventricles are contracting. Diastolic is minimum pressure in the
arteries, which occurs near the end of the cardiac cycle when
the ventricles are filled with blood. Typical measured values for
a healthy, resting adult are 115 millimeters of mercury (mmHg)
II
(1976–80)
III (Phase 1
1988–91)
III (Phase 2
1991–94)
1999–2000
Awareness
51
73
68
70
SBP and DBP arterial blood pressures are not static and
Treatment
31
55
54
59
undergo natural variations from one heartbeat to another
Control†
10
29
27
34
throughout the day. They also change in response to stress,
(15 kilopascals [kPa]) systolic and 75 mmHg (10 kPa) diastolic.
*High blood pressure is systolic blood pressure (SBP) ≥140 mmHg or diastolic blood
pressure (DBP) ≥90 mmHg or taking antihypertensive medication.
nutrition, drugs, illness and exercise.
†SBP ≤140 mmHg and DBP <90 mmHg
How measurements are made
Table 1
Sources: Unpublished data for 1999–2000 computed by M. Wolz, National Heart, Lung
and Blood Institute; JNC 6.1
As the cuff that is wrapped around the patient’s arm deflates,
small variations in the overall pressure against the cuff (red trace
in Figure 2) can be observed. These pressure variations are
created by the patient’s pulse, which are then amplified through
freescale.com/beyondbits
Blood Pressure Monitors 4
Freescale RDQE128BMP Blood Pressure Monitor Reference Design
Motor Control
Valve
Power Stage
TPM (1)
MPXV6060GP
(Pressure Sensor)
Air Chamber
ADC (1)
DC Motor
(Air Pump)
High Pass
Filter
SPI (4)
Ctrl (2)
MC13202
(ZigBee®
Transceiver)
PCB
Antenna
PPR083
(Capacitive
Touch Sensor)
Electrodes
(5)
ADC (1)
Power Stage
OLED Display
128 x 64 pixels
MCF51QE128
Flexis™ 32-bit MCU
TPM (1)
SPI (3)
GPIO (3)
ADC (1)
GPIO (3)
GPIO (3)
MR2A16A
MRAM Memory
SCI (2)
USB Connector
(Type B)
MC9S08JM60
Flexis 8-bit MCU
GPIO (1)
Power Supply
(3.3, 12V)
Low Pass Filter
(RC)
Audio Amplifier
(TBAB20M)
Speaker
Freescale Technology
Figure 1
a 1 Hz high-pass filter and offset, producing the grey blood
diagnosed when the SBP is consistently over 140 mmHg or the
pressure trace. This new signal is the heartbeat signal.
DBP is consistently over 90 mmHg.
Using the heartbeat detection as explained, a simple
White coat hypertension
oscillometric method employed by the majority of automated
non-invasive blood pressure monitoring devices is used to
determine SBP and DBP. The oscillometric method measures
the amplitude of pressure change in the cuff as it is inflated
above SBP and then deflated. The amplitude suddenly
increases as the pulse breaks through the patient’s SBP. As the
cuff pressure is further reduced, the pulse amplitude reaches
a maximum and then diminishes rapidly. The index of diastolic
pressure is taken where this fast transition begins. Therefore,
the SBP and DBP are obtained by identifying the region where
there is a rapid increase (SBP) then decrease (DBP) in the
pulse amplitude. Mean arterial pressure (MAP) is at the point of
maximum pressure.
People suffering from white coat hypertension only exhibit
high blood pressure symptoms in higher stress environments
away from the normal home environment, such as a clinic or
physician’s office (hence, the ”white coat” reference). People
with white coat hypertension exhibit high readings (SBP over
140 mmHg, or DBP 90 mmHg) when measured in a clinical
environment but have normal blood pressure readings outside
the clinic. White coat hypertension can be misdiagnosed
as essential hypertension, which can lead to unnecessary
treatment and increased insurance premiums. For this reason,
medical professionals frequently support home readings over a
few weeks to verify a diagnosis. Therefore, portable, easy to use
blood pressure monitors are becoming common in the domestic
Measuring SBP and DBP can help diagnose hypertension
environment.
in general, but clinical monitoring alone cannot differentiate
People with white coat hypertension have a higher risk of
between the two common types of hypertension.
Essential hypertension
Essential (or primary) hypertension is high blood pressure with
no identifiable or correctable cause. Essential hypertension is
freescale.com/beyondbits
developing essential hypertension in the future than those who
currently do not suffer from any hypertension. This, along with
other risk factors, such as smoking and high cholesterol, has
helped drive increased demand for home monitoring kits.
Blood Pressure Monitors 5
Heartbeat vs. Diastolic Pressure
2500
MAP
SBP
2000
DBP
1500
mV
1000
500
0
1
458
915 1372 1829 2286 2743 3200 3657 4114 4571 5028 5485 5942 6399 6856
Number of Samples
Heartbeat
Pressure
Figure 2
There are a number of drugs available for hypertension
Compact, easy-to-use blood pressure monitors that require no
treatment, which physicians may choose to use in combination,
clinical training to operate are a must if they are to be effectively
including:
used by hypertension sufferers while at home or even as they
• ACE inhibitors and angiotensin II receptor antagonists that
travel. Today’s advanced semiconductor technology can provide
keep the blood vessels from narrowing
• Alpha blockers and beta blockers, which relax the blood
vessels and heart respectively
• Calcium-channel blockers that help expand the blood vessels
the basis for more accurate, reliable and cost-effective devices
that can help patients better monitor their hypertension so more
effective treatment and improved diet and lifestyle changes can
be initiated.
to ease blood flow
SAR DAC Block Diagram
• Diuretics that help rid the body of excess salt and fluids
In addition to following a medical treatment plan, patients
SAR
must instigate a number of changes in lifestyle and diet and
Clock
may employ therapeutic relaxation techniques to help reduce
hypertension. Regardless of which medical alternative is used
or what lifestyle changes are implemented, continual blood
pressure monitoring is the common denominator for effective
VREF
treatment. It is essential that the physician has accurate,
Capacitive
DAC
up-to-date information so any changes in treatment can be
initiated. This means blood pressure monitoring equipment must
be available to the patient outside the clinical environment if he
VIN
or she hopes to lead a relatively normal life.
Sample
and Hold
+
–
Figure 3
freescale.com/beyondbits
Blood Pressure Monitors 6
Analog-to-digital
converter accuracy
As illustrated in Figure 1, the microcontrollers (MCUs) and
pressure sensor are the core technologies in the blood
pressure monitor. The RDQE128BPM reference design block
diagram also shows that the most important MCU module in
this application is the ADC. Freescale’s embedded controller
ADC modules are successive approximation ADCs (see Figure
3). These have sample and hold circuitry to acquire the input
voltage (Vin), a comparator, a successive approximation register
when measuring signals that change by microvolts, improves
the accuracy of the resultant data. Small SNR values mean that
the data is distorted by the noise in the system and accuracy
is affected. “Noise Reduction Techniques for MicrocontrollerBased Systems” (document number AN1705) is one of many
resources that can be downloaded from www.freescale.com
to help blood pressure monitor system designers mitigate any
potential SNR degradation.
Techniques to improve accuracy
Adding a small amount of controlled noise (0.5 LSB of Gaussian
sub circuit and an internal reference capacitive digital-to-analog
white noise) to an ADC’s input, often referred to as “dithering,”
converter (DAC). The DAC supplies the comparator with an
can force a signal above or below the closest resolution step,
analog voltage equivalent of the digital code output from the
which avoids having to round down to the value below. The
successive approximation register (SAR) for comparison with Vin.
state of the conversion’s LSB randomly oscillates between
Applications like blood pressure monitors have to measure
very small signals. Therefore, the ADC resolution is often a
key parameter (i.e., 10-bit, 12-bit or 16-bit resolution) and an
important factor to consider when choosing an MCU for the
application design. Just as important, if not more so, is the ADC
accuracy. Bear in mind that all ADCs have built-in inaccuracies
because they digitize a signal in discrete steps, a process
known as quantization. Consequently, the output cannot
perfectly represent the analog input signal. For instance, a
12-bit converter would provide a least-significant bit (LSB) with
0 and 1 rather than staying at a fixed value. Instead of the
signal being cut off altogether at this low level (which is only
being quantized to a resolution of 1 bit), the process extends
the effective range of signals that the ADC can convert at
the expense of a slight increase in noise. Effectively, the
quantization error is spread across a series of noise values.
Dithering only increases the resolution of the sampler and
improves the linearity but not necessarily the accuracy.
However, a technique that adds 1–2 LSB of noise to a signal
with oversampling can increase accuracy.
a 1.22 mV step for a maximum Vin of 5V. Therefore, the ADC
When adding artificial noise to a signal it is important to
can only digitize values in 1.22 mV steps: 1.22 mV, 2.44 mV,
remember that the noise must have a mean value of zero.
3.66 mV, etc. In this case, it means a perfect measurement can
However, many systems have white noise present from other
never be more accurate than ±0.5 LSB (±610 µV).
sources, including thermal noise, the CPU core, switching ports
Unfortunately, several other embedded ADC characteristics
introduce errors and reduce accuracy, including offset, gain,
temperature drift and non-linear performance. Some ADCs,
such as the 16-bit ADC on some of the newest Freescale
and variations in the power supply. Blood pressure monitors
are especially prone to white noise as the pump generates
electromagnetic interference, vibrations, etc., which are
absorbed by the PCB and thus, the microcontroller.
Flexis™ products, have the ability to reduce errors in the offset
Oversampling is the process of sampling a signal with a
and gain through calibration. Many ADCs have the ability to
sampling frequency significantly higher than the Nyquist
measure the temperature of the die via an on-chip temperature
frequency of the signal being sampled. In practice,
sensor internally connected to the ADC channels, allowing for
oversampling is used to achieve cheaper higher-resolution
temperature compensation to be incorporated.
ADC conversions. For instance, to implement a 16-bit converter
An ADC’s effective number of bits (ENOB) is the true indication
of resolution and accuracy. This value shows how many of the
bits in a given system provide accurate information. It can be
calculated by the following formula:
ENOB = (SNR - 1.76 dB)/6.02 dB
Here, the signal-to-noise ratio (SNR) is the ratio between the
meaningful information (signal) and the background noise
(noise or error). The SNR value is not only affected by the
ADC design and chip integration but also by the layout and
design of the printed circuit board (PCB) and by the selection
of additional discrete components. A large SNR value means
that more of the signal is data and the error is minimal, which,
freescale.com/beyondbits
it is sufficient to use a 12-bit converter that can run at 256 times
the target sampling rate. For each additional bit of resolution
the signal must be oversampled four times. Averaging a
group of 256 consecutive 12-bit samples adds 4 bits to the
resolution of the averaged results, producing a single result with
16-bit resolution. Because a real-world ADC cannot make an
instantaneous conversion, the input value should be constant
during the time that the converter performs a conversion.
The sample and hold circuitry performs this task by using a
capacitor to store the analog voltage at the input
and an electronic gate to disconnect the capacitor from the
input. Using the ADC setting with the sample and hold time
most suited to the input signal will help to improve the
result’s accuracy.
Blood Pressure Monitors 7
Oversampling and Decimation Signal + Noise Averaging Block Diagram
Result (Hex)
10
F
E
D
C
B
A
13
12
11
10
F
E
D
C
B
A
R
R
R
R
R
Time
R
R
R
R
R
Figure 4
The above two methods, noise injection and oversampling,
Calibration is a three step process:
can be combined to improve accuracy further, as illustrated in
1. Configure the ADC
Figure 4. This technique is often referred to as oversampling
2. Initiate a calibration conversion and wait for
and decimation. The top plot shows the ADC conversion
result over time and identifies what the result would be using
oversampling alone, without the addition of noise. By adding
the conversion to complete
3. Generate offset and gain calibration
1–2 LSB of noise, concurrent samples do not end up with the
The offset and gain calibration values can be subtracted
same result, as shown in the bottom plot in red. This method
and multiplied respectively to the result. This can be done
increases the SNR and enhances the ENOB. By adding the
in software or automatically in hardware on some ADC
1–2 LSB of noise to the input signal and oversampling, the
implementations, such as the ADC16 on Freescale’s latest
results can be averaged to provide a more accurate result.
Flexis products for monitoring applications.
Averaging data from ADC measurements also has the
advantage of minimizing signal fluctuation and noise as it
flattens out spikes in the input signal.
The offset of the input is the easiest of the three sources for
which to compensate. For a single-ended input conversion, the
input can be referenced against the same voltage internally.
There are four other manageable sources of inaccuracies:
This should produce a zero result. If the result is not zero, this
offset, gain, leakage and, to a lesser extent, temperature. Some
is the offset, which must be subtracted from the ADC result.
embedded ADC modules, such as the 16-bit ADC on some
If a differential conversion mode is available, the offset can be
of the newest Freescale Flexis products, have a hardware
found by converting the same signal on both input pins.
calibration feature that enables repeated calibration during
code execution. Embedded ADC modules without hardware
calibration can still be calibrated, but this must either be done in
the factory or by a solution designed into the product.
Once the offset is known, the ADC’s gain can be found from the
full-scale error. This is the difference between the ideal code at
the highest output code, such as 0xFFF in a 12-bit ADC, and
the actual output code when the offset error is zero.
Figure 5 shows the exaggerated effect of offset and gain on
an un-calibrated ramp (black) vs. an ideal ramp (red), from
freescale.com/beyondbits
Blood Pressure Monitors 8
temperature so adjustments can be made. Device data sheets
Gain and Offset
will normally specify the temperature sensor slope expressed at
Result
mV/°C to indicate the typical characteristic.
Nonlinearity is an error source for which little can be done,
Gain
since it is normally inherent in the design of the module.
The voltage difference between each code transition should
be equal to 1 LSB. Therefore, nonlinearity is the irregular
spacing of the code steps, which will cause some distortion.
Freescale application note “ADC Definitions and Specifications”
Un-calibrated
(document number AN2438, available as a PDF download from
www.freescale.com) explains in more detail the difference
between integral and differential nonlinearity errors.
Offset
Ideal
Voltage
Conclusion
Digital blood pressure monitors help physicians diagnose and
Figure 5
help patients control hypertension. Accurate blood pressure
ground to full scale. In applications sensitive to accurate ADC
monitoring both in the health care facility and the home is
results, such as blood pressure monitors, which are required
critical, particularly when diagnosing white coat hypertension
to identify tiny changes in readings (µV), calibration should
vs. essential hypertension.
be done frequently, at least after every reset sequence. If a
The toughest challenge in any measurement system is the
hardware function does not exist, calibration can be achieved
translation accuracy of the real-world analog signals to the
by designing ground and Vdd inputs into the application,
embedded controller’s digital domain. High-resolution ADCs
subtracting offset and multiplying by the calculated gain after
offer good granularity of results (LSB indicates nV changes)
every set of conversions.
but do not necessarily deliver high accuracy. Various ADC
There is another source of input error that is often overlooked
techniques, such as oversampling and decimation, calibration,
but can be significant. Leakage on the input pin can cause the
leakage control and temperature compensation, can be used to
voltage to drop across the resistive portion of the input source.
increase the accuracy and the ENOB in a measurement-based
This error can be in the order of tens of LSB in such circuits as
application.
battery voltage and temperature detection, which use high value
resistive voltage dividers to create the analog reference if the
analog DC source resistance is high. The best way to eliminate
this error is to reduce the analog DC source resistance and any
form of leakage that is within the designer’s control. An op-amp
that buffers the input voltage can reduce analog DC source
Freescale’s embedded controller ADCs have high levels of
functionality integrated into each device to allow designers to
customize them to suit the characteristics of their applications,
making high accuracy more achievable. The latest 16-bit ADC
in the Flexis product series enables developers to improve
accuracy by adjusting the ADC’s offset and gain without adding
resistance.
to the system’s hardware and software requirements.
The temperature of the MCU die can have an effect on the
Freescale’s blood pressure monitor reference design
ADC result. This is because the characteristics of the ADC
demonstrates how the sensing, data communication and
change over temperature, as does the MCU-induced noise,
processing capabilities of Freescale’s Flexis QE128 and JM
power consumption and frequency. However, temperature is a
controllers, sensors and analog products interact to create
slow changing factor. Regular recalibration of a blood pressure
a complete medical handheld solution. More details on this
monitor that has been designed into the application code so
the user does not have to be concerned about ideal conditions
will help to minimize the effect. However, full in-factory
reference design are available from the Blood Pressure Monitor
Design Reference Manual, which can be downloaded from
www.freescale.com (document number DRM101).
calibration, with results stored in a look-up table in memory,
can nearly eliminate temperature effects. Many ADCs have
on-chip temperature sensors that can be used to monitor the
Inga graduated from the University of Strathclyde with an honors degree in electronics and electrical engineering. Her technical
marketing and applications engineering career has focused on 8-bit and ColdFire MCUs for the consumer and industrial markets.
She has published a number of articles and application notes.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Blood Pressure Monitors 9
10
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Matt Maupin and Raghavan Sampath
ZigBee® Technology for Long-Term Care
Improving the quality of life
Introduction
Long-term care
There are many concerns among businesses today, and health
Long-term care includes a variety of services designed to
care is high on the list. Health care can affect the bottom line of
improve or maintain the quality of life for patients. While there
a business through expensive premiums, reduced productivity
are numerous conditions that can require long-term care,
and even employee turnover. However, the issues associated
advanced age is the primary reason for seeking long-term care
with health care are deeper and much more personal than
services. In 1900, the life expectancy from birth in the United
just the financial implications. With two-thirds of people over
States was 49.2 years. By 1997, that number had increased to
65 needing long-term care at some time in their lives and the
76.5 years[2]. In addition, while 10 percent of the population in
average duration of need over a lifetime being about three
1999 was considered elderly (60 years or older), by 2050, that
years[1], most of us are likely to be impacted at some point.
number will increase to 20 percent[3].
Thus, quality long-term care is becoming a worldwide concern
as life expectancy continues to grow.
How do we increase safety and improve the quality of life
for long-term care patients while optimizing the patient-to-
Automated monitoring can help improve a patient’s safety
nurse ratio? This is a growing concern among patients, family,
and quality of life by providing remote decision support
caregivers and businesses. In 2000, there was an average of
from the comfort of his or her home. Unfortunately, most of
1.4 million hospice care patients in the U.S. alone[4]. The quality
today’s monitoring solutions still restrict a patient’s freedom of
of care for these patients varied greatly among caregivers, with
movement. However, recent advances in wireless technology
18 percent of nursing home residents complaining of pain and
make it possible to free patients from their equipment,
10 percent having pressure ulcers (bed sores)[5].
allowing them greater freedom of movement, while providing
Life Expectancy at Birth
the caregivers a more cost-effective way to install network
connectivity. It makes it possible for health providers to monitor
1997
1990
1980
1970
1960
1950
1940
1930
1920
1910
1900
90
80
70
60
50
40
30
20
10
0
patients who are on the go.
Figure 1
freescale.com/beyondbits
ZigBee Technology for Long-Term Care 10
Comparing ZigBee® Technology to Other Wireless Protocols
Technology
Pros
Cons
900 MHz
• Unlicensed band
• Long range
• Range increases security concerns
• Different frequencies for U.S. (915 MHz) and EU (868 MHz)
Wi-Fi®
• Large installed base of equipment
• Programmable for worldwide band usage
• Long packets are less robust
• High current consumption
• Expensive and large in size compared to ZigBee
ZigBee
•
•
•
•
•
• Protocol stack required on host
• Network coordinator required
Bluetooth®
• Large installed base of equipment
• Optimized for ad-hoc networking
Low power
Short packets are more robust
Cost effective
Very small size
Globally license free
•
•
•
•
Seven device limit per piconet
High current consumption
Expensive compared to ZigBee
Range is limited
Table 1
Remote Automated Patient Monitoring System
#LINICAL
,ABORATORY
7!.
ZigBee technology
and IEEE® 802.15.4
Because the growing need for long-term care is a 21st century
issue, it is fitting that we address it with 21st century solutions.
For medical care providers, access to timely and accurate
3ERVER#ENTRAL
-ONITORINGô3TATION
information improves the ability to provide the highest quality
of patient care. Decision support is not limited to the bedside
%THERNET
though, and the quality of care is often dependent on the ability
to share vital patient data with clinicians in real time outside
(OSPITAL
the care facility. This means clinicians can provide immediate
'ATEWAY
6ITALô3IGNALS
4EMPERATUREô
(EARTô2ATEô
%#'ô
"LOODô0RESSUREô
feedback to attending physicians based on real-life clinical
research as well as track treatment paths and results beyond
the walls of the hospital over the patient’s lifetime to improve
"LOODô'LUCOSE
2ESPIRATION
0HYSICALô!CTIVITY
.EURALô3IGNAL
future treatment methodologies.
ZigBee technology is rapidly proving to be useful in these
applications, helping provide greater freedom of movement for
the patient without compromising the automated monitoring
Figure 2
functions. By providing low-cost, low-power wireless technology
that can cover large buildings and institutions with mesh
Patient Monitoring System Wireless Link
%THERNET
3ERVER
7IRELESSô,INK
7IRELESSôGATEWAY
USINGô%THERNETBASEDô
BITô#OLD&IREØô-#5
ôANDô2&ôDEVICESôô
Figure 3
networking, ZigBee technology can be deployed in a number
7IRELESSô
DEVICES
INTERFACEDô
TOôVITAL
SIGNMONITORINGô
SENSORS
of products that can help ensure better patient care and more
effective tracking of that care.
Why ZigBee is ideal for
wireless vital sign monitoring
A ZigBee network for long-term care consists of a patient
monitoring system and the network infrastructure to
communicate with a central location or caregiver station as well
as other mobile devices. Wireless monitoring provides feedback
through a gateway to a central server where data is maintained.
This data can be accessed by doctors, nurses and other health
care professionals between caregiver visits, alerting them of
changing conditions that need attention. Wireless monitoring
also allows institutions to track care for accountability and
insurance requirements.
freescale.com/beyondbits
ZigBee Technology for Long-Term Care 11
MC1321X Family Block Diagram
Tx/Rx
Switch
HCS08
Digital Transceiver
!NALOG
2ECEIVER
Frequency
Generator
Analog
Transmitter
Background
Debug Module
RFIC Timers
8-ch., 10-bit
ADC
Flash Memory
Digital Control
Logic
2 x SCI
RAM
I 2C
Low Voltage
Interrupt
Buffer RAM
16-bit
Timers
IRQ Arbiter
RAM Arbiter
Keyboard
Interrupt
Power
Management
Voltage
Regulators
Internal Clock
Gen
COP
Up to
39 GPIO
Figure 4
Remote automated monitoring
for long-term-care patients
Remote automated monitoring can be categorized in many
ways, including:
• Patient monitoring
• Activity monitoring
• Safety monitoring
• Event capture
Patient monitoring typically checks vital signs, such as heart
Safety monitoring targets the notification of events, or potential
events, that have affected, or could affect, a patient’s safety.
It can be tied to both patient monitoring and patient activity to
provide notifications of such events. For example, if a patient
leaves a certain area, an alert can be sent to the caregiver so
the patient can be located.
Event capturing records events associated with the patient and
caregiver responses. This is critical information for health care
records and ensures that information on events and actions can
be quickly retrieved and reviewed.
rate and temperature, and disease indicators, such as blood
MCF5223x Family Block Diagram
pressure and blood glucose levels. ZigBee can be used
to transmit data to a network gateway, updating the staff
BDM
or notifying them when a certain threshold is passed. An
PLL
JTAG
CRYPTO
4-ch.
32-bit
Timer
4-ch.
16-bit
Timer
4-ch. 16-bit
automated monitoring system could even be designed to take
PWM
specific actions. For example, blood glucose levels could be
PWM
Options
monitored and recorded at pre-set intervals. If the glucose level
3 UART
rises above a specific threshold, insulin could be delivered
automatically.
PHY
then be used to interpret changes. This can be as simple as
tracking movement data from an acceleration sensor during
daily activity or an exercising session. This reading can be
128 KB
256 KB
Flash
Options
as the heart rate, to determine how much effect a certain
amount of physical activity has on the body. This activity can be
tracked over any length of time and then compared to historical
data to identify certain trends. Activity monitoring can even be
Debugging/
Interface
used to remind the patient when to perform an activity or alert
the caregiver if the activity has not taken place.
Optional
Additional
Module
4-ch. DMA
2-ch. PIT
I 2C
10/100
FEC
2x4-ch.
12-bit
ADC
QSPI
Flash
EMAC
compared with vital information from patient monitoring, such
CAN
RTC
DMA
Activity monitoring records daily activity. The data logging can
freescale.com/beyondbits
GPIO
8-ch. 8-bit
32 KB SRAM
V2 ColdFire®
Core
Peripherals
System
Integration
Flash
RAM
Core plus Features
Figure 5
ZigBee Technology for Long-Term Care 12
SPI_SS
SPI_MOSI
+
V IN
C6
1uF
16V
SPI_CLK
RESETB
UART1_RTS
UART1_CTS
TMR1
KBI_5
KBI_7
SPI_MISO
3
2
1
Byp
OUT
I/O
J1
4
5
1
3
5
7
9
11
13
15
17
19
LP2985AIM5-3.3
En
GND
V in
U2
0
JTAG
J2
DNP
R8
2
4
6
8
10
12
14
16
18
20
2
4
6
8
10
12
14
16
18
20
DNP
L1
3.9nH
RTCK
TMS
+
TDO
TCK
TDI
ERASE
1
2
3
4
V IN
V Reg
KBI_6
I2C_SDA
UART1_RX
R9 0 Ohm
C8
1nF
KBI_4
I2C_SCL
ADC0
ADC0
DNP
R4 2k
R3 3k
TMR1
I2C_SCL
I2C_SDA
UART1_TX
UART1_RX
UART1_CTS
UART1_RTS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
MC13225
GND_1
GND_2
GND_3
GND_4
GND_5
GND_6
GND_7
GND_8
GND_9
GND_10
GND_11
GND_12
GND_13
GND_14
GND_15
GND_16
GND_17
GND_19
GND_20
ADC0
ADC1
ADC2
ADC3
ADC4
ADC5
ADC6
ADC7_RTCK
TDO
TDI
TCK
TMS
UART2_RTS
UART_CTS
UART2_RX
UART2_TX
U1
C2 0.1uF
R1 10k
R13 0 Ohm
R12 0 Ohm
R11 0 Ohm
R10 0 Ohm
75
76
77
78
79
84
85
86
87
88
93
94
95
96
97
104
105
106
115
V Reg
R2 10k
VOLTAGE DIVIDER FOR A TO D INPUT
INSTALL ZERO OHM R4 TO USE AS I/O
AND DO NOT INSTALL R3
UART1_TX
RESETB
DNP
C3
0.5pF
C5
10uF
10V
R6 100k
C7
0.01uF
V Reg
1
3
5
7
9
11
13
15
17
19
C1 10pF
A1
F ANT
J3
TP2
ANT2
TP1
ANT1
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
ADC2_VrefH
ADC1_VrefH
ADC1_VrefL
ADC2_VrefL
RF_RX_TX
RX_ON
RF_GND
ANT_2
ANT_1
Vreg_ANA
PA_P
PA_N
TX_ON
RESETB
XTAL_24_IN
XTAL_24_OUT
UART1_RTS
UART1_CTS
UART1_RX
UART1_TX
IC2_SDA
IC2_SCL
TMR3
TMR2
TMR1
TMR0
SPI_SCK
SPI_MOSI
SPI_MISO
SPI_SS
SSI_BITCK
SSI_FSYN
freescale.com/beyondbits
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
RECOVERY MODE
1-2 ADC2 VRefH = 0
3-4 ADC2 VRefL = 1
4
2
133
129
130
120
121
111
112
102
103
131
122
113
114
132
123
124
SPI_CLK
SPI_MOSI
SPI_MISO
SPI_SS
MDO7
MDO6
MDO5
MDO4
MDO3
MDO2
MDO1
MDO0
MCKO
RDY_B
MSE1_B
MSE0_B
EVT1_B
EVTO_B
VregDIG
VregNVM
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
CRYSTAL_NX3225DA
24 MHz
Y1
XTAL_32_OUT
XTAL_32_IN
RF_PLL_FLT
VBAT
LREG_BK_FB
COIL_BK
KBI_0_HST_WK
KBI_1
KBI_2
KBI_3
KBI_4
KBI_5
KBI_6
KBI_7
SSI_TX
SSI_RX
3
1
RESETB
KBI_7
KBI_5
KBI_6
KBI_4
V Reg
C4
0.1uF
MC13224 PiP Schematic Drawing
Figure 6
ZigBee Technology for Long-Term Care 13
Freescale enables ZigBee
technology for medical devices
Freescale’s family of ZigBee technology solutions provides the
perfect combination of low cost, low power, high integration and
high performance that is required for medical monitoring
applications. These solutions include the 8-bit MC13213 system
in package (SiP), 32-bit MCF5223x ColdFire® embedded controller
and the 32-bit MC13224 Platform in a Package™ (PiP) solution.
While such a solution as the MC13224 PiP simplifies RF design,
many customers do not have the expertise to ensure robust
and optimized designs. So Freescale has done much of the
work for them, compiling a number of reference designs where
customers can take the BOMs, Gerber files and schematics and
simply copy a design and integrate it into their product[6]. The
complete platform approach is provided to help the customer
reduce development time and speed time to market.
(MCU) with the MC1320x RF transceiver into a single 9 x 9 mm
Application example:
RF Technologies®
LGA package. The MC13213 SiP provides 60K flash memory
One of Freescale’s customers, RF Technologies, is a leader
and 4K of RAM. By using the IEEE 802.15.4 compliant MAC or
in providing solutions that enable health care providers to
ZigBee protocol stack, the MC13213 SiP is an excellent solution
monitor patients. The company has developed a number of
for sensing and controlling applications that require mesh
products based on ZigBee technology that are used to improve
networking.
the health and safety of patients while providing tracking and
The MC13213 SiP integrates the MC9S08GT microcontroller
The MCF5223x family of ColdFire devices includes single-chip
solutions that provide 32-bit control with an Ethernet interface.
It combines a 10/100 fast Ethernet controller (FEC) and Ethernet
physical layer (EPHY) with the V2 ColdFire core for exceptional
performance at a reasonable cost. The MCF52235 embedded
controller provides the designer with the right set of peripherals
and memory size for a compact Ethernet-enabled platform
that cuts development time and cost to help move products to
market more quickly.
Freescale’s third-generation MC13224 device is the ideal
accountability for the providers. For example, the Code Alert®
Integrated Care Management Solution includes Emergency
Call Pendants for patients to wear that allow them to alert the
staff if they need assistance. Software tracks the alert, and the
emergency notification can be sent to a computer or to any
number of mobile devices in the system, displayed as an e-mail
or text message. When the staff member arrives to provide
assistance, the pendant can be depressed in a specific code
sequence to log the event and the response into the system.
This helps caregivers ensure that proper care is given on time,
and it provides response time and incident location so facility or
platform for enabling ZigBee technology in products for medical
administrative personnel can measure accountability.
applications. It provides key technology enhancements for
RF Technologies adopted ZigBee technology for its low-cost,
reduced size and a lower product cost, which are important
considerations for body-worn devices. The highly integrated
low-power design provides long battery life and requires only
an external power source and a 50 ohm antenna to complete
the solution. The 32-bit ARM7™ core processor with plenty of
additional memory allows the device to run both the ZigBee
stack and the application on a single IC.
Freescale’s ZigBee solutions include not only silicon but also
high-reliability and low-power-consumption benefits. James
Herman, vice president of business development said that
“ZigBee is the perfect match for our data capture, bandwidth
and communications requirements. No other standard provides
the same benefits, and ZigBee works well in our customers’
environments. Customers also want standards-based platforms
and are tired of proprietary systems that cost them more and
lock them into single-source relationships.”
software, development tools and reference designs to help
simplify development. Freescale’s BeeStack™ ZigBee-compliant
stack with BeeKit™ Wireless Toolkit provides a simple software
environment to configure network parameters. This tool allows
customers to use a wizard and drop down menus to help
configure the ZigBee network parameters, whereas competing
solutions force the user to wade through lines of code to edit
the network parameters.
freescale.com/beyondbits
ZigBee Technology for Long-Term Care 14
Summary
References
An aging population and long-term medical care will continue
[1] Kemper, P., Komisar, H.L., and Alecixh, L., “Long-Term
to be serious issues in our society. Advancing technology helps
Care Over an Uncertain Future: What Can Current Retirees
address the need to improve the quality of life for patients, and
Expect?” Inquiry 42(4):335-350, 2005
ZigBee wireless technology enables designers to bring new
[2] National Vital Statistics System
ideas to reality. By providing a low-power wireless solution
[3]National Vital Statistics System
that can be used with patient activity and safety monitoring
[4] National Center for Health Statistics Advance Data No. 297
solutions, ZigBee technology offers patients more freedom to
do what they want and provides caregivers a number of key
[5] NCHS Nursing Home Current Residents, June 2008
advantages, including:
[6] www.freescale.com/webapp/sps/site/overview.
jsp?code=ZIGBEE_REFERENCEDESIGN_HOME
• Cost-effective and scalable sensor networks to address
critical bottlenecks in the emergency response process
• Real-time notification of drug infusion protocols that violate
accepted hospital practice, thus eliminating preventable
adverse drug events
• The opportunity to improve treatment protocols
• Remote access to real-time patient data for physicians in
their offices
• Real-time analysis of drug effectiveness
• Network management of all connected medical devices
• Real-time changes in patient care to reduce costs and
improve care
Through our leading ZigBee technology solutions, Freescale can
enable customers to design new products that can help them
grow in a rapidly expanding health care market and improve the
daily lives of long-term care patients.
Raghavan Sampath joined Freescale in 2006. He has over nine years of experience in the semiconductor industry focusing on
application support and business development. Matt Maupin joined Freescale in 2001. He has over 15 years of experience in the high
tech industry, focusing on wireless connectivity, including Wi-Fi, Bluetooth, 802.15.4 and ZigBee technology. He has a Bachelor of
Science degree in management and marketing from Park University.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
ZigBee Technology for Long-Term Care 15
16
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Donnie Garcia and Alejandra Guzman with Dr. Claudia Rentería Govillo
Gestational Diabetes
Technology can help reduce complications
Introduction
Freescale’s advances in low-power technology and mixedsignal integration have led to more flexible microcontrollers
(MCUs) that feature key peripheral blocks useful for
pregnancy monitoring applications, including those for
gestational diabetes. In all areas that are important to medical
applications—low power, mixed signal integration, display and
connectivity—Freescale is delivering the enhanced technology
During gestational pregnancy, if the glucose levels are not well
managed, extra blood glucose passes through the placenta and
raises the baby’s blood glucose levels. This can increase the
baby’s body fat and lead to macrosomia (a baby weighing more
than nine pounds 15 ounces at birth). Macrosomic babies face
their own health problems, including increased risk for breathing
problems, child obesity, developing type 2 diabetes and even
physical injuries during childbirth.
needed for next-generation medical system solutions.
For all these reasons, accurate blood glucose testing
Gestational diabetes
before or early in the pregnancy is essential for quick
Pregnant women who are not diabetic can still develop high
blood sugar (glucose) levels during pregnancy. This is called
gestational diabetes, and it affects between one and three
percent of all pregnant women. Essentially, the increased
diagnosis and treatment of gestational diabetes (see Figure 1),
particularly since most women will not exhibit early symptoms
normally associated with diabetes (excessive thirst and
increased urination).
production of hormones during pregnancy can lead to insulin
Initial diagnosis may involve an oral glucose tolerance test. This
resistance, which means insulin cannot effectively lower blood
is generally performed in a clinical environment and requires
glucose levels. This forces the body to produce more insulin to
the patient to drink a glucose solution, which is then followed
compensate, which can lead to gestational diabetes.
by blood glucose monitoring at specific intervals (see Table 1).
What’s more, even though any woman can develop
gestational diabetes, some are at greater risk than are
others, including those:
However, continual monitoring for diabetic maintenance once
the diagnosis has been established is most conveniently done
at home, hence the need for accurate home devices.
• Older than age 25
Example of Oral Glucose Tolerance Test (OGTT)
• With a family history of diabetes, or those who have had
Fasting
95 or higher
At 1 hour
180 or higher
At 2 hours
155 or higher
At 3 hours
140 or higher
gestational diabetes in a previous pregnancy
• Who have delivered a baby who weighed more than nine
pounds or have experienced an unexplained stillbirth
Note: Some labs use other numbers for this test
• Who were overweight before pregnancy
*These numbers are for a test using a drink with 100 grams of glucose
Table 1
In addition, for reasons that aren’t clear, Hispanic, American
Indian, Asian and black women are more likely to develop
gestational diabetes than are other women. And for women
already suffering from diabetes, excellent blood glucose control
before conception and throughout pregnancy is vital not only
for the health of the mother but for that of the baby as well.
freescale.com/beyondbits
Advanced semiconductor technology from Freescale, with low
power, mixed signal integration and display and connectivity
interfaces, make it possible to design small, easy-to-use
devices that are ideal solutions for home blood glucose
monitoring.
Gestational Diabetes 16
Risk Management for Gestational Diabetes Screening
High Risk for
Gestational Diabetes (GDM)
Low Risk for GDM
Average Risk for GDM
Negative
Screen for GDM Immediately
Positive
Yes
Screen for GDM at
24–28 wk of Gestation
Positive
75– or 100–g OGTT
Screen?
No
Negative
Negative
Monitor Pregnancy
Closely
Positive
Diagnosis of GDM
Figure 1
Source: Am J Health-Syst Pharm © 2004 American Society of Health-System Pharmacists
Freescale highly integrated
low-power solutions
Combining ultra-low-power platforms with high precision
analog peripherals, Freescale has made great strides toward
realizing total system solutions for automating many of the
application functions in the developing pregnancy monitoring
market. Freescale’s MCUs can enable significant cost benefits
for glucose meter designs, thus providing the benefit of glucose
level tracking for more mothers to be.
There are several key focus areas that are important to a wide
range of portable medical applications:
Ultra-low-power platform
Freescale MCUs utilize innovative technology to achieve the
absolute lowest power for such applications as portable medical
devices. The low-power performance of each of the following
MCUs makes them ideal for portable medical devices.
• MC9S08LLxx: Cost-efficient entry-level MCU with LCD
driver and excellent power consumption
• MC9S08QExx: Best-in-class power consumption for
sensor development and medium processing performance
at a great price
• MCF51QE: Excellent performance and low-power features.
Pin-to-pin compatibility with 9S08QE controllers makes it
• Low power
ideal for enabling medical devices to scale in complexity
• Mixed signal integration
and functionality
• Display technology
• Connectivity
Freescale is delivering the advances needed to enable medical
market customers to optimize their products for each
of these areas.
All of these devices contain four main features that are the
foundation of low-power operation.
Low-power crystal oscillator
The crystal oscillator is optimized for driving crystals at low
power with options for low or high gain modes. This peripheral
consumes less than 500 nA for a 32.768 kHz crystal when
in low-power modes. With the low-power crystal oscillator,
accurate time can be kept while the MCU is in a standby power
mode (Stop mode).
freescale.com/beyondbits
Gestational Diabetes 17
the power to be reduced by about 500 µA per Mhz. The ICS
Freescale Low-Power MCU Modes of Operation
will allow the embedded developer to fine tune the MCU’s
performance to optimize power consumption.
Highest
Functionality
Clock gating
Run
In order to further reduce run-mode power consumption, each
Wait
Low-power run (LPRun)
Low-power wait (LPWait)
Stop3
of the peripherals on the low-power platform has the ability to
New Modes
for S08 and
ColdFire®
be clock gated. Clock gating is a method of shutting down the
clock signal that is routed to a peripheral. Though clock gating
a single peripheral only reduces power consumption by tens
Stop2
of microamps, when reaching for the lowest power possible, it
is essential to reduce every unneeded internal trace and clock
Lowest
Power
signal. When disabling clocks to all peripherals, clock gating
has been measured to reduce run mode power consumption by
Figure 2
almost one third.
Modes of operation
each tailored to a specific level of functionality to allow the
Glucose meter application
using Freescale solutions
most efficient performance/power consumption tradeoffs. The
Utilized together, the features described in the previous section
modes of operation (run, lprun, wait, lpwait, stop2 and stop3)
can optimize a portable medical design, such as a blood
support power consumption as low as 250 nA for some devices
glucose meter, for more energy-efficient operation.
The energy-efficient MCUs have multiple modes of operation,
and enable medical applications to continuously operate with
The low-power oscillator is used to deliver very low standby
the highest energy efficiency. The modes of operation also
power consumption while keeping accurate time. This will
enable many of the MCU’s peripherals to operate in low-power
allow the glucose meter to keep accurate records of measured
run mode to provide the right functionality mix in a low-power
glucose levels for historical purposes.
mode.
Using the flexible modes of operation and the ICS, the glucose
Flexible clock source
meter firmware can be designed so that during the complex
Related to the benefits provided by the operating modes, the
calculations necessary to produce a glucose measurement the
internal clock (ICS) peripheral on the energy-efficient solutions
MCU performance can be increased in order to shorten the
provides the ability to ramp up or ramp down the device’s
operating frequency. Higher operating frequencies lead to higher
processing time, thereby improving the user experience.
run-mode power consumption. Depending on the application
Finally, additional power savings can be achieved with the clock
requirements, running at a lower operating frequency will allow
gating technology. Using all the low-power techniques together
Blood Glucose Meter Block Diagram
Test Strip
LCD Segment Display
Analog Front End
12-bit ADC
GPIO
Flash
LCD
SPI
Sensor
CPU
TPM
KBI
Connectivity
RAM
TOD
SCI
ICS
XOSC
I2C
M
Optional
Motor
Optional
Speaker
Battery
Figure 3
freescale.com/beyondbits
Gestational Diabetes 18
will allow the meter to function much longer on a single battery
charge, and it will enable developers to use a smaller battery,
Blood Glucose Meter Software Flow Chart
thus enhancing portability and the user experience.
POR
Mixed signal integration
Essential to a glucose meter design is the ability to make small
signal analysis of the electro-chemical reaction initiated by a
Configure Perpherals
i.e. ADC KBI GPIOs LCD
glucose measurement. One stage of the analysis is recognizing
the peak of the biosensor’s electrical output. Utilizing the
analog comparator (ACMP) peripheral, the Freescale MCU
can be configured to trigger an interrupt once the peak has
Stop Mode
been reached.
No
The next stage requires precisely timed analog-to-digital
conversions of the glucose meter strip’s linearly decaying
output. Many Freescale devices contain a feature-rich
Detect Strip?
12-bit analog-to-digital converter (ADC) that enables these
measurements. The ADC has features, such as automatic
compare and flexible conversion time settings, that are ideal
Yes
for this type of analysis.
Apply Voltage to the Strip
Finally, the CPU (8-bit or 32-bit) is used for the mathematical
analysis. The chemical reaction between the sample (blood)
and glucose meter strip produces a linearly decaying signal
that is processed across a couple of seconds. The CPU
Good Amount
of Blood?
performs some filtering of the input signals over time using
average routines or the more complex IIR filtering. The average
No
Display
Error
is taken at several points along the input signal’s linear decay,
from which the slope of the linear decay is calculated. It is this
Yes
slope that will directly correlate to a specific value for the blood
Sample the Values from the
Electro-Chemical Reaction
glucose level.
The on-chip integration of analog functionality on Freescale
MCUs provides many system cost benefits. The obvious benefit
Math Operation
is that it decreases the need for external ICs, thus reducing
the BOM and board space. But on-chip analog also features
low-voltage detection and internal bandgap reference voltages,
Save Glucose Reset
which further lower overall cost.
No
Display
Warning
and
Glucose
Value
Glucose
Level Inside
Range?
Yes
Display Glucose
Yes
End
Display?
No
Figure 4
freescale.com/beyondbits
Gestational Diabetes 19
Display capabilities
Connectivity
With the launch of the L family of 8-bit MCUs with integrated
The ability to transfer information from the blood glucose meter
LCD peripherals, Freescale provides the ideal display
to a computer for analysis is an important option for new meter
functionality for portable medical devices. The LCD peripheral
designs. Freescale MCUs integrate key peripherals essential for
on these devices contains key features that will reduce cost
providing this connectivity, such as SPI, SCI and I2C, that allow
and provide more functionality for glucose meters.
data transfers within systems. Using the SPI, the MCU can
easily connect to a ZigBee® transceiver to provide flexible,
First, Freescale has added the ability to assign front plane
low-power wireless connectivity.
(segment) or backplane (common) functionality on any of the
MCU’s pins. With this feature, signal layout can be optimized so
that PCB board space can be reduced. This feature also allows
quick changes of LCD glass design because the hardware
Conclusions
Freescale’s advances in low power and mixed signal integration
have led to the development of MCUs that feature key
change can be handled by a software update. An excellent
components for glucose monitoring applications used during
example of a flexible LCD driver is described in the Freescale
the diagnosis and treatment of gestational diabetes. Though
application note, LCD Driver Specification, which can be
current Freescale devices provide many benefits,
downloaded as a PDF from www.freescale.com (document
the company is dedicated to further improve low power,
number AN3796).
mixed-signal integration, display and connectivity features to
Second, the new LCD peripheral has the ability to drive more
benefit the pregnancy monitoring market.
segments with fewer pins, utilizing x8 muxing of the LCD
Bibliography
signals. With this function it only takes 28 pins (8 x 20) to drive
160 LCD segments. The same functionality requires 44 pins on
many competing devices. By using fewer pins, board size and
www.diabetes.org
www.diabetes.niddk.nih.gov/dm/pubs/gestational/
connector space are reduced, enabling more compact portable
medical designs.
Gestational diabetes: Test and diagnosis—www.mayoclinic.com
www.familydoctor.org/online/famdocen/home/women/
Finally, the LCD peripheral architecture is designed to provide
pregnancy/complications/075.html
the most energy-efficient performance. Low power was
considered for every aspect of the design. The end result is
the ability to drive LCD glass with total system power as low as
1.5 µA with LCD glass connected. This performance, along with
low-power blinking mode (the ability to blink the display while in
stop mode), allows product developers to lower average power
consumption by up to 70 percent for their portable medical
designs. This will lead to significantly longer battery life and
further cost reductions in the types of batteries needed for the
end device.
In glucose meter designs, a visual display is mandatory
for patients to be able to read the metering results. With
Freescale’s S08L family, LCD functionality and best-in-class
power consumption can be achieved with a single device.
Freescale also provides software routines that allow easy glass
customization and fast LCD GUI development. In addition,
by consulting the LCD Driver Specification application note,
designers can reduce their overall development time.
Donnie and Ale both support Freescale’s Microcontroller Solutions Group. During Donnie’s 10 years with the company, he has worked
as an applications engineer supporting 8-bit MCUs and has been heavily involved with the product definition of the new S08 MCUs.
Ale has supported customers through Freescale’s Technical Information Center (TIC) after collaborating for systems and solutions
engineering, working on medical applications. Dr. Rentería has been an attendant for the gynecology and obstetrics service for more
than ten years with expertise in high-risk pregnancy.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Gestational Diabetes 20
21
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Shen Li, Ju Yingyi with Dr. Gabriela López and Dr. Sergio Rosales
Sports Game Station
Exercise, entertainment and seizure detection
Introduction
Pediatric seizures epidemiology
Today, more and more people are participating in sports,
For some time, viewing television and video games has
pedaling a stationary bicycle or running on a treadmill to remain
been linked to photosensitive epileptic seizures. In Japan
fit. However, at the same time more children are forgoing
in December 1997, a televised Pokemon animated program
physical exercise and spending more time playing video games.
reportedly induced seizures in a number of children. The
Not only can the lack of exercise lead to weight gain, but the
investigation was narrowed down to a section of the show
visual nature of high-speed video games can lead to pediatric
that included a 15 Hz alternating red and blue flashing light.
seizures in children with photosensitive seizure disorder.
This tended to confirm previous reports that children with
The seizures can be induced by photic stimulation (flicker)
or by spatially periodic patterns[1]. These stimuli are found in
multiplayer online role-playing games, small handheld games,
video or television games and special game consoles[2].
Recognizing the risk, international organizations, including
the International Telecommunication Union (ITU) and the
International Organization for Standardization (ISO), have
begun to consider international guidelines for photic and
pattern stimulation in public media to help protect such
individuals[1], [2], [3], [4].
photosensitive seizure disorder are particularly affected by
flashes of very-long-wavelength monochromatic lights. In the
1999 study, “Photosensitive Epilepsy and Image Safety,” the
authors concluded that video game display flicker, intermittent
photic stimulation (IPS) at 50 Hz, may underlie the seizures
suffered by game players with photosensitive seizure
disorder[3], [5].
Reducing the risk
of pediatric seizures
Programmers can help reduce the risk of video game-induced
Freescale has built a wireless game controller demonstrator
seizures by eliminating such IPS instances as opposing changes
that combines a stationary exercise bicycle with video game
in luminance between pairs of flashing lights and transition to
technology to help people stay fit while playing their games.
or from saturated red, and by limiting flashing sequences to no
What’s more, by integrating a ZigBee transceiver and a
more than three per second.
®
three-axis low-g microelectromechanical system (MEMS)
accelerometer, the Freescale Sports Game Station (SGS) is
designed to detect evidence of conditions such as a pediatric
seizure and wirelessly transmit an alert signal to parents or other
To help players lessen the risk of seizure, the Epilepsy
Foundation recommends:
• Sitting at least two feet from the screen in a well-lit room.
caretakers. The concept is designed to help make video game
• Reducing the brightness of the screen.
playing healthier and safer.
• Not allowing children to play video games if they are tired.
• Taking frequent breaks from the games and looking away
from the screen every once in a while. Do not close and open
eyes while looking at the screen as blinking may facilitate
seizures in sensitive individuals.
• Covering one eye while playing, alternating the covered eye
at regular intervals.
• Turning the game off if strange or unusual feelings or body
jerks develop.
freescale.com/beyondbits
Sports Game Station 21
Freescale Sports Game Station:
combining exercise, entertainment
and seizure detection
SGS System Overview
Station Diagram
MCF51JM128
TRX MC13192
Transceiver
USB Connectivity
USB Driver
MCF51JM128
Station Board
Direction
Control
Figure 1
S08QE32
Sensor
SGS has two parts, one is a station and the other is an
Speed
Sensor
endpoint. On the station board (Figure 1), there is a 32-bit
MCF51JM128 microcontroller (MCU) based on the V1 ColdFire®
core with integrated USB On-The-Go and an MC13192 shortrange, low-power 2.4 GHz industrial, scientific and medical
(ISM) band transceiver.
Transceiver
Endpoint Board
Stationary Bicycle
Figure 3
USB keyboard, enabling many popular keyboard or joystick
controlled video games to use this system as its controller. For
Endpoint Diagram
different game controllers, this platform is able to use different
TRX MC13192
MMA7260
Ultra-Low-Power MC9S08QE32
Battery Supply
Figure 2
The endpoint board (Figure 2) includes an ultra-low-power
8-bit MC9S08QE32 (S08QE32) main control chip, an MC13192
low-power 2.4 GHz wireless transceiver and the MMA7260QT
3-axis, low-g MEMS accelerometer.
movement sensors, simple buttons or joysticks. For instance,
Freescale’s 3-axis low-g MMA726x accelerometers are already
used for tilt detection in some well-known PC games. For
stationary bicycles, the speed sensor and direction control
keys can be adopted. For a wrestling game, a joystick can be
used as a direction controller and the accelerometers sense the
punching and kicking motions.
Using the endpoint sensor
to detect seizures
Adding significant value to the Freescale’s SGS, the endpoint
can be used to provide some peace-of-mind for players with
photosensitive seizure disorder. The same endpoint hardware
can be used, requiring only a different software implementation
As part of the complete system (Figure 3), the endpoint is
that can recognize a seizure event. A seizure may occur when
attached to the player’s body or activity equipment to record
a brief, strong surge of electrical activity affects part or all
movement. The accelerometer senses motion (specific human
of the brain. Seizures can last from a few seconds to a few
action) and converts the action to an analog electronic signal.
minutes and can exhibit many symptoms, from blank staring, lip
The MCU (S08QE32) reads the analog signal and converts it
smacking or jerking movements to more dangerous convulsions
to a suitable keyboard key value. After that, the MCU sends
and loss of consciousness.
the key value to the wireless transceiver through the SPI port
and directs the wireless transceiver to transmit the data to the
station. When the transceiver on the station board receives a
key value data packet, it alerts the MCU (MCF51JM128), which
reads the data through the SPI port and sends the key value
to a PC via a USB cable. Thus, the PC can recognize human
actions as a keyboard value.
To detect evidence of conditions such as a seizure, a reliable
algorithm is necessary. This special algorithm must be designed
using enough samples of seizure waveforms (caused by
jerking body movements) gathered by the accelerometer to
ensure exceptional accuracy. Once the seizure information is
transmitted to the station and, in turn, sent to a computer, a
software program running on the PC can alert parents through
In this example, the endpoint acts as a sensor that transmits
an automatic text message to their cell phones or a buzzer
activities and motions to the station while the station acts
alarm in the game console that an unexpected seizure has
as a USB human interface device class (USB HID) keyboard
occurred. This data could also be submitted to a neurologist to
device. When connected to a PC, it is recognized as a simple
verify the waves and confirm any abnormal activity.
freescale.com/beyondbits
Sports Game Station 22
Long battery life
SMAC
Because the SGS endpoint is a wireless game controller, power
SMAC is an uncomplicated software protocol based on the
consumption is an important design consideration. All three
IEEE® 802.15.4 protocol that works with Freescale’s transceivers
of the primary components exhibit exceptional low-power
with 8-bit MCU control. It is free of charge from Freescale and is
performance: the ultra-low-power S08QE32 MCU (about
intended to be used for fast product development and system
0.4 µA in STOP mode), MC13192 wireless transceiver and the
evaluation. SMAC is simple and easy to use because it implements
MMA7260 low-g accelerometer (about 3 µA in sleep mode).
neither the full ZigBee stack nor the complete 802.15.4 layer.
In addition, if there is no signal detected by the sensor within
SMAC is ideal for low-cost applications that require basic
several minutes, the endpoint itself will enter sleep mode to
primitives, such as transmit, receive and power and channel
conserve battery life.
selection. For more details on SMAC, please refer to the stack
reference manual (search for SMACRM) at www.freescale.com.
Software Overview Diagram
Application
SGS Station
Conclusion
Application
SGS Endpoint
SWIP
USB HID Class
Freescale has the necessary technology to develop a
sophisticated gaming system to provide entertainment,
promote fitness and detect photosensitive seizures. Wireless
SWIP
AD Val Key Val
Service
SMAC
transceivers (MC1319x/1320x family) and free stacks (SMAC),
accelerometers (MMA726x family), low-power 8-bit MCUs
(S08QE family) and high-performance, connectivity-enabled
Service
SMAC
Hardware Abstract
USB
SPI
IRQ
Hardware Abstract
ADC
SPI
IRQ
Station
Endpoint
ColdFire MCUs (MCF51JM family) are the key elements used
to build the SGS system. Technical support is also available,
and Freescale designers regularly consult with customers
and medical doctors to develop more new products that can
improve the quality of life.
References
Figure 4
[1] “Photic- and Pattern-Induced Seizures: Expert Consensus
SGS firmware
of the Epilepsy Foundation of America Working Group,”
It is easy to program the firmware for both the station and
Graham Harding, Arnold J.Wilkins, Giuseppe Erba, Gregory
endpoint (Figure 4). The station includes a USB driver,
L. Barkley and Robert S. Fisher, Epilepsia, 46(9):
1423–1425, 2005
USB-HID keyboard protocol and simple multimedia access
controller (SMAC) protocol. (For more details on the USB driver
[2] “Massively Multiplayer Online Role-Playing Game-Induced
and USB-HID class for ColdFire MCUs, please refer to the
Seizures: A Neglected Health Problem in Internet Addiction,”
CMX_USB-LITE stack, available at www.freescale.com).
Yao-Chung Chuang, CyberPsychology & Behavior,
August 1, 2006, 9(4): 451–456
For the endpoint, a SMAC and a simple algorithm translates
[3] “Game-Related Seizures Presenting with Two Types of
tilt, movement, direction and speed signals into a keyboard or
Clinical Features,” Yao-Chung Chuang, Wen-Neng Chang,
joystick where values are needed. The endpoint’s MMA7260QT
Tsu-Kung Lin,Cheng-Hsien Lu, Shang-Der Chen, Chi-Ren
accelerometer outputs variable voltage levels to X, Y and Z
Huang, Seizure (2006) 15, 98–105
output pins when it detects a tilt, movement or acceleration.
[4] “Mechanisms of Video-Game Epilepsy,” F. Fylan, G. F. A.
The ADC module in the S08QE32 MCU reads the voltage
level outputs and converts them to digital values that can be
Harding, A. S. Edson and R. M. Webb, Epilepsia,
recognized as movement activity. And with the SMAC
4O(Suppl. 4): 28–30, 1999
protocol, any simple data packet can be easily sent or
[5] “Video-Game Epilepsy: A European Study,” D. G. Kasteleijn-
received effectively.
Nolst Trenité, A. Martins da Silva, T. S. Ricci, C. D. Binnie,
G. Rubboli, C. A. Tassinari and J. P. Segers, Epilepsia,
4O(Suppl. 4): 70–74, 1999
Ju Yingyi is a ColdFire application engineer with expertise in SMAC, FAT/FAT32 and microWindows (GUI). Shen Li is also a
ColdFire application engineer. He has a master’s degree in communication and information systems and has been with Freescale
for almost five years. Gabriela López-Armas, M.D., is a postgraduate resident in biomedical sciences at the Laboratory of
Neuroscience of the Centro de Investigación Biomédica de Occidente (Western Biomedical Research Centre) belonging to the
Social Security Mexican Institute. Dr. Rosales is a pediatric surgeon and holds a Ph.D. in neurodegenerative disorders. His research
has been recognized in the Alzheimer Association for entrepreneur activities in this field.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Sports Game Station 23
24
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Dr. José Fernández Villaseñor and Jesus Gaytan
Telemonitoring Solutions
A new approach to better patient health
Aging population and chronic
degenerative diseases
The aging of the world’s population is a fact in our society. Baby
boomers are now becoming our senior citizens, fueling the
growth of the aged population. To accommodate this dramatic
population shift, drastic changes in our health systems are
necessary. Today, these changes include new therapies and
early diagnostic tools with advanced sensor and microcontroller
(MCU) technologies that are accessible by the general population.
Non-communicable diseases accounted for almost 50 percent
of the global disease burden, according to the World Health
Organization (WHO). Among these, the highest incidences
are for chronic degenerative diseases, such as cardiovascular
disease, in which hypertension plays a large part (600 million
people worldwide), and metabolic diseases like diabetes
(90 million people).
A significant issue with chronic degenerative and metabolic
diseases is that a patient needs to control the homeostasis or
physiological balance for long periods of time, which means
Enabling physicians or health care providers to access
patient monitoring data at any time is one way that doctors
can improve patient treatment. For instance, if something is
not normal, a monitoring system can start sending data to
whoever would make the appropriate diagnostic decisions to
avoid a complication. Also, since some problems can be silent
complications, a systematic monitoring of vital signs and other
readings can prevent further complications.
Telehealth monitoring
systems can prevent the
acute complications of
chronic degenerative diseases
Telehealth solutions directly address the chronic degenerative
diseases problem. Intelligent systems that acquire data from
endpoint devices, such as blood glucose meters (glucometers),
heart rate monitors, blood pressure monitors, digital scales,
etc., can advise patients on the proper time for taking new
measurements or medication. The telehealth system must also
ensure that the data is analyzed and securely transmitted to the
developing new habits in their daily lives, like taking blood
health care provider.
pressure or glucose measurements. These can be annoying
A telehealth monitoring system collects, analyzes and monitors
and disruptive tasks that can be forgotten or even purposefully
avoided, providing no help to the physician on how the
treatment is improving the patient’s health.
Chronic diseases such as diabetes and hypertension are
becoming worldwide public health problems due to the lack
of symptom control and the knowledge to recognize the
body’s way of letting us know that something is not going
well. The prevention and early treatment of the sudden (acute)
a patient’s vital signs data and uses telecommunications
technology to transfer this information to a remote health
provider for further analysis, which can include tracking the
evolution of a chronic degenerative disease or monitoring
post-operative treatment. This type of telehealth system can be
customized by attaching different data acquisition peripherals,
such as blood pressure meters, glucometers, pulse oximeters
(for measuring oxygen saturation levels in the blood), digital
complications of these kinds of pathologies is vital for reducing
scales and thermometers, among others.
any deaths they cause.
One of the many advantages of this kind of system is the
In addition, medical costs can become an issue, because
immediate transmission of the patient’s vital signs data to a
long-term pathologies can become a financial burden for
the patient. For this reason, it’s very important for insurance
companies to be aware of how technology and new medical
devices can prevent acute complications, since they count for
remote medical center. For this purpose, different types of
networks can be used, such as wired or wireless Ethernet
through a secure virtual private network (VPN) connection or a
general packet radio service (GPRS) network for patients living
a large number of reimbursement applications.
in rural areas without access to a broadband network.
freescale.com/beyondbits
Telemonitoring Solutions 24
General Telehealth Application Block Diagram
AC Mains or
Battery
Keypad
Voltage
Regulation
USB
and/or
Ethernet
PC/Broadband or
POTS connection
Speaker
Display
MCU/MPU
RF Transreceiver
(Wi-Fi, ZigBee®,
Bluetooth®)
IR Interface
MCU
Optional
Peripherals
Analog
Figure 1
The telehealth monitoring systems are primarily designed for a
Telehealth Network
home-medical environment where a rich graphical user interface
(GUI) can help guide patients through the process of measuring
Pulse
Oximeter
vital signs. This article provides an overview of how a telehealth
Weight Scale
monitoring system can be implemented using Freescale’s
Solution Enablement Layer to provide portability across
Freescale’s 32-bit processor portfolio.
Glucometer
It is critical that telehealth devices should be personalized
Blood
Pressure
to address a particular disease or condition and cater to the
patient’s specific needs. This is a challenge for both system
designers and OEMs. Scalability, low power consumption and
a rich peripheral set are key design considerations for telehealth
Thermometer
system design engineers. This article discusses the medical
risks of hypertension and diabetes and describes telehealth
solutions for patients suffering from these conditions.
Figure 2
Portable Wireless Telehealth System
Blood
Pressure
Glucometer
Thermometer
Pulse
Oximeter
7!.
Portable
Wireless
Device
Weight Scale
i.MX,
MPC5121e,
ColdFire®
Figure 3
freescale.com/beyondbits
Telemonitoring Solutions 25
Hypertension and diabetes:
medical standards for prevention,
detection and evaluation
Distinguishing between hypertensive emergency and urgency is
The Seventh Report of the Joint National Committee on
It helps as well to monitor other signs and symptoms that
Prevention, Detection, Evaluation, and Treatment of High Blood
the patient could be experiencing that do not relate to the
Pressure (JNC7) has published some important guidelines
pathology, such as those in the following table.
crucial to appropriate management. Diagnosis could be done
easily by telehealth devices that already have data from the
patient’s history, including medications the patient is taking.
regarding hypertension prevention and management. The
Signs and Symptoms of Hypertensive Crises,
Urgencies and Emergencies
following are key points taken from the report:
• In persons older than 50 years, systolic blood pressure
greater than 140 mmHg is a much more important
Signs and
Symptoms
Hypertensive
Crises, %
Urgencies,
%
Emergencies,
%
P
cardiovascular disease (CVD) risk factor than diastolic
Headache
17.0
22.0
3.0
<.001
blood pressure.
Epistaxis
13.0
17.0
0.0
<.001
Chest pain
13.0
9.0
27.0
<.005
with each increment of 20/10 mmHg. Individuals who are
Dyspnea
12.0
9.0
22.0
<.02
normotensive at age 55 have a 90 percent lifetime risk for
Faintness
10.0
10.0
10.0
NS
Psychomotor
agitation
7.0
10.0
0.0
<.004
Neurological
deficit
7.0
3.0
21.0
<.001
Vertigo
6.5
7.0
3.0
NS
Paresthesia
6.5
6.0
8.0
NS
Vomitus
2.5
2.0
3.0
NS
Arrhythmia
1.0
6.0
0.0
<.04
Other
5.6
2.0
3.0
NS
• The risk of CVD, beginning at 115/75 mmHg, doubles
developing hypertension.
• Individuals with a systolic blood pressure of 120–139 mmHg
or a diastolic blood pressure of 80–89 mmHg should be
considered as prehypertensive and require health-promoting
lifestyle modifications to prevent CVD.
• Thiazide-type diuretics should be used in drug treatments for
most patients with uncomplicated hypertension, either alone
or combined with drugs from other classes. Certain high-risk
conditions are compelling indications for the initial use of
enzyme inhibitors, angiotensin receptor blockers, beta-
Hypertensive Urgencies and Emergencies. Prevalence and
Clinical Presentation. Bruno Zampaglione; Claudio Pascale;
Marco Marchisio; Paolo Cavallo-Perin
blockers, calcium channel blockers).
Table 1
other antihypertensive drug classes (angiotensin converting
• Most patients with hypertension will require two or more
antihypertensive medications to achieve goal blood pressure
(<140/90 mmHg or <130/80 mmHg for patients with diabetes
or chronic kidney disease).
• If the blood pressure is >20/10 mmHg above goal blood
pressure, consideration should be given to initiating therapy
with two agents, one of which usually should be a thiazidetype diuretic.
Hypertensive urgency is managed using oral antihypertensive
drugs as an outpatient or in a same-day observational setting.
Hypertensive emergency requires the patient to be taken to
an intensive care unit with parenteral medication. For treating
hypertensive urgency, the goal is to reduce mean arterial
pressure (MAP) by no more than 25 percent in the first 24 hours
with oral therapy.
• The most effective therapy prescribed by the most careful
clinicians will control hypertension only if patients are
motivated. Motivation improves when patients have positive
experiences with, and trust in, the clinician. Empathy builds
trust and is a potent motivator.
Acute complications
of hypertension
The most life threatening acute complications are hypertensive
urgency and emergency. Hypertensive emergency is
characterized by a severe elevation in blood pressure, above
180/120 mmHg, complicated by target organ dysfunction,
such as cerebrovascular events, pulmonary edema, coronary
ischemia or renal failure among others. Hypertensive urgency
does not include progressive target organ dysfunction.
freescale.com/beyondbits
In a hypertensive emergency, MAP should be reduced by
10 percent during the first hour and an additional 15 percent
in the following two to three hours. It’s clear to see that
automating the data collection under these circumstances is
vitally important for the physician to accurately manage this
complication.
Diabetes
In diabetics, poorly controlled glucose levels could lead to
vascular complications, such as arterial microthromboses,
retinopathy, nephropathy and neuropathy. These conditions
are primarily caused by superoxide production, the activation
of protein kinase C, serum glycosylation and the formation of
glycation end products.
Telemonitoring Solutions 26
Acute complications of diabetes
The most common acute diabetic complication is hypoglycemia
(very low blood glucose levels), which can result when patients
are concerned about high levels of glucose (hyperglycemia)
and over compensate with too much insulin. Hyperglycemia
is primarily responsible for chronic complications like diabetic
retinopathy, nephropathy, neuropathies, infection and others.
Strict control of glucose is inadvisable in some patients, such
as those with short life expectancy, hypoglycemic symptom
unawareness or those who cannot communicate the symptoms,
like young children. However, by using telehealth solutions with
powerful closed loop systems in which glucometers and insulin
classes designed to interact and define consistent application
behavior and look and feel and often implement a rich user
interface.
• SEL services are application partitioning mechanisms
available for partitioning software components from the
underlying hardware design, so that applications need only
be recompiled to migrate from one platform (HW and RTOS)
to another.
Conceptually, the SEL is an extension of the operating system
running on the embedded processor that allows another level of
application abstraction. SEL services are therefore application
subcomponents that are not operating system-specific and can
pumps are merged together, these kinds of situations can
be shared.
be avoided.
SEL services
One of the most common causes of hypoglycemia in elderly
SEL services are central components in a software solution’s
patients is an overdose of antiglycemic drugs. Sometimes they
implementation. As applications begin to use the SEL, they
forget they have already taken their dosage and by mistake take
can start by abstracting only a single service for a particularly
another dose of the drugs.
complex piece of hardware-specific code while the rest of
Freescale enables technologies
for avoiding acute complications
of chronic degenerative and
metabolic diseases
Solution Enablement Layer
The Freescale Solution Enablement Layer (SEL)[1] is an
embedded software platform running with standard operating
systems, such as Linux and uCLinux, to provide application
framework capabilities and abstracted hardware drivers (called
services). The SEL is designed to support a compile-and-deploy
model of software reusability across a range of Freescale
32-bit processors.
The SEL service is the primary abstraction mechanism
designed to allow the partitioning of applications into hardwarespecific software components. Since services can be written
for specific hardware, the application source code can have
control and consistent behavior without being tied to a specific
processor. Moving from one platform to another becomes as
simple as partially re-implementing the service for the new
hardware device. Moreover, services are RTOS-agnostic and
can be shared by multiple applications. Services are designed
to be reusable between applications. In fact, Freescale and
third parties can provide suites of services that eliminate the
the application directly calls the operating system. Over
time, more and more of the functionality can be divided into
services, resulting in the application code becoming more and
more abstracted from the hardware without losing any of the
underlying hardware functionality. This gradual process allows
users to convert to SEL over the life of one or more projects.
SEL services properties
• SEL services—insulate the application from both OS and HW
differences and are dynamically loaded at runtime
• SEL service interface—directly useable from within an
application or the command line
• SEL extended services—may derive functionality based on
existing SEL services
Telehealth monitoring system
services
Working down from a software solution through a hardware
implementation in a telehealth monitoring system, developers
want to write application code that is easy to migrate among
hardware devices and RTOS platforms. The SEL allows
applications to be segmented to:
• Define the GUIs independent of SEL services
Main control with personalized items for vital signs
on patient GUI
redundant portions of software solutions while still getting the
Blood pressure with symptoms for acute complications GUI
most from specific processor capabilities.
Glucometer with symptoms for acute complications and
Application frameworks and SEL services are the primary
elements of the SEL technology.
• Application frameworks define prevalidated application
prevention of double intake of dosage GUI
Pulse oximeter for chronic obstructive pulmonary
disease GUI
frameworks that exist for rapid prototyping and application
development. Most application frameworks are suites of C++
freescale.com/beyondbits
Telemonitoring Solutions 27
• Define application services that are HW- or RTOS-
Medical SEL Services
independent, such that re-implementing part of the service
allows the user to easily migrate through the 32-bit
Graphical User Interface
processor portfolio
Main GUI
Blood Pressure
GUI
Blood pressure service (systolic, diastolic and mean
Glucometer GUI
arterial pressure)
Glucometer service
Application Framework
GUI Framework
Pulse oximeter service
GUI Widgets
Thermometer service (infectious disease complications)
Digital weight scale service (for monitoring water retained
SEL Architecture
in patients with congestive heart failure)
SEL Interfaces
Following that software partition, a telemonitoring system
application could have multiple services running in a high-end
Medical Services
Blood Pressure
Oximeter
Glucometer
Thermometer
processor, such as Freescale’s i.MX, MPC51xx or ColdFire®
Weight Scale
processor, or the application might be tailored to implement
a couple of services in a low-end processor. Figure 4
illustrates a complete telemonitoring system using the medical
services suite.
SEL OS
Conclusion
fsl_os_linux
Modern society faces public health issues due to the rapidly
MCF52277 MCF5329
i.MX31 MPC5121e MPC8360
aging population and their pathologies’ demographics. This
means providing systems that can remotely monitor vital signs
Figure 4
and drug intakes to help avoid acute complications that result in
Medical SEL Services in a MCF5329 ColdFire Processor
higher costs for patients admitted to a hospital ER facility.
To address these issues, Freescale offers medical equipment
Graphical User Interface
designers and OEMs hardware tools and a new software
Main GUI
platform (SEL) that enables concurrent software and hardware
Blood Pressure
GUI
development and allows hardware designers to deliver their
solutions to market faster.
Application Framework
GUI Framework
Reusing SEL services and spanning their usage across
the 32-bit processor portfolio enables accurate and rapid
GUI Widgets
development of telehealth applications that create a virtual
SEL Architecture
bridge between doctor and patient.
SEL Interfaces
References
[1] Solution Enablement Layer Architecture V1.0 Benedek
Medical Services
Aaron, Hemstreet Greg
Blood Pressure
SEL OS
fsl_os_linux
MCF5329
Figure 5
José Fernández Villaseñor is a medical doctor and electrical engineer who combines his work at Freescale Semiconductor as a
medical product marketer and his work as a hospital physician. He has more than eight years of experience working on automotive,
industrial and medical engineering systems and applications as well as semiconductor product development. He is currently part of
Freescale’s Microcontroller Solutions Group. Jesus Gaytan is the software lead for Freescale’s Extensible Software Platform team in
Guadalajara and has been with the company since 2006. He holds a bachelor’s degree in computer science.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Telemonitoring Solutions 28
29
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Raman Sharma
Low-Energy Wireless
Just what the doctor ordered
Introduction
Wireless telehealth overview
The medical market, while on the frontier of human sciences,
Telehealth is one of the primary applications for low-energy
has always been conservative and cautious when it comes
wireless connectivity in medicine. Telehealth is a broad term
to analyzing the market’s technology adoption rate. While the
used to describe telemedicine, telemonitoring and telecare.
rest of the industrial and consumer markets were immersed
Wireless technology is making a huge impact in telemonitoring
in the potential of wireless connectivity, networking and the
by enabling remote patient monitoring for the healthy
Internet, the medical market continued to build devices with
(preventative medicine) and for those that require management
tried and tested technology. However, we are now witnessing a
of chronic diseases. Wireless technology will allow doctors to
technology revolution in the medical market. This is in part due
improve quality of care by providing a new method to collect
to a perfect storm of events: an aging population, increasingly
more relevant data, more frequently and at a lower cost.
costly health care and rapidly developing technology trends.
We’ve seen this story unfold before, however, where a game
A global aging population combined with rising health care
changing technology comes along, only to be derailed by
costs is straining the world’s health care infrastructure. For
the lack of interoperability. Fortunately, because the medical
instance, baby boomers are entering an age bracket where
market has been slow to adopt new technology, this problem
they will be affected by chronic diseases. As the burden of
has already been solved and similar applications have proven
illness increases, the health care system will not have enough
successful in other markets. The answer for the medical market
professionals to care for the ill. We are at a point where
is standards. Standards will allow medical devices to talk to
yesterday’s technology, adapted to today’s medical market, can
each other and deliver the promise of telehealth. There are
solve critical unmet needs in medicine, such as improved health
two associations driving standards for low-energy wireless
care coverage and quality, and lower health care costs. One
technology in the health care industry: Continua Health Alliance
such technology is wireless.
and IEEE® 802.15.6 wireless body area network (WBAN).
Wireless technology can be used in a variety of medical
Standardizing wireless telehealth
[1]
applications—in the hospital, in the home, on the body and,
lastly, implanted within the body. Although the focus of this
article is low-energy wireless in the home and on the body,
it is worthwhile to briefly mention the wireless standard
for implantable devices—Medical Implant Communication
Service (MICS). MICS was established by the US Federal
Communications Commission (FCC) in 1999 in the 402 MHz to
405 MHz frequency band (the same band as for weather
balloons). While MICS is not the primary allocation of this
Continua’s mission is to establish a standard for medical
devices and systems within the personal health care (which
includes telehealth) and fitness monitoring application space.
One of Continua’s key criteria is to choose a technology
or technologies that are globally applicable. Therefore,
technologies that operate in the 868 MHz and/or 915 MHz
bands are automatically locked out of the greater world market,
including Japan, Korea and China.
frequency band, it is used in the US, EU, New Zealand, Japan
Freescale, with its broad portfolio of microcontrollers, sensors
and Canada to provide a communication medium between
and analog devices, can enable Continua’s mission by providing
an implanted “can,” such as a pacemaker, and an external
solutions for satellite devices that collect the data and the
programmer. The range is typically two meters with a power
infrastructure devices that analyze and manage the data. No
limitation of 25 mW.
other company of similar size and pedigree can approach this
space in such a one-stop-shop way.
freescale.com/beyondbits
Low-Energy Wireless 29
Continua recently published version 1 (VI) of its guidelines
Wireless Options for Medical Applications
for wireless connectivity for portable medical/telehealth
applications. In this initial version, Continua selected Bluetooth®
technology as the wireless standard (USB was selected for
480 Mbps
wired connectivity) and we will soon see interoperable medical
devices from leading device manufacturers that will be certified
UWB
by Continua.
Bluetooth wireless technology certainly meets the needs of the
300 Mbps
Data Rate
medical market from a risk mitigation point of view. According
to market analysts, over one billion Bluetooth chipsets were
IEEE®
802.11n
shipped in each of the last two years. With these numbers,
there is no doubt that Bluetooth technology is tried and tested.
However, many argue that Bluetooth technology is not ideal for
54 Mbps
Active RFID
IEEE 802.11a/g
11 Mbps
and short range are key requirements. As a result, Bluetooth
Low Energy (BTLE) is being promoted for the second version
(V2) of the Continua guidelines.
IEEE 802.11b
3 Mbps
Bluetooth® Wireless Technology and BTLE Technical Merits
Bluetooth®
ULP
Bluetooth
250 kbps
ZigBee Technology
®
20 kbps
the intended medical use cases where low data rate, low power
Passive RFID
1
10
Meters
100
Figure 1
Telehealth System Concept
Pulse
Oximeter
Bluetooth
BTLE
Frequency Band
2.4 GHz
2.4 GHz
Data Rate
1-3 Mbps
1 Mbps
Range (meters)
5–10
5–10
Max Power
+20 dbm
+10 dbm
Modulation
GFSK, PSK
GFSK
Low-Power
Capability
Not ideal
Sleep modes to
conserve power.
Designed for battery
operation.
Table 1
Weight Scale
BTLE is specified for short-range, low-energy applications
where only short bursts of data are required (i.e. non-streaming
data). Low latency and available sleep modes allow BTLE to
boast low power consumption characteristics. Furthermore,
Glucometer
based on the simple BTLE framework, processor memory and
performance requirements are low. Although BTLE is now a
Blood
Pressure
Thermometer
Ř*UDSKLFV
Ř$XGLR9LGHR
Ř:LUHG:LUHOHVV
Connectivity
Ř7RXFK8,
part of the Bluetooth Special Interest Group (SIG), there are
significant differences between the two standards.
The key difference between Bluetooth wireless technology and
BTLE is that BTLE is designed for low-power, battery-powered
applications. This will effectively serve the portable medical
market since 18 months of battery life for portable medical
monitors is a requirement from various manufacturers. However,
it is important to note that Bluetooth technology and BTLE are
Figure 2
not inherently interoperable. The Bluetooth device must be
new enough to understand BTLE. For many devices already in
the field, that may be difficult. Therefore, interoperability may
really only begin with the next generation of Bluetooth devices
beyond the ones available today.
freescale.com/beyondbits
Low-Energy Wireless 30
Wireless Protocols Contending for Continua’s V2 Guidelines
Wireless Standard
Data Rate
ANT
1000 Kbps
Range
Nodes
Battery Life
Frequency Band
65,000 + 1
~4 years
2.4 GHz
Sensium
50 Kbps
3m
8+1
> 1 year
862–870 MHz
902–928 MHz
Z-Wave
9,600 Kpbs
30–100m
232
> 1 year
900 MHz
BodyLAN
1000 Kbps
BTLE
1000 Kbps
5–10m
7+1
1 year
2.4 GHz
ZigBee®
250 Kbps
1–100m
65,524
> 3 years
868 MHz
915 MHZ
2.5 GHz
2.4 GHz
Table 2
BTLE is the leading contender for Continua’s V2 guidelines,
IEEE is also focusing on establishing a wireless standard
however, ZigBee technology is also a strong and viable
for medical applications. IEEE 802.15.6, or WBAN, is strictly
candidate. Besides BTLE, there are five other wireless protocols
focused on wirelessly connecting sensors worn on the body. In
that are in contention for V2 guidelines:
comparison, Continua is creating use cases for both WBAN and
• ANT: Proprietary 2.4 GHz technology developed by
personal area networks (PAN). PAN use cases include wirelessly
®
Dynastream. ANT is currently used in some health and fitness
connecting portable medical monitors to telemonitoring
products, using a version of the Nordic nRF24 transmitter.
gateways (see Figure 2).
Total volume to date is a few million units, and an alliance has
A task group for IEEE 802.15.6 has recently been formed to
been created to promote an ecosystem.
develop the WBAN standard encompassing a physical layer
• Sensium: Proprietary 868/915 MHz technology developed by
(PHY) and media access control (MAC) layers. Although this
Toumaz.
group is in its infancy, the high-level technical requirements
• Z-Wave: Proprietary technology developed by Zensys. Total
include low power consumption, security, multi-node
volume to date is a few million units and an alliance exists to
networking, interference protection and coexistence.
promote an ecosystem.
Wireless applications in the medical market are on the cusp of a
• BodyLAN: Proprietary 2.4 GHz technology developed by
breakthrough. Imagine a system that uses a sensor embedded
Fitsense. This is part of a larger effort that includes fitness
in your clothing to monitor your heart rate, then transmits the
equipment and fitness centers. Total volume is unknown, but
data to a telemonitoring gateway and alerts your physician,
appears to be less than a million units.
all wirelessly, without intervention. The only way for this to
• ZigBee: The only technology based on an international
become a reality is to establish standards so various sensors
standards body (IEEE). The ZigBee Alliance, an open
and portable medical monitors can speak to each other. This is
organization, has the personal, home and hospital care
exactly what Continua and IEEE are doing with the support of
(PHHC) profile that caters to the Continua-defined use cases.
technology drivers like Freescale. The vision is set, standards
IEEE 802.15.4 total volume to date is around 25 million units
are being defined, and a technology revolution for the medical
and growing rapidly.
market is underway.
While Continua would like to accept only one additional wireless
References
technology in its V2 guidelines, it is not mandatory that only one
[1] “Tele-What?: It’s Time to Re-Think the Industry’s Terms,”
is selected. Companies such as Philips, Motorola and Freescale
are working together to promote ZigBee as one of the standards
Wuorenma, Jan K, TeleHealth World, Vol. 1, p. 7, Fall 2008
approved by Continua.
Raman Sharma has 10 years of high-tech experience. He has worked in several functions, ranging from ASIC design engineer,
applications engineer, sales and marketing and management. Raman has a masters in electrical and computer engineering from
Carnegie Mellon University and an MBA from the Kellogg School of Management. At Carnegie Mellon, Raman focused on wearable
computing and biomedical engineering. At Freescale, Raman is the Global Medical Segment manager responsible for business
strategy, marketing, new product roadmaps and revenue growth.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Low-Energy Wireless 31
32
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Alfredo Soto with Dr. Juan Carrillo Jiménez
Automatic Ventilation Control
Cost-effective alternative to manual ventilation
Introduction
This article describes the design of a portable automatic
ventilation control system that also processes arterial oxygen
• Time-cycled ventilator: Inspiration and expiration are
programmed the same as the gas flux.
• Flux-cycled ventilator: Inspiration ends when the inspiratory
flux is below a pre-determined level.
saturation (SpO2) data from a pulse oximeter. The system, built
around Freescale’s 8-bit MC9S08QG4 microcontroller (MCU), is
• Mixed ventilator: The most commonly used; combines
the attributes of the other classifications.
designed to be a portable, automatic replacement for manual
pulse oxygen and ventilation monitoring and control, requiring
less human interaction during surgery. It can be particularly
useful during surgery on infants.
Overview
All tissues are fed by oxygen transported through the blood
vessels, which is needed to grow the tissue and repair damage.
Normally, the body regulates a constant oxygen concentration
in extra-cellular fluids, relying primarily on the chemical
Physicians can set blood oxygen tolerance limits, and when
oxygen saturation gets too low the ventilator can switch from
manual to automatic mode to help the patient reach adequate
oxygen saturation. When normal levels are achieved, the system
exits automatic mode.
How to select the adequate
ventilator for pediatric patients
characteristics of the hemoglobin in red blood cells.
Newborns have an elevated metabolic rate that leads to
For most surgeries, however, the doctors must introduce a
that weigh less than 1600 grams and have a gestational age
certain amount of anesthesia, which also acts as a muscle
below 37 weeks are at higher risk of retinopathy of prematurity,
inhibitor. This automatically reduces the patient’s breathing, and
which can be caused by oxygen toxicity and lung dysplasia,
when combined with the blood loss during surgery, can result in
resulting from the high pressures of oxygen delivery. It is critical
hypoxia, or lack of sufficient oxygen in the patient’s body. That’s
that the automatic ventilation systems are used in these cases
why the doctors must use an anesthetic ventilator and a meter
to ensure that the infants do not receive 100 percent oxygen
to measure oxygen saturation in the blood (pulse oximeter) to
concentrations.
regulate the anesthesia-oxygen mixture applied during surgery.
increased oxygen consumption (5–8 ml/kg). Premature babies
In newborns, the pressure-limited continuous-flux devices and
With mechanical ventilation, an external device is connected
time-cycled ventilators allow adequate spontaneous respiration
directly to the patient and artificially exchanges respiratory gases.
without restriction. In scholar children (6 to 11 years) and
Mechanical ventilation is designed to maintain an adequate
children above the age of 12, the pulsed-flux ventilators are
exchange of gases, even through diminished breathing rates
used to control volume as well as pressure. New generations of
and reduced myocardial use. However, it could also be used to
volumetric ventilators allow flux volumes up to 20 ml, and they
provide adequate lung expansion with reduced respiratory effort,
now incorporate sensors to automatically cycle the device to
the correct combination of anesthetic sedation and muscle-
allow doctors to use them for two to three kilogram babies.
relaxing related drugs and to stabilize the thoracic wall.
Ventilators can be divided into five classifications, depending on
how the inhaling process is terminated:
• Pressure-cycled ventilator: Inspiration of gas is stopped when
a designated pressure is achieved.
• Volume-cycled ventilator: Inspiration ends when the desired
volume of gas has been introduced.
freescale.com/beyondbits
Circuits
A circuit is the interface between the mechanical ventilator
and the patient. There are three types: neonatal (11 mm
diameter), pediatric (15 mm) and adult (22 mm). Some
circuits have heating wires with a servo-controlled humidifier
temperature system. These are quite expensive, but they allow
optimum humidity and temperature for pediatric patients.
Automatic Ventilation Control 32
They are lightweight, flexible and occlusion-resistant with
modes plus strong analog capabilities, a complete set of serial
safe connections and minimum flux resistance, and they are
modules, a temperature sensor and robust memory options.
available in standard sizes (15–22 mm).
MC9S08QG8/4 Features
How the system works
Core
HCS08
The automatic ventilation system is designed to offer safe and
Flash
8K/4K
controlled ventilation for babies along with blood oxygen level
RAM (byte)
512/256
feedback. The main features include:
Bus Frequency
10 MHz
• The ability to receive and process parameters for measuring
ADC
Up to 8 channels (10-bits)
Analog Comparater
Yes
• Portability, for use in remote locations
Keyboard Interrupt
Up to 8-pins
• Communication between the oximeter and the system’s MCU
Timers (up to)
One 16-bit timer (2 channels)
arterial oxygen saturation as sent by a pulse oximeter
via serial interface (SCI)
One 8-bit timer
• Stepper motors that provide precise instrument control
SCI
1
according to set parameters to deliver exact ventilation
SPI
1
frequency and pressure
I2C
1
Thanks to the MCU, an automatic ventilation control system
Operational Voltage 1.8–3.6V
can be developed where important data can be processed and
Package
stored to ensure proper ventilation for patients of a specific
Figure 2
size and weight. Programs can be written that address only
8 DIP/SOIC/QFN, 16-pi DIP/TSSOP/QFN
other aspect of the system. Figure 1 illustrates the automatic
Functional description
of the system
ventilation control implementation.
Pulse oximetry is a non-invasive technique that uses light waves
those physical parameters in question, without altering any
Automatic Ventilation Control System Block Diagram
Pulse
Oximeter
SpO2
Sensor
TX
Serial
Communication
DB-9 connector compatible with the meter. The Sp02 Y sensor
RX
has two light-emitting diodes (LEDs) on one side of the sensor
and a light detector on the other side. The sensor is normally
attached to the fingertip so the light can pass completely
through the tissue to the light detector.
The light from the LEDs is transmitted in two wavelengths,
Stepper
Motors
Breaths
per Minute
procedure employs an instrument called a pulse oximeter, a
portable, low-cost device that includes an Sp02 sensor and a
MC9S08QG4
Ventilation
Tubes Circuit
to measure the oxygen saturation of a patient’s blood. This
660 nm (red) and 915 nm (infrared), which correspond to the
Pressure
Flow
oxygenated hemoglobin and total hemoglobin, respectively.
The detector captures the light emitted by LEDs, and the pulse
oximter processes the differing absorption rates between the
red and infrared wavelengths. The MCU in the meter can then
Ventilator
Figure 1
isolate the arterial pulsation readings and calculate the
oxygen saturation.
The SpO2 reading from the pulse oximeter can be transmitted
Choosing the right MCU
to the automatic ventilation system through the serial
Multiple alternatives exist when selecting an MCU for this
interface (SCI) connected to the S08QG. The system will
application system. The Freescale MC9S08QG4 (S08QG) device
use the standard serial protocol as this is defined within the
offers an excellent combination of the features needed at a
specifications of a commercial oximeter. The data from the
very competitive cost. It extends the advantages of Freescale’s
pulse oximeter is transmitted continuously through the SCI
S08 core to low-pin-count, small-package options. S08QG
interface to the ventilation system.
devices are low voltage with on-chip in-circuit flash memory
programmable down to 1.8V. They include the standard features
of all S08 MCUs, including wait mode and multiple stop
freescale.com/beyondbits
The data is processed by the S08QG and translated into motor
steps to control the movement of the oxygen ventilator.
Automatic Ventilation Control 33
1
16
PTA0/KBIP0/TPMCH0/ADP0/ACMP+
2
15
PTA1/KBIP1/ADP1/ACMP–
VDD
3
14
PTA2/KBIP2/SDA/ADP2
VSS
4
13
PTA3/KBIP3/SCL/ADP3
PTB7/SCL/EXTAL
5
12
PTB0/KBIP4/RxD/ADP4
PTB6/SDA/XTAL
6
11
PTB1/KBIP5/TxD/ADP5
PTB5/TPMCH1/SS
7
10
PTB2/KBIP6/SPSCK/ADP6
PTB4/MISO
8
9
PTB3/KBIP7/MOSI/ADP7
Frequency
Variable
Controller
Motor
SCI
PTA5/IRQ/TCLK/RESET
PTA4/ACMPO/BKGD/MS
Pressure Flow
Controller Motor
MC9S08QG4 16-pin Package
Figure 3
The control software routines for different types of stepper
motors are based on variable frequency or pressure flow control:
• Variable frequency takes information from the clock pulses to
control the number of steps desired.
• Pressure flow control means the motor can perform
comprehensive steps, steps with great torque (double
step), changes of direction and no changing position steps
(inhibited steps).
Figure 3 shows a simple way to implement stepper motor
control through the S08QG.
Oxygenation Security Ranges
Motor Movement
Range
(%) SpO2
Pressure Flow
Frequency
93–98 %
Disable Step
Disable Step
Good
Oxygenation
80–92 %
Disable Step
Movement to
the right
Low
Oxygenation
<80%
Movement to
the right
Movement to
the right
HIPO
Oxygenation
>98%
Movement to
the left
Movement to
the left
HIPER
Oxygenation
Diagnostic
Table 1
A significant characteristic of the stepper motor used to
implement this application is its maximum current consumption
of 20 mA. The torque provided by the motor is small, with
maximum static torque at 4 mNm and maximum dynamic
torque at 1.3 mNm, but it is strong enough to move standard
gauges. The S08QG MCU can drive up to 25 mA, so it is well
suited for this application. The motor is directly connected to
the MCU using port A and port B, and based on the previous
conditions, the electronic circuitry is minimal (see Figure 1). The
system requires VCC, GND and the output motor controller
signal. No additional external electronics are required.
Frequency specifies the number of motor steps per second,
which determines how fast the motor rotates. The motors’
physical limitations determine their operation frequencies. Some
engines operate between 10 Hz and 500 Hz for very specific
applications while others can operate in the kHz range. For this
system, the maximum frequency is 100 Hz, but it is set at 50 Hz
for optimal use by a physician during surgery.
Conclusion
The automatic ventilation control system is a cost-effective
alternative to manual ventilation control that provides reliable
The oxygen ventilator has three simple control knobs, which
control the inhalation flow and breaths per minute. One knob
controls proper ventilation according to the patient’s size and
weight. The second knob controls the desired breaths per
minute, and the third manages the oxygen flow pressure. In
this particular system design, the second and third knobs are
automatically controlled by the stepper motors.
ventilation for infants and other patients in surgery with
Software routines calculate the movement of the stepper
motors according to oxygen saturation percentages sent by the
pulse oximeter through the SCI interface. The oxygen saturation
numbers also provide information necessary for doctors to
perform a series of comparisons to determine different ranges
References
minimal human intervention. The concept is simple: the pulse
oximeter feeds oxygen saturation percentages through an SCI
interface, and the system does all the rest. It allows physicians
to concentrate on patient care, and it can be used for general
surgery, pediatric and neonatal care or even be adapted to
veterinary clinics.
[1] AN3602: Driving a Stepper Motor Based on the
MC9S08QD4 and Other 8-bit Families; Freescale
Semiconductor, Rev 0, 4/2008
of security, as illustrated in Table 1.
Alfredo Soto is a systems and applications engineer in the Technical Information Center at Freescale Semiconductor. He has a degree in
electronic engineering with a specialty in control and instrumentation from Technologic of Sonora Mexico, and a master of science in electrical
engineering with a specialty in bioelectronics from CINVESTAV I.PN Mexico. Dr. Carrillo holds an anesthesiology and palliative medicine
degree. He has been an attendant for eight years in the Pediatric Hospital of high-risk surgery and also attends terminally ill patients as a
palliative medicine specialist.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Automatic Ventilation Control 34
35
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Kurt Seifert
Health Social Networks
Using low-cost RF devices
The total budget for health care in the United States rose
Cigarette smoke is known to contribute to serious health
to 2.26 trillion dollars in 2007, which translates to $7,439
conditions, including heart disease, respiratory disease
per inhabitant, and it has been predicted that this trend will
and several types of cancer, but there are many other air
continue to rise. Even at this cost, the United States has only
contaminants that can have adverse effects on human health.
the 45th highest life expectancy worldwide, according to the
People are often unknowingly exposed to these pollutants and
CIA World Fact Book (2007 estimates). As the cost of health
over time the toxins from the pollutants can accumulate within
care continues to rise, the government struggles to find new,
the human body.
more efficient ways to treat and prevent diseases. A proposed
solution described in this article relies on significant use of
low-cost, low-power RF devices.
If all of these risk factors could be monitored and the data
compiled, many of the illnesses associated with them could
be prevented or even eliminated. One of the main problems in
Introduction
implementing a solution lies in the complexity of monitoring all
According to the World Health Organization, environment is
responsible for as much as 24 percent of the total cases of
preventable diseases. This means that thousands of people
around the world die prematurely because of unhealthy
of these risk factors in the context of a single individual and
processing the information in an efficient way. If this could be
done, possibly life-threatening diseases could be identified
before they reached a critical stage, and preventative measures
environmental conditions, such as air and water pollution.
could be taken to avoid costly health care treatments.
According to the US Department of Health and Human
The main risk factors to human health are well-known, but the
Services (HHS), personal actions, such as smoking and lack
of exercise, along with poor food quality can also lead to
unhealthy conditions. Millions of dollars are spent each year
treating illnesses that are direct results of these risk factors.
By monitoring the risk factors on a regular basis, the
government would be able to prevent some diseases and treat
others before they developed into more serious and expensive
medical conditions.
programs currently in place to gather information about these
threats are very expensive and are not adequately accessible
to the population. Governments spend large amounts of money
each year on health care in an effort to research, treat and
prevent diseases caused by these risk factors, but because
the risk factors are not effectively monitored, improvements are
slow to come. Overall health care could be improved if humans
and the risk factors they encounter on a day-to-day basis could
HHS also states that some of the most common human health
be accurately monitored at a low cost.
risk factors are related to how often people eat in restaurants[1] [2],
Meals eaten outside of the home tend to contain more fat and
Wireless sensing
and monitoring solution
calories and are served in larger portions. These excesses can
By monitoring the number of times that a person eats at a
lead to serious conditions, such as obesity and type 2 diabetes,
restaurant and the amount of exercise performed, and by using
which, in turn, can lead to heart disease. In the U.S. alone, a
exhaust gas sensors and air contaminants sensors to detect
person dies of heart disease every 34 seconds . As of yet
air pollution, it’s possible to predict the likelihood of individuals
there is no completely accurate and affordable way to monitor
developing certain diseases. Preventative treatments can be
these different risk factors and the effects they have on the
administered before these illnesses develop into more serious
human body.
and more expensive infirmities.
freescale.com/beyondbits
which also can expose them to higher levels of cigarette smoke.
[3]
Health Social Networks 35
MC13224V Platform-in-Package Block Diagram
32.768 kHz (Optional)
RF Oscillator/PLL
and
Clock Generator
Balun
Digital
Modem
TX
Modem
TX/RX
Switch
Analog
Receiver
RX
Modem
Analog Power
Management
and Voltage
Regulation
SCI/UART
Module
CPU Complex
802.15.4
MAC
Accelerator
(MACA)
IEEE® 802.15.4 Transceiver
Buck
Converter
SCI/UART
Module
ARM7
TDMI-S™
32-bit
CPU
SSI/I2S
Module
Bus
Interface
and Memory
Arbitrator
Advanced
Security
Module
(ASM)
ARM
Interrupt
Controller
(AITC)
SPI
Flash
Module
(SPIF)
96 KB RAM
80 KB ROM
128 KB
Serial Flash
I2 C
Module
Keyboard
Interface
Data and Address Buses
Analog
Transmitter
Timer
Module
Clock and
Reset
Module
(CRM)
Up to 64 GPIO
24 MHz (Typical)
Battery
Monitor
SPI
Interface
GPIO
Control
12-bit
ADC
12-bit
ADC
JTAG and
Nexus
Figure 1
With the current advancements in modern low-power technology,
node that the owner had eaten in a restaurant. This system
smart wireless devices, such as the Freescale MC13224V
won’t record how many calories a person has eaten or if the
Platform-in-Package™ (PIP) with an integrated ARM7™ based
food had sufficient quality, but as stated by HHS, this is enough
microcontroller (MCU), can be used to develop and implement
information to give a general idea of a person’s alimentary
cost-effective and efficient wireless monitoring solutions.
habits, which is what the application needs.
The monitoring solution is based on the fact that a person’s
There are many ways this kind of solution could monitor
environment can be measured or cataloged at any given
an individual. For instance, it could compile the amount of
moment. This is achievable if low-power wireless sensors are
time spent in the restaurant, or a signal could be sent to the
strategically placed to monitor the subjects as much as possible
individual’s mobile node when the meal had been paid for.
while they go about their daily routines. In order to successfully
Figure 2 illustrates the hardware requirements.
accomplish this, two types of wireless sensor nodes must be
used: static and mobile. It is logical to assume that most people
spend the majority of their time either at home, at work or in
some cases, in transport between the two. Therefore, a static
sensor node could be placed in an individual’s workplace,
home and mode of transportation to collect information about
the quality of the environment, such as cigarette smoke,
combustion gases and hazardous chemicals. A restaurant static
node could be employed that would simply alert the mobile
Hardware Diagram for Wireless Sensing and Monitoring
Antenna
The IEEE® 802.15.4 wireless communications protocol works
perfectly for this implementation. This protocol supports a lowpower network at moderate data rates (about 250 Kbps), and
with proper implementation, can provide years of battery life
from a lithium coin cell battery when used in an ultra-low-dutycycle communications system. The protocol’s IEEE 802.15.4
MAC layer by itself isn’t enough, but a networking layer such as
the ZigBee® wireless can provide all the necessary networking
services. The proposed stack is shown in Figure 3.
Proposed Health Network Stack
ZigBee® Network
Internet
MC13224V
PIP
IEEE®
802.15.4
GPRS
802.15.4 MAC
Environment
Sensor
802.15.4 PHY
MCU
Figure 2
freescale.com/beyondbits
RFIC
Figure 3
Health Social Networks 36
In the Zigbee layer there are different types of devices.
Possible Hardware Configuration Block Diagram
Because of its constraints on power consumption, the static
node would have to be a Zigbee coordinator whose main role
would be to start and administer the network. The Zigbee layer
Antenna
of the stack would control the administration of the health
Accelerometer
data by performing different duties, such as timing, incoming
Health Sensor 1
MC13224V
PIP
data, generating the frame for this layer and processing the
recently received data. Because of the application’s orientation,
IEEE®
802.15.4
transfers could be performed in period ranges greater than ten
seconds. A general frame from a static node should contain
Health Sensor n
such information as the number ID of the monitored person,
information about the quality of the environment and if that
person has a special message such as a health alert.
Placing sensors in highly frequented locations would not
be enough to obtain a complete and accurate data set for
each individual. A personal mobile sensor node would be
Figure 4
Using regular AA rechargeable batteries, this would mean years
between charges.
required to collect data related to exercise. This mobile node
Because the mobile nodes would be low power, they couldn’t
would be equipped with an accelerometer, such as the 3-axis
transmit information over long distances. It would first have
MMA7361L low-g acceleration sensor from Freescale, giving
to communicate with the static node via the IEEE 802.15.4
it the ability to measure the user’s level of physical activity.
wireless protocol, and then the static node would be able to
Using simple algorithms, like those mentioned in the Human
transmit the information to the diagnostic center through the
Fall Detection Using 3-axis Accelerometer reference manual
Internet or cellular data network such as the general packet
(MMA7260QHFDRM, downloadable from www.freescale.com),
radio service (GPRS). If the Internet is not available, GPRS could
specific movements, such as running, walking and jumping,
send the information via short message service (SMS), providing
could be recorded. Custom features could also be added
additional infrastructure flexibility and making it a cost-effective
to allow the mobile node to log specific information, such
solution for non-Internet data transfers.
as temperature or glucose levels for individuals with special
requirements. The mobile node could also have the ability to
recognize patterns that indicate an urgent state of medical
crisis. It would be able to alert the individual of the critical
state of health and he or she would be able to seek immediate
medical attention.
A general frame from a mobile node should have the
person’s ID and statistical information, such as the risk factor
measurements gathered in a single day, and special information
if that person requires another kind of monitoring.
The diagnostic center could be programmed to recognize
specific patterns of risk factors and would indicate the findings
to a specialist if a potential health risk was identified. The
specialist would receive the data early enough to be able to
analyze it and send a message to the patient in a timely manner.
The system could be flexible enough to facilitate outsourcing
overnight data to another location to avoid night shifts.
Because each person would have a unique ID, the data could
be quickly accessed and reviewed by a specialist who would
record the individual’s data and determine if a potential health
Both mobile and static nodes would have to be part of the
risk was present. If this were the case, the diagnostic center
wireless network. They could use the same data transfer
would communicate back to the static node which would then
software and hardware, which includes the IEEE 802.15.4
send an indicator to the individual’s mobile sensor via wireless
wireless protocol and an MCU. Once again, the proposed
technology. Figure 5 displays the logical path of communication
controller would be the MC13224V PiP because it features a
between the sensor nodes and the diagnostic center.
high-performance ARM7 controller and all the IEEE 802.15.4
radio hardware. The design of this mobile node could also
include a flexible sensor port capable of supporting three or
more different sensors in addition to the accelerometer in order
to add custom features for special patients. In this case the
mobile node would be a Zigbee end device.
The process of generating a physical health network would
be very simple (see Figure 6). A static node would first create
a network by itself with no other nodes attached. Then, other
static nodes could be added to create a larger wireless network.
Once this was accomplished, every new mobile node would join
the network by sending a beacon request. Every static node
Since the device is mobile and battery powered, energy
would answer the request, allowing the mobile node to detect
consumption is very important. The MCU is critical in managing
the network. Each mobile node would decide which static node
energy consumption, and if a 0.1 percent TX/RX duty cycle
to join depending on the quality of the signal. Once the decision
is used, the average consumption could be as low as 40 uA.
was made, an association request would be sent to join that
freescale.com/beyondbits
Health Social Networks 37
802.15.4
Communication
Internet/GPRS
Communication
Static Node, Mobile Node and Diagnostic Communications
Static Node Network Coordination
(ZigBee® Coordinator)
Static Node
Diagnostic
Center
802.15.4
Network
Broadcast to
Network Members
Static Node
Static Node
Mobile Node
Mobile
Node 1
Diagnostic
Patient data (ID, environment risk factors, meals eaten outside the home,
physical activity, custom data from the patient)
Environmental risk factors
Amount of meals eaten outside home
Mobile
Node 2
Mobile
Node n
(ZigBee End Devices)
Figure 6
Figure 5
Conclusion
particular static node. Because every member of the network
shares the same environmental conditions, that data would be
This type of wireless sensing and monitoring system could
sent as a broadcast to all members. The static node would also
help reduce health care expenses and increase individual life
control sending messages to specific mobile nodes but only
expectancy. In addition, the system itself would be a one-time
when the diagnostic center determines that there is a potential
investment, and the devices, once installed, would require
risk for a particular mobile node.
little maintenance other than periodic recharging and sensor
Theoretically, a maximum of 65,536 mobile nodes could be
trimming. On the whole, the health care network could provide
connected to a single static node. Because several static nodes
preemptive health checks that would reduce the time and
can be expected to be placed in the network, there are no real
economic resources invested in health care while improving the
topology issues.
overall quality of life.
Using low-cost, low-power devices to monitor the most
References
common risk factors would provide a health care agency
[1] “Away-from-Home Foods Increasingly Important to Quality
with a realistic and cost-effective technological platform to
of American Diet,” Lin BH, Guthrie J, Frazao E., Economic
provide critical data for preventive and effective medical
Research Service, U.S. Department of Agriculture,
treatment, particularly for high-risk individuals. The low-power,
Agriculture Information Bulletin No. 749; 1999
high-performance MC13224V PIP and its implementation of
[2] “Eating out in America, 1987–2000: Trends and Nutritional
the IEEE 802.15.4 protocol would be the device of choice for
Correlates,” Kant AK, Graubard BI., Preventive Medicine
this application, providing a high return on investment to the
2004; 38:243–9
total health care budget. And, thanks to the minimum number
[3] American Heart Association, “Heart Disease and Stroke
of extra components required, it would still provide huge
customization capabilities to suit the different application variants.
Statistics—2005 Update”
Kurt Seifert graduated from the Instituto Tecnológico y de Estudios Superiores de Occidente in Guadalajara México with a degree in
electronics engineering with an orientation to communications. He works at Freescale in the Wireless Connectivity Operations group
and his main role has been to test, design and maintain software applications.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Health Social Networks 38
39
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Larry Fennigkoh and Diego Haro
Human Factors and the Control
of Medical Device-Related Error
Introduction
Hospitals have become extremely complex, high-technology
environments where the use of intrinsically dangerous
equipment and procedures is routine. While the benefits
associated with this technology have been tremendous,
the additional complexity carries a human cost, namely, the
disturbing increase in the number of patient deaths that are
attributed to medical error. As concluded in the 2004 Health
Grades report, Patient Safety in American Hospitals, “over
575,000 preventable deaths occurred as a direct result of
the 2.5 million patient safety incidents that occurred in U.S.
hospitals from 2000 through 2002.”[1] The estimated average
of 191,000 deaths per year is nearly double the 98,000 annual
deaths cited in the pivotal 1999 Institute of Medicine report,
“To Err is Human: Building a Safer Health System.”[2]
mitigated if not completely eliminated. As such, the primary
purpose of this article is to encourage medical device designers
and manufacturers to fully embrace many of these wellestablished human factors principles. These same principles
have been successfully integrated throughout much of the
aerospace industry, including the military, NASA and other
high-risk, high-technology enterprises.[3] Human factors, as a
scientific, systems-focused discipline, is poised to identify and
solve many of the medical systems’ problems in general and
device-related shortcomings in particular.
Human factors as a
systems science
The study of human factors is a highly interdisciplinary systems
science.[4] [5] From its interdisciplinary perspective, it is heavily
rooted in the principles obtained through experimental and
The authors of these two major studies should be credited for
cognitive psychology research. Such principles include, but
waking up the government and health care community to the
are not limited to, how people communicate, perceive and
problem of medical error. As a result, the medical literature
process information, how they interact with machines and
today includes more case studies and calls for action. Despite
their environment (i.e., user interfaces) and how they make
this growing awareness, the magnitude and seriousness of
mistakes. The design and optimization of tools, work places
medical error remains largely obscured. The mingling of these
and processes also borrows heavily from industrial engineering,
accidental deaths with those from natural causes, combined
biomechanics and anthropometry. Here, reducing work-related
with a gross underreporting of such accidents, makes obtaining
errors and their associated injuries and maximizing worker
accurate figures extremely difficult.
efficiencies are often the primary objectives. It is, however,
A major conclusion within the 1999 Institute of Medicine
report, and the prevailing consensus within this community, is
that most of this error is due to faulty systems and processes
human factors’ foundation and emphasis on systems science
Simple Diagram of a Medical System
Noise Levels
Lighting
embedded within the health care system. It is these flawed
delivery systems, not the health care worker, that tend to be
Medical
Device
directly or indirectly associated with medical errors. Systems
Device
User
problems require systems solutions. It is here where the
interdisciplinary and systems science associated with the field
of human factors offers the greatest promise.
Interface
While the full scope of medical error is much too broad to
adequately address here, those errors caused or aggravated
by less than optimal medical device design will be targeted.
Specifically, it is through the use of established human factors
principles that many common device-related errors can be
freescale.com/beyondbits
Facility Design
Air Quality
Figure 1
Human Factors and the Control of Medical Device-Related Error 39
that offers the greatest opportunity for improved medical
transports the connected medical devices need to continue to
device design. In this context, and also as defined by Alphonse
function reliably on their internal batteries. Combined, these
Chapanis, widely regarded as one of the fathers of ergonomics,
facility-related issues may contribute significantly to mishaps
a system is “an interacting combination, at any level of
and mistakes. The physical environment has been implicated
complexity, of people, materials, tools, machines, software,
as the root cause of approximately 15 percent of the sentinel
facilities and procedures designed to work together for some
events reported to the Joint Commission on Accreditation of
common purpose.”[5] For both the medical device designer and
Healthcare Organizations (JCAHO)[8].
its clinical user, the essence of such a system is illustrated in
Figure 1.
Air quality
Electronic medical devices, patients and their caregivers may
While most designers are understandably focused on
also be adversely affected by:
developing device functionality, its ultimate performance, safety
• Temperatures that are either too hot or too cool, or
and effectiveness can be strongly influenced by the human
user and the particular environment in which it is used. This is
precisely why interdisciplinary design teams are so essential,
not only internal to the organization but external as well.
Such teams can recognize and integrate the unique skills and
temperature control that is widely fluctuating.
• Insufficient or excessive humidity and humidity control.
• Inadequate air filtering, surgical smoke evacuation or air
exchanges.
specialized components of their trusted suppliers. Good human
Here, designers are encouraged to use the embedded
factors in design are not just about user-friendly, cosmetically
intelligence and processing capacity within their products to
appealing front panels. They extend all the way through a
monitor critical internal device temperatures and other factors,
device, from components, to firmware, to network connectivity.
such as pressure differentials across air inlet filters, and alert the
In the context of Figure 1, consider how these individual
user to take appropriate action if necessary.
elements often interact in subtle yet complex ways.
Hospital environment
Lighting levels
Glare from overhead or inappropriately placed task lighting can
obscure instrument displays and can elevate worker
Noise levels
Hospital ambient noise levels can affect safe and proper device
stress levels.
operation in two critical ways:
Human factors
• They can severely mask life-critical equipment alarms.
When developing a new medical device, it is essential that
Ventilator-dependent patients, for example, have died when
such alarms cannot be heard.
• Excessive and persistent ambient noise may contribute
to increased stress levels in patients and hospital staff.
Persistent exposure to noise levels of 65–70 dB, while not
known to cause hearing damage, has been shown to degrade
task performance and cause temporary hearing threshold
shifts. A variety of physiological changes also occur at such
noise levels.
[6]
A 2005 hospital noise study from Johns Hopkins University also
concluded that “hospital noise levels have internationally grown
steadily over the past five decades, disturbing patients and staff
members, raising the risk of medical errors and hindering efforts
to modernize hospitals with speech recognition systems.”[7]
Facility design
Hospital patients are routinely moved throughout the facility,
the designer view the end product from the human user
perspective. Namely, what human characteristics does the
device need to cater to in order to be operated correctly and
safely? In this regard, it is essential for medical device designers
to consider human factors, such as the perceptual abilities
associated with sight, hearing and touch, early in the design
process. They should:
• Employ labels and displays that can be easily read and
interpreted.
• Use colors and contrasts that minimize ambiguity and add
information redundancy when possible, e.g., red alarm lights
to further convey a dangerous condition.
• Recognize the implications for visually impaired users.
• Evaluate, in advance, to learn if viewing angle limitations,
such as those associated with LCD or LED displays, are likely
to be problematic under expected use conditions.
• Manage the tones, intensities and types of audible alarms,
often connected to a variety of monitoring devices with
avoid the same combination of tones and intensities for
their associated cables and fluid-filled catheters and tubes.
differing alarm conditions, ensure that device alarms are
Transporting patients connected to multiple devices through
distinct from the many other devices that are likely to be in
long, tortuous hallways and up and down elevators, crossing
use in the immediate working environment, and never provide
a number of flooring transitions and thresholds in the process,
the user the ability to permanently silence audible alarms or
creates a variety of opportunities for accidental cable and
turn alarm volumes to less than ambient noise levels,
tubing disconnects. What’s more, during these patient
freescale.com/beyondbits
i.e., 55–65 dB.
Human Factors and the Control of Medical Device-Related Error 40
• Seek to make the alarm compatible with the level of the
User training
threat. Humans tend to equate both the volume and character
Inadequate training, or the lack of user training, has often
of an alarm with its severity. In other words, do not assign an
been used to explain why clinicians make mistakes. Doing so,
ear-splitting klaxon for a relatively minor alarm condition.
however, can often deflect users from uncovering device- or
• Provide the user with tactile feedback whenever possible
systems-related factors that may be the real culprit. Granted,
and appropriate. Humans possess touch receptors that are
proper education and training are important and vital to
sensitive to both displacement and viscoelastic resistance.
ensure that devices are used properly and safely. However,
Positive detent push buttons and keypads communicate to
user training is rarely an effective substitute for user-friendly,
users that their actions were sufficient. However, today there
intuitively obvious equipment design. Any medical device
are new technologies, such as proximity capacitive sensing,
that requires hours of instruction and a voluminous operator’s
that do not require positive detent push buttons. Users may
manual is not user-friendly. To continually promote training as a
lose the tactile response of pushing a button, but audio or
solution to the problem of medical error obscures larger system
visual (lights or LEDs) feedback can be programmed into the
issues. An over-emphasis on training also tends to insult the
system to return a satisfactory response. These interfaces
intelligence of the device user.
are also easier to clean and maintain, since users don’t have
direct contact with the circuits inside the device.
Machine
Poor medical device design and the lack of usability testing
Many of these human perceptual design elements, for example,
have been repeatedly discussed as being key factors in many
were incorporated into a (circa 1970’s) cardiac defibrillator panel
device-related incidents.[9] [10] [11] [12] While the FDA and many
shown in Figure 2.
medical device manufactures have made considerable progress
In particular, note the user-appropriate label “ECG SIZE”
(as opposed to the then-popular term “Gain”), the numeric
numbering of the positive detent, illuminated controls and the
effective use of a single background color that indicates that
all of the controls within this area are related even though there
is no label that specifically points this out. Additional effective
elements in this design include the use of redundant feedback
mechanisms associated with many of the controls. The power
on/off switch, for example, sends three different messages to
in addressing the importance of human factors in device design,
pre-market and pre-purchase usability studies continue to be
under-utilized. Consider, for example, the differences in the
front panel design of two infusion pumps shown in Figure 3. In
particular, note the conventional (and familiar) telephone keypad
layout in the pump on the right in contrast to the less familiar
layout pattern used with the pump on the left. Such subtle
differences can affect the speed and accuracy of data entry,
and the lack of standardization also invites user mistakes.
users to indicate that they did something correctly when turning
Human-machine interface
this device on. First, the “1” on the button says “press me first.”
The human-machine interface is perhaps the most dynamic and
Second, the crisp detent of the switch provides tactile and
complex element within the device/user environment. It is the
audible feedback that this was done correctly. Third, the switch
point of engagement between the human and the machine. As
illuminates, indicating that the device is indeed on.
the device is attempting to communicate with its user through
visual and audible displays, indicator lights, color-coded
Cardiac Defibrillator Panel
Traditional vs. Non-Traditional Keypad Layouts
Figure 2
Figure 3
freescale.com/beyondbits
Human Factors and the Control of Medical Device-Related Error 41
controls, icons, control panel design, function and labeling,
reduce the amount of end-user training time and will help
the user attempts to perceive, interpret and respond to these
clinicians be more productive. With devices intended for
stimuli in a timely and appropriate manner. In this regard, the
unsupervised patient use, such as home glucose monitors for
human-machine interface is effectively its own closed-loop
diabetics, ease-of-use can affect whether the patient will be
stimulus-response system. It is also here where much of what
able to use the device at all. Medical device manufacturers will
is conveniently but inappropriately labeled ”user error” occurs.
be well served by investing the necessary resources to improve
To blame the user, however, for device designs that allow, invite
usability. From a business standpoint, the potential payoffs from
or encourage the user to make inappropriate responses, while
this investment may include:
convenient, is often not warranted. It is also at this human-
• Faster time to market (by avoiding user interface problems
machine interface where users express much of their frustration,
which can be violent, damaging the device or even the user.
While this might result in a missed movie or broken DVD player
at home, the same conflict, when attempting to use an infusion
pump, ventilator or defibrillator, may result in compromised
patient care.
late in the development cycle)
• Simpler user manuals and related learning tools
• Improved marketing through credible claims about a
device’s usability and associated gains in user productivity
• Increased sales (attributable to enhanced user
interface quality)
Applicable codes and standards
• Reduced customer training and support requirements
After reviewing some of the factors that may affect the intended
• Extended market life
use of a device, it is important to mention that standards have
been defined, some of them being relatively new. They include
key features and strategies that suggest how to design better
• Clearer compliance with regulatory requirements
• Reduced exposure to liability claims
and more efficient medical devices in order to reduce or even
• Increased user satisfaction
eliminate mistakes. The U.S. Food and Drug Administration
designers to adopt appropriate sections from the following
IEC 62366:2007 Medical
devices—application of usability
engineering to medical devices
available standards.
This standard was developed to help manufacturers improve
ANSI/AAMI HE74:2001
Human factors design process
for medical devices
the usability and safety of medical devices. The standard
The AAMI Human Factors Engineering Committee developed
IEC 62366 describes a process that addresses medical device
(FDA) has increasingly recognized the value of human factors
in medical device design and encourages manufacturers and
this process-oriented standard to provide manufacturers with
a structured approach to user interface design, helping them
develop safe and usable medical devices. It also helps them
respond to the increasing number of national and international
human factors standards in the medical field and the
promulgation of new governmental regulations (based on ISO
9001) pertaining to medical device user interface design[13].
This standard includes an overview of the human factors
engineering (HFE) discipline, a discussion on the benefits of HFE,
a review of the HFE process and associated analysis and design
techniques and a discussion on implementation issues and
relevant national and international standards and regulations.
Improving usability
Medical device users (e.g., physicians, nurses, therapists,
technologists, patients and service personnel) regard usability
as one of the most important design considerations. They
understand that a highly usable medical device is likely to
freescale.com/beyondbits
recognizes that the use of all medical devices has associated
risks and provides an engineering process for identifying,
assessing and mitigating those risks.
use errors and divides those errors into categories to guide
their analysis. This process can be used to assess and mitigate
risks caused by the usability problems associated with the
normal and abnormal use of a medical device. As shown in
Figure 4, use errors can be first separated by whether there
were intended or unintended user actions or inactions
.
[14]
All unintended actions, as well as intended actions that are
categorized as either mistakes or correct use, are considered to
be part of normal, and thus foreseeable, use. The manufacturer
can only be responsible for normal use. Abnormal use errors are
outside the scope of manufacturer responsibility, and they need
to be controlled by the hospital.
If the designer complies with the usability engineering process
detailed in this standard, the residual risk associated with
device usability is presumed to be acceptable. Patient safety
will improve as future medical devices are designed to comply
with this standard.
Human Factors and the Control of Medical Device-Related Error 42
Use Error Analysis Diagram
Action
Unintended
Intended
Abnormal
Use
Correct
Use
Mistake
Lapse
Slip
Use Error
Figure 4
Conclusions
[6]
The safe and proper use of medical devices can be dramatically
improved when established human factors concepts are
“Ergonomics: How to Design for Ease and Efficiency,”
Kroemer, K, et al., 2nd ed, New Jersey. Prentice-Hall, 2001
[7]
www.jhu.edu/news/home05/nov05/noise.html. Accessed
November 4, 2008
integrated early and applied throughout the design process.
[8]
The incremental costs to do so are often negligible, but the
Joint Commission on Accreditation of Health Care
payback can be tremendous. Improved user satisfaction,
Organizations. Sentinel event statistics:
reduced use-related errors and a reduction in adverse patient
September 30, 2004. Available at: www.jcaho.org
Accessed December 31, 2004
outcomes are often the results. Freescale is helping make the
medical world a smarter and safer place with a new generation
[9]
of powerful, high-quality medical semiconductor products. With
its wide product portfolio and support ecosystem, Freescale
“Human Factors in the Health Care Facility,” Welch DL,
Biomed Instrum Technol. 1998, 32(3):311-6
[10] “Poor Interface Design and Lack of Usability Testing
can help developers find the perfect fit for their next medical
Facilitate Medical Error,” Fairbanks RJ, Caplan S, Joint
device product design. Simply put, a human factors approach
Commission Journal on Quality and Safety, 2004;
to medical product design plus advanced semiconductor
30(10):579-584
technology makes for better, intrinsically safer products—and a
safer health care environment.
[11] “Human Factors Engineering and Patient Safety,”
Gosbee J, Qual Saf Health Care. 2002; 11:3524
References
[12] “Design Paradigms: Case Histories of Error and Judgment
in Engineering,” Petroski, H, Cambridge University Press,
[1] Health Grades, Inc. “Patient Safety in American Hospitals,”
July 2004. Available at www.healthgrades.com/media/
english/pdf/HG_Patient_Safety_Study_Final.pdf. Accessed
1994
[13] ANSI/AAMI HE74:2001, “Human Factors Design Process
for Medical Devices” (Arlington, VA: AAMI, 2001)
December 31, 2004
[2]
[14] IEC 62366:2007, “Medical Devices—Medical Devices”
Institute of Medicine. “To Err is Human: Building a Safer
(Geneva: IEC, 2007)
Health System,” Washington DC: National Academy Press.
1999
[3]
“Aviation Industry Provides Roadmap to Improve
Patient Safety,” Hart CA, Biomedical Instrumentation &
Technology. 2004; 38(6):466-9
[4]
“Human Factors in Engineering and Design,” Sanders MS,
McCormick EJ, New York: McGraw-Hill, 7th ed., 1993
[5]
“Human Factors in Systems Engineering,” Chapanis, A.,
John Wiley
Larry Fennigkoh, Ph.D., professional engineer, is currently a professor with the biomedical engineering program at the Milwaukee
School of Engineering, Milwaukee, WI USA. Diego Haro, bachelor of science in electrical engineering, was formerly a system solutions
engineer at Freescale Semiconductor.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Human Factors and the Control of Medical Device-Related Error 43
44
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Rogelio Reyna and Kim Tuck with Dr. Daniel Copado
Beyond Accidental Falls
Human fall detection using accelerometry
Accidental falls are a widespread health hazard and a significant
When evaluating and treating the elderly as well as developing
cause of death for people above 65 years of age. Thirty percent
new systems to help protect them from accidental falls, some
of reported falls that require medical attention involve people
important axioms in gerontology (the study of the social,
65 years or older and 40 percent of the victims are above 80
biological and psychological aspects of aging) should be
years old. Over the age of 85, two-thirds of the falls are directly
considered.
linked to the victim’s death. In elder shelters and retirement
• The notion of functional reserve: This is a redundant function
homes, 66 percent of the residents report at least one fall each
present in virtually all physiological systems. A significant
year. However, many accidents are not reported, therefore the
amount of this function can be lost over time before clinical
frequency of falls is probably underestimated.[7]
symptoms appear.
However, by using Freescale’s MMA7260Q triaxial
• Aging is heterogeneous: The variability between physiological
elements increases with age, and there can be a wide
accelerometer, 56F8013 digital signal controller (DSC) and
discrepancy between chronological and biological age. For
MC13192 RF transceiver, a person’s fall can be detected and
this reason, it is difficult to examine the effect of age in some
reported for immediate response. This paper describes a
body systems.
reference design to recognize and analyze many human fall
situations once they have occurred. It also details the hardware
• The decline in total functionality: This approximately
equals the sum of the functional losses in the physiological
and software developed to implement such an approach.
system. When only one of the system’s components is
Introduction
lost, compensating mechanisms maintain functionality.
Health care services have estimated that two thirds of the falls
When multiple losses occur, any compensation is heavily
in the senior population could have been prevented. Identifying
compromised, resulting in lost functionality in the body
the risk factors, which are either intrinsic (host) or extrinsic
as a whole.
(environment), is an essential first step toward developing a
technologically advanced fall detection and reporting system.
• The consequences of deteriorated mobility and poor
balance: This can vary depending on the social, emotional
Intrinsic factors include such symptoms as vertigo, dizziness,
or behavioral environment. An effective network of social
weakness, confusion, impaired proprioception and other
support and a healthy sense of judgment can mitigate the
walking problems. Environmental factors can include slippery
effect of poor balance and reduce the chance of falling.
surfaces, uneven surfaces, deficient lighting and various
obstacles.
Fall prevention is very important, but when these events do
occur, prompt medical attention is required. Evaluating a fall
victim requires the combined multidisciplinary work of doctors,
therapists, psychologists and nurses. Their response time
can be greatly improved by integrating accelerometer-based
technology into the emergency network to provide prompt and
accurate reports of falls.
freescale.com/beyondbits
Beyond Accidental Falls 44
FIR Output with Energy Expenditure for Walking and Falling
1.5
40
Fall
35
1
30
Walking
g-m/s2
0.5
25
20
0
15
-0.5
10
-1
X
5
Y
0
Energy
Z
-1.5
00
01
02
03
04
05
06
07
08
Time-Seconds
Figure 1
The key is that the first fall is reported. Once the accelerometer
senses a fall, and the information is processed and transmitted
to the care givers, the whole support and evaluation system
can swing into gear to treat the patient, discover all the
physiological, psychological and environmental reasons for the
fall and follow up with preventative measures.
A psychologist or a social worker can gather information about
social and financial well-being, any symptoms of depression,
the current state of cognitive functions and other factors that
might increase the probability of a fall.
The physical therapist can gather information about any
Monitoring human motion
A human fall detection system can be viewed as a
subsystem of a human activity monitoring system. Several
studies ([1], [2], [3],
[4]
and others) have investigated systems that
monitor human activities, and different sensing technologies
have been evaluated, including the use of accelerometers to
measure human movement.
Freescale’s human fall detection reference design is based on
accelerometry, which has the following advantages:
• Accelerometers are small and can be easily attached to
the body.
physical deterioration of function that may indicate specific
• They can be easily interfaced with a portable processing unit.
disabilities that could contribute to a fall.
• They are low-power sensors.
The doctor’s role is vital in this evaluation. He or she can
The accelerometer is only a sensor and therefore is only an
determine the clinical history of the patient and recommend
using an accelerometer-based fall monitoring system to track
falling conditions. This can help the doctor adjust treatment as
necessary. The clinical history may include:
• Drugs currently prescribed for use by the patient (hypnotics,
input into a monitoring system. The real value in the system is
the analysis from the sensor inputs that is used as a monitor of
the human activity. This requires processing the accelerometer’s
input, computing the human state and communicating to a
network to report the current state or an alarm condition.
sedatives, antidepressants, tranquilizers, antihypersensitives
and others)
• Medical situations that could contribute to patient instability
(neurological damage, cardiovascular conditions, blindness,
history of ear damage, etc.)
• Illnesses that manifest in balance disorders or metabolic
conditions that increase patient instability (important
information for estimating the probability of another fall)
freescale.com/beyondbits
Beyond Accidental Falls 45
Algorithm
3.Creating a model and validating the algorithm
a.Created the model of the selected algorithm using Matlab®
After reviewing different approaches to the human fall detection
and the digital signal processing toolbox.
problem, the methodology selected for the human activity
b.Used the created model, with the log files as input, to
monitor is defined in the paper, “Determining Activity Using a
Triaxial Accelerometer”.[1] Its adoption into the reference design
simulate the output of the algorithm. This was performed
is briefly described below:
only for a couple of sequences (the objective was to
• The Freescale MMA7260Q triaxial accelerometer is measured
classify a human fall, not a complete set of human
activities).
at 45 Hz.
c.Performed minor modifications to the algorithm, such as
• An order 13 median filter is applied to the accelerometer
determining the order of the FIR filter to better suit the
samples to remove the noise spikes.
application (to fit the 0.8 second window).
• A high pass FIR filter with a cut-off frequency of 0.25 Hz over
d.Used the data to create the classes (thresholds) of the
a non-overlapping window of 0.8 seconds (36 samples) is
energy expenditure values for standing, walking and falling.
used to remove the gravity component in order to stay with
e.Used part of the data to test the thresholds.
the dynamic acceleration data. This is required for computing
the next stage.
4.Implementing the model in the DSC
• There is an energy expenditure computation stage on each
a.Once the algorithm was tuned and working, the floating
window. Figure 1 plots the data on the signals out of the FIR
point data types were changed to fixed point to make it
filter and the energy expenditure. As found in “Determining
suitable for the DSC.
Activity Using a Triaxial Accelerometer,” a non-overlapping
b.The software architecture was defined and implemented in
window of 0.8 seconds is good enough for determining
the DSC through a serial interface.
human activity using a device attached to the waist.
c.Used the serial interface to load the log files data and
• The energy expenditure computation over each window is
then compared with specific thresholds for determining the
human activity, such as stand, walk and fall. This is done by
validated the algorithms running in the 56F8013 DSC.
5.Implementing the remaining requirements
a.Wireless communication, flash driver and serial
comparing the energy expenditure level of each activity with
a set of thresholds determined by experimentation. The
system recognizes a fall because the impact of the human
communication modules were implemented.
6.Validating the reference design
a.After being developed, the reference design was evaluated
body creates the highest energy expenditure threshold value
using a small group of people.
in the system. Please refer to the Conclusion section of this
article for recommended work to increase the reliability
of the system.
Development process
1.Setup and experimentation
System requirements
In order to make it suitable for its intended use, a human fall
detection device should meet the following requirements:
• It is small and inconspicuous and can be easily attached to
the person.
a.The experimentation setup consisted of a board with an
IEEE® 802.15.4 transceiver and accelerometers, another
• It is battery powered.
802.15.4-enabled board connected to a laptop through an
• It senses a person’s fall by detecting the impact then reports
RS232 connection and a comfortable cushion (allowing
the fall after it has occurred to a base station, where it is
the test subjects to fall without injury). These were used to
stored in nonvolatile memory.
gather the source information for evaluating the algorithms
• The device can receive and execute commands from the
used offline.
base station to control the nonvolatile memory.
b.Ten men were asked to execute 21 sequences, three times
each. These included: walking then falling, jogging, running,
walking upstairs and walking downstairs.
2.Documentary research and determining the algorithm
a.Looked for papers on the Web, specifically on IEEE.org.
b.Reviewed papers and selected the algorithm suggested
in “Determining Activity Using a Triaxial Accelerometer.” It
was selected because it uses a triaxial accelerometer and
the details on the algorithm are provided with good results.
freescale.com/beyondbits
Beyond Accidental Falls 46
Human Fall Detection Reference Design Block Diagram
9V Battery
Volt Reg.
Antenna
Serial Communications
Interface (RS232)
MC13192
Transceiver
DSC
56F8013
2 LEDs, 1 Buzzer,
2 Pushbuttons
Matching
Network
JTAG
Interface
Filter
G Select
MMA7260Q
Accelerometer
Figure 2
Software Tasks
Foreground
Initial
IDLE
Timer Interrupt
Data Processing
Human State
Timerlsr
Background
ADC Interrupt
Median Filter
ADClsr
Figure 3
Hardware description
The triaxial accelerometer provides three analog signals
corresponding to the sensed acceleration in each axis.
G selection is controlled directly by the DSC and is used
to determine the sensitivity of the device (+/-1.5g was
selected). The power-save pin is connected to Vdd to allow the
The 56F8013 DSC controls the behavior of the accelerometer
(MMA7260Q), the user controls and indicators, the I2C
memory and the RF transceiver (MC13192). It processes the
accelerometer outputs to generate information about the
human subject’s state and determines whether he or she has
fallen or not.
accelerometer to be on constantly. In the current approach,
The RF transceiver allows the system to wirelessly report an
there is no need to change the sensitivity range of the
event or emergency to a base station. It is also the way to
accelerometer; however, future implementations may require
access the data on the I2C memory. The size of the memory
changes in order to provide the system with more information
depends on how many events you are willing to store. A 32 KB
on a specific human body movement.
memory was used in this design. The protocol used to transmit
the data is a modified version of SMAC4.1, which is available at
www.freescale.com.
freescale.com/beyondbits
Beyond Accidental Falls 47
Software description
Conclusion
The software is divided into two main tasks—a background task
Freescale is well-positioned to enable this application with
and a foreground task.
its current portfolio of low-power 8-bit and 32-bit
microcontrollers, DSCs, low-power accelerometers and
The background task processes the accelerometer signals
802.15.4 transceivers.
to detect the human state. The foreground task responds to
hardware events, such as interrupts generated by IRQs, the
This human fall detection device is only part of a complete
analog-to-digital converter (ADC) and communication modules
system that could allow prompt response in the event of an
(UART and Simple MAC).
accident. Other parts of the system would include a device that
With the ADC sampling at 45 Hz, the algorithm used to detect a
fall relies on digital signal processing in the following stages:
could wirelessly receive the fall event and issue an accident
report to a telemonitoring central station. This station could, in
turn, attach the actual conditions of the person (as outlined in
• 13th order median filter applied to the ADC samples to
this article’s introduction) to the fall information received and
remove the very high frequency noise.
alert medical or emergency services as well as call or page
• 30th order high pass filter with a cut-off frequency of 0.25 Hz
to remove the gravity component.
family members to alert them of the accident.
References
• Energy expenditure computation stage that compares with
[1] “Determining Activity Using a Triaxial Accelerometer,”
specific thresholds for determining the human activity, such
M. J. Mathie, N. H. Lovell, A. C. F. Coster, B. G. Celler,
as stand, walk and fall.
Second Joint EMBS/BMES Conference, 2002
Results
[2] “A Triaxial Accelerometer and Portable Data Processing Unit
The initial scope of this project was to generate a simple
for the Assessment of Daily Physical Activity,” C.V.C Bouten,
reference design that Freescale customers can use for
K.T.M. Koekkoek, M. Verduin, R. Kodde, J.D. Janssen, IEEE
developing their own products. Given this, and regardless of
the multiple data points that can be gathered, only three human
activities were characterized—standing, walking and falling.
Transaction on Biomedical Engineering, 1997
[3] “Detection of Static and Dynamic Activities Using Uniaxial
Accelerometers,” P. H. Veltink, H.B.J Bussmann, W. de
Given this scope, no further evaluation of the generated
Vries, W.L.J. Martens, IEEE Transaction on Rehabilitation
solution was performed. You should be able to reproduce this
Engineering, 1996
reference design by reading “Human Fall Detection Using a
[4] “Activity Monitoring with Accelerometry,” H.B.J. Bussmann,
3-axis Accelerometer,” downloadable from www.freescale.com
(search for document number MMA7260QHFDRM)[6].
P.H. Veltink, W.L.J. Martens, H.J. Stam, 1994
[5] “Exploring the Information Content and Some Applications
of Body Mounted Piezo-Resistive Accelerometers,” W.L.J.
To further improve system reliability and flexibility, an historic
Martens, Symposium supplement, “Dynamic Analysis
windows analysis could be performed to detect a fall or even
Using Body-Fixed Sensors” of the 2nd World Congress of
prevent some of them.
Biomechanics, 1994
Energy expenditure values together with gravity information
[6] “Human Fall Detection Reference Design”
(for detecting a free fall condition and tilt) will generate a more
www.freescale.com/files/sensors/doc/ref_manual/
reliable system response.
MMA7260QHFDRM.pdf?fsrch=1
[7] CDC (Centers for Disease Control and Prevention)
www.cdc.gov/NCIPC/FACTSHEETS/ADULTFALLS.HTM
Rogelio Reyna is a software engineer working with the Sensors and Actuators Solution Division at Freescale Semiconductor. Kimberly
Tuck has her degree in systems design engineering from the University of Waterloo. She has MEMS design experience and worked
as a MEMS applications engineer for five years in a research environment designing tools for various micro assembly projects. For
the past two years she has been working in the consumer and industrial sensors segment as an applications engineer focused on
accelerometers for Freescale. Dr. Copado is a four-year resident of Traumatology and Orthopedic Surgery at the Mexican Institute of
Health Hospital with an expertise in hip replacement.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Beyond Accidental Falls 48
49
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Jaime Herrero with Dr. José Fernández Villaseñor
Changing the High-Complexity Paradigm
Simplifying health and safety solution designs
Introduction
Duration of Hyper, Hypo and Normoglycemic State During
Continuous Glucose Monitoring System (CGMS in 17
Children and Adolescents with Type 1 diabetes)
People worry about their health and safety, and today they ask
for compact, portable, easy to use and attractively designed
Duration of Glycemic State
during CGMS 72h
personal equipment that accomplishes specific safety and
health objectives.
Minutes
Percent
(<70 mg/dl)
224
4.7 ± 3.39
This article focuses on using Microsoft .NET Micro Framework
Hypoglycemia
for designing home medical appliances and provides tips on
Normoglycemia
(70–180 mg/dl)
1650
38.0 ± 27.9
how to give the end product the look and feel that customers
Hyperglycemia
(>180 mg/dl)
2446
57.3 ± 29.4
®
demand. This can be accomplished by designing attractive
graphic interfaces, integrating connectivity through various
communication interfaces (UART, I2C, SPI, Ethernet, USB, Wi-Fi)
and enabling the performance of the i.MX microprocessor. The
result can be a high-end monitoring solution, such as blood
glucose meters, or any number of other health and safety
devices designed to satisfy specific customer needs. These
appliances are differentiated by price, functionality, ease of use
and look and feel.
Table 2
Source: Taken from “Efficacy of continuous glucose monitoring system to detect
unrecognized hypoglycemia in children and adolescents with type 1 diabetes,”
Frederico F.R. Maia and Levimar R. Araújo
Personal medical appliances can also be used for general
wellness and fitness applications as well as for chronic
degenerative diseases. Integrating advanced software and
hardware components into highly functional and intelligent
designs is critical to successfully create the future health and
safety applications that will be used by millions of people.
When chronic degenerative diseases, such as diabetes,
This article describes an easy way to develop small and cost-
strike young people, clinicians face a greater challenge
effective solutions through .NET Micro Framework and the i.MX
getting patients to cooperate with the data acquisition (illness
microprocessor family.
monitoring) required to gain better control of the disease.
hyperglycemia in glucose continuous monitoring systems,
i.MX applications processor
and .NET Micro Framework
which can result in the loss of glycemic control over longer
Freescale’s i.MX family of applications processors is based
periods of time (see Table 1). However, integrating multimedia
on ARM® core technology and is optimized for multimedia
functionality with the monitoring system may encourage
applications. .NET Micro Framework can be ported to these
patients to make better use of the instrument, including
processors to enable them with the features that come with
responding to any alarms.
the software.
For instance, diabetic teenagers tend to turn off alarms for
Glycemic Control Targets from the ADA, ACCE and IDF
HgA1c
Fasting/
preprandial
2-hour
postprandial
.NET Micro Framework is the most compact .NET Framework
ADA
ACCE
IDF
<7.0
≤6.5
≤6.5
90–130 mg/dL
<110 mg/L
<100 mg/dL
is optimized for embedded devices, offering full use of the
5.0–7.2 mmo1/L
<6.1 mmo1/L
<5.6 mmo1/L
most common tasks associated with embedded development
<180 mg/dL
<140 mg/dL
<135 mg/dL
without the overhead of unnecessary tasks featured in the
<10.00 mmo1/L
<7.8 mmo1/dL
<7.5 mmo1/L
complete .NET Framework. It enables developers to use
Table 1
offered by Microsoft and is configurable for the smallest
memory footprint (64 KB RAM, 256 KB flash). This framework
the communication ports (Ethernet, Wi-Fi, USB, serial, SPI,
I2C), LCDs (drawing directly in the canvas or through visual
freescale.com/beyondbits
Changing the High-Complexity Paradigm 49
components), touch screens and storage (flash, RAM, SD/
1. As input pin
MMC). Due to its architecture, .NET Micro Framework is
InputPort inputPin = new InputPort(Pins.GPIO_
PORT_C_5, true, Port.ResistorMode.PullUp);
if (inputPin.Read()) runInputAction();
limited to running just one application, but it allows multiple
tasking. The .NET Framework libraries have the most common
objects and functionality, and their use requires a license
2. As interrupt pin
from Microsoft.
• ARM920T™ core, operating at 100 MHz
InterruptPort interruptPin = new
InterruptPort(Pins.GPIO_PORT_C_6, true, Port.
ResistorMode.PullUp, Port.InterruptMode.
InterruptEdgeHigh);
interruptPin.OnInterrupt += new GPIOInterruptEvent
Handler(inputPinInterrupt_onInterrupt);
• Color LCD controller
3. As output pin
• Direct memory access controller (DMAC)
OutputPort outputPin = new OutputPort(Pins.GPIO_
PORT_C_7, true);
outputPin.Write(true);
Freescale offers the i.MXS applications processor for use with
.NET Micro Framework. The processor features include:
• External interface module (EIM)
• SDRAM controller (SDRAMC)
• A variety of connectivity peripherals (SPI, USB and UARTs)
• Power-saving modes to provide exceptional performance
while lowering the overall power budget and system cost
The .NET Micro Framework port lets the users develop
embedded applications using Microsoft Visual C#. This takes
advantage of the high-end programmers’ skills and enables
them to develop embedded applications.
The toolset required to develop i.MXS embedded applications
for health and safety using .NET Micro Framework includes:
• Microsoft Visual Studio 2008
• Microsoft Visual C#
• .NET Micro Framework
• USB cable
• i.MXS development board
For more information on .NET Micro Framework, visit
www.microsoft.com/netmf.
Design tips and considerations
Following are design tips and considerations that can be
applied when designing graphical user interfaces (GUIs) and
data monitoring functionality. Developers with C# programming
skills are able to configure the hardware for the special needs of
the health and safety embedded applications.
General purpose input output (GPIO)
The configuration of threads is as follows:
Thread t1 = new Thread(new ThreadStart(thread1));
t1.Priority = ThreadPriority.Highest;
t1.Start();
Storing data in memory
Storing data in flash is another common task in embedded
development. Metrics are stored in several different kinds
of medical devices, such as blood pressure monitors and
blood glucose meters. To store data in flash using .NET Micro
Framework, follow these steps:
1. Create a serializable class
[Serializable]
public class Device
{
private String name;
private byte value;
public String Name
{
set { name = value; }
get { return name; }
}
public byte Value
{
set { value = value; }
get { return value; }
}
public Device(byte Value, String Name)
{
value = Value; name = Name;
}
}
Almost all health and safety assets use GPIOs to configure
LEDs (to show any special device status), special keys (reset,
test mode, calibration) and signalizing (additional interrupts to
detect an accurate sensor read). .NET Micro Framework allows
GPIOs to be configured by the following three ways, depending
on the application needs:
freescale.com/beyondbits
Changing the High-Complexity Paradigm 50
2. Create a serializable log of the class
User interface elements available in
.NET Micro Framework
[Serializable]
class DeviceLog
{
private ArrayList log = new ArrayList();
public ArrayList Log
{
get { return log; }
}
public void AddToLog(Device device)
{
log.Insert(0, device);
}
public void RemoveFromLog(Device device)
{
log.Remove(device);
}
public void ClearLog()
{
log.Clear();
}
User Interface Element
Description
Canvas
Defines an area or canvas within
which you can explicitly position child
elements by using coordinates that are
relative to the upper left corner of the
canvas
Image
Displays a bitmap image
ListBox
Implements a list of selectable items
ListBoxItem
Implements a selectable item inside a
ListBox object
Panel
Constitutes a base class for all panel
elements
StackPanel
Arranges child elements (child objects)
in a single line that can be oriented
either horizontally or vertically
Text
Displays a block of text
}
TextFlow
Provides members that control how text
flows on the display device (screen)
3. Create and use a flash reference
TextRun
Provides members you can use to
create and work with a text run, which is
a string of characters that share a single
property set
Shape
Represents a line or a two-dimensional
shape displayed on a hardware display
device. The implemented shape objects
are: ellipse, line, polygon and rectangle.
ExtendedWeakReference flashReference;
uint id = 0;
public Object load()
{
flashReference = ExtendedWeakReference.
RecoverOrCreate(
typeof(Program),
marker class
id,
// id number in the marker class
ExtendedWeakReference.c_
SurvivePowerdown);// flags
flashReference.Priority = (Int32)
ExtendedWeakReference.PriorityLevel.Important;
Object data = flashReference.Target; //
recovering data
return data;
}
public void save(Object data)
{
flashReference.Target = data;
}
//
GUIs
.NET Micro Framework also helps the programmer develop
attractive screen interfaces, which can be major purchasing
Table 3
In a similar way, all the elements in the table above are
programmed as follows:
// Create a panel
StackPanel _panel = new StackPanel();
_panel.Height = _mainWindow.ActualHeight;
_panel.Width= _mainWindow.ActualWidth;
// Create and configure user interface elements
Text textTitle = new Text();
textTitle.Font = Resources.GetFont(Resources.
FontResources.small);
textTitle.TextContent = “Title Text”;
textTitle.HorizontalAlignment = Microsoft.SPOT.
Presentation.HorizontalAlignment.Center;
textTitle.ForeColor = (Microsoft.SPOT.Presentation.
Media.Color)0xFF0000;
// Add the user interface elements to the panel
_panel.Children.Add(textTitle);
differentiators for end customers and can influence the
The code above starts creating the panel object, then its
developer’s choice of silicon vendors.
dimensions are specified, the text object is created and its font,
.NET Micro Framework running on the i.MXS processor offers
two ways for the developer to configure the user interfaces.
text, alignment and color properties are defined. Finally, the text
object is added to the panel’s children stack.
One is to use the user interface elements offered by .NET Micro
Once the user interface element has been added to the display
Framework while the other is to use the bitmap class and flush
panel, the only way to update the element’s content is through
its contents in the screen.
an asynchronous update, as illustrated by the following code:
freescale.com/beyondbits
delegate void UpdateTitleTextDelegate(String hint);
private void UpdateTitleText(String text)
{
if (textTitle != null) textTitle.TextContent =
text;
}
Changing the High-Complexity Paradigm 51
Graphical charts provide a way to verify historic data and
// When the update of the textTitle is required,
use the following code
_mainWindow.Dispatcher.Invoke(
new TimeSpan(0, 0, 1),
new UpdateTitleTextDelegate(UpdateTitleText),
new object[] { “New Title Text” });
When the bitmap class is used and flushed in the screen, the
item’s location and the screen rendering is not automatic. The
developer has to create code to perform location and rendering
through functions, state variables, timers and threads. Following
is a simple example of this process:
Bitmap _back = new Bitmap(240, 320); // bitmap
used for flush
Bitmap _screen = new Bitmap(240, 320); // based
bitmap to be updated
Font font = Resources.GetFont(Resources.
FontResources.small);
_back.DrawImage(35, 10, Resources.
GetBitmap(Resources.BitmapResources.freescale), 0,
0, 170, 57);
_back.DrawRectangle(Color.White, 1, 35, 10, 170,
57, 2, 2, Color.White, 0, 0, Color.White, 240,
320, 0);
_screen.DrawImage(0, 0, _back, 0, 0, 240, 320);
_screen.DrawTextInRect(“State: Background”, 10,
300, 220, 20, Bitmap.DT_AlignmentCenter |
Bitmap.DT_TrimmingCharacterEllipsis,
(Color)0xFFFFFF, font);
_screen.Flush();
Complex GUI with Interface Elements and Canvas
perform analysis on this data. Personal health and safety
devices commonly use graphics, such as bar charts and point
charts, to display, in one format, several variables that are
being measured. Two solutions for graphics handling are
proposed below.
First, using the user interface element named Image, the
developer can manipulate the information displayed, at pixel
level, through the property bitmap.
Manipulating pixels in the image can be done through the
following bitmap class methods
Method
Description from the Visual Studio .NET
MF help
Clear
Clears the entire drawing surface
DrawEllipse
Draws a filled ellipse on the display
device
DrawImage
Draws a rectangular block of pixels on
the display device
DrawLine
Draws a line on the display device
DrawRectangle
Draws a rectangle on the display device
DrawText
Draws text on the display device
DrawTextInRect
Draws text in a specified rectangle
SetPixel
Turns a specified pixel on or off
Table 4
Second, using the user interface element named Canvas, the
developer can manipulate the location and the user interface
elements to display in a specific area, as illustrated in the
Patient Name: Anailu Herrero
Doctor Name: Jose Perez
Sys(mmHg)
120
Dia(mmHg)
82
Pulse/min
70
BPM
GM
HRM
Pulse Oximetry
Weight
Temperature
Download Data
Configuration
240
240
220
220
200
200
180
180
160
160
140
140
120
120
100
100
80
80
60
60
40
0
10 20 30 40 50 60 70 80
STATUS: ANALYZING DATA
40
following example code:
Canvas _canvas = new Canvas();
_canvas.Height = SystemMetrics.ScreenHeight;
_canvas.Width = SystemMetrics.ScreenWidth;
Shape shape = new Rectangle();
// Getting random numbers for width and height,
fixing the max number to the canvas size
shape.Width = Math.Random(_canvas.Width);
shape.Height = Math.Random(_canvas.Height);
shape.Stroke = new Pen(color);
shape.Fill = new SolidColorBrush(color);
// Setting the location in the canvas for the
element, these functions are static
Canvas.SetTop(shape, Math.Random(_canvas.Height shape.Height));
Canvas.SetLeft(shape, Math.Random(_canvas.Width shape.Width));
// Adding the shape to the canvas
_canvas.Children.Add(shape);
In the above code snippet, we are creating a new canvas
object and defining its height and width. A rectangular-shaped
object is created and the types of stroke, fill color and texture
are defined. Finally, the location of the rectangular shape in the
canvas is specified, and the rectangular shape is added to the
canvas. Creating figures has never been easier, and all this is
allowed by the .NET Micro Framework user interface elements,
which are supported in the i.MXS microprocessor.
Figure 1
freescale.com/beyondbits
Changing the High-Complexity Paradigm 52
System Block Diagram
BPM/GM/HRM
Bluetooth®
UART
USB
Reset
LCD
i.MXS
GPIO/
UART/
SPI
Bank of
Memories
Sensors and Signal Processing
Figure 2
Conclusion
Communications interfaces
Serial communications is a major component in all health and
The i.MXS processor and .NET Micro Framework are optimized
safety applications that transfers data from the device to a PC
for such applications as clocks, watches, remote controls,
for analysis by the physician or patient.
blood glucose meters, cholesterol meters and others. Using
Using such interfaces as UART, SPI, I2C, USB, Ethernet
the i.MXS processor and .NET Micro Framework, the developer
and Wi-Fi are common ways to feed data to a PC. In the
doesn’t need to be a microprocessor expert to quickly design
following example, the lines of code enable a UART-based
a visually attractive user interface. High level C# enables a
communication:
high-end programmer to program code in a manner similar to
SerialPort serialPort;
// The configuration is through the SerialPort.
Configuration class
SerialPort.Configuration serialConfig = new
SerialPort.Configuration(SerialPort.Serial.COM1,
SerialPort.BaudRate.Baud115200, false);
serialPort = new SerialPort(serialConfig);
// The read is through the Read function that
returns the number of bytes read
numberOfBytesRead = serialPort.Read(strBuffer, 0,
READ_NUMOFCHARS, READ_TIMEOUT);
// The write is through the Write function
serialPort.Write(strBuffer, 0, strBuffer.Length);
programming a personal computer.
In summary, Microsoft and Freescale enable designers to
develop attractive applications (a good look and feel adds value
for the end user) that reach the market faster. Most importantly,
continuous monitoring of an illness or condition can be made
less painful and intrusive and can help improve the response to
medical treatment.
Unfortunately, the serial port doesn’t use interrupts to alert the
application that a byte has been received or when the UART
is ready to send a byte. The common way to check for a
received byte is to monitor the return value of the Read method.
Nevertheless, .NET Micro Framework lets developers work with
threads and events and allows them to create a more complete
class with an infinite loop into a thread that checks for a byte
received.
Figure 2 is an example of a health care system block diagram
powered by an i.MXS applications processor.
Jaime Herrero is a systems and applications engineer in the Multimedia Application Division at Freescale Semiconductor. He has been
in charge of developing embedded applications over .Net Micro Framework and Sideshow for i.MXS. Dr. José Fernández Villaseñor is
a medical doctor and electrical engineer who combines his work at Freescale Semiconductor as a medical product marketer and his
work as a hospital physician. He has more than eight years of experience working on automotive, industrial and medical engineering
systems and applications as well as semiconductor product development.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Changing the High-Complexity Paradigm 53
54
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Rodolfo Gonzalez
Reducing DICOM
Moving the standard to portable devices
In the last couple of decades not only has the use of digital
medical imaging grown very rapidly, but the ability to share this
information, in seconds, across the globe has maximized the
usefulness of each image. Digital imaging and communication in
medicine (DICOM) specifies a standard method for transmitting
medical images and all the information related to them.
DICOM, a bird’s eye view
The DICOM standard is a major evolution of its predecessor,
ARC NEMA (American College of Radiology, National Electrical
Manufacturer Association). DICOM applies to a TCP/IP
networked environment from either online or off-line standard
media, such as CD-R or external memory devices. One of the
DICOM is the most common format used in picture archiving
biggest differences between DICOM and ARC NEMA is that it
and communication systems (PACS), which is a medical
has been structured as a multi-part document, which allows
network dedicated to the storage, retrieval, distribution and
new features to be added rapidly.
presentation of images. PACS is also helping hospitals move
into what they call filmless storage and presentation. This way
millions of films in yellow envelopes can be replaced with a
1- to 10-terabyte digital storage server. Figure 1 illustrates the
main components of PACS.
DICOM files are composed of the header and the images. The
header can include such information as personal patient data,
type of study, equipment used, image dimensions, diagnostics,
graphics, waveforms and reports, just to mention a few. What’s
more, each file can contain hundreds of images.
All the information is concentrated on the server in the middle
Typical DICOM File
of the diagram. Acquired images from the different modalities
are stored in the server, available at any time to be consulted
by physicians and staff through the workstations inside the
network. Also, the information can be published to a website
so it can be viewed in clinics or hospitals around the world. All
these transactions are done through DICOM.
PACS
#4
-2)
#2
4ECHNOLOGISTSô
7ORKô3TATIONS
.-
5LTRASOUND
0!#3
$IAGNOSTICô
7ORKô3TATIONS
Figure 1
freescale.com/beyondbits
Figure 2
Reducing DICOM 54
Figure 2 shows a typical DICOM file. In this example, the first
bytes are used by the header, which describes the tomography
image dimensions. The size of the header can vary, depending
on how much detail is included in the stored information. In
this case it shows two images formed by a matrix of 201 x 134
voxels (a voxel is a volume element used to represent a value
in three-dimensional space, just as a pixel represents a value in
two dimensions). Images and data are stored in the same file.
DICOM for portable devices
The medical market is demanding portable devices with
DICOM services. This may require developing portable media
players capable of accessing and downloading image data to
be analyzed by specialists to determine a diagnosis. Currently,
some radiologists are using commercial PDAs with DICOM
viewer software to take an overview of the data. However,
lower display resolution, reduced image processing capabilities
The DICOM standard was created and is maintained by a
and other limitations prevent radiologists from generating a
committee of more than 20 health care vendors, 15 medical
diagnosis using such devices.
users and other medical stakeholders (see medical.nema.org/
members.pdf). DICOM is now the standard used by most of the
companies within the health care industry.
Since DICOM incorporates the images in a JPEG lossless
format, a basic JPEG viewer could be used to display the
image, but the user needs to be very careful about the
One of the goals the standard is trying to achieve is to facilitate
resolution, gray scale, luminance, dark room contrast and other
the interoperability of different kinds of medical devices, such
factors before generating a diagnosis. Studies have shown that
as those for radiology and cardiology. In other words, one of
five megapixels (MP) is sufficient for most of the radiographic
the goals for DICOM is to allow health care personnel to share
studies, but for mammography more than ten MP is desired
images from different modalities from different vendors on the
to generate a diagnosis (see www.ieeexplore.ieee.org/stamp/
same network. In addition, the plan is to allow other image
stamp.jsp?arnumber=00673974).
and non-image medical apparatuses to be interconnected.
This last capability has not been fully explored. Thus far, most
of the equipment with DICOM capabilities in the market is
non-portable radiological instruments, such as those used
for magnetic resonance imaging, computed tomography,
Two different kinds of displays are used in the medical arena.
A commercial display is used to show the images for reference
only. For making diagnoses, specialized medical displays with
the features outlined in Table 1 are required.
fluoroscopy, mammography, ultrasound and others. These
Primary Features Needed for Medical Displays
instruments are based on very powerful workstations with
Emission
Monochrome
high-speed processors, large amounts of memory and storage
Maximum luminance
>400 fl
capabilities and medical algorithms for image analysis. The
Addressable pixel matrix
4000 x 5000,
minimal requires 2000 x 2500
continue to evolve, however the medical industry is rapidly
MTF at nyquist frequency
0.70
incorporating more portable devices.
MFT uniformity
±0.05
effectiveness of using DICOM with these large instruments will
Large-area luminance uniformity
<±0.1 dB
Intra-scene dynamic range
>500:1
Noise power spectrum
White
Total S/N per pixel
>100:1
but transmitting the information to the care givers can be
Large-area distortion
<±1%
problematic. In the health care arena, hours, minutes or even
Refresh rate
Static or >72 Hz
seconds count, meaning the faster the specialist receives the
Internal grey scale
Perceptionally linear
information the better the medical response. Reducing this
Time to rewrite screen
<1 sec.
time could be the difference between life and death. Therefore,
Table 1
Portable home versions of such products as ultrasound units,
blood pressure monitors, heartrate monitors and others are
becoming part of the new generation of health care devices.
These provide valuable health data to the patient at home,
it is time for DICOM to move forward into portable image and
non-image medical devices and make them a compatible part
of the big network. Currently, it is very easy to receive Internet
access at home or through a GPRS cellular service. This ease of
access needs to be exploited to share the information gathered
with all these portable medical devices.
At present, medical display prices are out of reach for most
of the small to medium sized hospitals or for independent
radiologists. This situation obliges the users to acquire
commercial monitors or LCDs that do not have all the features
required for good diagnostics.
There are also those markets requesting radiology equipment
upgrades. Hospitals in developing countries, for instance,
need to move forward into a DICOM environment but cannot
afford to replace all the medical equipment they already
have. For example, more than 50 percent of the hospitals in
freescale.com/beyondbits
Reducing DICOM 55
Latin America have invested in relatively new equipment that
Hardware/Software DICOM Converter
is non-DICOM compliant, but it cannot be discarded. In some
cases, the equipment can be upgraded into a DICOM system,
Hardware/Software
DICOM Converter
but often this cannot be done. In such cases a HW/SW interface
is required to take the source image, convert it into a JPEG
format and compress the file. If the hospital has a radiology
Digitization
Analog
information system (RIS), the interface will request all the
Signal
patient information attached to the image in order to generate
5LTRASOUND
a complete DICOM file. In this way, non-DICOM equipment can
JPEG
Generation
be interconnected to a DICOM network at 20 percent of the
cost of a new DICOM-compliant instrument.
Digital
Signal
-2)
Figure 3 illustrates the general principle of the HW/SW
File Acquisition
and Conversion
DICOM converter.
Converters already in the market are interfaces that need to
be permanently installed to provide service to one modality.
DICOM
Client
File
Generation
The challenge is to design a low-cost converter capable of
providing service to more than one piece of equipment at a time
by sharing the interface. It must also be capable of connecting
DICOM
both new portable devices and legacy portable equipment into
Network
the DICOM network.
Figure 4 illustrates a portable ultrasound unit based on a
Patient
Data
Freescale ColdFire® MCF520x microprocessor.
Most of the specialized equipment used at hospitals is
RIS
compatible with the DICOM standard. Now is the time to
convert portable and home health care devices to the same
standard, either through newly designed equipment or HW/SW
Figure 3
converters that can connect older devices to the network.
DICOM-Compliant Portable Ultrasound Unit
Transducer
Main Board
MCF520x
Signal
Conditioning
ADC
DMAC
USB
Pulse
Generator
Power
Management
Timer
Processing
GPIO
I2C
i.MX21S
LCD Wi-Fi
MCU
Peripherals
Analog
Keypad
DICOM
Network
Sensors
Figure 4
Rodolfo Gonzalez joined Freescale in 2006 as a hardware design engineer. Previously, while at the National Institute of Astrophysics
Optic and Electronic, INAOE, he designed DICOM interfaces for radiology equipment as well as a data acquisition device for an
electronic navigation system. In addition, Gonzalez developed several projects for the Mexican Army.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Reducing DICOM 56
57
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Leonardo Mangiapelo
Implementing an Electrogoniometer
Using Freescale’s low g accelerometers
Introduction
Rehabilitation engineering is the systematic application of
engineering sciences to design, develop, adapt, test, evaluate,
apply and distribute technological solutions to problems
confronted by individuals with disabilities. Determining
precise joint angles is extremely important to rehabilitation
and biomedical engineers as well as physiotherapists and
Potentiometers: A potentiometric element is attached to a
joint’s rotation point. The potentiometer’s electrical resistance
can be used to determine the angle between the joints. These
types of electrogoniometers are somewhat bulky and restrict
patient movement. The instrument’s precision can also be
compromised due to its inability to follow any changes in the
joint’s axis of rotation.
Flexible Electrogoniometer
ergonomics specialists. The angle data is essential for
identifying abnormal patterns and characterizing impairments,
disabilities and handicaps. Disabled patients, such as those
suffering from hemiplegia (half the body is paralyzed) or
hemiparesis (half the body is weakened but not paralyzed),
may experience limited speed and amplitude in some body
movements. For such cases, an electrogoniometer is a
useful tool for measuring joint angles, such as those for
elbows or knees, to determine the extent of the disability.
The electrogoniometer is an electronic device that uses angle
sensors, such as potentiometers, strain gauges and, more
recently, accelerometers to record such measurements.
Commonly-used technology
The most common electrogoniometers employ one of the
Figure 2
following three sensor schemes:
Potentiometric Electrogoniometer
Strain gauges: Also known as flexible electrogoniometers, a
strain gauge is a flexible spring with plastic end blocks on each
end. The strain gauge mechanism is housed inside the spring,
which changes its electrical resistance proportionally to the
change in angle between the plastic end blocks’ longitudinal
axes. Strain gauges are lightweight, portable, easily applied,
do not restrict movements nor interfere in patient activities and
adapt well to different body segments. These are currently the
most popular electrogoniometers.
Figure 1
freescale.com/beyondbits
Implementing an Electrogoniometer 57
Using accelerometers
to measure angles
Optoelectronic System
For electrogoniometer applications, Freescale offers a wide
variety of accelerometers that offer the following features:
• Low g, medium g and high g, ranging from 1.5 to 12g
measurement capability
• One, two or three axis measurements, allowing greater
application flexibility
• Either analog or digital (I²C/SPI) output signal format
• Fast response time, low current consumption, low voltage
operation and a standby mode, all in a small profile package
to detect fall, tilt, motion, positioning, shock or vibration
The Freescale MMA1260 (Z-sensing axis) low g accelerometer
is a good choice and behaves as illustrated in Figure 4.
Figure 3
Optoelectronic systems: These are video systems that use
Comparing Figures 4 and 5, when the accelerometer is in a
one or more video cameras to track bright markers placed
static horizontal position, or zero degrees angle (a), its horizontal
at various locations on the patient’s body. These markers are
axis is exposed to the earth’s gravity acceleration, registering
either infrared (IR), light emitting diodes (LEDs) or solid shapes
a positive 1g, and the analog output voltage is at its maximum
of reflective tape. The system keeps track of the vertical and
value. If it rotates 90 degrees in either negative (b) or positive (c)
horizontal coordinates of each marker, and computer software
directions, the acceleration on its axis will be 0g, and the analog
processes this information to determine the angle on the body
output value will be in its intermediate range value. If it rotates
segments of interest. Although optoelectronic systems offer
180 degrees (d), negative gravity acceleration will register -1g,
good precision, their calibration procedures and data analysis
and its output analog signal will be at its minimum value.
are time-consuming.
By using this behavior and simple linearization techniques,
Accelerometer Behavior
a simple 8-bit microcontroller (MCU), such as Freescale’s
MC9S08JM (S08JM) device with USB functionality, can be
+1g
VOUT=3.7V
a)
used with an accelerometer to measure one-dimension angles
–
between any surface and the horizontal plane. In this case, an
g
+
analog-to-digital controller (ADC) channel was used to convert
the analog signal and process it as digital angle information.
However, the need for an ADC is eliminated if an accelerometer
with I2C or SPI output is used instead. Furthermore, this
–
+
0g
VOUT=2.50V
method can be extended to measure angles in two and three
b)
dimensions using Freescale’s MMA7455L 3-axis digital output
accelerometer, for example. By doing this, instead of measuring
g
the relative angle between two segments, it’s possible to
create a three-dimensional representation of the segment being
measured, allowing more information to be gathered.
c)
-1g
VOUT=1.3V
–
+
0g
VOUT=2.50V
g
+
–
d)
g
Figure 4
freescale.com/beyondbits
Implementing an Electrogoniometer 58
Graphical Behavior of the Analog Output Voltage vs. the Angle with the Horizontal Plane
4
a)
3.8
3.6
3.4
3.2
Voltage (Volts)
3
b)
2.8
c)
2.6
2.4
2.2
2
1.8
1.6
d)
1.4
d)
180
160
140
120
100
80
60
40
20
0
-20
-40
-60
-80
-100
-120
-140
-160
1
-180
1.2
Angle (Degrees)
Figure 5
MCUs in the HCS08JM Family
Features
MC9S08JM8
MC9S08JM16
MC9S08JM32
MC9S08JM60
Core
HCS08 Core
HCS08 Core
HCS08 Core
HCS08 Core
8
16
32
60
Flash (KB)
RAM (KB)
USB RAM (Byte)
1
1
2
4
256
256
256
256
KBI
Up to 7
Up to 7
Up to 8
Up to 8
ADC
Up to 8-ch., 12-bits
Up to 8-ch., 12-bits
Up to 12-ch., 12-bits
Up to 12-ch., 12-bits
SCI
2
2
2
2
I²C
Yes
Yes
Yes
Yes
Device
Device
Device
Device
48 QFN, 44 LQFP,
32 LQFP
48 QFN, 44 LQFP,
32 LQFP
64 QFP, 64 LQFP,
48 QFN, 44 LQFP
64 QFP, 64 LQFP,
48 QFN, 44 LQFP
Full-Speed USB 2.0
Package
Table 1
S08JM family of MCUs
Implementation
The S08JM family, which is part of the low-cost, high-
Figure 6 is a prototype of an accelerometer-enabled
performance HCS08 family of 8-bit MCUs, extends Freescale’s
electrogoniometer. Essentially, the prototype was constructed
entry-level USB portfolio with one of the industry’s most
on a platform (A) to study the accelerometer’s (B) angle
cost-effective USB control solutions. Featuring on-chip USB
behavior using segments controlled by stepper motors (C)
2.0 full-speed device support, the S08JM family provides
and a microcontrolled circuit. The joint angle is simulated by
an economical, quick and easy way to standardize serial
the stepper motors controlling the movement of the segments
communications in industrial and consumer applications. All
connected to the accelerometers’ axes. These accelerometers
MCUs in the family use the enhanced HCS08 core and are
(MMA1260) send the electrogoniometer (D) an analog signal
available with a variety of modules, memory sizes, memory
proportional to the angle of each segment.
types and package types. The S08JM8 MCU is a good,
cost-effective choice for this application because it has all
the peripherals necessary to implement electrogoniometer
functionality. These include ADC, I2C/SPI and USB
communications. More information about this and other 8-bit
MCUs can be found at www.freescale.com/8bit.
freescale.com/beyondbits
The electrogoniometer then converts the analog signals to
digital signals using simple ADC conversions and extracts
angle information by using simple linearization techniques. This
information is then sent to a computer and an LCD display via
USB communication.
Implementing an Electrogoniometer 59
makes all necessary calculations and sends this information to
Accelerometer-Enabled Electrogoniometer Prototype
an LCD. USB communication can also be used to send the data
to a printer or to be stored for further clinical analysis.
Conclusions
B
Using the methodology and techniques described in this article,
C
it is possible to implement precise, low-cost angle measurement
systems for electrogoniometers or other applications used to
measure static angles. The article focuses on how to implement
D
single-axis measurements, but the same methodology can
be used for two- and three-axis measurements. Multipleaxis measurements using Freescale’s accelerometers can
provide the data necessary for a complete three-dimensional
representation of any segment.
A
It is important to note that this method is very useful for all
Figure 6
static angle measurements for such clinical cases as hemiplegia
A)Angle measurement platform
or hemiparesis, where patients present movement limitations.
B)Accelerometers
In these cases, the electrogoniometer is very useful for
C)Stepper Motors
measuring, monitoring and recording patient performance and
treatment results. The method, however, is not recommended
D)Electrogoniometer
for many sports medicine cases where high-speed body
A block diagram of the system (Figure 7) illustrates the use
movements may induce measurement errors for all acceleration
of Freescale’s low g accelerometers as the angle sensors,
forces other than earth’s gravity. Nonetheless, for clinical
sending the angle of each segment to the central processing
measurement studies of movement impaired patients,
unit via analog or digital serial communication, depending on
accelerometer-enabled electrogoniometers are highly efficient,
the accelerometer used. The central processing unit, an S08JM
cost-effective monitoring tools.
MCU which acquires the angles from the accelerometers,
Block Diagram of the Implemented Electrogoniometer
S08JM Family
Low g
Accelerometer
Processing Unit
(S08JM)
Angular
Measurement
LCD
53"ô#ABLE
ICE + BDM
MCG
Up to 51
GPIO
2 x SCI
2 x SPI
I 2C
12-ch.,
12-bit
ADC
6-ch.
16-bit
Timer
2-ch.
16-bit
Timer
Full-Speed
USB 2.0
Device
ACMP
RTC
KBI
LVD
Indep.
Clocked
CCIP
Flash
256 KB
USB RAM
4 KB RAM
S08 Core
Laptop
Debugging/Interface
Peripherals
Flash
RAM
Core plus Features
Figure 7
Leonardo B. S. Mangiapelo received a bachelor’s degree in electrical engineering at the Universidade Estadual Paulista, UNESP, Ilha
Solteira in July 2007. He has worked in the industrial automation industry throughout Brazil. He joined Freescale in May 2008 through
the Ministry of Science and Technology program to work on the SASD team as a digital verification engineer.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Implementing an Electrogoniometer 60
61
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Thomas Böhm
A Matter of Torque
Electric power steering system
Electric power steering offers greater vehicle safety by adapting
EPS systems also can help ensure safer driving. The steering
variable steering ratios to human needs, filtering drivetrain
torque is adapted to the vehicle’s speed and optimized for
influences and even adjusting active steering torque in critical
different driving situations. For example, during low-speed
situations. In addition, it can make cars lighter and more fuel
driving maneuvers, such as parking, EPS provides a higher level
efficient when compared to those using hydraulic steering
of assistance than it does at higher speeds, when electronic
systems.
power assist is gradually reduced to enable more direct steering
The central electronic elements of today’s power steering
and better feedback from the road.
systems are modern 32-bit microcontrollers (MCUs). Only
By integrating sensors and network connectivity, EPS can
high-performance MCUs can provide sufficient computing
further enhance its safety characteristics through improved
power and specialized peripherals for complex motor control
dynamic control and warning functions:
functions. Since power steering is a safety-critical function, it
• Improved vehicle dynamics control
also requires new MCU elements that support the functional
Helping and guiding the driver with additional steering
safety of the overall system.
torque in over-steer situations
Reducing stopping distance by coordinating with the
This article provides an overview of the latest generation of
electronic stability control (ESC) system on roadways with
Power Architecture based MCUs and describes how they are
®
differing friction levels
used in power steering applications. New innovative elements,
such as the cross-triggering unit for motor control and the
• Warning functions
fault collection unit for monitoring and reporting safety critical
Generating a slight counter-steering torque in order
signals, are explained.
to prevent the vehicle from unintentionally drifting out
Introduction
of its lane
During the last decade, advanced chassis control functions
have become main technology drivers for active safety
systems in vehicles, and electric power steering (EPS) nicely
combines vehicle safety with higher fuel efficiency. With the first
systems entering the market in the mid 1990s, purely electronic
System overview
Depending on the level of assisting forces required, various
types of EPS systems exist. The different architectures include:
• Column-drive systems
Typical for relatively light vehicles with lower steering forces
steering systems have migrated to almost every segment of the
DC or BLDC EPS motor integrated with the steering
vehicle market.
EPS in modern cars can significantly reduce fuel consumption
when compared to cars using hydraulic solutions. Industry
column
• Rack-drive systems
Typical for larger vehicles requiring high steering forces
studies have shown that EPS can save up to 85 percent of the
Assist power is directly applied to the steering rack with a
energy normally needed to steer a vehicle with conventional
BLDC EPS motor
hydraulic systems. The result is fuel consumption reductions
of up to 0.3 liters per 100 kilometers driven. EPS is so efficient
The elements that all EPS architectures have in common are a
because the system is only activated when steering support
steering wheel with integrated steering angle sensor, a steering
is really needed. As a result, a permanent engine load is not
torque sensor, a power steering control module and a motor for
required.
generating the required assist force.
freescale.com/beyondbits
A Matter of Torque 61
Steering Control Module Block Diagram
Gearbox
Load
VBAT
Prot
PMSM
Power Stage
Hall
Sensors
Position
Sensor
Torque
Sensor
Bridge Pre-Driver
Voltage
Regulator
CAN
Timer
PWM
ADC
HS-CAN
Interface
Watchdog
AMP
MPC560XP
SBC
FlexRay™
Network
FlexRay
Interface
CAN
SPI
MC9S08
Figure 1
Permanent magnet synchronous motors (PMSM) with their
The Freescale MPC560xP family of Power Architecture-based
improved efficiency and higher reliability are now widely used in
MCUs is specifically designed for advanced motor control
electric power steering systems. Minimizing the non-linearity in
applications. It provides all high-precision analog-to-digital
the motor torque characteristic while generating the maximum
converter (ADC) and timer functions required for motor signal
torque requires a sophisticated motor control approach called
acquisition, a powerful Harvard architecture core and flexible
vector control, which requires real-time processing for the stator
PWM modules that allow center, edge-aligned and asymmetric
phase currents and rotor position.
PWM duty cycles.
Figure 1 illustrates the basic architecture of a power steering
The new MC33905 family of system basis chips consists of
control module, and its main functions:
integrated power management solutions for 32-bit MCUs
• Generating and monitoring the component supply voltages
and other components of a power steering control unit. The
• Monitoring/preprocessing steering torque and steering angle
devices combine dual 5V/3.3V selectable voltage regulators
sensor signals
• Receiving vehicle speed and engine speed signals via CAN or
FlexRay™ protocols
• Receiving control inputs from other systems, such as the
braking controller
• Calculating the necessary assisting force/torque
• Motor signal processing and torque vector control
• PWM signal conditioning and controlling the MOSFETs
with an ISO11898 high-speed CAN interface and up to two
LIN 2.0 interfaces. Integrated monitors guarantee undervoltage
detection as well as voltage, current and temperature
protection.
The MC33937 pre-driver integrates high side and low side FET
drivers with greater than 1A gate drive capability. The device
can be directly interfaced to the microcontroller’s PWM outputs
and is configurable via an SPI port.
typically used in 3-phase motor drives for power steering
freescale.com/beyondbits
A Matter of Torque 62
Typical Power Steering Motor Control Cycle
Driver
Driver
ADC
Quad Timer
Driver
Driver
Driver
Duty cycle a
Duty cycle b
Duty cycle c
Application Contol
Current q
PI
Controller
Current d
PI
Controller
Torque_load_meas
Field
Weakening
Controller
Is_q
Is_d
Inverse Park
Transformation
d,q>alpha,beta
sin
cos
Forward Park
Transformation
alpha,beta>d,q
Us_alpha
Is_q_Req
Us_beta
Torque
Controller
Us_q
PWM
Modulation
Us_d
Torque_Req
PWM
Is_a
Is_b
Is_c
Sector
Us_alpha_comp
Us_beta_comp
DC-bus
Ripple
Compensation
Current
Sensing
Processing
thata_actual_el
Is_beta
Is_alpha
Forward Clark
Transformation
a,b,c>alpha,beta
Reference
Generations
and
Quad Timer
Sine
Cosine
GPIO
Is_a_comp
Is_b_comp
Is_c_comp
SCI
Angle
Tracking
Observer
Software
Switch
Figure 2
Technical challenges
Vector control seeks to align the PMSM’s rotor and stator fields
in a way that delivers maximum torque. The optimum solution is
when both fields are oriented 90 degrees from each other. The
control scheme designed to keep the 90 degree field alignment
is often referred to as field oriented control (FOC).
Real-time control code processing
In order to derive new PWM control values for the motor, the
measured/calculated phase currents have to be transformed
into direct and quadrature components of a rotating reference
frame. The advantage of this transformation is that current
components have DC steady-state values now, which
allows relatively simple PI-Type control algorithms for error
The typical cycle time for a PMSM control scheme is about 50
compensation. Resulting control signals are transformed
µs, during which the following tasks will normally need to be
back to 3-phase quantities and applied to the motor via
performed:
PWM outputs. Figure 2 shows a typical example of such a
• Motor phase currents and DC bus current measurements and
control cycle.
calculations
• Encoder/resolver signal processing and rotor position
calculation
Synchronizing A/D conversion, timer inputs and PWM
In a control scheme as described above, it is important to
schedule the acquisition of the state variables, such as currents
• Motor current processing (id, iq) via Clark/Park transformation
or position counter information, with respect to the PWM cycle.
• Processing current control algorithms
With traditional MCU peripherals, complex schedules require
• Generating new PWM signals via reverse Park/Clark
substantial central processing unit (CPU) involvement. Examples
transformation
Due to the tasks outlined above and the functional safety
include ADC configuration and adapt handling or pre-setting the
timer and PWM registers for the next control cycle.
system requirements, electric power steering control unit
Compliance with functional safety standards
designers will face the following technical challenges.
An EPS system is a safety-critical element that needs to meet
Fast and precise acquisition of state variables
Given the PWM control cycle time, a fast and precise ADC is
needed to acquire the DC bus current and/or phase currents.
The ADC needs to provide high conversion speed in order to
allow for oversampling of multiple data points within a single
PWM cycle. A typical requirement is ≤1.5 µs conversion time
with at least nine bits.
freescale.com/beyondbits
the requirements of industry standards, such as IEC61508 or
ISO26262. State-of-the-art functional safety concepts for power
steering control units require sophisticated fault monitoring of
MCU functions in order to allow the system to enter a safe state
in case of malfunction. Collecting internal faults and reporting
these to an external circuitry, even if the CPU is malfunctioning,
is a typical technical requirement for power steering controller
solutions.
A Matter of Torque 63
MPC560xP Block Diagram
(c)JTAG
Interrupt
Contoller
e200z0
Core
Fault Collection Unit
FlexRay™
only
MPC5604
VLE
eDMA
Nexus
IEEE-ISTO
5001™-2003
Crossbar Switch
I/O
Bridge
Up to
4 x 16K
Data
Flash
Up to
40K
SRAM
4 + 1-ch.
PIT
Boot
Assist
Module
DSPI
DSPI
DSPI
Mux
DSPI
Mux
LINFlex
S&H S&H
LINFlex
10-bit 10-bit
Safety Port
ADC VF
FlexCAN
eTimer
(6-ch.)
Up to
512K
Program
Flash
FlexPWM
eTimer
(6-ch.)
SIU
Figure 3
MPC560xP controller family
for motor control
Freescale’s new MPC560xP family of 32-bit MCUs, with
a Harvard-type Power Architecture core and a set of
powerful motor control peripherals, provides an ideal solution
for EPS and other advanced motor control applications.
Features include:
• High-performance 64 MHz 32-bit e200z0 Power Architecture
CPU with variable length encoding (VLE) for code
compression
• Up to 512 KB on-chip flash memory with ECC, additional
4 x 16 KB on-chip data flash memory with ECC for system
configuration data storage and fault events
• Up to 40 KB on-chip RAM with ECC protection
• One 16-channel enhanced direct memory access (eDMA)
controller
• Two general purpose eTimer modules, each with six timers,
16-bit resolution cascadable counters and quadrature signal
decoding
• One 16-bit resolution PWM module with configurable
dead-time insertion and fault inputs
• Two 10-bit ADCs supporting simultaneous conversions in less
than 1 µs with a linearity error of ±1 LSB
freescale.com/beyondbits
• Cross triggering unit that allows automatic generation of ADC
conversion requests during the PWM period without CPU
load and dynamic configuration optimization via DMA
• Four serial peripheral interface modules for communication
with MC33905 system basis chips, MC33937 pre-drivers and
other control unit components
• Two serial communication interface modules with LIN support
• Up to two CAN modules with 32 message buffers
• One dual-channel FlexRay controller with 32 message buffers
for safe communication with other control units
• Fault collection unit for collecting internal controller faults and
reporting these to an external circuitry, even in the case of a
malfunctioning CPU
• Safety elements, such as a programmable watchdog timer,
redundant 16 MHz internal RC oscillator, junction temperature
sensor and a non-maskable interrupt
• On-chip single-supply voltage regulator supporting 3.3V
and 5V
In order to guarantee optimal peripheral performance as well
as highest timer and PWM resolution, all motor control related
modules can be configured to use a dedicated clock domain
supporting up to 120 MHz. All other peripherals use the 64 MHz
main system clock.
A Matter of Torque 64
Example of CTU-Based ADC Triggering
pwm a
pwm b
pwm c
Calibration
DC-bus
Current
t1
t2
2
t1
’
t2
’
Position
DC-bus Voltage
Calibration
Position
DC-bus Voltage
Figure 4
State variable acquisition:
scheduling problems
As discussed before, scheduling state variable acquisition
with respect to the PWM cycle is technically challenging and
often results in a significant interrupt load for MCU. In order
to completely avoid CPU involvement in the acquisition of key
state variables, a new hardware element, the cross triggering
unit (CTU), was introduced on the MPC560xP family.
The CTU receives inputs from internal controller sources, such
as the PWM module and timers, but also allows an external
trigger from a GPIO port. Inputs can be on the rising edges,
falling edges or both edges of each received signal. A trigger
generator handles incoming signals in terms of input selection,
Example: A/D conversion
In order to avoid any CPU intervention, the ADC module must
be controlled by the CTU. This requires the ADC to be switched
to CTU control mode, which allows the scheduler unit to send
ADC commands when a trigger event occurs. As an alternative
to conventional results registers, ADC results can be stored
in one of four FIFOs. These FIFOs allow conversion results to
be dispatched according to the type of acquisition (i.e., phase
currents, rotor position, ground noise).
Further minimizing CPU load, the CTU is fully DMA supported.
The master reload signal provided by the trigger generator can
be used as a DMA request, for example. DMA transfers are also
used to read data from the result FIFOs.
active edges definition and master reload signal generation.
All CTU registers are double buffered, which allows setting a
On the basis of incoming signals, the trigger generator can
new configuration while actual acquisitions are made. Figure 4
generate up to eight trigger events. Two modes are supported:
is an example of a triggered sequence of A/D conversion that
• Triggered mode: each source of the incoming signal can
can be implemented very efficiently using the new CTU.
generate up to eight trigger event outputs
• Sequential mode: each source of the incoming signals can
generate one trigger event output only
Depending on the trigger events generated, a scheduler unit
generates specific outputs, including:
• Command or stream of commands for the ADC
• Pulse for the timer module
• External trigger pulse via GPIO
freescale.com/beyondbits
A Matter of Torque 65
Functional safety: fault collection
Summary
Another innovation introduced with the MPC560xP family is the
The Freescale MPC560xP family of Power Architecture
fault collection unit (FCU). This hardware module is intended
controllers provides an optimal solution for advanced
to simplify controller-level fault reporting in safety-critical
automotive motor control applications, such as EPS. Such
applications. The FCU can handle up to 32 controller internal
technical challenges as timed acquisition of state variables are
fault signals, such as loss of system clock, loss of PLL lock
resolved with a new cross triggering unit that allows significantly
or multi-bit ECC failures. The module allows the user to select
reduced interrupt load due to hardware synchronization of the
how different fault signals will be treated. Three options can be
PWM cycle, timers and the ADCs.
configured:
The fault collection unit, a new hardware element, supports
• No Action: no specific counter measures needed to
power steering system certification according to such safety
manage the fault
standards as IEC61508 and ISO26262. The FCU is intended to
• Alarm: allows software and/or hardware to recover
ease controller-level fault reporting in safety-critical applications
from the fault
and completes the set of safety features available on the
• Fault: direct communication to external circuitry via two
MPC560xP controller family. This family, in combination with
dedicated GPIO pins
MC33937 pre-drivers and MC3390x system basis chip solutions
that integrate power supply, network interfaces and signal
Three different protocols can be used to communicate with
monitoring capabilities, provides the main building block for
external circuitry. The dual-rail scheme is one example of a
state-of-the-art EPS systems.
supported protocol. As long as no critical fault occurs, the
FCU output pins will toggle between (0,1) and (1,0) with a
configurable frequency. By default, this value is f=976 [email protected]
MHz. If a fault is detected, these pins will toggle between (0,0)
and (1,1) at the same frequency, which would allow external
circuitry to bring the system into a safe state.
In order to guarantee CTU independence in case other
controller modules or the main core malfunction, the module
runs on a separate internal 16 MHz RC clock. This allows
deterministic computation of output signals and time outs.
Additional safety elements, such as a programmable watchdog
timer, a junction temperature sensor and FlexRay support,
complete the list of controller features that support IEC61508 or
ISO26262 certifiable systems design.
Based in Munich, Germany, Thomas Böhm is global marketing manager for chassis, safety and driver assistance solutions for
Freescale Semiconductor. He joined Freescale in 2000 as a system engineer and has worked in several business development
positions since 2004. He earned a degree in electrical engineering from Chemnitz University of Technology and received an MBA
from OUBS in the United Kingdom.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
A Matter of Torque 66
67
|
Back to Table of Contents
List of Articles
|
Print/Email This Article
Oziel Hernandez, Varun Jain, Suhas Chakravarty and Prashant Bhargava
Position Location Monitoring
Using IEEE® 802.15.4/ZigBee® technology
Freescale and ZigBee®
technology can help you
locate your kids
ZigBee® Mesh Network
In this article you will learn how Freescale and ZigBee
MN1
technology can help you implement a low-cost, low-power
location monitoring system for indoor environments where other
positioning systems have typically performed poorly. This article
is a useful tool to help system designers understand the very
basic concepts of cooperative localization.
Location monitoring without
GPS? How does it work?
Static Nodes
Gateway Nodes
Mobile Nodes
Figure 1
Believe it or not, it is possible to locate people or other
Vector (AODV) routing protocol, provide greater stability in
objects in an indoor environment without using expensive
changing conditions (self-forming) or when single nodes fail
global positioning system (GPS) devices. What’s more, GPS
(self-healing). In our ZigBee mesh network in Figure 1, we have
performance inside buildings is very limited due to impaired line
three different types of nodes, all of them working on the same
of sight (LOS) to the GPS satellites.
IEEE 802.15.4 physical link.
A location monitoring system can be developed with
The gateway node (GN) is used to connect or interface our
moderate performance with a ZigBee mesh network that
ZigBee network to an external computer or computer network
uses low-cost IEEE 802.15.4 embedded devices. At this point,
(Figure 2). It is always wall-powered and non-mobile with
however, it is important to clarify what ZigBee technology and
significant computational power. These nodes are usually called
IEEE 802.15.4 are because sometimes they are erroneously
ZigBee coordinators (ZC).
used interchangeably.
Example Board Setup for Gateway Node
IEEE 802.15.4 is a wireless standard that defines the physical
(PHY) and medium access control (MAC) layers while ZigBee
Memory
technology adds network (NWK) and application (APL) layer
specifications on top of 802.15.4 to complete what is called the
full ZigBee stack. For the scope of this article we are proposing
ZigBee-compliant devices because the mesh networking
capability is implemented in the NWK layer.
MCF520x
(Ethernet + DDR)
MC13224V PiP
SPI
In Figure 1, we have a ZigBee mesh network where each device
can communicate directly or through neighbor devices with
other devices in the network. Connections between nodes are
dynamically updated and optimized in difficult conditions. Mesh
networks are decentralized where each node is self-routing and
EPHY
able to connect to other nodes as needed. The characteristics
of mesh topology, thanks to the Ad hoc On Demand Distance
freescale.com/beyondbits
Figure 2
Position Location Monitoring 67
The static nodes (SN) are normally wall-powered and in a fixed
The SNs should be strategically located throughout the area to
known location (non-mobile) because they will act as references
provide coverage for our position monitoring system. The more
for the rest of the nodes that we want to locate (Figure 3).
SNs the system has, the better it will perform.
They too have higher computational power. SNs have a similar
function to that of the satellites in a GPS system. These nodes
are called ZigBee routers (ZR).
Now we have all the pieces in place, but how does this
low-cost, low-power, low-complexity local positioning system
work? Let’s go back to Figure 1. Imagine that mobile node 1
Example Board Setup for Static Node
(MN1) needs to be located. You can see MN1 is in the vicinity
(within its transmission radius) of three static nodes, so it is able
to estimate its position using a multilateration technique, which
Memory
can be based on range measurements taken using received
signal strength indicator (RSSI) or by measuring the angle of
arrival (AOA). AOA implies the use of multiple antennas, so
that’s why using range measurement based on RSSI is simpler
MC13224V
(Platform in
Package™ SoC)
and lower cost.
For ZigBee-based position monitoring systems it is important to
have enough coverage for device triangulation. Remember, we
need to get at least three distances from the SNs to the node
we want to locate[3]. But what happens when an MN does not
Figure 3
have a direct connection to an SN node?
Finally, we have the mobile nodes (MN), which need to
Typical Wi-Fi-based location monitoring systems assume that
be battery-powered and as small as possible with lower
a direct connection between the MN we want to locate and at
computational capabilities (Figure 4). This is because they
least three reference nodes can be established at any time. In
do not store network-wide information nor do they need to
Figure 1 our ZigBee network shows that every MN has a direct
be able to perform network-related services. If you want to
connection to at least three SNs.
locate people inside a building, MNs can be worn as badges,
bracelets or other form of accessory. In the case of a badge or
ID application, these might even support memory cards to store
information programmed by the user or an LCD display for easy
human interfacing. An MN can either be a ZR or ZigBee end
device (ZED).
On the other hand, in Figure 5 shown below you can see
another ZigBee mesh network where MN2 and MN3 only have
a direct connection with two SNs. However, in this case, it is
still possible to locate the two MNs because ZigBee technology
offers a multihop routing capability. In other words, MN2 may
establish a communication with and calculate the distance to
Example Board Setup for Mobile Node
the SN above MN3 using MN3 as an intermediate hop. It is
important to highlight that in this case MN3 must be a node
with ZR capabilities.
Memory
Another ZigBee® Mesh Network
MC13224V
(Platform in
Package™)
SPI/
I2C/
GPIO
LCD
Controller Chip
(Optional)
MN3
MN2
Keypad
(Optional)
LCD Panel
(Optional)
Figure 4
Static Nodes
Gateway Nodes
Mobile Nodes
Figure 5
A keypad or LCD panel would be optional, for instance, when
Multihop position monitoring is a very important
the MN is used as a tag to locate inventory in a hospital or
ZigBee capability.
school. (See the Position Location Application section for
more details).
freescale.com/beyondbits
Position Location Monitoring 68
Wireless Technologies Comparison (ZigBee, Bluetooth, UWB, and Wi-Fi)
ZigBee®
Bluetooth®
UWB™
Wi-Fi
Standard
IEEE 802.15.4
IEEE 802.15.1
IEEE 802.15.3a
(to be ratified)
IEEE 802.11 a, b, g
(n, to be ratified)
Industry organizations
ZigBee Alliance
Bluetooth SIG
UWB Forum and
WiMedia™ Alliance
Wi-Fi Alliance
Network topology
All
Star
Star
Medium dependent
®
Data rate
250 Kbps
723 Kbps
110 Mbps–1.6 Gbps
10–105 Mbps
Range
10–300m
10m
4–20m
10–100m
Power
Very low
Low
Low
High
Battery life
Alkaline
(Months–Years)
Rechargeable
(Hours–Days)
Rechargeable
(Hours)
N/A
Max. nodes
65,000
8
128
32
Table 1
IEEE 802.15.4 radios provide very good “free-space” ranges up
to 300 meters, which can be used to extend the coverage of
the positioning system. For indoor applications, range drops to
about 25–75 meters depending on building layout, contents
and construction.
ZigBee technology features
and advantages
ZigBee technology has some important features that make it
our best option to implement an ad hoc, on-demand, low-cost
RSSI-based location
monitoring algorithm
Using RSSI, the MN’s coordinates relative to the SN can
be determined within some allowable error, typically less than
three meters.
The RSSI-based location monitoring algorithm works in two
phases[1]:
• Deterministic phase: This phase involves calibrating the RSSI
values of each of the SNs whose location is known. Radio
and low-power location monitoring system. Consider this—if
propagation patterns exhibit different non-isotropic path loss
you need battery-powered mobile nodes to implement an
due to the various transmission mediums and directions.
efficient location monitoring system, what happens if you have
This is done using an MN. Raw RSSI values are collected at
to change batteries every day? ZigBee’s low-cost, low-power
various predefined distances from the SNs, and the calibrated
capabilities help solve this issue and more.
values are then used to determine a suitable propagation
constant for each of the SNs.
ZigBee technology’s cost-effective features:
Different mediums (free space, glass and wall) surrounding
• Operating in 2.4 GHz unlicensed band or one of the sub-GHz
the SNs affect the signal attenuation differently. Therefore,
regional bands
if only a single propagation constant is used for all SNs,
• Standards-based solution
distance miscalculations occur. The calibrated propagation
• Specifically designed to support sensing, monitoring and
constant takes obstacles into account, and it is calculated
control applications
as follows:
• Low complexity (low memory footprint)
• Low power (battery operated devices)
ni = –
• Mesh networking (a feature not found in most wireless
networking standards)
RSSIi – A
10log10di
where:
Self healing
n: Signal propagation constant or exponent
Self forming
d: Distance from sender
Multihop routing protocol (AODV routing protocol)
A: Received signal strength at 1 meter distance
The value A is obtained in a no-obstacle one-meter
In Table 1 you can see some of the ZigBee technology
advantages over other wireless standards. Note that none of
the others were designed to address monitoring or control
distance signal strength measurement from the SNs.
• Probabilistic phase: This phase involves distance and
position estimation using the propagation constant found in
applications.
the above phase.
Distance estimation: This method is based on the fact
that the mobile user does not move arbitrarily, rather there
is a correlation between current positions and previous
locations.
freescale.com/beyondbits
Position Location Monitoring 69
Because the strength of the received signal varies
Iterative methods, such as weighted linear least squares
dynamically, even if the MN is not moving, it is important
or maximum likelihood, are applied to derive the MN
to apply a low complexity smoothing algorithm to minimize
position according to the estimated distance resolved from
the dynamic fluctuation of the radio signal received from
filtered RSSI and the calibrated constant. The algorithm
each SN when the MN is moving. However, for a low-cost
requires the coordinates of at least three SNs (xi, yi) and
solution a coarse location of the subject under search
the distances (di) between the MN and the respective SNs,
would normally be sufficient.
which are estimated in the deterministic phase.
The basic assumption for this smoothing algorithm is that
the constant velocity motion will result in a constant data
change rate and stationary noise processes.
The estimation and prediction stages for the smoothing
algorithm are shown below:
Estimation:
^
^
^
^
The error estimated is corrected in the estimation. The
iteration is repeated until the error is acceptable.
The complete flow of MN estimation of location is shown in the
flowchart in Figure 6.
RSSI-Based Position Location Algorithm
^
Rest(i) = Rpred(i) + a Rprev(i) – Rpred(i)
Vest(i) = Vpred(i) +
Collect Raw RSSI Values
^
b
R
– Rpred(i)
Ts prev(i)
Deterministic Phase
Prediction:
^
^
Ř&DOLEUDWLRQ0RGHO
^
Rpred(i) = Rest(i) + Vest(i) Ts
^
RSSI – A
n=–
^
Vpred (i + 1) = Vest(i)
10log10D
where
^
Rest(i) : the ith smoothed estimate range,
Probabilistic Phase
^
Rpred(i) : the ith predicted range,
RSSI Smoothing Algorithm
Rprev(i) : the ith measured range,
^
Vest(i)
^
Ř(VWLPDWLRQ
: the ith smoothed estimate range rate,
Vpred(i)
: the ith predicted range rate,
a, b
: gain constants,
Ts
: time segment upon the ith update.
^
^
^
^
Rest = Rpred + a
Vest = Vpred +
b
Ts
^
Rprev – Rpred
^
Rprev – Rpred
Ř3UHGLFDWLRQ
Position estimation: To estimate the position of an MN,
^
^
^
^
^
Rpred = Rest + Vest Ts
at least three SNs in the network must be able to detect
and measure the MN’s signal strength. Trilateration is a
Vpred = Vest
method used to determine the position of an object based
on simultaneous range measurements from three SNs at
Ř'LVWDQFH(VWLPDWLRQ
known locations. The trilateration, otherwise known as the
^
Rest = 10nlog10 D + A
triangulation technique, is only the first step needed to
estimate the position of the node of interest. For instance,
if we have been able to measure distances from three
Position Estimation
(XE,YE)
Ř,WHUDWLYH7ULODWHUDWLRQ
SNs, then we will have a triangle, but we have to find the
centroid of that triangle to get the initial position of the
node we want to locate. We can then initiate one of the
well-known location estimation iterative methods.
freescale.com/beyondbits
Figure 6
Position Location Monitoring 70
Placement of Various Nodes on School Premises
The MNs are embedded in student and teacher ID cards, which
ID holders wear at all times while in the school. The gateway
node periodically sends out broadcast messages to static
nodes to update network information.
Using this network, the school administration can:
• Track student activities
• Broadcast messages about different events, such as school
Outdoor
(Playground)
assemblies
• Monitor the time a child spends in certain activity areas
and develop a report on his or her behavior for school and
parental review
• Automate student attendance records
• Contact teachers when their assistance is needed
If any student is not in a classroom or needs to be located, the
teacher can simply type in the student’s ID on any computer
Indoor
(School
Building)
connected to the GN through the mesh network or even the
Internet. The GN would then instruct the SNs to obtain the
position of that particular ZigBee mobile node ID.
Main
Entrance
Patient monitoring
This application is similar to the school application, and can be
used to:
• Monitor patients in different rooms and transmit their vital
statistics to a central server (connected to the GN), which can
forward those to the doctor in charge
• Ping doctors and medical staff to locate them faster
• Help new patients and employees navigate through the
Static Nodes
Gateway Nodes
Mobile Nodes
Figure 7
hospital premises
• Monitor the hospital’s inventory to locate stored items
more quickly
Position location application
In this case the mobile node requires less functionality
Position location monitoring can be used in the following
because it does not need any display or keyboard buttons.
applications.
The MNs are simple tags that can be attached to the
hospital inventory for quick location in an emergency,
Location monitoring
which can save time critical to patient care
This application is designed to help school authorities, for
instance, keep track of school children while they are on school
Local navigation
premises and even locate teachers in case of an emergency.
This application can work in tandem with the local positioning
Figure 7 illustrates sample placements of the three types of
nodes in both the indoor and outdoor school environments.
system explained in the previous section. Because the GN
contains all network information, it can help a person with an
MN navigate to a specific destination in the building. The user
In the above layout, the gateway node is placed in the
would enter a location from a preset menu, then the navigation
administration office. In case of multiple floors, each floor
software built on top of the MN’s local position monitoring
may have a gateway node, and all gateway nodes could be
capabilities can guide the user to the desired location.
networked to the main computer in the administrative office.
Static nodes are scattered around the building in such a way
that blind spots (i.e. portions not detected by a static node) are
minimized and maximum coverage is obtained. The goal is to
ensure any mobile node is continuously in contact with three
static nodes.
Information exchange
A similar setup can be used for a big event spread over a huge
area, where attendees and organizers would be given ID cards
that would act as MNs in the network. In addition to monitoring
people and helping them navigate through the maze of booths
and conference halls, an additional application can be built into
the ID Cards which can help people exchange business and
freescale.com/beyondbits
Position Location Monitoring 71
contact information. Through a scrollable menu, the user can
MC13224V PiP key features include:
select from any of the following application features
• IEEE 802.15.4 standard-compliant on-chip transceiver/
(Figure 8):
modem
• Find people
2.4 GHz
Similar to student location and patient monitoring
16 selectable channels
Can help to track administrative people or fellow seminar
Advanced encryption/decryption hardware engine
attendees
(AES 128-bit)
• Locate a room or hall in the event area using a local
navigation function
21 mA typical current consumption in RX mode with
• Exchange contact information and notes
MCU active
Allow users to exchange contact information, notes (large
messages could be broken into smaller ones and then
reassembled after receipt) and business cards, which could
be downloaded to a PC at the event and transferred to a
CD or flash drive for personal use
Sending short messages to fellow attendees or organizers
Sample Design of ZigBee Enabled ID Card
®
Speaker behind the ID
card for audio alerts
• Low power
LCD
Screen
Space for Logo
(Antenna
embedded behind)
29 mA typical current consumption in TX mode with
MCU active
• 32-bit ARM7TDMI-S™ CPU core with programmable
performance up to 26 MHz (24 MHz typical)
• Extensive on-board memory resources
128 KB serial flash memory (can be mirrored into RAM)
96 KB SRAM
80 KB ROM
• Best-in-class power dissipation
• Extensive MCU peripherals set
Name:
John Smith
Company: XYZ Company
Session: ColdFire Architectures
Dedicated NVM SPI interface for managing flash memory
Two dedicated UART modules capable of 2 Mbps with
CTS/RTS support
SPI port with programmable master and slave operation
8-pin keyboard interface (KBI) supports up to a 4x4 matrix
Two 12-bit analog-to-digital converters (ADCs) share eight
input channels
SD Card
Slot
LEDs
Buttons
Figure 8
Freescale enables location
monitoring with ZigBee
technology
Freescale has an extensive portfolio of ZigBee-enabled ICs
and low-power microcontrollers (MCUs) that make up the ideal
platform for ZigBee-enabled networks.
Up to 64 programmable I/O shared by peripherals and GPIO
• No external RF components required
o Only an antenna is needed for single-ended 50Ω RF
interface (balun in package)
o Only a crystal is required for the main oscillator;
programmable crystal load capacitors are on-chip
o All bypass capacitors in package
For further details, please see the MC13224v reference manual[2].
Freescale’s BeeStack™ ZigBee-compliant stack with BeeKit™
Freescale’s MC13224V ZigBee Platform in Package™ (PiP) is
Wireless Toolkit provides a simple software environment to
the latest of our low-power platforms for ZigBee devices. The
configure network parameters. This tool is unique to Freescale,
highly integrated MC13224V PiP simplifies RF design, allowing
allowing customers to use a wizard and drop down menus to
many customers who do not have extensive RF experience to
help configure the ZigBee network parameters.
still create robust ZigBee-enabled designs. Freescale also has
a number of reference designs that include the design details
for the hardware in the development kits. You can take the
bills of materials, Gerber files and schematics and either copy
our design or integrate it into yours. The complete platform
approach helps reduce development time and speed time
to market.
Freescale’s MC13224V ZigBee Evaluation Kit (Part #1322xEVK)
is specifically targeted for developing ZigBee-enabled products,
providing the necessary hardware and software tools to
streamline the development process. For customers running the
ZigBee protocol who require a different low-power MCU, they
can combine the MC13202 RF transceiver and the Flexis QE128
MCU. The MC1320x-QE128-DSK provides a simple and costeffective development platform.
freescale.com/beyondbits
Position Location Monitoring 72
MC13224V Simplified Block Diagram
32.768 kHz (Optional)
RF Oscillator/PLL
and
Clock Generator
Clock and
Reset
Module
(CRM)
Radio
Interface
Module (RIF)
Balun
RF
TX/RX
Switch
TX
Modem
RX
Modem
Analog
Receiver
802.15.4
MAC
Accelerator
(MACA)
Advanced
Security
Module
(ASM)
IEEE® 802.15.4 Transceiver
Analog Power
Management
and Voltage
Regulation
Timer
Module
(4 Blocks)
UART
Module
(UART0)
ARM7
TDMI-S™
32-bit CPU
UART
Module
(UART1)
Bus Interface
and Memory
Arbitrator
SSI/I2S
Module
ARM® Interrupt
Controller
(AITC)
SPI
Flash
Module
(SPIF)
Ext PLL
Filter
Battery
Detect
JTAG/
Nexux
Debug
Digital
Modem
Analog
Transmitter
Dual 12-bit
ADC
Module
128 KB
Serial Flash
96 KB SRAM
(24K Words
x 32 Bits)
80 KB ROM
(20K Words
x 32 Bits)
Keyboard
Interface
Up to 64 IO Pins
24 MHz (Typical)
I2C
Module
SPI
Interface
GPIO and IO
Control
Figure 9
Summary
The MCF520x[4] family of ColdFire controllers answers the
call for a low-cost, flexible memory controller that supports
In short, Freescale-enabled location monitoring using IEEE
a combination of external SRAM, flash memory and a choice
802.15.4/ZigBee technology can help make lives safer and
of single-data rate (SDR), double-data rate (DDR) or mobiledouble-data rate (M-DDR) SDRAM memory. The cost-effective,
fully-functional and easy-to-use M5208EVB kit simplifies
healthier. Products such as the MC13224V PiP allow designers
to implement low-power, cost-effective ZigBee mesh networks
that can provide effective location monitoring for a variety
MCF5208 product development and speeds customers
of environments.
to market.
References
[1] “Enhanced RSSI-Based Real-Time User Location Tracking
System for Indoor and Outdoor Environments,” ErinEe-Lin Lau and Wan-Young Chung, Dongseo University,
Korea, 2007 International Conference on Convergence
Information Technology, ieeexplore.ieee.org/stamp/stamp.
jsp?arnumber=04420422
[2] MC13224V Advanced ZigBee® Compliant SoC Platform for
the 2.4 GHz IEEE® 802.15.4 Standard Reference Manual,
www.freescale.com/files/rf_if/doc/data_sheet/MC1322x.pdf
[3] “Locating the Nodes: Cooperative Localization in Wireless
Sensor Networks,” N. Partwari, J. N. Ash, S. Kyperountas,
A. O. Hero III, R. L. Moses and S. D. Correal, IEEE Signal
Processing Mag., vol. 22, no. 4, pp. 54–69, July 2005,
ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=1458287
[4] MCF5208 ColdFire® Microprocessor Data Sheet,
www.freescale.com/files/32bit/doc/data_sheet/
MCF5208EC.pdf
Oziel Hernandez Salgado is a software engineer at Freescale’s Wireless Connectivity Operation in Mexico. He has a bachelor
of science degree in computer science and a master’s degree in telecommunications. Varun Jain, Prashant Bhargava and
Suhas Chakravarty are design engineers at Freescale’s India Design Center. Each holds a bachelor of engineering in electronics
and communication.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Position Location Monitoring 73
74
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Jose Palazzi
Beyond Isolation
Low-cost isolated digital link
This article provides an overview on how to use two ultra-
An ultra-low-cost 8-pin MCU at the isolated side monitors the
low-cost 8-bit Freescale microcontrollers (MCUs) and an
logic level of three GPIO pins and packs the information into
electromagnetic isolation barrier in a self-healed arrangement to
a serial protocol. Using a special modulation technique, this
implement a multi-channel isolated digital link for potential use
information is sent through the isolation barrier, made with the
in medical diagnostic equipment.
transformer, to the demodulator side.
Isolation is a frequent requirement for any application in
Another ultra-low-cost 8-pin MCU is used at the demodulator
which common mode voltage can compromise integrity. In
side to recover the modulated information. However, instead
medical applications, both the equipment and the patient
of decomposing the signals in three pins, this device
need protection from hazardous voltages or currents. For
communicates to a host through a single pin interface, which
instance, electrocardiogram (ECG) systems use sensors that
reduces system I/O count.
are connected to the patient. If the system causes even a
3-Input Isolated Digital Link
small amount of AC current to flow through the human body,
it could be fatal. In another example, the high voltages present
in electrodes when defibrillators are operated could potentially
A
kill conditioning circuits in the signal processing patch. Safety
regulations, such as IEC60601-1, UL 2601-1, IEC601-1 and
Mux
and
Modulator
B
CSA C22.2 No. 601, mandate isolation with strict safety laws,
rules and guidelines governing the design and construction of
Driver
Detector
Demux
and
Modulator
C
medical devices.
Optocouplers, which isolate electronic circuits connected to the
Isolated Side
patient, offer inherent immunity to electrical or magnetic fields.
Demodulator Side
Figure 1
However, the high input current needed to drive the internal
LEDs and its consequent degradation over time limits the
In addition, the proposed solution supplies DC voltage to the
long-term use of these devices.
isolated side using the transformer as an isolated converter.
On the other hand, electromagnetic coupling provides extremely
A square wave signal generated by the MCU in the demodulator
high isolation with no degradation. The implementation
side is used to charge the inductor that is wound in one side
proposed in this article consists of two MCUs used to control
of the isolation transformer. Integrating two inductors in the
the flow of data across an electromagnetic isolating barrier.
same magnetic core allows energy to be transferred from
Thanks to the highly integrated ultra-low-cost MCUs from
the demodulator side to the isolated side. A rectifier diode,
Freescale, such as the MC9RS08KA series, multi-channel
capacitor and regulator are added to the isolated side to form a
isolation is possible using just two very small 8-pin devices.
stable DC supply source for the MCU.
Energy to one side and
signal to the other
The typical MCU power consumption suggested for this
The block diagram in Figure 1 shows how the 3-input isolated
digital link is implemented. Using the single isolation element to
implementation is 5 mA at 10 MHz clock frequency. The
modulation will add approximately 3 mA, thus configuring a
maximum power consumption of 8 mA at the isolated side.
transport three signals through the isolation barrier represents a
significant cost reduction over individual isolation elements.
freescale.com/beyondbits
Beyond Isolation 74
Direct Current Modulation
R1
S2
R2
S2
Switch
on
t
Switch
Rsense
Switch
off
t
Isense
Switch
t
t
Figure 2
Direct current modulation
demodulator side when the isolated side is ready to transmit
This solution is suitable for applications where speed is not as
a package. Isync represents the additional average current
critical as serialization, demodulation and protocol handling,
increase in the primary side when the frame flag is on. After the
which are performed by the MCU executing instructions in
isolated side sends the serial stream of data, the frame flag is
sequence. Thanks to the stable behavior of the isolated circuit
turned off, signaling the demodulator side that the data transfer
at the primary side, a simple technique using direct current
cycle is finished.
modulation can be used with high reliability and repetitiveness
without requiring extreme processing horsepower from the
MCU. Figure 2 shows how direct current modulation works.
On the left side, when the SWITCH is closed, the DC current
Direct Current Modulation Waveforms
Isync
across the inductor (primary side of the transformer) follows
the equation:
E = L * di / dt where:
12
11
A
B
C
E = Voltage applied to the inductor
t
L = Inductance
di = DC current of the inductor
dt = Charge time
Frame
The primary inductance of the transformer is calculated as a
function of operating frequency, supply voltage and required
max DC current. Energy stored in the transformer during the
“on” time is transferred to the secondary side during the “off”
time, similar to switched mode power supplies.
t
Data
Now things become interesting. As the current drained at the
secondary side of the transformer is reflected to the primary
side, changes in the DC consumption can be detected at the
primary side of the transformer.
A
Figure 3 illustrates how we can transform this into something
useful. A hardware level protocol is implemented using a twolevel current modulation scheme, with a frame flag alerting the
freescale.com/beyondbits
B
C
t
Figure 3
Beyond Isolation 75
Proposed Isolated Side
MC9RS08KA2
A
B
PTA0
11
PTA3
12
PTA1
PTA4
C
PTA5
Reset
PTA2
Figure 4
Putting it all together
Figure 4 is a simplified circuit diagram for the proposed isolated
Figure 6 shows the internal implementation of the voltage
comparator block.
side while Figure 5 is a simplified circuit diagram for the
In our demodulator circuit, PTA1 receives the primary current
proposed demodulator side.
signal through the RC network. A multi-level voltage detector is
At the isolated side, the rectifier diode, capacitor and series
regulator form a DC source to supply Vdd to the MCU. The wide
supply range Freescale specifies for small MCUs (1.8V to 5.0V)
adds flexibility when specifying the transformer. For instance,
with a 1:1 transformer excited by a 50 percent duty cycle 5V
supply, output voltages of near 2V could be expected at the
voltage regulator input.
PTA0, PTA1 and PTA2 pins receive A, B and C signals. PTA3
and PTA4 are connected as current sinks modulating the current
consumption directly in the transformer pins. The MCU’s low
voltage detection (LVD) helps prevent abnormal operation when
the supply voltage is not sufficient to guarantee the operating
implemented using the MCU’s internal 1.21V reference, and the
three-resistor network is implemented around PTA5, generating
a reference voltage for the non-inverted input of the voltage
comparator. This MCU-controlled network allows the DC current
detector to be dynamically configured to detect specific trip
points during the system operation and to correlate those to the
“truth demodulation table” stored in the MCU’s flash memory.
PTA3 is used to deliver a 1200 bps, 8, N, 1 asynchronous TX
data signal that can be read by any UART/SCI interface. The
firmware in the demodulator side can be configured to generate
continuous sampling or to generate a data stream every time a
new updated packet is transferred from the isolated side.
conditions.
Conclusion
On the demodulator side, as illustrated in Figure 5, PTA4
This proposed implementation with two ultra-low-cost
generates a square wave signal to switch on and off the
MCUs does not exhibit high signal speed due to the nature
transistor implementing the primary side of the flyback
of the MCUs’ ability to execute the codes that perform the
converter. A current sensor resistive element is connected
expected tasks. On the other hand, the cost and longevity of
between the emitter and GND so the current level across the
Freescale products offer several advantages over using one
transformer and through PTA1 can be measured.
optocoupler per signal in low-speed applications. Flexibility
As shown in Figure 4, a sampling window is set to detect
the current modulation. The voltage comparator inside the
ultra-low-cost MCU has been designed to operate across
the full range of the supply voltage (rail-to-rail operation) with
extreme flexibility.
for customizations, high breakdown voltage, low power
consumption and high immunity to transients along with low
cost and increased longevity make the proposed solution
favorable for medical applications.
A prototype has been built using two Freescale MC9RS08KA2
MCUs. The RS08 core allows the development of compact
code and has been optimized for small memory sizes.
freescale.com/beyondbits
Beyond Isolation 76
Proposed Demodulator Side
5V
5V
MC9RS08KA2
PTA3
To the main
microcontroller
PTA4
PTA0
PTA1
+
PTA5
-
Reset
5V
PTA2
Figure 5
Voltage Comparator Block
Internal Bus
Internal Bandgap
Reference Voltage
ACBGS
Status and
Control
Register
ACME
ACMP
Interrupt
Request
ACF
ACOPE
ACMP+
set ACF
ACMOD
ACO
ACIE
ACME
Interrupt
Control
+
Comparator
ACMPO
ACMP-
Figure 6
Operating at up to 10 MHz clock speed, with an internal
toroidal ferrite cores, breakdown voltages in excess of 8 Kv
background debug module and a precise trimmable oscillator
were repeatedly experienced. Immunity to transients in the HF
that ensures greater stability, this small MCU is available in
spectrum (1 MHz to 30 MHz) was obtained using a “drum core”
8-pin DIP and 8-pin SOIC packages.
construction associated with good ground planes in the PCB.
Breakdown voltages, lower power consumption and immunity to
transients have direct effects on the transformer’s construction
E-shape cores present high immunity to coupled transients,
which allows the operation close to inductive loads connected
to a 50–60 Hz AC supply.
and materials. In experiments conducted by the author with
Jose Palazzi worked many years as a field application engineer for microcontrollers and microprocessors and has a solid
background in the development of electronic circuits for consumer and industrial applications. Jose is a sales account manager
in Sao Paulo, Brazil.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Beyond Isolation 77
78
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Suhas Chakravarty, Varun Jain, Nakul Midha and Prashant Bhargava
Low-Cost Driver Assistance
Using ZigBee®/IEEE® 802.15.4
Introduction
• Be used for automated, unmanned toll collection for
parking lots and toll roads where a secure ZigBee link can
According to some investigations, intelligent driver assistance
help carry out toll transactions before the vehicle reaches
systems can prevent 20 to 30 percent[3,4] of road accidents. In
the entry point.
the years to come, driver assistance systems will be required
safety features rather than options. The main challenge
In summary, any application that requires car-to-road
for the automotive industry is how to make these systems
communication, with a moderate amount of data involved,
cost-effective so they can be embedded into small and
would benefit from the solution.
mid-segment cars as well as high-end models.
Current driver assistance systems are based on a number of
technologies, such as radar, computer vision and sensors.
Integrating all of these technologies into a single system is
normally a costly and complex solution. We propose a complete
ZigBee® based driver assistance system solution that leverages
the cost-effective, low-power and secure wireless networking
features of the ZigBee protocol.
The solution seeks to alert and inform the driver whenever the
vehicle approaches a preset waypoint on the road. A ZigBeebased unit is installed at each waypoint, broadcasting relevant
The ZigBee network
The ZigBee networking stack is built upon the IEEE® 802.15.4
standard that defines the physical (PHY) and medium access
control (MAC) layers for a low-data-rate, low-power network.
ZigBee adds network (NWK) and application (APL) layer
specifications on top of 802.15.4 to complete what is called the
full ZigBee stack.
More details on the ZigBee network can found in the additional
Beyond Bits 4 article, Location Monitoring Using ZigBee/IEEE
802.15.4.
information to corresponding ZigBee units embedded in
The solution network has the following types of ZigBee nodes:
approaching vehicles. Such a system significantly reduces the
• Gateway Node: This node in traffic control or police stations
reliance on human vision and on-road lighting conditions.
synchronizes and collects information from waypoint nodes
in the vicinity. Each gateway node would connect with the
This highly flexible concept can perform the following functions:
Internet through an Ethernet connection. Thus, the Internet
• Alert the driver to approaching traffic, stretches of road
serves as a backbone, connecting all gateway nodes
under maintenance, school and hospital zones, vehicles
together. Traffic data logging applications and, in general,
approaching around a blind corner and many other hazardous
any sort of application that falls within the purview of the
conditions.
city administration and requires extensive coverage, needs a
• Serve as milestones, road signs and simple advertisements,
network of waypoint nodes. This is to facilitate central data
such as the menu of a nearby drive-in restaurant.
collection and analysis as well as remote node updating and
• Be used as waypoint nodes to record and transmit traffic
maintenance.
statistics, such as the number of vehicles passing through an
• Waypoint Nodes: There are two types of waypoint nodes:
intersection. These nodes can be linked to sensors measuring
networked and stand-alone. Networked nodes perform
air quality, temperature or humidity at important locations in
heavy data logging operations and are permanently linked
the city, and all readings can then be broadcast through a
with a gateway node. Such nodes could be placed along
mesh network of various waypoint nodes to in-car units and
major thoroughfares, freeway entrances and exits and at
a central gateway node for further processing.
major intersections. In addition to capturing and transmitting
traffic information, these nodes could broadcast useful driver
information, such as nearby gas stations or hospitals, to
freescale.com/beyondbits
Low-Cost Driver Assistance 78
car unit nodes. These waypoint nodes should be capable
of handling traffic on either side of the road. Thus, each
car unit would inform the waypoint node about its heading
and the waypoint node would respond with pertinent
information. Since these nodes are mesh networked with the
gateway node, they can be updated with information on new
landmarks and utilities in their vicinity.
Stand-alone nodes are temporarily deployed and may or
Setup
Every ZigBee car unit node has a unique ID assigned to it,
much like the vehicle’s registration number. At periodic intervals,
the car unit sends out a “ping” packet that includes the ID.
On receiving a ping, a waypoint unit will transmit a particular
message in return.
Application
may not be linked to gateway nodes in the area. They can be
On a broad level, the applications can be classified in the
used as emergency notification nodes that warn approaching
following three categories:
traffic about accidents, construction in progress and other
1.Alert scenarios
road hazards. These would be removed once the hazard has
2.Information broadcasting
been resolved. Stand-alone waypoints can also serve as
advertisements, which would not require a connection to the
city administration waypoint network.
• Car Unit Nodes: These are the nodes placed in each car to
3.Data logging
Alert scenarios
These scenarios use the information to alert drivers to
communicate with waypoint nodes. These nodes would have
hazardous situations on the road ahead. A waypoint unit
a human interface, such as a keypad, LED display or LCD, for
detects an approaching vehicle and transmits an alert
user-friendly access to the system.
message that identifies upcoming hazards, such as:
In Figure 1, the waypoint nodes marked 1–4 could effectively:
1.Provide alerts about traffic at potential blind spots
2.Provide information on various landmarks, such as gas
stations, malls and hospitals
• Speed bumps or breakers
• Blind turns
• Road maintenance
• No parking, no entry or speed limit changes,
such as school zones
3.Provide information about approaching trains at a
• Pedestrian crossings and hospital or fire station
railroad crossing
4.Temporarily provide a warning about construction and other
traffic obstructions
entry and exit points
• Approaching vehicles on single lane curved roads,
especially in hilly areas
In the next sections we will see how all the nodes working
together can collectively support multiple applications.
Figure 2 shows how waypoint units are placed to give the
automobile driver advanced warning in time to take corrective
actions. The process for warning vehicles in a blind turn vicinity
could be as follows:
Example of Typical Node Placements
• In Figure 2, the waypoint node detects car A approaching the
intersection (receives the car’s ping).
• The waypoint node logs car A’s ID and transmits a “blind
corner” alert.
2
• On receiving this warning packet, the car unit in car A will
give the driver both an audio and visual warning of the “blind
3
3
2
• Now, while car A is still within the range of the waypoint
node, car B comes within range of the waypoint node.
2
• The waypoint node detects car B and changes its broadcast
1
1
corner” alert.
message to “multiple cars approaching blind turn.” Because
2
it is a broadcast, it is received by both cars.
4
• Again, car units of both cars sound warnings and light
Construction Site
up a red LED. A warning message is also displayed on
each car’s LCD.
In-Car Nodes
Gateway Nodes
Figure 1
freescale.com/beyondbits
Waypoint Nodes
• The drivers of both cars can slow or stop as required.
• When both cars leave the range of the waypoint node, the
node stops broadcasting.
Low-Cost Driver Assistance 79
Advanced Warning Approaching Corners and Obstacles
Let’s assume a case where car A and car B are approaching the
blind turn at 70 Km/h (19.44 m/s), simultaneously, which is the
posted speed limit (Factor 4). Factor 1 equals 50m (conservative
estimate), and the data rate is 50 Kbps (Factor 2). At 70 Km/h,
the approximate stopping distance is 43m, which includes
Car B
driver reaction time. Let’s say the alert message is 800 bits long.
A and B would be detected at a distance of 50m from the
waypoint node, and at 50 Kbps, 16 ms elapse in transmitting
Waypoint Unit
Alerting
an 800-bit alert message, within which time the cars travel a
Car A
distance of around 32 cms. Subtracting this figure from 50m still
leaves us comfortably placed within the 43m stopping distance.
Information broadcasting
This category of applications provides the driver with
ROAD
WORK
information that ranges from one level below safety-critical to
simple advertisements for various commercial establishments.
Waypoint Unit
Alerting
Some examples are:
• Road signs
• Nearest petrol/gas filling stations
Figure 2
• Nearest hospitals, hotels, markets, car service stations and
landmark information
For all alert scenarios, the placement of the waypoint units must
allow the alert message to be sent out early enough to give the
• Directional guides, such as destination A is 2 km straight,
driver enough time to react. The correct placement of the unit
destination B is 3 km right and destination C is 3 km left from
depends on the following factors:
the present location
Factor 1: The broadcast range of the waypoint unit or the car
unit (whichever is shorter)
Factor 2: The data rate of the ZigBee link between the car and
the waypoint unit
• Advertisements for roadside eateries
Data logging
Each waypoint unit at major intersections and on major freeway
entry and exit points can maintain a log of passing vehicle IDs
plus a timestamp. Nodes can timestamp the entry and exit of
Factor 3: The average human reaction time
vehicles in their hearing range and log the duration spent within
Factor 4: The posted speed limit, which helps determine the
average distance it takes for the car to come to a halt
this range. This can help the city planners profile the traffic
patterns and volumes.
Roadside Facilities and Landmark Information Access
Fugitive Vehicle Tracking
Waypoint
Unit 3
Waypoint Unit
(Milestone, temperature,
nearest gas station location)
Waypoint
Unit 2
Waypoint Unit
(Advertisement)
Roadside
Eatery
Waypoint
Unit 1
Figure 4
Figure 3
freescale.com/beyondbits
Low-Cost Driver Assistance 80
In a given location, a few dozen waypoint units could be
connected through a mesh network to a gateway node, which,
Mobile Unit Design without LCD
LED
Panel
in turn could be integrated with an administration office LAN.
The gateway node would update its master log by regularly
querying each waypoint unit in the mesh network. The
information from the master log could be pulled to create a
GPIO
consolidated report on a daily or monthly basis. By integrating
MC1322x
Platform in
Package™
air quality, temperature and humidity sensors with the same
waypoint units, the locality’s air quality can also be effectively
monitored. Since these applications will require intensive data
logging, fast, high-endurance, non-volatile memory with error
correction capability should be included in the waypoint units.
The solution could also be used to track stolen or fugitive
Figure 6
Static Unit Design
vehicles via the following steps:
LED
Panel
• Once an alert for a particular vehicle has been issued, every
gateway node is sent the vehicle’s ZigBee unit’s ID.
• The gateway nodes then pass it on to their respective
MC1322x
Platform in
Package™
• The waypoint units then enter a special mode where
they compare each vehicle ID they log with the “red alert”
ID. When a waypoint unit finds a match, it alerts the
gateway node.
• A rough route of the vehicle can be tracked, including the
UART
GPIO
waypoint units, along with a “red alert” packet.
USB
Figure 7
time each waypoint unit identified the vehicle.
System details
We introduce the terms “mobile unit” and “static unit” here.
can be applied through GPIOs or RGPIOs and can be used in
The ZigBee unit installed in the vehicle is called the mobile unit,
a low-cost solution in place of an LCD. Also, waypoint nodes
while a waypoint unit on the road is the static unit.
and gateway nodes do not require LCDs, as a technician can
In a mobile unit, an LCD screen and an array of LEDs on a
vehicle’s dashboard serve to display the messages and alert
connect the node to a laptop to view its information during debug
and maintenance. Audio alerts are a must for all mobile nodes.
the driver along with audio warnings. The kind of LCD used
To conserve power, the static unit is in sleep mode most of the
(segmented or color) depends on the kind of MCU used and
time, waking up when it detects an approaching vehicle. Solar
the cost of the unit. If the MCF1322x Platform in a Package™
energy can also be used to power the waypoint and recharge its
(PiP)[1] is used, then the LCD can be connected via SPI. LEDs
batteries for enhanced 24-hour energy efficiency.
Figure 5
freescale.com/beyondbits
Static Unit Design for Traffic Monitoring and Vehicle Tracking
LED
Panel
LED
Panel
GPIO
GPIO
MC1322x
Platform in
Package™
MC1322x
Platform in
Package™
SPI
LCD
GPIO
Mobile Unit Design with LCD
GPIO
SPI
Keypad
Non-Volatile
Memory
Figure 8
Low-Cost Driver Assistance 81
The Freescale advantage
Summary
Freescale provides all the building blocks used to develop
In this article we discussed the importance of an efficient driver
a complete ZigBee-compliant platform solution, including
assistance system and how it can help us improve safety
hardware, software, tools and reference designs. Freescale
standards on the road. The solution can significantly reduce
offers hardware solutions ranging from a single-chip advanced
the risk to drivers and enable better traffic management. Our
ZigBee-compliant PiP[1] to a simplified two-chip solution with
ZigBee-based driver assistance system provides a very cost-
a ZigBee transceiver (radio) and a low-power microcontroller
effective alternative to more expensive commercially adopted
(MCU). In a two-chip solution, the MCU should include an LCD
systems like GPS, which provide navigation but do not have any
controller or two or more SPI interfaces. ZigBee features, such
fore-warning capabilities. Further details on the comparison of
as the ability to securely transfer messages over a channel
ZigBee with other wireless protocols can found in the additional
without interfering with other wireless networks[5], ensures that
Beyond Bits 4 article, Location Monitoring Using ZigBee/IEEE
the data is delivered intact.
802.15.4.
All modules would include a Freescale MC1322x MCU,
We showcased a number of ZigBee-enabled application
featuring:
scenarios related to automotive and road safety, such as data
• 128 KB serial flash
logging, information broadcasting and driver alerts. In today’s
• 96 KB static RAM
market, where many solutions are emerging that are related
to vehicle-to-vehicle and vehicle-to-road communications, we
• 80 KB ROM
believe Freescale’s ZigBee solutions can play a larger role in
• Hardware acceleration for IEEE 802.15.4
promoting a safer, more informative driver experience.
Car units have these extra onboard components:
References
• LED panel to indicate alerts and other vital information
• LCD panel (optional) to display the messages transmitted by
waypoint nodes
[1] MC1322x Advanced ZigBee-Compliant SoC Platform
for the 2.4 GHz IEEE 802.15.4 Standard Reference Manual,
www.freescale.com/files/rf_if/doc/data_sheet/MC1322x.pdf
Waypoint nodes with data logging capability will also have
[2] www.freescale.com/zigbee
SPI flash, which can be interfaced with the SPI on board the
[3] Research On The Road To Intelligent Cars,
MC1322x MCU.
ScienceDaily (Mar. 11, 2006), www.sciencedaily.com/
releases/2006/03/060311090833.htm
Freescale also provides a full integrated development
[4] Concept of an Intelligent Adaptive Vehicle Front-Lighting
environment (IDE) for developing embedded applications. The
Assistance System, H. Shadeed, J. Wallaschek; Proceedings
IDE is complemented by the BeeKit™ Wireless Connectivity
of the 2007 IEEE Intelligent Vehicles Symposium
Toolkit, a comprehensive package of wireless networking
[5] Zonal Location and Asset Tracking with ZigBee Technology
libraries, application templates and sample applications.
(using RSSI), Cambridge Consultants (Oct. 12, 2006),
www.zigbee.org/imwp/idms/popups/pop_download.
asp?contentID=9567
Nakul Midha, Varun Jain, Prashant Bhargava and Suhas Chakravarty are design engineers at Freescale’s India Design Center. Nakul
and Varun have performed verification and validation of various SoC projects. Prashant has worked in design, architecture and
verification of SoC and IP projects while Suhas has been working in SoC architecture and design. All hold bachelor of engineering
degrees in electronics and communication.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Low-Cost Driver Assistance 82
83
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Deepak V. Katkoria and Alberto C. Arjona
3-D Facial Recognition System
Based on the MPC5121e microprocessor
Introduction
In practice, this is difficult to achieve because the baseline
separation and angles are hard to measure accurately. However,
Research in computer graphics has brought attention to 3-D
modeling. With advanced progress in image recognition models,
designers have opened a whole new field of applications,
a demonstrated technique for obtaining range information via
laser triangulation without knowing the values of A, β and γ
has been developed. The algorithms of this technique could
including 3-D human face recognition. This article proposes a
be successfully implemented in 32-bit processors, such as the
design and algorithm for a 3-D facial recognition system
MPC5121e multicore processor.
using Freescale’s versatile MPC5121e microprocessor. Its
MPC5121e implementation
triple-core architecture features an e300 Power Architecture®
processor core, 2-D/3-D graphics engine (MBX) and audio
The MPC5121e integrated processor includes multiple cores
processor (AXE) core.
and multiple buses that provide higher performance and allow
Face detection algorithms
for lower system cost and higher reliability.
To measure distance via triangulation, the calculation uses the
The MPC5121e processor’s rich set of integrated peripherals
baseline distance between a laser beam and a camera as well
includes PCI, parallel advanced technology attachment (PATA),
as their angles to a target point (see Figure 1).
Ethernet, USB 2.0, twelve programmable serial controllers
(PSC), display controller (DIU) and video-in unit (VIU), all of
Triangulation Principle
which fulfill the requirements for a facial recognition system.
The system can use the integrated display controller (DIU) to
P1
support an LCD display with a maximum resolution of 1280 x
γ
720p and color depth of up to 24 bits per pixel. This will create
B
an excellent image model for the user. Another advantage of
α
A
DIU is its blending capability, which can be used to blend up to
P3
three different planes on the display. The system uses DIU for
β
C
displaying the image model and for overlaying the data images
to guide the user’s decision making process.
P2
The VIU plays a crucial role in the system’s video interface. The
VIU core accepts an ITU656-compatible video stream from the
Figure 1
video camera, providing a wide selection of display modes,
P1 and P2 represent two reference points, the camera and
from QVGA to XVGA 8-bit/10-bit ITU656 video input.
laser beam, while P3 is a target point. The range B can be
The internal DMA engine transfers all incoming video data from
determined from the known values of the baseline separation A
and the angles β and γ using the Law of Sines:
sin α
A
=
sin β
B
=
triangulation algorithm mentioned above. Once the processor
calculates the position of the vertex (point of interest) from
sin γ
C
FIFO to memory. This data is analyzed and computed using the
the memory, then the matrix parameters are transferred to the
(1)
MBX core. This is a 3-D accelerator that recreates a real-time
rendering of the matrix (stored in memory) on the display.
freescale.com/beyondbits
3-D Facial Recognition System 83
Facial Recognition System Block Diagram
Video
VIU
RJ45
+
PHY
FEC
DIU
AXE 8KB
I-Cache
MBX
Multi-Port
Memory
Controller
200 MHz AHB
Mirror
DDR 2
Memory
Display
e300
Power Architecture®
32 KB IC 32 KB
128 KB
SRAM
PATA
83 MHz IP Bus
MiniUSB
Type AB
Connector
Laser
Controller
USB 2
+
PHY
SDHC
I2C
GPIO
PSC
WDT
IPIC
RTC
802.11g
Wi-Fi
SDIO
Module
Data
Storage
Figure 2
Image modeling is an important factor in a facial recognition
Real-time remote access and control of the facial recognition
system. Facial recognition, facial animation, video compression/
system from a central location is possible by using 100 Mbps
coding, 3-D games, facial expression recognition, human action
Ethernet and a Wi-Fi interface.
recognition for surveillance and object recognition are all image
modeling outputs.
In Figure 2, the VIU is a specific module where the video input is
processed. It is used as a direct interface between the camera
Users can store the display format and other useful information
and the processor. The DIU is the module that controls the
on a hard disk. The MPC5121e’s PATA block offers two
video output and LCD display. The laser control algorithms are
operation modes (PIO and DMA mode) that can be active at the
processed by the MPC5121e. Some of the GPIOs and PSC are
same time.
used as interfaces between the laser controller block and the
A facial recognition system based on the MPC5121e processor
e300 core.
can provide direct interface to display, video and storage using
fewer components. The Power Architecture core and MBX core
perform the post-processing for image reconstruction.
Designers can use MPC5121e’s PSC and GPIO interfaces to
control the laser’s movement and intensity. The PSC can be
used for serial communication between the laser unit and the
MPC5121e processor while GPIO can work as on/off signals.
Depending on the selected laser, a user can control its 180º
circular movement with a timer, which turns the laser-positioning
motor drive on and off to rotate the laser beam.
freescale.com/beyondbits
3-D Facial Recognition System 84
It is a non-linear system. Solving these equations is a problem
Laser Triangulation Schematic Diagram
of high computational cost. Nonetheless, by placing the
reference system Z axis along the laser beam plane (j = 0), the
Point P
system is reduced. The new system of equations is given by:
Lx = |L|cosϕ = Ax + Cxyx
0 = Ay + Cxyy
(6)
(7)
Lz = |L|sinϕ = Az + Cxyz
(8)
The analytic solution of the set of equations (6) to (8) is given by:
Cxy
L
Lx = |L|cosϕ = Ax + |Cxy|α
Aγ
|Cxy|γ = –
β z
(9)
(10)
Lz = |L|sinϕ = Az + |Cxy|γ A
(11)
…where α, β, γ are the directional cosines of the vector Cxy, in
x
the laser’s frame of reference.
y
These vector components are found using the camera’s intrinsic
Figure 3
and extrinsic parameters. Because of the importance of the
General triangulation equations
camera location and its space orientation, it is necessary to
The elements of the data acquisition system along with the
transformation matrix are the angles between each unitary
point where the object is illuminated by the laser form a triangle
vector from the original frame to the new frame. If both frames
of vectors (Figure 3). The objective of laser triangulation is to
fit in one common axis, then the parameters are simplified in
find the spatial coordinates of the illumination point (Point P) in
just one angle, as illustrated in Figure 4. This is the case for this
a defined frame of reference.
application.
find a transformation matrix. In general, the elements of a
Where,
Parameter of the Camera's Transformation Matrix
L is the vector between the origin of the laser beam and point P
Z
A is the vector between the origin of the laser beam and the
optical center of the camera
C is the vector between the optical center of the camera and
Z
C
point P
Y
The geometrical relation is expressed in the following vectorial
ω
equation:
L = A + Cxy
(2)
X
From this equation, vector A as well as the directional cosines
C
ω
from the vector Cxy are known (see Camera Calibration section
below).
X
Equation (2) expressed in spherical coordinates, where j is the
angle between the vector L and X-Y plane and θ is the angle
between the laser beam plane and X axis, is:
|L|cosϕcosθ = Ax + Cxyx
|L|cosϕsinθ = Ay + Cxyy
|L|sinϕ = Az + Cxyz
freescale.com/beyondbits
(3)
Y
C
(4)
Figure 4
(5)
3-D Facial Recognition System 85
Camera calibration
The parameter in Figure 4 is represented in the following
transformation matrix:
^
^
βy
= -sinω 0 cosω
^
0
γz
-1
The objective of calibrating the 3-D laser scanning is to find
^
αcxc
cosω 0 sinω
αx
the parameters of the triangulation equations (13) to (15).
^
Those parameters are the vector A, the directional cosines
^
of the vector Cxy and the parameters of the homogeneous
= βcyc
γczc
0
(12)
Although there are various ways to model a camera, in
Replacing (12) into (9) to (11), the system becomes:
computer vision the pinhole model is often preferred because
Lx = |L|cosϕ = Ax + |Cxy|[αccosω + γcsinω]
Ay
|Cxyy| = –
γccosω–αcsinω Lz = |L|sinϕ = Az + |Cxy|[–βc]
(13)
(14)
(15)
Because the laser beam path projects a line on the exploration
surface, a rotating mirror is used to project the line along this
surface (in this case a human face). This implies a mobile
In general, a mobile frame has translation and rotational
matrix that separates rotations and translations in two isolated
partitions.
Lz
1
founded in lateral extremes due to chromatic and radial
distortion in the lenses. Many calibration techniques omit these
Graphics on the ADS512101 Board Using OpenGL ES” at
www.freescale.com (search for AN3793)]
All the digitized points can be stored in a data base. For
face recognition, these points are the comparison parameters
that are different for every face scanned. Traditional techniques
are based on extracting landmarks, or features, from a
rw
1
into consideration that image deviations in cameras are
such as the MPC5121e processor. [See application note “3-D
use a homogeneous transformation matrix. This is a block
= T(ψ)4x4
solve the problem in an iterative way.[2] It is important to take
using OpenGL-ES and displayed using an embedded controller,
complex and difficult to drive. A very good alternative is to
rv
problem. However, it is possible to find several algorithms that
After digitizing the model, the output files can be manipulated
components. Conventional transformations are inherently
0
problem of optimization, specifically a parameter estimation
Output
the information needs to be referenced to a fixed system.
ru
of its simplicity.[1] Finding the parameters of the model is a
deviations for simplicity.
frame of reference in the laser beam, which then means
Lx
transformation matrix T.
two-dimensional (2-D) image of the subject’s face. These
(16)
features are affected by changes in lighting, relative position
and perspective variations. Some of these traditional techniques
If the reference system is located in the laser, the origin
are based on the Eigenface method, neural networks or
is defined as OUVW and the fixed system of reference as
hidden Markov models. These techniques are very complex
OXYZ, and (ru, rv, rw)T is the triangulated point (0, Ly, Lz)T, using
and expensive.
equations (13) to (15). Transformation matrix T describes, in
general, the dynamics of the mobile mirror frame in a partition
of rotation and a partition of translation.
T(ϑ, φ, ψ, x, y, z)4x4 =
γ3x3(ϑ, φ, ψ)
T3x1(x, y, z)
01x3
11x1
(17)
Where,
γ3x3 is the rotation partition
Ŧ3x1 is the translation partition
y is the angle of rotation of the mobile mirror on the z
component of the fixed frame
freescale.com/beyondbits
3-D Facial Recognition System 86
Application and Driver Tools and Software
ID
Description
Software and Tool Type
Vendor
CW-MOBILEGT
Integrated tool suite environment for mobileGT
IDE: debug, compile and
Freescale
applications. *Board support packages are
build tools
®
offered free of charge, as-is.
KINETIC ECG ALGORITHM
The Kinetic ECG Algorithm provides signal
Protocol stacks and
processing and interpretation of the ECG
middleware
Monebo
waveform, thereby aiding health care
professionals in assessing cardiac parameters
ADS512101
MPC5121e, ADS5121, Mini-ITX, USB, audio,
Evaluation/development
Silicon Turnkey
video, Ethernet, ATA, secure digital, automotive,
boards and systems
Express
consumer, industrial, portable
MPLUS5121
MPC5121e, Mini-ITX, Media5200, LCD, Ethernet, Hardware components
Silicon Turnkey
PATA, SATA, CAN, DVI, mobileGT, telematics,
Express
automotive, ADS512101, graphics
MBX-SDK
Available from FAE and marketing team
Software development kit
Open Source
based on Linux® OS
Table 1
Conclusion
On the other hand, the 3-D facial recognition system measures
the positions of different points on a face and uses this
A new facial recognition technology based on Freescale’s
information to create a 3-D surface image that contains the
distinctive features of a specific face. The principal advantage of
3-D facial recognition is that it can identify a face from a number
of viewing angles. In addition, it is not affected by changes in
MPC5121e processor can provide a low-cost solution to help
ensure public safety. The MPC5121e processor is a multifeatured solution that can help designers transform their ideas
into reality, turning a big box facial recognition system into a
lighting as are the traditional techniques mentioned previously.
compact, low-cost device for security applications.
Tools and software
To learn more about the MPC5121e processor, visit
For developing applications and drivers, Freescale and its
www.freescale.com/mobilegt or contact your local FAE.
partners provide the tools and software listed in Table 1.
(Reference manual URL: www.freescale.com/32bit)
Soon, additional drivers are expected to be available from
References
other third-party vendors.
[1] “Multiple View Geometry in Computer Vision,” Richard
Hartley and Andrew Zisserman, Second Edition, Cambridge
University Press, March 2004
[2] Applied Mathematics and Computation ISSN:0096-3003,
Rudolf Scitovski, Marcel Meler
Deepak V. Katkoria is an IMT application engineer, formerly with Freescale Semiconductor. He has his degree in engineering
from Pune University. While at Freescale, Deepak supported the MPC5200B and MPC5121e product families focusing on
graphic support. Alberto Arjona Cabrera (Dmitri XIII) is a university professor and Freescale application engineer in Guadalajara,
Mexico. Throughout his Freescale career he submitted several mathematical algorithms related to computer vision and signal
processing applications. He received a master of science degree with a control theory specialty and has previously served as a
captain in the Mexican Air Force.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
3-D Facial Recognition System 87
88
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Dugald Campbell
Making Industrial Systems Safer
Meeting the IEC 60730 standards
Introduction
With the introduction of the International Electrotechnical
IEC 60730/EN 60335 segments automatic control products into
three different classifications:
Commission’s IEC 60730 standards series, household appliance
Class A: Not intended to be relied upon for the safety of the
and industrial control manufacturers now have to consider
equipment
introducing new design enhancements to their automatic
electronic controls that ensure their component’s safe and
Class B: To prevent unsafe operation of the controlled
reliable operation.
equipment
IEC 60730 standards series on automatic electrical controls for
Class C: To prevent special hazards
household and similar use, Part 1, is one of many standards
Class A controls are deemed not hazardous if the software
used by large appliance manufacturers. IEC 60730 is also
referenced by other standards for other systems, such as boiler
ignition systems (EN 297) and medical electrical equipment (IEC
malfunctions, and thus IEC 60730 does not require the
manufacturer to implement system checks.
60601), that cover general requirements for basic safety and
A class B system likely has automatic controls where a possible
essential performance. For details on IEC specifications, visit
hazard could occur and result in harm to a human being.
www.iec.ch.
Generally, the controls are characterized by how the class B
IEC 60730 discusses mechanical, electrical, electronic,
environmental, endurance, EMC and abnormal operation of AC
system is implemented and if the critical safety system features
some form of redundancy (in hardware and/or software).
Class B System That Ensures the Motor Will Not Overheat
appliances. IEC 60730 Annex H: Requirements for Electronic
Controls, specifically relates to microcontrollers (MCUs),
detailing new test and diagnostic methods to ensure the safety
Software
Function
of embedded control hardware and software for automatic
systems. Its focus is to provide measures to ensure that the
embedded software design functions safely and reliably if a fault
condition occurs within the system’s sub-components, such
Hardware
Function
as CPU, memory, interrupts, program counter, communication
interfaces and software program flow.
Hardware PTC monitors temperature.
Software also monitors motor current.
If one function fails the other ensures safe operation.
Today the majority of automatic electronic controls use singlechip MCUs (microprocessors with embedded memory and
Class B—a fault occurring in a safety-critical software
routine will not result in a hazard due to another software
routine or redundant hardware intervening.
input/output peripherals). Manufacturers develop real-time
embedded software that executes within the MCU and provides
the hidden intelligence that controls an electro-mechanical
Figure 1
device. Measures detailed in IEC 60730 are critical to help
ensure that such an electro-mechanical device will not be
hazardous to users.
If the automatic control relies on a specific safety function
and there is no redundancy, then the system will likely be
deemed class C. If the automatic controls directly control an
explosive substance, such as gasoline, the system will be
deemed class C.
freescale.com/beyondbits
Making Industrial Systems Safer 88
Class C System That Ensures No Overheating of a Motor
Interrupt handling and execution is verified by a method called
independent time base monitoring. This requires a regular
periodic check from a time base independent of the CPU
clock. An example is having a real-time interrupt clocked by an
Software
Function
independent 1 kHz oscillator that includes a check on token
counters of all interrupts utilized. If any irregularity is discovered,
Class C—a fault occurring in a safety-critical software
routine will result in a hazard.
Figure 2
then the CPU is forced into a routine that places the application
in a safe state.
The clock or the CPU clock is also required to be checked by
The various components of an embedded system that must be
tested are summarized in Table H.11.12.7. of IEC 60730 Annex
H. For each of the listed class B and class C components,
optional measures are given for the manufacturer to deploy
within the automatic system.
an independent time-base monitor. An independent clocked
timer, such as a real-time interrupt, can be used to make
timestamps at regular intervals from a CPU clocked timer.
Additionally, Freescale MCUs feature a watchdog counter that
is clocked by an independent time base. This feature provides
an additional check if the CPU clock stops, ensuring that an
Class B systems
asynchronous reset occurs to place the system in a safe state.
Table 1 summarizes the required components that need to
Watchdogs that are clocked from the same source as the CPU
be tested and monitored to ensure the system meets class B
cannot provide this protection.
specifications.
For invariable memory (flash), the manufacturer is required to
Class B Components That Need Testing and Monitoring
check for single bit faults, which can be performed using a
modified checksum routine. The main issue here is that there
Class B 60730 components required
to be tested on electronic control
(see Table H.11.12.7)
Fault error
1
1.1 CPU registers
Stuck at
2
1.3 CPU program counter
Stuck at
3
2. Interrupt handling and execution
No interrupt or too
frequent interrupt
4
3. Clock
Wrong frequency
5
4.1 Invariable memory
All single bit faults
6
4.2 Variable memory
DC fault
7
4.3 Addressing (relevant to variable/
invariable memory)
Stuck at
a 16-bit CRC. For small memory footprints, the CRC can be
8
5. Internal data path
Stuck at
calculated in software within a reasonable time frame.
9
5.2 Addressing
Wrong addr
Variable memory (RAM) can be verified as having no DC faults
10
6. External communications
Hamming distance 3
by executing a periodic test using the well-known March C or
11
6.3 Timing
Wrong point in time/
sequence
March X test pattern. These March patterns (Figure 3) require
12
7. I/O periphery
Fault conditions
specified in H.27
designer must segment the RAM into favorable sizes, checking
13
7.2.1 Analog A/D and
D/A converters
Fault conditions
specified in H.27
each segment in sequence. Freescale has developed March
14
7.2.2 Analog multiplexor
Wrong addressing
which can help speed up the development of a class B system.
Table 1
CPU registers can be monitored by using a periodic test routine
that writes a 0xAA pattern followed by a 0x55 pattern to verify
no register bits are stuck at a 1 or 0 state.
is no common method or routine for deploying a modified
checksum. Manufacturers have taken the approach of deploying
the program memory’s cycle redundancy checking (CRC)
signatures because it is well understood and has a reliable
mechanism for identifying single-bit errors. After all bytes have
been read, each byte is run through a CRC calculation. Once
that calculation is made, it can be compared to a “golden” CRC
signature to verify no single faults exist. Freescale has created a
hardware CRC engine that will provide a fast method of creating
a lot of execution time for most embedded systems, and the
C and March X tests for HCS08 and MC56F80xx controllers,
The March X pattern is a subset of March C where only steps 1,
2, 5 and 6 are executed, thus saving CPU execution time.
Components 4.3 addressing, 5.0 internal data path and
5.2 addressing (Table 1) are covered by implementing the
A CPU program counter can be similarly tested with a
above variable and invariable periodic test routines. 6.0 external
0x55/0xAA pattern by placing small routines at addresses
communication refers to protocols that are used to interface
0x5555.. and 0xAAA.. that have return from subroutine
with components external to the automatic control system, such
instructions (RTS). The CPU should execute these routines and
as UART communication between a control board and a motor
then examine the contents in the stack pointer.
control board. There are several optional measures to ensure
reliable communication, such as adding a 16-bit CRC to data
freescale.com/beyondbits
Making Industrial Systems Safer 89
March C per “van der Goor, 1991” Test Pattern
Write all
zeros
00000
00000
.....
00000
00000
00000
.....
00000
Read zeros
11111 Read zeros
00000
.....
00000
STEP 1
11111
00000
.....
00000
11111
11111
.....
00000
Write ones
inc address
11111
11111
.....
11111
Read ones
00000 Read ones
11111
.....
11111
Write ones
inc address
STEP 2
00000
00000
.....
11111
Write zeros
inc address
STEP 3
00000
..... Read zeros
00000
11111
00000
.....
11111
11111
00000
.....
00000
00000
00000
.....
00000
11111
Read zeros
Write zeros
inc address
00000
11111
.....
11111
Write ones
dec address
Write ones
dec address
11111
..... Read ones
11111
00000
11111
..... Write zeros
00000 dec address
00000
11111
.....
11111
11111
11111
.....
11111
00000
Read ones
STEP4
Read all
zeros
00000
.....
00000
00000
Write zeros
dec address
STEP 5
STEP 6
Figure 3
transferred via the communication port and transfer redundancy,
Class C Components That Need Testing and Monitoring
which is simply sending data twice. A timing component, as
Class C 60730 components required
to be tested on electronic control
(see Table H.11.12.7)
Fault error
1
1.1 CPU registers
DC fault
2
1.3 CPU program counter
Stuck at
3
1.2 CPU instruction decoding
and execution
Wrong decoding or
execution
4
2. Interrupt handling and execution
No interrupt or too
frequent interrupt
5
3. Clock
Wrong frequency
6
4.1 Invariable memory
99.6% coverage of all
info errors
7
4.2 Variable memory
DC fault & dynamic
cross links
above will provide IEC 60730 Class B compliance.
8
4.3 Addressing (relevant to variable/
invariable memory)
Stuck at
Class C systems
9
5. Internal data path
Stuck at
10
5.2 Addressing
Wrong addr
11
6. External communications
Hamming distance 4
specifications.
12
6.3 Timing
Wrong point in time/
sequence
For class C systems there is one additional component that
13
7. I/O periphery
Fault conditions
specified in H.27
14
7.2.1 Analog A/D and
D/A converters
Fault conditions
specified in H.27
1.2 CPU instruction decoding and execution, which is required
15
7.2.2 Analog multiplexer
Wrong addressing
to check that the CPU is decoding the instructions used to
Table 2
in the wrong point in time, and sequence of external data
exchanges can be reliably checked using independent time slot
monitoring, the same as used for interrupts.
Components 7.0 periphery, 7.2.1 analog I/O and 7.2.2 analog
multiplexers (Table 1) require the manufacturer to carry out
plausibility checks prior to application use. These employ a
number of techniques, including making upper/lower limits on
ADC inputs, redundant ADC inputs to check multiplexer and
short circuit and open circuit tests of adjacent pins to a safetycritical signal line.
Subjecting a system design to all of the measures described
Table 2 summarizes the required components that need to
be tested and monitored to ensure the system meets class C
needs to be tested and more stringent measures placed on
four of the existing components. The additional component is
perform the safety feature. Table H.11.12.7 of IEC 60730 Annex
H provides three optional measures to test for this component:
• Dual CPU implementation with comparison
• Internal hardware detection
• Periodic self-test using equivalence class test
freescale.com/beyondbits
Making Industrial Systems Safer 90
CPU instruction decoding
and execution
Freescale Power Architecture® products, such as the MPC5510
CPU register test requires the manufacturer to check for DC
faults on the CPU registers, which can be accomplished using a
walking 1s and walking 0s pattern.
family, have dual CPU cores that can execute simultaneously,
Figure 4 shows a walking 1s pattern on an 8-bit register. By
and the execution results can be compared prior to executing a
executing this pattern and confirming the data at each step, all
safety function. Freescale provides internal hardware detection
DC faults will be exposed. A walking 0s pattern is similar to the
through error code correction (ECC), which uses a form of
walking 1s pattern with all data inverted, and it should also be
parity when reading program instructions and can automatically
performed.
correct single parity errors. This feature can be found on S12X
family members, such as the MC9S12XE100, as well as the
MPC5510 family, which has ECC on both flash and RAM
memory.
Variable memory (RAM) testing requires the same techniques
as used for the CPU register (walking 1s and walking 0s to
check for DC faults). For RAM arrays of >2 KB, executing such
a test can be time consuming. However, the manufacturer can
For our 8-bit S08 CPU, Freescale has developed a CPU
split the RAM array into small segments (32–128 bytes), and
instruction test that can be executed prior to running power-up
each RAM segment can be tested in sequence while executing
on the end application. This test routine requires approximately
the application. Note that the manufacturer will likely need to
2 KB of program memory, but it’s modular, which allows
pause the application while it tests each application and disable
removing tests for instructions that are not utilized by the safety
interrupts to ensure no program variables are inadvertently
application. Execution time for the full test is 3666 CPU BUS
corrupted.
cycles (183.3 μs at 20 MHz).
Freescale has developed a walking 1s and walking 0s RAM
TÜV SÜD has validated and certified this test routine to be IEC
test for the HC9S08AC60 MCU, which segments the RAM into
60730-compliant, and the test routine is available for Freescale
48-byte segments. This is modular software, however, and can
customers. Please contact your local Freescale representative
be easily modified to support larger or smaller RAM arrays.
to obtain free license and software information.
Invariable memory (flash) for class C systems requires the
In addition to the extra component to be tested, there are four
user to look for 99.6 percent coverage of all bits. This can be
components of class C systems that require more stringent
covered by ECC or by a 32-bit CRC. Optionally, redundant
testing:
memory can be deployed where the CPU can periodically check
• CPU register test
that both arrays compare.
• Variable memory (RAM)
For external communications components meeting class C
• Invariable memory (flash)
specifications, the manufacturer is required to implement either
• External communications
a 32-bit CRC to data transfers or deploy data redundancy,
where the data is sent at least twice and the redundant
Walking 1s Pattern for 8-bit Register
data is modified in some form, such as inverting the second
piece of data. Another option is to use comparison or
1
0 0 0 0 0 0 0 0
redundant functional channels with comparison. By using two
2
1 0 0 0 0 0 0 0
communications ports and sending the data on both ports, the
3
0 1 0 0 0 0 0 0
4
0 0 1 0 0 0 0 0
5
0 0 0 1 0 0 0 0
6
0 0 0 0 1 0 0 0
7
0 0 0 0 0 1 0 0
8
0 0 0 0 0 0 1 0
9
0 0 0 0 0 0 0 1
10
0 0 0 0 0 0 0 0
software can compare the received data to ensure they match.
For each of the 10 steps the data
is verified to ensure no DC faults.
Figure 4
freescale.com/beyondbits
Making Industrial Systems Safer 91
Software
Summary
Freescale has developed periodic test routines for Freescale
Although these hardware and software safety features have
MCUs that users can deploy in their application code. These
been developed to help manufacturers meet the IEC 60730
developed routines have each been certified by a certification
standard, it is clear that these features are also needed in
body, such as VDE or TÜV SÜD, to meet IEC 60730
medical applications as determined by IEC 60601.
requirements.
Freescale has developed hardware features, such as
independent watchdogs, CRC engines, ECC and software
Certified IEC 6073-Compliant Freescale
Developed Test Routines
Class B
periodic test routines to help manufacturers gain IEC
60730 compliance. These features are available on HSC08,
HCS08
MC56F80xx
CPU register stuck at
•
•
MC56F80xx, S12X, ColdFire® and Power Architecture products,
Program counter stuck at
•
•
providing flexible options for the manufacturer based on the
Watchdog timerout test
•
•
complexity and size of the automatic control system. Freescale
RAM March C test
•
•
is also developing enhanced hardware safety features for future
RAM March X test
•
•
products to help improve system software integrity and safety,
Flash CRC (software CRC
calculation)
•
•
Flash CRC (hardware CRC engine)
•
which will be available in 2009 and beyond.
Class C
CPU register DC faults
CPU instruction test
•
RAM walking 1s test
•
RAM walking 0s test
•
Table 3
Dugald Campbell is an industrial systems solution engineer at Freescale Semiconductor. He has more than 20 years of experience in
embedded microcontroller design in the consumer and industrial market. His recent focus has been on large appliance, medical and
industrial safety applications.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Making Industrial Systems Safer 92
93
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
Bogdan-Constantin Holmanu
Wireless Sound Notification System
for Visually Impaired Persons
Introduction
According to a 2002 World health organization survey, there are
more than 161 million visually impaired individuals worldwide[1].
Memorizing outside landmarks and inside room layouts, as
well as using the touch sense to differentiate objects such as
communicate with a PC through an 802.15.4 connection
to download critical information. This data could then be
converted to speech by a text-to-speech (TTS) converter to
provide information to the visually impaired. To implement this
feature, an additional support person is required.
Hardware Block Diagram
medicines and different tools and utensils, help the visually
impaired navigate through everyday life. Their sense of hearing
can also help a great deal. Through acoustic guidance, a person
I2C
can estimate his or her motion and approximate the distance
SCI
Timers
especially in wireless communication, can enable new products
SCI
that can magnify the effectiveness of acoustic guidance to
facilitate daily needs.
S08 CPU
The wireless connection
ADC
ARM® CPU
This paper proposes a system that enables a certain
SPI
degree of acoustic support, such as guidance and object
differentiating, for visually impaired individuals. This support
can be achieved by using IEEE® 802.15.4 wireless-based
Flash
platforms. The real advantage of the 802.15.4 solution is its
Text to Speech Controller
and positioning of a specific object. Technology breakthroughs,
MC13192
2.4 GHz Radio TRX
low-power characteristics, which extend battery life and reduce
GPIO
maintenance costs. Acoustic support can be implemented
using body-attached audio hardware and additional memory
802.15.4 Platform
for message recording. The system is based on the 802.15.4
network data transfer service with link quality indication used to
approximate the distance between two nodes in the
wireless network.
DSP
Platform
Hardware overview
Audio In
Audio Out
The system consists of two types of devices (object and
personal) that can interact through 802.15.4 wireless
Figure 1
communication. Both devices are based on 802.15.4 platforms,
with either an S08 microcontroller (MCU) core or ARM® MCU
core and a 2.4 GHz 802.15.4 radio frequency (RF) transceivers.
The platforms used for object devices must have additional
audio hardware, from a simple MCU design with initegrated
analog audio hardware to a DSP-enabled platform with enough
memory for voice recording and increased processing capability.
For instance, a DSP-enabled object device could wirelessly
freescale.com/beyondbits
Software overview
The system has to be able to notify a visually impaired person
whenever he or she is within the desired proximity of an object.
To do this, the software must deliver a set of system functions.
Two modes of operation can be designed for both object and
personal devices—a paired mode, where two devices are
programmed to recognize each other, and a broadcast mode.
Wireless Sound Notification System 93
Paired mode is a good option for indoor use because it
all hardware platforms. The drivers and platform components
prevents interference from other 802.15.4 systems in the area,
are delivered with the 802.15.4 software solution as part of the
ensuring the integrity of the wireless network. Broadcast mode
MCU-specific project.
must integrate the broadcast service with an applicationspecific operation used for device recognition. This operation
can be implemented using a simple message-based handshake.
With broadcast mode, it is possible to deploy a large-scale
outdoor sound notification system for visually impaired persons
that provides acoustic support for applications such as traffic
lights or road and walkway signage. It can also be used indoors
for large public institutions, such as libraries or hospitals.
Broadcast systems need a constant power source and must
meet several mechanical and electrical design requirements.
The system must be able to filter other spectrums’ radio waves
and not allow harmful electrical noises to damage the hardware.
In addition, the outdoor device must be weatherproof to protect
the hardware from the elements.
Before accessing MAC services and platform components,
initialization routines must be called. The application’s major
task is to send broadcast messages at predefined times to
notify its presence to object devices. The interval between
broadcast messages must be short enough to cover even the
fastest movement that a person can make. To ensure this, the
time interval should be less than a tenth of a second. Smaller
time intervals, however, consume more power, so an adaptive
time interval can be used to manage the power consumption.
The interval is greater when no confirmation is received for
notification messages and smaller when confirmations
are received.
The broadcast message is sent using the data request service.
For both object and personal devices, the software application
can be built over the 802.15.4 media access control (MAC)
software libraries and platform-specific driver modules. The
applications require the full function device (FFD) MAC library[3]
to be implemented on both types of devices. The full function
device non-beacon (FFDNB) library includes all MAC features
and requires 24.2 kilobytes code size and 426 bytes of RAM
memory for the S08 platform. The MAC library for the ARM
platform is put directly into 44 kilobytes of ROM and contains all
MAC FFD functionality. All MAC libraries can be downloaded at
www.freescale.com[3]. The MAC stack can be accessed using
the BeeKit™ Wireless Connectivity Toolkit, a software tool that
can generate framework applications, including the MAC stack
and platform components for all of Freescale’s 802.15.4 solutions.
The personal device application software can be built on top
of the MAC library and software platform components. These
components contain the drivers for the S08 or ARM MCU
peripherals, as well as the typical services required by any
application, such as serial communication, timers and
non-volatile storage. They must also have the same API across
Application Message-Based Handshake Chart
The 802.15.4 MAC has long address and short address
data transmitting modes. In addition to the device address,
a personal area network ID (PAN ID) must be specified into
the data service’s parameters. A broadcast message is sent
using an 0xFFFF value for both the PAN ID and the short
address. After sending the broadcast message, the system will
immediately enter a low-power mode to extend battery life and
exit that mode after a set amount of time. Alternatively, instead
of using a clock-to-cycle low-power mode, a personal device
could be designed with a motion sensor that would wake
the device out of low-power mode only when circumstances
dictated that the device must send another broadcast message.
This feature can be used to save battery power when the
person is not moving or is not carrying the device. In Figure 3,
the blocks for this feature have dashed borders.
The battery lifetime can be estimated during the system’s
design stage using the experimental data published at
www.freescale.com[4] in the white paper, Ultra-Low-Power
Wireless Designs for Real-Time Communication (search for
“ultra-low-power wireless design”). The experiment setup
includes a demo board with the MC9S08QG8 16-pin 8-bit MCU,
MMA7260QT triaxial accelerometer and the MC13191 802.15.4
transceiver with three power modes that can be accessed from
Object Device
Application
Personal Device
Application
power consumption numbers for the different power states of
each board component. Using the Battery Life Versus Packets/
sec chart from the paper, battery lifetime can be estimated for a
Send Predefined Message
personal or object device. For example, if the device broadcasts
Wait for ACK
Send Acknowledge Message
the application through the power library. The white paper cites
packets five times per second, the battery lifetime is about
25 days. Using an adaptive time interval, the system’s battery
lifetime depends on device usage modes.
The object device software also must be built using the
802.15.4 MAC library and platform components. After platform
Figure 2
freescale.com/beyondbits
startup, the MAC stack and platform initialization calling
routines are the first two steps. The application must be able
Wireless Sound Notification System 94
Personal Device Software Flowchart
Object Device Software Flowchart
Reset
Reset
Initialize Platform
Components
Initialize Platform
Components
Initialize MAC Stack
Initialize MAC Stack
Send Broadcast
Message
No
Broadcast
Message
Arrived?
Yes
No
Devices are
Paired?
Yes
Enter in Low-Power
Mode for Predefined
Time Interval
Read Data from
Motion Sensor
No
Motions
Detect?
Yes
Compute Distance
Using LQI
Figure 3
to detect broadcast message reception. The next step in the
No
software application is optional and uses a pairing mechanism.
If this pairing is used, and the devices were previously paired,
Distance ≤
Threshold
Distance?
Yes
the application must compute the distance between devices.
This is achieved using the link quality indicator (LQI) of the
Play the Object
Specific Sound
data transfers.
Freescale has published an application note, MC1319x
Range Performance[2], which investigates the correlation
Figure 4
between transceiver power and the distance between two
802.15.4-enabled devices. The application note can be
downloaded from www.freescale.com (search for “AN2902”).
If the distance is lower than a predefined proximity distance,
the device has to play a specific object sound. If the notification
is simple, like buzzer sounds, the application can use the
driver routines for the background platform with a framework
application generated with the BeeKit Wireless Connectivity
Toolkit [3]. If the platform can enable voice recording and voice
rendering, the software must include additional modules for
communication with a DSP platform.
Conclusion
The wireless sound notification system can significantly improve
the quality of life for many visually impaired people. Freescale
offers low-cost, robust, complete hardware and software
platforms for the 802.15.4 marketplace, enabling system
providers to develop compelling and competitive solutions,
such as the one presented in this article. Freescale offers two
main hardware solutions: an S08 MCU-based solution and an
ARM7™ MCU-based solution. MC1321x system in package
(SiP) is Freescale’s second-generation ZigBee® platform, which
incorporates a 2.4 GHz radio frequency transceiver and an
8-bit S08 microcontroller[5]. The MC13224V is a third-generation
ZigBee platform that incorporates the radio transceiver with a
32-bit ARM7 core-based MCU with hardware acceleration for
both the 802.15.4 MAC and AES security[6]. Both platforms are
available with 802.15.4 MAC and ZigBee stacks.
freescale.com/beyondbits
Wireless Sound Notification System 95
MC1321x System Level Block Diagram
Transmit/
Receive Switch
Digital Transceiver
Analog
Receiver
Frequency
Generator
Analog
Transmitter
HCS08 CPU
Background
Debug Module
RFIC
Timers
16-60 KB
Flash Memory
8-ch.
10-bit ADC
Digital Control
Logic
1–4 KB RAM
2x SCI
Dedicated SPI
I2C
Low Voltage
Detect
1-ch. and 4-ch.
16-bit Timers
Buffer RAM
IRQ Arbiter
RAM Arbiter
Keyboard
Interrupt
COP
Power
Management
Voltage
Regulators
Internal Clock
Generator
Up to 32 GPIO
802.15.4 Modem
S08 MCU
Figure 5
MC13224V Block Diagram
32.768 kHz (Optional)
RF Oscillator/PLL
and
Clock Generator
Radio
Interface
Module (RIF)
Digital
Modem
Analog
TX
RF
TX/RX
Switch
Balun
TX
Modem
802.15.4
MAC
Accelerator
(MACA)
RX
Modem
Analog
RX
Advanced
Security
Module
(ASM)
IEEE 802.15.4 Transceiver
®
SPI
Flash
Module
(SPIF)
Buck
Converter
Analog Power
Management
and Voltage
Regulation
128 KB
Serial Flash
Clock and
Reset
Module
(CRM)
Dual 12-bit
ADC
Module
Battery
Detect
Timer
Module
(4 Blocks)
JTAG/
Nexux
Debug
UART
Module
(UART0)
ARM7™
TDMI-S
32-bit CPU
UART
Module
(UART1)
Bus Interface
and Memory
Arbitrator
SSI/I2S
Module
ARM® Interrupt
Controller
(AITC)
96KB SRAM
(24K Words
x 32-bits)
80KB ROM
(20K Words
x 32-bits)
Keyboard
Interface
Up to 64 IO Pins
24 MHz (Typical)
I2C
Module
SPI
Interface
GPIO and IO
Control
Figure 6
References
[4] Ultra-Low-Power Wireless Designs for Real-Time
Communication, www.freescale.com/webapp/sps/site/
overview.jsp?code=784_LPBBLWPWRWRLSS&fsrch=1
[1] Magnitude and causes of visual impairment (World
Health Organization), www.who.int/mediacentre/
factsheets/fs282/en/
[5] MC1321x Technical Data Document
[6] MC1322x Product Preview Document
[2] AN2902 MC1319x Range Performance Application Note
[3] BeeKit Wireless Connectivity Toolkit, www.freescale.com/
webapp/sps/site/prod_summary.jsp?code=BEEKIT_
WIRELESS_CONNECTIVITY_TOOLKIT&fsrch=1
Bogdan-Constantin Holmanu graduated with a computer science degree from Technical University of Iasi, Romania in 2008, and
joined Freescale Semiconductor Romania in 2008 in the wireless connectivity organization as part of the MAC and platform team.
As part of a four-student team he won second prize at Microsoft Imagine Cup competition, Embedded Development section, with a
Networked Braille Learning Environment project.
Back to Table of Contents
|
List of Articles
|
Print/Email This Article
|
Feedback
Wireless Sound Notification System 96
97
Back to Table of Contents
|
List of Articles
Freescale Semiconductor
Family product summaries
Beyond Bits IV presents many new and innovative ways
Wireless Connectivity Product Summary
to implement modern electronic technology. It’s meant to
www.freescale.com/files/wireless_comm/doc/fact_sheet/
spark your imagination so that you can develop products that
ZIGBEEMCUPS.PDF?fsrch=1
break new ground in form and functionality. Let us help you
find the semiconductor platforms you need to build your new
designs. We have a number of online product summary guides
that can match Freescale hardware, software and tools with
your next project.
8-bit Product Summary
www.freescale.com/files/microcontrollers/doc/fact_
sheet/8BITCIPRODMPFS.pdf
32-bit Product Summary
www.freescale.com/files/microcontrollers/doc/brochure/
BRCOLDFIREPRODSUM.pdf
DSC Product Summary
www.freescale.com/files/industrial/doc/brochure/
DSCPRDCTSMRY.pdf
freescale.com/beyondbits
Product Summaries 97
It’s a prescription
for
It’s success.
a prescription
for success.
Freescale Medical Solutions
Freescale offers a comprehensive line of medical solutions from analog to
sensors in addition to ultra-low-power MCUs, highly integrated MPUs,
Freescale Medical Solutions
medical-specific software, reference designs, white papers, application notes
and more. But we don’t stop there. We’ve established a Medical Center of
Freescale offers a comprehensive line of medical solutions from analog to
Excellence staffed by design engineers and clinicians to provide you with an
sensors in addition to ultra-low-power MCUs, highly integrated MPUs,
unprecedented level of support and expertise. We’re committed to helping
medical-specific software, reference designs, white papers, application notes
the medical device community deliver lower power, more innovative designs
and more. But we don’t stop there. We’ve established a Medical Center of
that can get to market faster and deliver healthier margins.
Excellence staffed by design engineers and clinicians to provide you with an
unprecedented level of support and expertise. We’re committed to helping
the medical device community deliver lower power, more innovative designs
that can get to market faster and deliver healthier margins.
Explore the possibilities at freescale.com/medical
Freescale™ and the Freescale logo are trademarks or registered trademarks of Freescale Semiconductor, Inc. in the U.S. and other countries. All other product or service names are the property
of their respective owners. ©Freescale Semiconductor, Inc. 2009.
Explore the possibilities at freescale.com/medical
Freescale and the Freescale logo are trademarks or registered trademarks of Freescale Semiconductor, Inc. in the U.S. and other countries. All other product or service
Freescale™
Freescale
logo are
trademarks
or registered
trademarks
of Freescale Semiconductor,
Inc. in the U.S. and other countries. All other product or service names are the property
names
are and
the the
property
of their
respective
owners.
© Freescale
Semiconductor,
Inc. 2009
of their respective owners. ©Freescale Semiconductor, Inc. 2009.
A15804_1a_Med_Sol.qxd
A15804c1A_Pg_300ucr_cut.tif
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement