Archive

Posts Tagged ‘acceleration’

Arduino and MMA7361 (acceleration sensor)

July 11, 2011 23 comments

Needed components:

  • 1 Arduino board (Duemilanove, in this case)
  • 1 acceleration sensor MMA7361
  • some wires.

Pins connections:

  • ST (Self Test): Arduino pin 2
  • GSEL (g-Select): Arduino pin 3
  • 0GD (0g-Detect): Arduino pin 4
  • SLP (#Sleep#): Arduino pin Power (3.3V)
  • XOUT: Arduino pin A0
  • YOUT: Arduino pin A1
  • ZOUT: Arduino pin A2
  • GND: Arduino pin Ground
  • VCC: Arduino pin Power (3.3V)

The firmware application created for the Arduino board read the analog inputs (A0, A1, A2) and send the resulted information to the computer. On the computer a software application read the information which comes on the serial port and display it into a user friendly interface.

For each axis the acceleration value is displayed in [m/s^2] measurement unit and graphically using different progress bars (one for the positive values and another for negative values).

The analog inputs present some variation even the sensor is not moved, which make me think that it is not the best solution when it is necessary to have a high precision. Maybe I do something wrong but I could not see what could be. The single option to improve the analog readings was to make the reading of the same input multiple times (100 – 1000 x) and calculate an average value. If you have another better ideas please tell me :D.

At the beginning I want to use this type of sensor for monitoring the vibrations from a building structure (ex. walls), but now I’m not very sure that it is a very good idea. I will have to find another type of sensor, more precise.