We have already used an accelerometer in a previous post. This time we have an analog 3-axis accelerometer, ADXL335, which can be used to estimate the orientation along the x,y and z axis. There are several websites that talk about this sensor. We won’t repeat any of the informations you can find elsewhere, this post contains content that we haven’t found on the web and that’s the reason why an exhaustive step by step tutorial is needed.

As stated in the previous tutorial about the MMA7268Q, a common problem with accelerometers is filtering noise out from readings. We will talk about this another post.

What will you get

We will connect the analog outputs to the Arduino, read raw acceleration values, calibrate the sensor (extremely important) and get measurements in g, estimate orientation and show it in processing.

What you will need

To measure acceleration data the following parts are required:

In the next pages we will use the Gravitational acceleration to calibrate the sensor and determine the accelerations along the three axis expressed in g.