Anda di halaman 1dari 4

57

Print

Email

Leonardo Mangiapelo

Implementing an Electrogoniometer
Using Freescales 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


joints rotation point. The potentiometers electrical resistance
can be used to determine the angle between the joints. These
types of electrogoniometers are somewhat bulky and restrict
patient movement. The instruments precision can also be
compromised due to its inability to follow any changes in the
joints 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 (IC/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 patients body. These markers are

axis is exposed to the earths 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 Freescales


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 Freescales MMA7455L 3-axis digital output


accelerometer, for example. By doing this, instead of measuring

the relative angle between two segments, its 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

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)

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

-20

-40

-60

-80

-100

-120

-140

-160

-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

16

32

60

Flash (KB)
RAM (KB)
USB RAM (Byte)

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

IC

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 Freescales

electrogoniometer. Essentially, the prototype was constructed

entry-level USB portfolio with one of the industrys most

on a platform (A) to study the accelerometers (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

Accelerometer-Enabled Electrogoniometer Prototype

makes all necessary calculations and sends this information to


an LCD. USB communication can also be used to send the data
to a printer or to be stored for further clinical analysis.

Conclusions

Using the methodology and techniques described in this article,

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

single-axis measurements, but the same methodology can


be used for two- and three-axis measurements. Multipleaxis measurements using Freescales accelerometers can
provide the data necessary for a complete three-dimensional
representation of any segment.

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 Freescales low g accelerometers as the angle sensors,

forces other than earths 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

USB Cable

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 bachelors 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.
freescale.com/beyondbits

Implementing an Electrogoniometer 60

Anda mungkin juga menyukai