Skip to content

MPU6050 MEMS Sensor: How Accel and Gyro Work | ShillehTek

October 22, 2023

Video Tutorial (Optional)

Watch first if you want the full high-level explanation in video form.

Project Overview

MPU6050 MEMS accelerometer and gyroscope overview: This tutorial explains how the MPU6050 uses MEMS structures to convert motion into measurable capacitance changes, resulting in linear acceleration and angular rate readings.

You will learn the key MEMS concepts behind typical accelerometers, including inertia, capacitance, proof masses on springs, and (for gyros) the Coriolis effect.

If you have not already, please subscribe to my Youtube Channel, especially if you learned something from this article.

  • Time: 5 to 10 minutes
  • Skill level: Beginner
  • What you will build: A high-level understanding of how the MPU6050 produces acceleration and angular motion values

Parts List

From ShillehTek

  • None required (this is a conceptual overview).

External

  • MPU6050 module (optional) - for hands-on experiments after you understand the concepts

Note: This article focuses on the MEMS concepts and does not require wiring, code, or a specific microcontroller board.

Step-by-Step Guide

Step 1 - Understand what the MPU6050 is

Goal: Define the MPU6050 at a high level and the core physical principles it relies on.

What to do: The MPU6050 is a MEMS (microelectromechanical) accelerometer. It uses properties of mechanics and electricity to output an acceleration value. The two main properties it utilizes are inertia and capacitance.

Pros of MEMS accelerometers (in general):

  • Small
  • Cheap
  • Low power
  • Economy of scale, can be manufactured in large batches

Cons of MEMS accelerometers (in general):

  • Generally less accurate than piezoresistive or piezoelectric based accelerometers.
  • Designing MEMS can be challenging because components are put together on the micro-scale (microns).
Electron microscope view showing the MPU6050 MEMS structures at the micron scale
Micron-level view of internal MPU6050 MEMS structures.

Expected result: You understand that the sensor reads motion by measuring tiny mechanical movement and converting it into electrical changes.

Step 2 - Learn how it produces linear acceleration readings

Goal: Understand how a MEMS accelerometer converts linear motion into an electrical signal.

What to do: The premise behind the device is a proof mass on a spring. A proof mass can move freely along a given axis due to an attachment on a spring of known properties. As the MPU6050 accelerates, the proof mass begins to move along its given axis.

Within the system there is also a fixed comb of electrodes. As the proof mass moves, the distance between the proof mass and the electrodes changes, producing a change in capacitance that can be measured and translated into acceleration via analog-to-digital techniques.

Diagram of a MEMS proof mass on springs with fixed electrodes showing capacitance change used for linear acceleration measurement
Proof mass and electrode comb concept used to measure linear acceleration via capacitance.

In the diagram, the electrodes in yellow are fixed. As the proof mass (light blue) moves it changes the values of C1 and C2. This is the basis of the acceleration values we see in the MPU6050.

You need at least three of these mechanisms to measure all three degrees of linear acceleration.

Expected result: You can explain how linear acceleration becomes a measurable capacitance change that is converted to a digital reading.

Step 3 - Learn how it produces angular motion readings

Goal: Understand how the MPU6050 gyroscope uses the Coriolis effect to measure angular motion.

What to do: Getting the three values of angular acceleration works similarly. It uses a proof mass on a spring to induce changes in capacitance, except it also incorporates the forces from the Coriolis effect.

At a high level, when an object is moving along an axis with a given velocity and an angular rate is applied, a perpendicular force is produced on the object. This is the Coriolis effect.

Coriolis effect diagram showing velocity direction and rotation producing a perpendicular force used by a MEMS gyroscope
Coriolis force concept used in MEMS gyroscopes.

In the diagram, the Coriolis force is in yellow because there is a velocity in the positive x-direction and a counterclockwise angular rate on the Z-axis. This type of force is utilized on proof masses in the MPU6050 gyroscope to generate predictable displacements between the proof mass and electrodes.

Expected result: You understand that rotation creates a predictable sideways force on moving masses, and the device measures the resulting displacement electrically.

Step 4 - Connect the Coriolis effect to the MPU6050 proof-mass layout

Goal: See how oscillating proof masses are arranged to detect rotation on multiple axes.

What to do: The proof masses on the MPU are set up similarly to the concept below.

Diagram of two adjacent MEMS proof masses oscillating in opposite directions as a model for MPU6050 gyroscope sensing
Adjacent oscillating proof masses used as a gyroscope sensing element.

Two adjacent masses are set to oscillate opposite one another, meaning they have velocities along the same axis but in the opposite direction. As the MPU rotates counterclockwise on the Z-axis (it can also rotate around other axes as well) the masses move due to the Coriolis effect. This movement induces a change in capacitance with electrodes (not shown in the diagram). The capacitance change is translated into the angular measurement reported by the MPU6050.

There are actually four proof masses on the gyroscope for the MPU6050. Four proof masses are required to capture all three axes of angular rotation (roll, pitch, and yaw).

Diagram showing four proof masses arrangement used by an MPU6050-style MEMS gyroscope to measure roll pitch and yaw
Four proof masses concept for capturing roll, pitch, and yaw.

As the MPU is powered on, these masses begin to oscillate at a known frequency. Any rotation of the MPU alters the movement of the proof masses relative to one another, altering the capacitance between electrodes.

Expected result: You can describe why multiple proof masses are needed to sense rotation about different axes.

Step 5 - Review the sources used

Goal: Keep references handy for deeper study.

What to do: Here are the sources used for the blog and video:

Expected result: You have links to continue learning beyond this overview.

Conclusion

You now have a high-level understanding of how the MPU6050 works, including how MEMS proof masses and electrode capacitance produce linear acceleration readings, and how the Coriolis effect enables angular motion sensing in the gyroscope.

Want the parts for your next MPU6050 project? Grab sensors, jumper wires, and prototyping gear from ShillehTek.com. If you want help selecting sensors, validating measurements, or designing an IMU-based product, check out our IoT consulting services.