Arduino Rocket Ejection at Certain Altitude

Lets say you had ground sensing radar in the rocket, the reading you got would still depend on your attitude and if you were at an angle you could not be sure you were not above some prominent feature. It sounds like a simple problem, but it seems really difficult. Quite obviously the Curiosity landing is a fake ]:smiley:

Far-seeker:
GPS units with 5 m accuracy might exist right now.

I have a GPS data logger that has sub one meter resolution - it very clearly shows lane change maneuvers. It's not pure GPS - it uses a combination of very precise GPS position sensing and accelerometers - but shows that this sort of accuracy is available if you're willing to put enough effort into it. I'm not clear what the accuracy requirements are in this case, though. If the objective is to hit an altitude target, then it's probably more important to be consistent with the equipment that the organisers use to measure height, than to be accurate in absolute terms.

But it takes time to get the intentionally-introduced jitter out

The "jitter" is atmosphere induced, not DoD induced.

Thus, you only find them in surveying gear that has very nice antennas and very pricey boxes to do the signal processing.

The surveying gear has a differential GPS receiver as part of the system in addition to the mobile antenna the surveyor uses. The ground station transmits a signal that lets a differential receiver know about the error currently in the signal. This is a more localized but more accurate system comparable to WAAS.

-j

Ok now the coding part, I got the example code running, and its like 10 feet off the altitude of where I live, but thats no big deal. I dont have any idea on where to start with coding.

The code would go something like this:

Zero the sensor once the arduino is turned on <==== The part I need help with, I have nothing with the coding, if i have one small example, i could go from there, and that would be greatly appreciated.
Read pressure and calculate it to feet every 5ms until it reaches 730 feet (730 feet because it will have some lag with the parachute catching.)
Turn servo

:astonished: this is kind of scary lol

OK,

Here is a couple of things you can do in advance.

  1. read the datasheet on the altimeter / barometer to understand what output it produces. How many bits of resolution do you have? How quickly can it update? Ideally, keep everything in integers, i.e. don't bother to translate to feet unless you have to. Makes life easier. Instead, calculate the difference (in raw sensor data) between the starting point and 730 feet.

  2. Take a couple of readings, average, store the number. Turn on a LED (green) to indicate that the microprocessor is ready for launch.

  3. Program the unit not to deploy a parachute unless a) the rocket motor has turned on, and/or b) altitude > 100 feet. Otherwise, a gust of wind could make for a bad day at the launch pad.

In general, you don't really zero the sensor - the sensor reads what it reads. What you do is sample the sensor and decide "OK, that's my zero", and save that value as the zero offset.

Thinking in terms of altitude, what you do is read the sensor, determine the absolute altitude (MSL, "mean sea level"), and assume that this value is ground level. Afterward, you subtract this MSL value from every altitude you measure to give you AGL (above ground level) altitude, which is what we use in rocketry.

When doing the launch detect code, remember it's not just a change in observed altitude, but a change in observed altitude over a given (short) time interval. If the weather is changing and you're on the pad for a while, you can actually see the pressure altitude change a bit while it's sitting there.

-j

Post what you've got and it can be taken from there. That way we'll know what library, if any, you are using.

Im using the library that is on adafruit's website.

Thanks for the support guys

LividKiwi:
Im using the library that is on adafruit's website.

Thanks for the support guys

You realize that the cost of our help is pictures, maybe even video, of this thing in action... :wink:

Sure I will post pictures!
This is the code im using. Im getting an error at the highlighted place, And I cant solve it no matter what i do.
#include <Wire.h>
#include <BMP085.h>

Adafruit_BMP085 bmp;

unsigned long datum;
unsigned long currPressure;

void setup()
{
Wire.begin();
bmp.begin();
datum = bmp.readPressure();
}

void loop()
{
currPressure = bmp.readPressure();
if ((datum - currPressure) > 28)
{
// Deploy 'chute...
}
}

LividKiwi:
Im getting an error at the highlighted place, And I cant solve it no matter what i do.

You at least have the advantage of knowing what the error is.

Are you using 1.0.1? If so, missing include files are no longer deemed fatal errors. The header file you are trying to include probably can not be found. Try compiling the code on a different version of the IDE.

LividKiwi:
Sure I will post pictures!
This is the code im using. Im getting an error at the highlighted place, And I cant solve it no matter what i do.
#include <Wire.h>
#include <BMP085.h>

Adafruit_BMP085 bmp;

As PaulS noted this is probably due to the correct header file not being loaded.

Replace:

#include <BMP085.h>

With:

#include <Adafruit_BMP085.h>