Using a accelerometer to measure negative speed of a rocket

I need to launch a rocket and recovery it. I'm trying to do by measure the speed of the rocket and when that speed get negative the parachute gonna be uncoupled.

I want get this negative speed with the accelerometer ADXL335. I already have the acceleration but I dont know how to get the speed (i didnt understand how to integrate in arduino).

I'm a novice with arduino and I need little help, if someone can give me a way to discovery the negative speed I appreciate.

An accelerometer measures acceleration, not speed.

If you throw a ball up into the air (neglecting air friction), after it leaves your hand the acceleration is constant at about 1 g, until it hits the ground.

What you want to do is detect apogee, which is not particularly easy to do. David Schultz used to have some great web pages on doing that for model rocketry, but they seem to have disappeared.

Some approaches are discussed here: https://cnx.org/exports/36fdaf81-f17c-4325-a90b-ffa07e2da5a6@1.1.pdf/digital-detection-of-rocket-apogee-1.1.pdf

Try a search for "model rocketry apogee detection".

jremington:
An accelerometer measures acceleration, not speed.

If you throw a ball up into the air (neglecting air friction), after it leaves your hand the acceleration is constant at about 1 g, until it hits the ground.

Yes, but an accelerometer reads forces against the sensor, not necessarily acceleration.

For instance, if you put an accelerometer on a table, it will read 1g in the Zth direction; yet the sensor is not accelerating.

If you put an accelerometer in the rocket, the accelerometer would probably be able to detect when the rocket engine/booster runs out of fuel - probably can’t detect apogee that well, but this should get OP close enough.

How about using an air pressure sensor?

an accelerometer reads forces against the sensor, not necessarily acceleration.

Correction: the accelerometer measures acceleration, caused by the sum of the forces applied to the sensor framework, including the force of gravity.

The engine burns out long before a typical model rocket reaches apogee.

I recommend the link in reply #1 to anyone who might want to learn about apogee detection. The discussion includes use of an accelerometer and a barometer, with a Kalman filter to merge the data.

I have the idea to measure the angle that the rocket is, and when it incline above ~70º the recovery sistem is ignited.

That will show that rocket is falling and it need to deploy the parachute.

jremington:
Correction: the accelerometer measures acceleration, caused by the sum of the forces applied to the sensor framework, including the force of gravity.

Still not completely accurate, but that's a discussion for another day... :slight_smile:

That being said, I second the usefulness of your link.

Still not completely accurate

Let us know when you finally figure out what an accelerometer measures!

jremington:
Let us know when you finally figure out what an accelerometer measures!

Riddle me this...

If "the accelerometer measures acceleration, caused by the sum of the forces applied to the sensor", then why does a free-falling accelerometer read 0 in all directions, yet it is accelerating!?

Also, why does an accelerometer resting on the surface of the Earth read non-0, yet is not accelerating!?

It is more accurate to say an accelerometer reads out the force required to hold the MEMS proof mass(es) in place - not just that it measures acceleration. It's plain MEMS physics.

Mumcolt:
I have the idea to measure the angle that the rocket is, and when it incline above ~70º the recovery sistem is ignited.

That will show that rocket is falling and it need to deploy the parachute.

The rocket is falling the moment the engine burns out. Yes it’s still moving in upward direction, but it’s technically also falling. Because of the engine burnout, it’s essentially weightless, and if not for the air resistance slowing down the ascend an accelerometer would measure zero acceleration.

Come to think of it, at azimuth should be the moment the accelerometer shows zero acceleration, as there is no air resistance at that point. Though in reality there’s always this thing called “wind” that will mess it up.

For detecting a tilt angle, you may also use a tilt sensor, but as the rocket is as good as weightless for most of the time after the rocket burns out that also won’t work.

So detecting the motion of the rocket by its acceleration profile is almost impossible. That leaves height measurements: barometric pressure and GPS are options for this.

It is more accurate to say an accelerometer reads out the force required

The accelerometer measures acceleration, which no person who has learned basic physics would ever confuse with force.

It is indeed a complication that an accelerometer actually measures the difference in the accelerations of the spring/test mass and the framework suspending the spring/test mass.

The accelerometer measures zero acceleration in free fall because the acceleration due to gravity is the same for the sensor framework and spring/test mass, for a difference of zero.

For a sensor sitting on a table, the acceleration produced by normal force from the table on the framework cancels the acceleration due to gravity on the framework, but not that of the spring/test mass.

  • load cells, pressure gages and accelerometers are all based on strain gages
  • on a pressure gage, the strain gages are attached to a diaphragm. induced pressure distorts the diaphragm, the distortion is proportional to the pressure applied. the distortion is measured by the strain gages, which are arranged in a Wheatstone bridge configuration.
  • in an accelerometer, there is a microscopic slab of rigid but elastic material hinged on one side. the strain gages are arranged across the hinge, again in a Wheatstone bridge configuration. the hinge is a thinned out region of the elastic material
  • acceleration moves the housing, which moves the fixed end of the hinge. inertia causes the slab of material to remain stationary when the housing moves; elasticity causes the slab to return to its resting position relative to the housing when the acceleration stops
  • accelerometers measure change, not steady state motion. but nothing is ever as easy as it seems.
  • accelerometers do not put out 0 at rest. accelerometers are adjusted to put out 0 at rest. this is done by balancing the Wheatstone bridge.
  • if you have a very low G accelerometer, you can determine the calibration by turning it over. 0 g at rest, -1G when inverted, because the effect of gravity is to bend the hinged slab, which induces strain in the strain gages, which causes a steady output from the now unbalanced Wheatstone bridge.
  • an accelerometer reads 0 when free falling, because the housing and the slab are moving together, ergo, spring tension in the elastic material brings the slab to its resting position.

if you have a very low G accelerometer, you can determine the calibration by turning it over. 0 g at rest, -1G when inverted,

Nope. +1 g in one direction, -1 g in the other. You should try it sometime, it is fun as well as a learning experience!

Additional hint: the measurements are usually different in the two directions, due to a correctable offset. Those in the know and who want accurate measurements calibrate their accelerometers (and magnetometers) using the approach described in this excellent blog article: Tutorial: How to calibrate a compass (and accelerometer) with Arduino | Underwater Arduino Data Loggers.

jremington:
Those in the know and who want accurate measurements calibrate their accelerometers (and magnetometers) using the approach described in this excellent blog article: Tutorial: How to calibrate a compass (and accelerometer) with Arduino | Underwater Arduino Data Loggers.

Some time ago, jremington recommended that I take a look at the provided link about alignment of the Magnetometer I am using; was some dang good advice. Thanks jremington.

jremington:
An accelerometer measures acceleration, not speed.

The OP knows you integrate acceleration to get speed... What they may not realize is that integrating acceleration over long times is completely pointless as drift will make the values useless.

If you throw a ball up into the air (neglecting air friction), after it leaves your hand the acceleration is constant at about 1 g, until it hits the ground.

While the ball is in free fall it feels zero acceleration. From the perspective an observer on the ground it accelerates, but an accelerometer on the rocket is just going to say zero around apogee.

Rockets feel significant atmospheric drag (which means the acceleration will not be constant except around apogee)

What you want to do is detect apogee, which is not particularly easy to do. David Schultz used to have some great web pages on doing that for model rocketry, but they seem to have disappeared.

Some approaches are discussed here: https://cnx.org/exports/36fdaf81-f17c-4325-a90b-ffa07e2da5a6@1.1.pdf/digital-detection-of-rocket-apogee-1.1.pdf

Try a search for "model rocketry apogee detection".