Drones

Gyroscope sensor in a drone, and why a wobble is not always your fault

Short answer

A gyroscope sensor in a drone measures angular velocity: how fast the drone is turning about each axis, in degrees per second. It does not measure the tilt angle. Inside the MEMS chip, a vibrating structure is deflected by the Coriolis effect when the chip rotates. The flight controller compares that rate with the rate it wants and changes the motor commands. In Betaflight Angle mode, the accelerometer also contributes to the attitude estimate.

Try it yourselfLearn to Fly, Lesson 6: PID, tune the wobble →Try the feedback loop the gyroscope feeds, in a browser simulation.

A gyroscope sensor in a drone measures how fast the drone is turning, not how far it is tilted. The flight controller reads that turning rate many times a second and adjusts the motor commands to cancel turns nobody asked for.

If your drone twitches in the air, the first thought is usually “I fly badly”. Sometimes that is right. But that small chip is measuring every turn and feeding the corrections, so it deserves a fair look before you take the blame.

3D illustration of an orange quadcopter beside an exploded gyroscope chip and flight controller board, with the words How a gyroscope keeps a drone level
A frame from the video. It is a 3D simulation; the chip is enlarged and not to scale.

What is a gyroscope sensor?

A gyroscope sensor measures angular velocity: how fast something is turning. In a drone it does this on three axes, X, Y and Z, which line up with roll, pitch and yaw. The InvenSense MPU-6000 datasheet calls its gyros “angular rate sensors” and gives their unit as degrees per second. VectorNav defines a gyroscope the same way, as a sensor that measures an object’s angular rate.

A gyro does not keep the drone level by itself. It measures turning, and the flight controller uses that measurement to decide what to do.

Your inner ear gives a rough feel for the idea: it senses your head turning. This is an everyday comparison, not a technical match.

What the measurement range means

The MPU-6000’s gyro range can be set to ±250, ±500, ±1000 or ±2000 degrees per second. That is the fastest turn the chip can report at that setting. A wider range does not make the chip more accurate, and it says nothing about how well the drone holds level.

How does a MEMS gyroscope work?

MEMS stands for micro-electro-mechanical system: a mechanical structure small enough to be made on a chip. The MPU-6000 datasheet says the chip has “three independent vibratory MEMS rate gyroscopes”. When the gyros rotate about one of the sense axes, the Coriolis effect causes a vibration that a capacitive pickoff detects. The signal is amplified, demodulated and filtered into a voltage proportional to the angular rate, then digitised by a 16-bit converter on each axis.

The chip is tiny. The datasheet gives the package as 4 x 4 x 0.9 mm, and it holds a three-axis gyroscope and a three-axis accelerometer. A package like this is often called an IMU sensor, short for inertial measurement unit. In the video, the chip’s motion is enlarged and slowed so you can follow it.

Why can’t a quadcopter balance on its own?

Ji and Turkoglu, in their 2015 quadcopter testbed paper, describe the quadcopter as “initially an unstable and underactuated plant”. They write that the deviation from hover is calculated using IMUs and fed back into the control system.

The video shows this with a simulated gust. With the gyroscope off, the drone flips; with it on, the drone stays steady. That tumble is a Blender simulation, not filmed flight.

From the chip to the motors

  1. The gyroscope measures a turn. A gust lifts one side and the chip reports a roll rate.
  2. The flight controller compares it with the rate it wants. PX4’s tuning guide describes a rate controller made of three independent PID controllers, one each for roll, pitch and yaw. Its inputs are the rate setpoint and the body angular rate “measured by a gyro”.
  3. The mixer turns the correction into commands for each motor. Ji and Turkoglu describe a roll as increasing or decreasing the left pair of motors while the right pair gets the opposite change. PX4 calls the conversion from torque commands to individual motor thrust commands “mixing”.
  4. Each ESC receives its own command. In Betaflight with DShot, that command is a throttle value; the DShot guide says “the first 11 bits are the actual throttle value”. The flight controller does not set an exact rpm for each motor.

