MMA7455 is a very low power 3 axis digital accelerometer from Freescale
Semiconductors. It's micro machined nano structure is capable of measuring
acceleration along its X, Y and Z axes.
User can setup sensitivity to 8bit, or 10bit, and measurement mode to 2/4/8G.
You should calibrate the sensor before use it, to calibrate it collect values
placing the accelerometer on every position of an ideal cube and then edit
calibration offset values.
For my tests calibration is done using the method proposed here: Using an Accelerometer for Inclination Sensing [Analog Devices]
A processing visualization tool is provided.
Attitude estimation can be done in firmware or in the visualization tool.
To estimate pitch and roll:
- normalize the accelerometer data
- use the equations suggested in the app note Tilt Sensing Using Linear Accelerometers [Freescale Semiconductor]
pitch = -atan2(ax, sqrt(pow(ay,2) + pow(az, 2)));
roll = atan2(ay, az);
Code
Notes
- read risk disclaimer
- excuse my bad english
thank you Mr.Davide..
ReplyDeletethis realy help my project
thank to you for your feedback ;)
DeleteVery nice!
ReplyDeleteI've run into other projects using 'Processing' (Girino, Arduinoscope, etc), but the thought of Java has sent me running scared! Do you think it has a steep learning curve?
For example, could you easily use a CAD file for the 3d visualization.. or are there other GUI platforms (opengl, wxwidgets, etc) better suited?
To me Processing is not so difficult, just spend a few hours on a tutorial.
DeleteIf you feel confortable in other language, you could try "openFrameworks" or "Cinder", or Python, .NET and many other.
You could convert your CAD file to other format and then import it.
I think Processing is far more simple than other above, because you just have to write code that "paint".