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:
- 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!
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: