Tracking a Rocket
Tracking the flight path of a rocket is tricky business. You cannot easily measure the velocity or displacement of the rocket. Wind speed and radar are silly things to measure on a rocket smaller than a big sandwich. All that is left to measure is instantaneous acceleration. If you know how fast you are accelerating in a given direction, you can use some simple calculus (or even addition) to determine your position. This technique is called dead reckoning. There are devices that can measure acceleration called accelerometers. These chips are becoming very popular: cell phones (iPhone), laptops (Lenovo) and other devices are using accelerometers to protect hard drives and rotate screen orientation. The human body detects linear acceleration with otolithic organs — layers of viscous gel in your inner ear. When you accelerate in some direction, the gel is slightly displaced and the change is detected by tiny hairs called kinocilia.
But linear acceleration isn’t enough. Your body, for example, also measures your rotation in space. Even with your eyes closed you can tell if you are lying sideway or are upside down. When your sense of orientation fails (when you’re dizzy), you get very confused about where you’re moving. It is similarly impossible (or at least very inaccurate) to determine position from acceleration alone on a rocket. A device that can measure this is called a gyrometer.
Your semicircular canal in your inner ear is filled with liquid; it senses your orientation (yaw, roll, and pitch) with tiny hairs. A gyrometer is an electrical analog: a tiny “tuning fork” is slightly bent when the device spins, causing a change in capacitance that can be detected. Not only is it imperative to track acceleration, we have to measure the rotational position of the rocket as well.
The funny thing about all these sensors is that they’re ratiometric. They don’t output the rockets speed in miles per hour or tilt in degrees. Instead, analog sensors output a higher voltage for a higher speed and gyrometers function analogously for tilt. It is therefore necessary to calibrate these sensors to 1g (9.8 meters/second/second) for accelerometers and standstill (parallel to ground) for the gyrometers. The linearity of the output of these signals is also not perfect: it is reasonable to expect that the output voltage would scale in a 1:1 ratio as speed increases, but this is not the case. All of these factors lead to a device that is of suspect accuracy and the results of which need to be verifiable.
There are three easy methods to double-check the data from these sensors. Air pressure is very high at the surface of the planet (imagine a two kilometer column of air above you) and drops as you travel away from the earth. Unfortunately this decrease is not linear, but the US Air Force has developed a formula that can approximate height based on atmospheric pressure. Atmospheric air pressure sensors are easily obtained and can also be included in the payload. Two other ways can confirm the apogee of the rocket: by measuring the angle the rocket makes relative to the ground, and by timing the time the rocket spends in the air.
The data from these sensors needs to be saved in flight and retrieved after landing. Therefore, a microcontroller will be needed to save these results. Rockets travel quickly and it will be necessary to poll the sensors often. An arbitrary starting figure is 50Hz (50 times per second). Since the sensors output analog data (a change in voltage) as opposed to digital (a change in pulse frequency), a microcontroller with an analog digital converter (ADC) will be needed. The PIC16F684 was conveniently on hand and has an ADC with a resolution of 10 bits — each voltage reading can be converted into a number from 0 to 1024. If there are three accelerations and two rotations (the spin of the rocket is irrelevant since it is a rod) plus a pressure reading, the controller will need to save six figures fifty times per second.
The rocket will track six 10 bit values fifty times per second. That means for each second of flight 3000 bits will be saved (about 3 kilobytes). On a computer, a 3000 letter document takes up 3 kilobytes. Microcontrollers feature paltry onboard memory, so an Electrically Erasable Programmable Read Only Memory chip is required. A one megabit module was available on hand, which is enough for about six minutes of flight time. To detect a launch, the controller will wait for a +5g impulse from the accelerometers to begin writing to EEPROM (it will keep a buffer of ten seconds prior to launch). Some optimizations can be made to the data that is saved: the 10 bit ADC is not very accurate and the last two bits can be discarded. Similarly, the pressure reading is not relevant until the nose cone is released (or else you’ll be recording the somewhat pressurized rocket tube).
The data on the memory needs to be uploaded to a computer. The microcontroller will need to interface with another circuit that will upload information to the computer. A two pin header will exist on the payload controller which will upload the flight data via an I2C (two wire) protocol. The “ground control” circuit will upload the results via an RS-232 (serial) interface. A software program will read the results which will be analyzed in Excel or Matlab using a Kalman Filter, an algorithm that smooths out noisy readings.
Some small features should include LEDs that signify recording state and proper orientation (if all accelerometers are reading proper values for a rocket perpendicular to the ground).