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
Flexible Electrogoniometer
Commonly-used technology
The most common electrogoniometers employ one of the
Figure 2
Potentiometric Electrogoniometer
Figure 1
freescale.com/beyondbits
Implementing an Electrogoniometer 57
Using accelerometers
to measure angles
Optoelectronic System
Figure 3
Optoelectronic systems: These are video systems that use
directions, the acceleration on its axis will be 0g, and the analog
are time-consuming.
Accelerometer Behavior
+1g
VOUT=3.7V
a)
g
+
0g
VOUT=2.50V
b)
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
Table 1
Implementation
MCUs in the family use the enhanced HCS08 core and are
Implementing an Electrogoniometer 59
Conclusions
Figure 6
B) Accelerometers
C) Stepper Motors
D) Electrogoniometer
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
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