The motor changes in the video are exaggerated so you can see them.

How fast does the loop run?

Betaflight’s CLI reference gives 8 kHz as the target gyro rate for the ICM-42688P and MPU-6000, and 3.2 kHz for the BMI270. Its pid_process_denom setting divides that: at 1 the PID loop runs on every gyro sample, and at 2 an 8 kHz gyro gives a 4 kHz PID loop. The Configuration tab adds that a slower processor, such as an F411, may run the PID loop at half the gyro rate.

So 8,000 times a second is a configuration-specific figure for certain gyros and processors, not a rate every drone uses. The MPU-6000 datasheet says its sample rate is programmable from 8,000 samples per second down to 3.9.

Does the gyroscope measure tilt?

No. To get an angle, software adds up the turning rate over time. Any small offset in the reading gets added up too, and the estimated angle slowly wanders.

Betaflight’s self-level modes use more than the gyro. Betaflight’s Modes guide says that in Angle mode the roll and pitch sticks control the angle between the drone’s axis and the vertical, and that the auto-levelled modes are available when the board has a 3-axis accelerometer. The CLI reference describes the complementary filter gain, imu_dcm_kp, as controlling “how aggressively acc data is blended with gyro integration”. In Acro, or Rate, mode, your sticks ask for a rotation rate and the drone does not level itself.

What does the accelerometer add?

An accelerometer does not measure gravity directly. NXP’s application note AN3461 says it measures the difference between any linear acceleration of the sensor and the Earth’s gravitational field. VectorNav calls this specific force. Only in the absence of linear acceleration does the reading show the rotated gravity vector and give pitch and roll.

The MPU-6000 datasheet gives the steady case: placed on a flat surface, the accelerometer reads 0 g on X and Y and +1 g on Z. A drone that is speeding up, braking or turning is accelerating, so a single accelerometer reading is not a clean tilt measurement. The gyro tracks fast turns, and the accelerometer gives a reference for down when the drone is close to steady.

Why do gyroscope readings drift?

The video shows a still drone whose gyro reads 20 degrees per second. That number is illustrative, chosen to make the idea visible.

A gyroscope held still should read zero, and in practice it does not read exactly zero. The MPU-6000 datasheet lists an “Initial ZRO Tolerance” of ±20 °/s at 25 °C. ZRO means zero-rate output: what the gyro reports when it is not rotating. This initial tolerance is not a drift rate, a guaranteed limit, or a prediction of any particular chip’s error.

The same table lists ±20 °/s of ZRO variation over temperature, from −40 °C to +85 °C, so the offset can also change as the chip warms or cools.

Flight software plans for the offset. The PX4 navigation filter guide lists “IMU gyro bias estimates - X, Y, Z (rad/s)” among the states it keeps estimating. In Betaflight, the CLI reference describes an accelerometer correction applied to the attitude estimate in Angle and Horizon modes.

A real question: why does my Arduino drone drift sideways?

On the Arduino Forum, a beginner asked “How can I use a gyroscope sensor to keep my drone level?” Their quadcopter had four brushless motors on ESCs, a LiPo battery and Bluetooth control from a phone. It took off but drifted sideways. They had an MPU6050 and did not know how to connect its readings to the ESCs; the sketch they posted had no gyroscope input.

The MPU-6050 is covered by the same product specification as the MPU-6000 and also combines a three-axis gyroscope with a three-axis accelerometer.

A reply in the thread said that doing this means learning PID control and how to compute 3D orientation from IMU data, pointed to ArduPilot as a resource, and warned that starting from scratch may take many months. That is the same chain described above, built from scratch. The chip only reports rates and specific force. Software has to estimate attitude, compare it with a target, and mix the corrections into motor commands.

Holding a level attitude is also different from holding a position. PX4’s navigation filter uses IMU data for state prediction only, and uses other measurements, such as GPS and barometric pressure, to correct its estimates.

Is the wobble always the pilot?

