We
tested the ADXL335 accelerometer by first rotating it so that each axis
would receive a value of 1g, 0g, and -1g for a given time. We then observed the
analog read data saved on the data logger to see what values each axis was
giving off, based on the g value they were receiving. Below are the analog read
values we found for each g value, for each axis.
x Val
|
y Val
|
z Val
|
|
0g
|
339
|
339
|
347
|
+1g
|
406
|
402
|
412
|
-1g
|
270
|
265
|
279
|
From
here we then created three linear calibration equations to place into our code
so we would receive g values instead of arbitrary analog read ones. The three
equations are below.
As
you can see, the three linear equations will convert our analog data into
multiples of g, which ensures that the data we collect will be accurate and
usable for analysis.
No comments:
Post a Comment