ELECTRICAL - CONTROLLER
Gun: Accelerometer
The Y axis of the accelerometer ran along the barrel of the gun. We fed it's output into a comparator with a reference voltage of approximately 1.34 volts, which corresponded to roughly 60 degrees from horizontal. With a 1M resistor, our hysteresis band was about 1.29 to 1.48 volts.
The X output of the accelerometer was used to turn the hovercraft. We ran it directly to an analog pin on the PIC. Although we used long wires, we didn't require particularly fine grained turning performance, so the noise induced on the lines wasn't a huge problem. |