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 Use ADS1115 with the Raspberry Pi (Part 1)

        How to Use ADS1115 with the Raspberry Pi (Part 1)

        Discover how to expand your Raspberry Pi projects by integrating the ADS1115 ADC for precise analog signal reading....

        How to Install Pip Packages in AWS Lambda Using Docker and ECR

        How to Install Pip Packages in AWS Lambda Using Docker and ECR

        Learn how to streamline AWS Lambda deployments by using Docker and Amazon Elastic Container Registry (ECR) to package...

        Create Tabular Product Descriptions on Your Shopify Store

        Create Tabular Product Descriptions on Your Shopify Store

        Enhance your Shopify store's product pages with our comprehensive guide on implementing tabular descriptions. Learn how to add a...

        SSH Into Raspberry Pi with Tailscale VPN

        SSH Into Raspberry Pi with Tailscale VPN

        Effortlessly access and manage your Raspberry Pi from anywhere using Tailscale's secure mesh VPN.

        Send Email with Lua and the ESP32

        Send Email with Lua and the ESP32

        In this tutorial, we delve into sending emails with the ESP32-S3 using Lua, focusing on the Xedge IDE's built-in SMTP...

        How to Code with Lua on ESP32 with XEdge32

        How to Code with Lua on ESP32 with XEdge32

        Learn how to set up Xedge32 and start coding on the ESP32-S3 with Lua programming!

        Stream Audio From Raspberry Pi to Local Computer

        Stream Audio From Raspberry Pi to Local Computer

        Discover the simplicity of streaming live audio directly from a USB microphone connected to your Raspberry Pi to...

        SSH Raspberry Pi via Cell Phone

        SSH Raspberry Pi via Cell Phone

        This beginner-friendly guide will walk you through remotely controlling your Raspberry Pi using SSH through your cell phone.

        Remotely Control Raspberry Pi via SSH from External Network

        Remotely Control Raspberry Pi via SSH from External Network

        Learn how to SSH into your Raspberry Pi from any network. This is critical in IoT since you can control...

        Stream Video from Raspberry Pi Camera to YouTube Live

        Stream Video from Raspberry Pi Camera to YouTube Live

        Learn how to stream to YouTube from a Raspberry Pi Camera.

        Back to blog

        Leave a comment

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