Saturday, January 29, 2011

Flight Computer Functions

The flight computer shall:
- record the flight track time and altitude
- deploy the parachute

As the Arduino can readily interface with a pressure sensor to infer altitude, a servo to deploy the parachute, and has built in non-volatile memory it is well suited to this project.

An Uno has 1K of non-volatile memory, which is a little limited for data logging. However, this allows 250 time and pressure readings (at two bytes each) to be recorded. If more memory is needed, a memory card can be added.

A typical water rocket flight lasts roughly 60 seconds, most of that descending on the parachute. So, this would allow approximately 0.25 second data recording intervals, if recording starts when launch is detected. This will not yield much detail about the initial acceleration, as most of the "propellent" is consumed within 0.25 second.

The Uno has 32k of program memory, which should be plenty.

Servo

To open the parachute door a servo is used. The one I am using is "small", and runs on 4.8 to 6V. Servos can use a lot of current, so it is not a good idea to run it off of the Uno board power supply, better to directly power it off of a battery. I briefly ran it on a 9V battery to test it out, and it survived, but I will have to get a 6V supply (probably 4 AAA batteries).

"Small" should be fine, as in this deployment design the servo just pulls a pin that allows rubber bands to open the parachute ejection door (not a lot of torque or travel required).

Coding is again easy, as someone else did most of the hard work. The "sweep" servo example that comes with the Arduino software worked the first try for me, and is easy to modify.

The timing of opening the door is controlled by the Arduino. I haven't decided the exact logic yet. Some options are: 1) Apogee (maximum altitude), 2) time after launch (simple), 3) a low altitude on descent (results in less drift while parachuting, makes it easier to recover the rocket, but riskier for deploying in time to be useful), and 4) any time the rocket starts to descend (might help limit the damage in errant launches).

Pressure Sensor

The pressure sensor senses changes in air pressure that can be used to calculate altitude. I will also attempt to use it a launch detect mechanism, so that an accelerometer is not required.

I will try using a BMP085 pressure sensor that comes mounted on a breakout. I forgot to order pins with it (newby mistake), so I used cut-off paper clip wire. A little big, but it works.

The BMP085 is a digital sensor that uses the I2C interface that may be intimidating to beginners. Fortunately, others have blazed the trail and offer the coding online (however, read the comments to get some corrections). So, within a couple of hours a beginner like me was able to get a rather accurate barometer up and running on the Arduino!

However, the sensing has noise on it correlating to about +/-6 feet of altitude. I tried some things like keeping the power line as separate as possible, and moving around the house with it to see if it was radio noise, but none of that made much difference. The code will have to live with that much uncertainty.

The BMP085 runs on 3.3V, while the Arduino Uno ATMega 328 processor runs on 5V. Fortunately, the Uno board has a 3.3V output pin that can power the BMP085. However, the digital signal out of the BMP085 is therefore limited to 3.3V. The processor still reads the signal accurately, although this voltage mis-match may be part of the noisy signal (some ambiguity as to whether the signal is high or low).

Start of project

This project will use an Arduino controller to make a version a water rocket flight computer, similar in function to the Air Command V1.6, and with a side deploy parachute mechanism. Another version may be found at Instructables.

The Arduino is larger than the Air Command design, but a good thing about water rockets is plenty of thrust (greater than 50 lb), so a few more grams of payload don't matter that much. The Arduino is also reusable for other projects (assuming that it survives the de-bugging flight tests)