Vertical Stabilization using MPU6050 and Servo?

An accelerometer only detects acceleration from gravity when something is holding it in place

Whilst I admit that I know little or nothing about the subject that does not sound right. Is not acceleration a change of speed in a particular direction ? If so, then here is our rocket happily climbing vertically and even accelerating in that direction with no horizontal speed. Something happens to disturb that state and it veers from the vertical. Now there is horizontal acceleration which can be detected and action taken to correct it.

UKHeliBob: Whilst I admit that I know little or nothing about the subject that does not sound right. Is not acceleration a change of speed in a particular direction ? If so, then here is our rocket happily climbing vertically and even accelerating in that direction with no horizontal speed. Something happens to disturb that state and it veers from the vertical. Now there is horizontal acceleration which can be detected and action taken to correct it.

It would require two accelerometers to be certain to detect rotations.

The rocket could rotate from vertical without the single accelerometer detecting it.

All this talk of accelerometers is getting very tedious. It's well understood how to deal with these sorts of orientation problems and the MPU6050 is an appropriate sensor to determine orientation. It has both accelerometers and gyros.

A single 3 axis accelerometer can not, by itself, be used to determine a rocket's orientation in flight. (Nor can it accurately determine a change in orientation.)

Edit: In a hopes this horse will stay dead, I'll kick it a bit more I'll add a bit about detecting rotation with an accelerometer. As long as the point of rotation of the rocket didn't occur right where the accelerometer was located, the accelerometer could detect that a rotation had occurred but it wouldn't be able to differentiate between a rotation and other sidewards acceleration. A wind gust could move the entire rocket and the rocket could remain vertical. This wind gust wouldn't necessarily look any different (to the accelerometer) than the rocket rotating. The point of rotation would be very important in determining the rocket's orientation and the accelerometer by itself wouldn't be able to identify where the rotation had occurred.

There aren't many "rocket scientists" on this forum!