How the MPU 6050 Works | High Level MEMS Overview

In this tutorial, I will explain how the MPU6050 accelerometer gives us acceleration values at a high level. I will overview MEMS concepts that are critical to accelerometers. The takeaway is that you will have a high level of knowledge of how the MPU gives us actual acceleration values. If you have not already, please subscribe to my Youtube Channel, especially if you learned something from this article. 

What is the MPU 6050?

    • The MPU6050 is a MEMS (microelectromechanical) accelerometer. That is, it utilizes properties of mechanics and electricity to output an acceleration value. The two main properties it utilizes are inertia and capacitance. 
    • Pros of the 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). Here is the MPU6050 on the micron level taken with an electron microscope. 

    Created by TDK Invensense, a California-based company founded in 2003

    How does it give us Linear Acceleration?

    • The premise behind the whole device is the "Proof Mass on a Spring". A system by which 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. 
    • Additionally, within the system there is a fixed comb of electrodes. As the proof mass moves, the distance between the proof mass and the electrodes begins to change, producing a change in capacitance that can be measured and translated into acceleration via analog-to-digital techniques. A representation of this concept is shown here:

      We can see in the diagram above that the electrodes in yellow are fixed, and as the proof mass (light blue) begins to move it changes the values of C1 and C2. This is the basis of the acceleration values we are seeing in the MPU6050. We can see similar structures in the micron-level diagram of the MPU6050. Note that you need at least three of these mechanisms to measure all three degrees of linear acceleration. 

      How does it give us Angular Acceleration Values?

      • Getting the three values of angular acceleration works similarly, in that it also uses a proof mass on a spring to induce changes in capacitance, except it also incorporates the forces from the Coriolis Effect. 
      • What is the Coriolis Effect? At a high level, when a given object is moving along an axis with a given velocity and with an angular rate applied to the object, we see a perpendicular force produced on the object. This is the Coriolis Effect.

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

        • The proof masses on the MPU are set up similarly to this:

        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) we know from the nature of the Coriolis Effect that the masses will move in the opposite direction. This movement induces a change in capacitance with the electrodes (electrodes not shown in this diagram). Once again, it is the change in capacitance that is translated to the acceleration we get from the MPU6050. 

        • To be more specific 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):

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

        Conclusion:

        Hope you had some takeaways after reading that high-level overview. The MPU6050 and MEMS accelerometers in general are marvelous pieces of engineering. Pretty amazing how all of this is captured on the micro-scale and how there is an incredible consistency when using such sensors. I would like to thank the sources I used to make this blog and youtube video:

        https://www.siliconsensing.com/technology/mems-accelerometers/

        https://lastminuteengineers.com/mpu6050-accel-gyro-arduino-tutorial/

        https://mjwhite8119.github.io/Robots/mpu6050

        https://circuitdigest.com/microcontroller-projects/interfacing-mpu6050-module-with-arduino#:~:text=How%20does%20MPU6050%20Module%20Work,of%20a%20system%20or%20object

        Create a free account to access full content.

        All access to code and resources on ShillehTek.

        Signup Now

        Already a member? Sign In

        Explore More on Our Blog

        How to Connect and Use the HCSR501 PIR Sensor with a Raspberry Pi Pico/Pico W

        How to Connect and Use the HCSR501 PIR Sensor with a Raspberry Pi Pico/Pico W

        Learn how to set up the HCSR501 PIR sensor with a Raspberry Pi Pico to detect motion and trigger...

        Powering the Raspberry Pi Pico W with the MB102 Power Supply

        Powering the Raspberry Pi Pico W with the MB102 Power Supply

        Learn how to power your Raspberry Pi Pico W projects easily and flexibly with the MB102 Power Supply Module...

        How to Use L298N Motor Driver with Pico W

        How to Use L298N Motor Driver with Pico W

        Learn how to use the L298N motor driver to control DC motors with the Raspberry Pi Pico W in MicroPython.

        Controlling an LED with a Snap Using the KY-037 Sound Sensor and Raspberry Pi

        Controlling an LED with a Snap Using the KY-037 Sound Sensor and Raspberry Pi

        Discover how to set up, code, and activate the LED based on detected sound with the Raspberry Pi...

        Getting Started with the KY-037 Sound Sensor and Raspberry Pi: Detecting Sound Using Python

        Getting Started with the KY-037 Sound Sensor and Raspberry Pi: Detecting Sound Using Python

        In this tutorial, I’ll guide you through setting up the KY-037 sound sensor with a Raspberry Pi using...

        How to Post to Reddit Using Python

        How to Post to Reddit Using Python

        Post to reddit automatically using a Python script.

        How to Create a Time-Lapse Video with a Raspberry Pi Camera

        How to Create a Time-Lapse Video with a Raspberry Pi Camera

        Learn how to make a timelapse with your Raspberry Pi in Python.

        How to Integrate the MPU6050 with the STM32 Blue Pill

        How to Integrate the MPU6050 with the STM32 Blue Pill

        Learn how to measure acceleration with the STM32 and the MPU6050 in the Arduino IDE.

        Getting Started with STM32 Blue Pill in Arduino IDE Using a USB to TTL Converter — Write Your First Program

        Getting Started with STM32 Blue Pill in Arduino IDE Using a USB to TTL Converter — Write Your First Program

        This comprehensive tutorial will guide you through the process of setting up and programming the STM32 Blue Pill...

        Automate Task Scheduling in AWS with Lambda, Step Functions, and CloudWatch

        Automate Task Scheduling in AWS with Lambda, Step Functions, and CloudWatch

        In this tutorial, I'll show you how to automatically schedule tasks in AWS at regular intervals using AWS...

        Back to blog

        Leave a comment

        Please note, comments need to be approved before they are published.