Sunday, February 19, 2012

ADXL335 Test

Triple Axis Accelerometer
Mitchell Knotts

Description and Use

                  The ADXL335 Triple Axis Accelerometer is a very small device that can sense accelerations in three different axis.  We are incorporating this instrument into our balloons payload so we can monitor the accelerations that the payload will experience. The accelerometer is very easy to use, it requires 1.8 – 3.6V and each axis has its own analog output pin. Each output pin will be connected to one of the analog input pins on the Arduino, finally the Arduino will interpret the signals from the accelerometer and output the acceleration values to the data logger.
                  This components interfacing to the Arduino requires more code than wiring, noted in the Testing section.  A pin out diagram as well as an overhead image can be seen below.
Triple Axis Accelerometer Triple Axis Accelerometer
Pinout definitions
Pin
Name
Description
1
ST
Self Test
2
X
X Axis
3
Y
Y Axis
4
Z
Z Axis
5
Gnd
System Ground
6
Vcc
Voltage In (3.3V)
ADXL335 triple axis accelerometer Data Sheet: http://www.sparkfun.com/datasheets/Components/SMD/adxl335.pdf
                   

Testing

                  Testing started out with connecting the Accelerometer to the Arduino. After the connections were made we had to read the data sheet for the ADXL335 chip and find out how the output values from the chip relate to useful units of acceleration. According to the data sheet the acceleration vs. voltage is a linear relationship. I started out by just programming the Arduino to read in the voltage from each axis. I then turned the accelerometer until the axis was parallel to the ground, meaning zero force of acceleration acting on the axis of interest. I recorded this value, the Zero Value, and moved to the next axis. After recording the “Zero value” for each axis I then twisted the accelerometer so that the axis in interest was pointed towards the ground, meaning the acceleration of gravity was acting on the axis in interest. I did this for all three axes and recorded the value. The value that was equivalent to one g force was 0.23V. Once I had this I plugged the values into the equation I had written in the code.
Accelerometer logic on the Arduino 




Once the code was uploaded on the Arduino I found that the accelerometer was functioning correctly! The values that the Arduino prints are in g’s, I decided to use g’s as units because I can easily multiply a g by whichever unit of acceleration I want like 9.8m/s^2.

 

Integration into Payload

This component will be soldered directly onto a printed circuit board that our team is designing. The printed circuit board connects all the instruments including the accelerometer and the Arduino. We will mount the printed circuit board to the bottom of the payload package, this will work well because the accelerometer will be reading the accelerations that the payload experiences.

2 comments:

  1. Good day!:) Thank you for this wonderful post..I find this very reliable than the other posts/codes through the net.. I've been trying to do the same thing as you did with the accelerometer.. but I have some questions regarding on how the values are taken.. I couldn't produce a value of 0.23V in 1g force during testing.. I also found out that my Vcc is not exactly 3.3V from my Arduino, but rather 3.48V does this have a large effect on the values to be taken.. Could you please kindly help me with some concerns? This concept and procedure is very useful for our project and I owe it to you :) Thank you... Hoping for your kind consideration! :)

    ReplyDelete
  2. Thanks for the post. I am just curious what is the purpose of using ST pin on the ADXL335. Can you please explain?

    ReplyDelete