No. A wobble can reflect wind and the flight controller’s response, among other causes. It can also come from tuning, vibration or propellers, and the sources here do not say which is most common. Check those before you blame your hands.

Gyroscope sensor cheat sheet

Check What to look for
What it measures Angular velocity on three axes, in degrees per second
How it works A vibrating MEMS structure deflected by the Coriolis effect
Where it lives In an IMU, such as the 4 x 4 x 0.9 mm MPU-6000, with an accelerometer
What it feeds The rate loop, which adjusts the throttle commands sent to each ESC
Loop speed 8 kHz in Betaflight for some gyros; configuration specific
The catch An offset at rest, so software estimates and removes gyro bias
Betaflight Angle and Horizon Use the accelerometer as well as the gyro

Where the simple picture stops

The video is a 3D simulation, not a real flight. The gyro-off tumble is simulated, the chip motion is enlarged and slowed, and the motor changes are exaggerated. The 20 degrees per second shown on screen is illustrative. The narration is an AI clone of the creator’s voice. To try the feedback loop yourself, Learn to Fly, Lesson 6 runs it in a browser simulation, and the flight controller explainer covers the board the gyro sits on. Next in the series: GPS.

Watch the video

Video: What Keeps a Drone From Falling Out of the Sky?▶ Watch on YouTube
What Keeps a Drone From Falling Out of the Sky?

Questions people ask

What does a gyroscope sensor do in a drone?

It measures how fast the drone is rotating about three axes, in degrees per second. The flight controller compares that rate with the rate it wants and adjusts the commands it sends to the ESCs.

What is a MEMS gyroscope?

A gyroscope built as a micro-electro-mechanical system, a tiny mechanical structure made on a chip. In the MPU-6000, a vibrating structure is deflected by the Coriolis effect when the chip rotates, and a capacitive pickoff turns that into a voltage proportional to the angular rate.

Is a gyroscope the same as an IMU sensor?

No. An IMU, an inertial measurement unit, combines several inertial sensors. The MPU-6000 holds a three-axis gyroscope and a three-axis accelerometer in one 4 x 4 x 0.9 mm package.

Does a gyroscope measure the tilt angle?

No. It measures turning rate. Software can integrate the rate to estimate an angle, but any offset adds up over time, so Betaflight’s Angle and Horizon modes also use an accelerometer.

Does the MPU-6000 drift 20 degrees per second?

No. The datasheet lists an initial zero-rate output tolerance of ±20 °/s at 25 °C. That initial tolerance is not a drift rate or a prediction of any particular chip’s error.

Sources

  1. InvenSense, MPU-6000 and MPU-6050 Product Specification, PS-MPU-6000A-00 revision 3.4 (2013) (read 17 November 2026)
  2. NXP (Freescale) AN3461 rev. 6, Tilt Sensing Using a Three-Axis Accelerometer (read 17 November 2026)
  3. Analog Devices, Analyzing Frequency Response of Inertial MEMS in Stabilization Systems (read 17 November 2026)
  4. VectorNav, What is an Inertial Measurement Unit? (read 17 November 2026)
  5. Betaflight docs, Command Line Interface (CLI) reference (read 17 November 2026)
  6. Betaflight docs, Configuration tab (read 17 November 2026)
  7. Betaflight docs, Modes guide (read 17 November 2026)
  8. Betaflight docs, DShot guide (read 17 November 2026)
  9. PX4 docs, Multicopter PID Tuning Guide (read 17 November 2026)
  10. PX4 docs, Using PX4's Navigation Filter (EKF2) (read 17 November 2026)
  11. Ji and Turkoglu, Development of a Low-Cost Experimental Quadcopter Testbed Using an Arduino Controller and Software, arXiv:1508.04886 (2015) (read 17 November 2026)
  12. Arduino Forum, How can I use a gyroscope sensor to keep my drone level? (read 17 November 2026)
Contact me

Send me a message

Questions about drones, robots or a course, or a project to work on together. I reply by email.

Messages are sent to my private inbox. See the privacy policy.