Altimeter/accelerometer for an artillery shell?

Long story short, I recently revived a co2 cannon I built years ago, and decided I want to 3D print a shell for it to fire rather than just nerf footballs or straight confetti. Ideally I want to make a shell that launches, travels up to its apogee, does a few things (opens cargo hatch to release payload ie confetti, starts some leds and trips the parachute), and falls, but I need to know how best to detect that it’s at release height. Should I use an accelerometer or similar sensor to see when it starts falling? Or should I use an altimeter and have it fire when current height is below previous height? My diameter limit is about 2.1” for the whole shell so I’ll be running this on a small lipo and an Arduino feather board. Thanks in advance for any advice!

What will the acceleration at launch be?

JCA34F:
What will the acceleration at launch be?

I’m honestly not sure, I know the barrel’s internal length is about 2 feet, 2.25” diameter, each shot uses 1 12 gram co2 cartridge, projectile weight I’m shooting for is .5 to .75 lb with a dia of 2.1”.

What I was getting at: Can the sensor tolerate the acceleration of launch without being thrown of specs.? ? ?
I know they are widely used on hobby rockets, but a gun launch?

JCA34F:
What I was getting at: Can the sensor tolerate the acceleration of launch without being thrown of specs.? ? ?
I know they are widely used on hobby rockets, but a gun launch?

Ohh ok I gotcha, no the thing’d be flying maybe as fast as a vinegar/baking soda rocket, if I can get the shell 50 feet up I’d be satisfied

Or should I use an altimeter and have it fire when current height is below previous height?

You will need to do some experimenting, because altimeter are measuring barometric pressure and that is depending on temperature, humidity and movement trough air. You also will need to get air into your projectile, so you need to drill a hole into it.

Look on model rocketry forums, where accelerometers and pressure sensors are used to record launch and altitude data.

An accelerometer alone cannot tell you when the maximum height has been reached, as the projectile is in "free fall" (ballistic trajectory) as soon as the engine or launcher stops producing thrust.

Likewise the pressure sensor approach is error prone, as error pressure measurements are distorted by projectile motion.

jremington:
Look on model rocketry forums, where accelerometers and pressure sensors are used to record launch and altitude data.

An accelerometer alone cannot tell you when the maximum height has been reached, as the projectile is in "free fall" (ballistic trajectory) as soon as the engine or launcher stops producing thrust.

Likewise the pressure sensor approach is error prone, as error pressure measurements are distorted by projectile motion.

That makes a lot of sense, I wonder if I’d be better off just using a timer, since the max payload isn’t much and the thrust is the same every time (with negligible weight differences between launching like confetti vs usbs or small items)

That makes a lot of sense, I wonder if I'd be better off just using a timer,

Simple, elegant, much less error prone and likely just as accurate.