The
ADXL210 accelerometers measure bovine motion for a
total of four measured axes. One of the measurements
is redundant.
The
accelerometers output a 0- to 1-ms pulse that’s indicative
of acceleration from –10 to 10 g. Each axis is connected
to one of the Timer0 input capture inputs. The input
capture service routine is programmed as an FIQ so
that it can interrupt inside the 10-ms logging loop.
When
it starts, input capture code records the time of
the pulse using Timer0 counting at 15 MHz. The software
waits for the first rising edge and then records the
start time, the time of the falling edge (T1), and
the time of the start of the next waveform (T2). T1
and T2 are divided to compensate for temperature and
drift. The final value is presented as the acceleration
value and stored in secondary memory.
Currently,
14 bits of resolution are used. The dropped bits are
below the noise level experienced by a static accelerometer.
A compile time definition (#define) can be changed
to increase the significant bits to a maximum of 16.