# High Level Design

• Rationale and Sources of our Project Idea
Our project design was originally supposed to be an inertial positioning system. Using the accelerometers to measure acceleration, we had hoped to determine an objects position by integrating, in time, acceleration twice. However, after some time experimenting with amplifying and scaling the accelerometer’s output, we discovered that they were not reliably measuring what we required to do our project. As such, we decided to redesign the project to be a digital level. The rationale behind this was that these accelerometers are quite good at measuring a constant acceleration hence they can be used to accurately determine the presence of gravity. The idea for the project came partly from Professor Land and our own results from experimenting with the accelerometers.

• Background Mathematics
According to its data sheet, when 5V Vdd is applied to the accelerometer, approximately 1g of acceleration will result in 0.3V fluctuation from the center (0g = 2.5V) output. When we were trying to do the inertial positioning system, we had built a circuit to amplify and re-center the signal leaving the accelerometer. We found that the circuit worked, but added a bit of noise prohibiting the accuracy we required. When interfacing with the ADC on the microcontroller, we found that we could squeak some accuracy out of it by lowering the Aref from 5.0V to 3.5V. This essentially scales all of the input values and amplifies them as well while not adding any additional noise (the best of both noise). So for example with the Aref at 5.0V the following values emerge from the ADC:

```Output(0g) = 2.5V
Output(+/-1g) = 2.2V – 2.8V
ADC(+/-1g) = 451  - 573, range = 122```

with the Aref at 3.5V the following values emerge from the ADC (note that the +/-1g range is higher resulting more accurate measurement):
```Output(0g) = 2.5V