Accelerometer+Magnetometer

__**Background**__

An accelerometer measures proper acceleration. This is the acceleration it experiences relative to freefall. An accelerometer at rest will indicate about 1g upwards, because any point on Earth’s surface is accelerating upwards relative to the local inertial frame. The intertial frame is the frame of a freely falling object near the surface of the Earth. DREAMS is using a Triple Axis Accelerometer Breakout-ADXL335. It has a sensing range of plus-or-minus 3g. It comes equipped with external .1 uF capacitors set the bandwidth of each axis to 50 Hz.

A magnetometer measures the strength, and in some cases, the direction of a magnetic field. It was first created in 1833 by Cal Friedrich Gauss, and it makes use of the Hall Effect in order to work. They are used mostly to calculate the Earth’s magnetic field and to detect any magnetic anomalies. The DREAMS magnetometer is the Honeywell 3-Axis Magnetic Sensor Hybrid HMC2003. It’s a 3-axis magnetic sensor used to measure low magnetic field strengths between -2 Gauss and 2 Gauss.

__**Equations**__

For the accelerometer, the acceleration was also measured in counts. However, due to errors with the equipment, the range of counts of acceleration was from 113 to 551, instead of 0 to 1023. This was because initially, the device was laid still on a flat surface, so the x and y accelerations should have been 0 and the z acceleration should have been equal to g. Therefore, when there is no acceleration, the count reads 332. This makes up for the experimental error brought about by the accelerometer. When acceleration is equal to g, the count reads 405. The relationship is linear between count and acceleration, so it can be understood with this equation:
 * Accelerometer:**

No equations were provided by the specs sheets. Instead, an equation to convert the count measuring voltage into both acceleration and magnetic field was used. Counts were given as numbers from 0 to 1023. For the magnetometer, these signified a voltage between .5 V and 4.5 V. Converting from these counts to a voltage involved using the linear equation: Converting from this voltage to a magnetic field value involved using this graph. We can assume the temperature at ground is 25 degrees Celsius. For DREAMS, the temperatures may vary and this graph tells how to adjust for different temperatures. As the graph shows, the voltage has a linear relationship with the magnetic field. Therefore, this equation can be used to convert voltage to magnetic field: The Magnetic field is measured in Gauss (1 Gauss=.001 Tesla). Because DREAMS is using a three-axis magnetometer, this method was used for the x, y, and z directions. Each of the Magnetic field values were adjusted by subtracting 0.2 Gauss to fit their actual trends (having negative and positive values).
 * Magnetometer:**

__**Data**__

See this for data in terms of counts:
 * Accelerometer:**

Initially, the accelerometer was held in place for 10 seconds. Then, it was oscillated in the y-direction for 15 seconds (from t=10 seconds to t=25 seconds). As can be seen in this graph, the largest oscillation in accelerations occur over this period.

Over the next 20 seconds (from t=25 to t=45 seconds) the x-direction was oscillated, which can be seen in the spike in values in this range.

Finally, from t=45 to t=65 seconds, the meter was oscillated in the Z direction, which can be seen by the spike in values in this range. The acceleration is 9.8 meters per second squared over the first 10 seconds, because the meter was still and the z direction was immediately downward.


 * Magnetometer:**

See this for data in terms of counts: At t=0, the x direction of the magnetometer is pointing North. This means that this is the maximum Magnetic field reading due to the Earth's magnetic field, which, by the numbers, is somewhere around .25 G. This is consistent with the actual range of Earth's magnetic field. The magnetometer was rotated in the x-y plane with 5-second time intervals of either 90 degrees of rotation or rest. From t=15 to t=20 seconds, the meter was rotated to the position opposite of the initial position. Therefore, it makes sense that the magnetometer read the opposite of what it read in its original position. It returned to its original position, and at t=45, it reached its original position, and the reading returned to its original value. The odd behavior that follows is because it was then rotated in the X-Z plane.

This graph shows the y direction of the magnetometer. The first 45 seconds should look similar to the x-graph, but shifted, and the final 45 seconds should be at zero, since the y direction is always perpendicular to the magnetic field of the earth. Unfortunately, after multiple trials, the Y magnetic field reading would not move in the correct direction. The Z-Direction Magnetic field readings were as expected. For the first 45 seconds, there was no z-direction rotation, so the magnetic field should have remained zero (the z-direction was perpendicular to the earth's magnetic field). in the next 45 seconds, there was variation as the meter was moved in the X-Z Plane. It increased to a max of .15 G when it was pointing North, and -.15 G when pointing south. It returns to its original value of zero when the meter is returned to its original position at time t=80 seconds.