Saturday, April 26, 2014

Accelerometer Test

We will use a Triple Axis Accelerometer Breakout - ADXL335 to detect the acceleration of the payload during its flight.  The ADXL335 provides three analog voltages corresponding to acceleration in each axis, and must be powered by a voltage between 1.8V and 3.6V. 

We used the setup below to test the accelerometer.  We created code that would read voltages in from pins A1, A2, and A3, and ran the code on the setup.  By aligning each axis in turn with g, we could find the base voltage out as well as the voltage given at 1g. 

We found that the voltage regulation on the Arduino is unreliable, giving different voltages at its 5V and 3.3V out pins depending on whether USB powers it or a 9V battery.  These voltages affect the voltages in from the accelerometer, and the conversion to real units , so in order to get accurate acceleration data, it will be necessary to configure the code with the final payload setup.



In order to print out the accelerations in units of g we used the following formula

The same formula is used for the x and y directions.  
In order to test our accelerometer we rotated it, aligning different axis with the direction of gravity, to ensure all gave 1g when appropriate.  One sample plot of this is shown below. 


Here we rotated the accelerometer so that the z axis was pointed down, and slowly rotated to be flat with the ground.  This process was repeated a few times, as you can see.

No comments:

Post a Comment