I am using the sensor mentioned above and writing the obtained data to an SD card. I am using an Arduino Mega for this.
My problem now is that I can’t understand what values the sensor is giving me. For example, which unit or why do I get acceleration values for all three axes even though the sensor is not moving? What creates this offset?
In addition, I can’t find any good documentation on the sensor settings that can be determined in the code, especially the filters are not comprehensible :?: .
The sensor data sheet is excellent and complete technical documentation, and has all the information you need to determine the meaning of the acceleration and rate gyro output values. The data sheet also explains the register settings for scale and filtering. Read it carefully – it may take a few tries and some experimentation for the information to make sense.
Both sensors have “offsets” for each axis that can and should be corrected by calibration. A web search will turn up lots of tutorials.
The acceleration sensor measures the acceleration due to gravity as well as those due to other forces. Any axis that is held vertical reports 1 g (possibly with a small, correctable offset), which immediately allows you to determine the scale factor. In your spreadsheet, Az is about 8230, which corresponds to about 1 g. If there is any tilt at all, some component of that 1 g acceleration will show up along the accelerometer X and Y axes.
The raw data is meant to be used if you already have a plan to post-process it (calibrate & offsets, etc) - use the ‘getAccel’ and ‘getGyro’ slightly further down https://github.com/sparkfun/SparkFun_6D … 30dhcx.cpp
The accel data is generally passed as “g” units, measured as how many scalar multiples of ‘gravity’ the sensor is experiencing along the axes (measures CHANGE in acceleration)…your readings look great
The gyroscope is generally passed “degrees per second”, i.e. how much the angles are changing per unit time…this is expected to be a bit noisy (like your graph) if viewing the raw data and it’s not moving much
Jay: Using the above breakout, the example code only provides basic acc/gyro data but I seek Yaw, Roll and Pitch calculations. Are you aware if a library that either uses the inputs from this device or code to produce the quaternion calcs to produce yaw, roll or pitch parameters. I will also try to post a new question.
jremington:
The sensor data sheet is excellent and complete technical documentation, and has all the information you need to determine the meaning of the acceleration and rate gyro output values. The data sheet also explains the register settings for scale and filtering. Read it carefully – it may take a few tries and some experimentation for the information to make sense.