A gyroscope is a sensor that measures the angular velocity of a device’s rotation about three axes. Unlike an accelerometer, which measures linear acceleration, a gyroscope detects rotation and orientation in space. According to STMicroelectronics, 2024, modern MEMS gyroscopes achieve an accuracy of up to 0.01 degrees per second, enabling their use in navigation, image stabilization, and AR applications.
Key Takeaways
A gyroscope in a smartphone is a microelectromechanical sensor (MEMS) that measures the angular velocity of the device’s rotation. Unlike mechanical gyroscopes used in aviation, a MEMS gyroscope is a silicon chip measuring 2×2×1 mm mounted on the phone’s motherboard.
Modern smartphones exclusively use MEMS gyroscopes of the vibrating type — tuning-fork and ring-design. They have no rotating parts, ensuring durability of up to 10 years of continuous operation. Leading manufacturers include Bosch Sensortec (BMI series), STMicroelectronics (L3G, A3G series), and InvenSense (ICM series).
A typical MEMS gyroscope has a measurement range from ±125 to ±2000 °/s, a sampling rate of up to 32 kHz, and current consumption of 3–6 mA. According to Bosch Sensortec BMI160 (2023), the noise level is 0.007 °/s/√Hz at a range of ±125 °/s — sufficient for accurate rotation tracking.
| Parameter | Value |
|---|---|
| Technology | MEMS (vibrating) |
| Range | ±125 — ±2000 °/s |
| Power consumption | 3–6 mA |
| Size | 2×2×1 mm |
| Noise | 0.007 °/s/√Hz |
The operating principle of a MEMS gyroscope is based on the Coriolis effect. Inside the chip, there is a silicon mass that vibrates at a specific frequency (15–30 kHz). When the device rotates, the Coriolis force acts on the vibrating mass, proportional to the angular velocity.
The key elements of a MEMS gyroscope are drive electrodes that create vibrations and sensing electrodes that detect displacement. According to the research paper “MEMS Gyroscopes for Consumer Electronics” (IEEE, 2023), a typical design includes 4–8 comb structures arranged symmetrically around the central mass.
Modern gyroscopes transmit data via I²C or SPI buses. The smartphone controller receives three-axis angular velocity values — X (Pitch), Y (Roll), and Z (Yaw). The built-in ADC converts the capacitive signal into digital values with 16–24 bit resolution. The update rate in gaming modes reaches 400 Hz.
An accelerometer measures linear acceleration — the change in an object’s velocity along axes. A gyroscope measures rotation — the rate of change of angle. These sensors are complementary: the accelerometer provides orientation relative to the gravity vector but cannot distinguish tilt from linear motion. The gyroscope tracks rotations independently of gravity but is subject to drift.
Real-world applications use Sensor Fusion — an algorithm that combines data from the gyroscope, accelerometer, and magnetometer. The Mahony filter or complementary filter computes orientation quaternions with an accuracy of 2 degrees in static conditions and 5 degrees in dynamic conditions. Android provides the virtual sensor TYPE_ROTATION_VECTOR at the framework level.
val rotationVector = sensorManager
.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR)
val callback = object : SensorEventListener {
override fun onSensorChanged(event: SensorEvent) {
val quat = FloatArray(4)
SensorManager.getQuaternionFromVector(quat, event.values)
// quat[0..3] — orientation quaternion
}
}
Android provides two types of gyroscope sensors: TYPE_GYROSCOPE (calibrated, without drift) and TYPE_GYROSCOPE_UNCALIBRATED (raw data with drift estimation). They are accessed via SensorManager.getDefaultSensor(). Data is returned in rad/s — radians per second.
Registering a listener for the gyroscope requires specifying a delay: SENSOR_DELAY_GAME (20 ms) for games, SENSOR_DELAY_UI (67 ms) for UI, SENSOR_DELAY_FASTEST (0 ms) for maximum frequency. Without unregistering in onPause(), the battery drains in 2–3 hours.
class GyroActivity : AppCompatActivity() {
private lateinit var sensorManager: SensorManager
private var gyroscope: Sensor? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
sensorManager = getSystemService(SENSOR_SERVICE) as SensorManager
gyroscope = sensorManager.getDefaultSensor(
Sensor.TYPE_GYROSCOPE
)
}
override fun onResume() {
super.onResume()
gyroscope?.let { sensor ->
sensorManager.registerListener(
this, sensor, SensorManager.SENSOR_DELAY_GAME
)
}
}
}
Raw data from event.values[0..2] corresponds to angular velocity along X, Y, and Z. To obtain the rotation angle, the angular velocity must be integrated over time. At 50 Hz, the integration error is about 1 degree per minute — acceptable for games but insufficient for navigation without correction.
Zero-rate drift (bias drift) is the main issue with MEMS gyroscopes. Even when stationary, the sensor may show non-zero angular velocity (0.1–2 °/s). The cause is temperature changes and mechanical stress in the silicon structure. Manufacturers compensate for this effect at the hardware level.
The Android system automatically calibrates the gyroscope upon first boot or when the temperature changes. The calibration process takes 10–30 seconds and requires no user intervention — simply place the phone on a stationary surface. The calibrate() method is not available on all devices. For forced calibration, TYPE_GYROSCOPE_UNCALIBRATED is used, obtaining the bias offset via event.values[3..5].
private fun handleUncalibratedGyro(event: SensorEvent) {
val rawX = event.values[0] // raw rad/s without calibration
val biasX = event.values[3] // X-axis bias
val calibratedX = rawX - biasX
applyCalibrationToFusion(
calibratedX,
event.values[1] - event.values[4],
event.values[2] - event.values[5]
)
}
The gyroscope is used in dozens of scenarios — from camera stabilization to VR headsets like Google Cardboard. Apple’s ARKit and Google’s ARCore use the gyroscope as the primary sensor for head rotation tracking. According to Apple ARKit Technical Specification (2024), the gyroscope paired with an accelerometer provides tracking accuracy of up to 0.5 degrees.
Beyond consumer electronics, gyroscopes are used in robotics and UAVs. Mobile robots based on Android Things and ROS (Robot Operating System) use MEMS gyroscopes for motion stabilization and odometry. According to an IEEE study “MEMS IMU in Robotics” (2024), the positioning accuracy of a mobile robot with a gyroscope is 3–5 times higher than with wheel odometry alone, especially on slippery surfaces. In consumer-grade drones, the gyroscope paired with a barometer maintains flight altitude with an accuracy of 0.5 meters in winds up to 10 m/s.
For AR applications, the gyroscope is the primary sensor determining the position of virtual objects relative to the real world. Google ARCore uses the gyroscope for device motion tracking at 1000 Hz (via internal sampling, independent of the API rate). Apple’s ARKit achieves positioning accuracy of 0.5 degrees during motion, sufficient for overlaying virtual furniture or game characters onto the real scene.
The new generation of 6-axis IMUs (InvenSense ICM-42688, 2024) integrates a gyroscope and accelerometer in a single chip with power consumption of 0.45 mA in low-power mode. The development of gradiometers and atomic gyroscopes for mobile devices remains at the laboratory prototype stage. Commercial-grade MEMS gyroscopes with an accuracy of 0.001 °/s are expected by 2028.
Frequently Asked Questions
The gyroscope detects rotation and orientation of the device in space. Without it, VR mode, auto-rotation by tilt, video stabilization, and AR applications would be impossible. Modern phones cannot function without a gyroscope.
An accelerometer measures linear acceleration (motion and tilt relative to gravity). A gyroscope measures angular velocity (rotation). An accelerometer cannot distinguish device rotation from linear movement — the gyroscope solves this problem.
Android uses automatic calibration. For manual calibration, download apps like “GPS Status & Toolbox” — they guide you to place the phone on a flat surface and calibrate via TYPE_GYROSCOPE_UNCALIBRATED.
This is zero-rate drift — a natural property of MEMS sensors. Even expensive gyroscopes have an offset of 0.1–2 °/s at rest. Calibration subtracts this offset. If the drift exceeds 5 °/s, the sensor is faulty.
Use SensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE) and register a SensorEventListener. Data arrives in rad/s along three axes. For games, use SENSOR_DELAY_GAME (20 ms); for background use, SENSOR_DELAY_UI (67 ms).
Summary
We will develop a mobile application turnkey
IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.
Read also