Tuesday, October 9, 2012

AVR Atmega MMA7455 accelerometer library 02 + processing

MMA7455 3-axis Accelerometer AVR Atmega library.



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:

Code


Notes
  • read risk disclaimer
  • excuse my bad english

4 comments:

  1. thank you Mr.Davide..
    this realy help my project

    ReplyDelete
  2. Very nice!

    I'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?

    ReplyDelete
    Replies
    1. To me Processing is not so difficult, just spend a few hours on a tutorial.
      If 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".

      Delete