Testing
A large portion of this project relied on testing the components in various configurations to ensure the final product would operate as we envisioned, as the system we needed to create would be much larger than the proposed small-scale system in the Maxim article. [1] The testing phases are broken down in the subsequent sections:
Capacitance Sensor Circuit
Once the Arduino was set up with the lab PC, the first step was to create the capacitance sensor circuit in Fig. \ref{739549}, as well as write the code to drive the sensor. The first draft of the Arduino code can be found in section \ref{153766} and is derived from the code found in the documentation for the capacitance sensor library we used. The starting circuit utilized a 1MΩ R1 and a 100nF CGND. In an adjustment from the proposed circuit, we made CGDN go into the discharge pin, rather than to ground. When the capacitor went to ground, the circuit was not properly sensing the capacitance and often overloaded. With the circuit built, we needed to create an open capacitor plate to properly test the capacitance sensing capabilities. We decided, given the resources present in the first lab period, to construct a capacitor plate from a single penny and short wire. Once soldered together, we placed our plate into the circuit and loaded the Arduino with the code. Once in, we saw a reading of >100 units on each microsecond on the serial monitor. To properly test if the circuit could see a change in capacitance, Tristan lowered his hand closer and closer to the penny, creating a capacitance between the penny and his hand. As he did, we saw no noticeable change in the capacitance, until he got with ~5 mm of the sensor, at which point we saw the numbers increase to ~2000, with the sensor reading as high as 3500 when fully touched. During one of the tests, we collected 500 ms resolution data, shown in Fig. \ref{918932}.
Increasing Sensitivity
Increasing the sensitivity of the capacitance sensor from the penny was essential to the proper function of the accelerometer. We decided to move to creating a pure copper plate out of the thin copper strips provided to us by Matt. We constructed the small plate using thermal tape to separate the two sides and soldered a wire to one side. Once connected to our circuit, the sensor was able to sense our hand up to 10 cm away with ~800 units of precision. Touching this sensor, unlike the penny, caused the program to overload, which corresponds to a "-2" reading. A feature of these new plates was also that they held a charge for a lot longer than the penny plate capacitor, which was proven by each time we touched the plate, the "zero" reading of the sensor would be at a higher value than before. We also found that increasing the resistor R1 from 5 MΩ to 10 MΩ gave us a more accurate and consistent reading.