FB pixel

How do Accelerometers and Gyroscopes work?

Published


Accelerometers and Gyroscopes can be found in almost all modern smartphones and in a lot of robotic applications. They can help us get information like how fast our device is moving and in which direction, or if it’s turning, then how quickly. Accelerometers detect linear acceleration of devices, that is, the acceleration along an axis. Gyroscopes, on the other hand, work with the Coriolis Effect instead of acceleration, and it detects the angular velocity, i.e, how fast the body is turning. However, the crucial thing here to note is that gyroscopes do NOT report current angle, they report the speed at which the device is turning. In order to get the angle position, you have to integrate it over time. The below figure shows the type of motion detected by accelerometers and gyroscopes.

Axes Sensitivity Orientation
Figure 1: Orientation of Axes of Sensitivity

Both accelerometers and gyroscopes are usually found inside an Inertial Measurement Unit or IMU. It’s a package containing accelerometers, gyroscopes, magnetometers, temperature sensors, etc. The below image is of an MPU6050 breakout board, which is an IMU. It has a 3-axis accelerometer and also a 3-axis gyroscope inside the main tiny IC you see in the middle of the board. Now, the interesting part is how this technology is implemented inside the chip.

GY 521 MPU 6050 Module 3 Axis Gyroscope Accelerometer
Figure 2: “GY-521 MPU-6050 Module 3 Axis Gyroscope + Accelerometer” by Nevit Dilmen (talk), licensed under CC BY-SA 3.0

All these sensors are implemented on a microscopic level using a technology commonly referred to as MEMS or micro-electromechanical system, which is a remarkable innovation in the field of engineering.

Microelectromechanical systems (MEMS) combine mechanical and electrical components into small structures and are only several micrometers in size. They are formed by a combination of semiconductor and microfabrication technologies using micro machining to integrate all the electronics, sensors, and mechanical elements onto a common silicon substrate. Basically, MEMS are microscopic mechanisms printed directly inside the IC.

Internal Structure of a MEMS Accelerometer

If we look at the internal structure of an accelerometer, it looks something like the following image:

MEMS Accelerometer Internal Structure
Figure 3: Structure inside MEMS Accelerometer
  • It has a proof mass or seismic mass, which is an H-shaped structure with “sense fingers” extending from it.
  • The proof mass is tethered to the substrate at both ends and is allowed to perform a to-and-fro motion between the tethered ends.
  • Electrodes are structures fixed in the substrate and remain stationary, unlike the proof mass which moves with the motion of the body.
  • Proof mass and electrodes together form a comb-like structure that is used to detect the motion.

Detection of Motion

The most common sensing method used in accelerometers and gyroscopes is capacitive sensing, in which the change in capacitance between the fixed electrodes and proof mass is used to determine body acceleration. This method is widely used due to the benefits it provides like high accuracy, stability, noise immunity, low power dissipation, and its simple structure.

Differential Capacitor
Figure 4: Differential Capacitor

To better understand the concept, let’s take a look at a circuit made up of two stationary and one free-to-move metal plate. Together they form a differential capacitor. In this differential capacitor, we measure the difference in the charges that form in the bottom capacitor (the bottom and middle plate) and the top capacitor (the middle and top plate). If we apply an equal potential difference to both the capacitors while keeping the middle plate exactly between the top and bottom plate, they’ll have an equal build-up of capacitance. Now if we move the middle plate closer to the bottom plate, the capacitance of the bottom capacitor increases while the top one decreases.

This is exactly how accelerometers work. If we look closely at the structure in Figure 5, we can notice that the interlocking fingers of the fixed electrodes and of proof mass form a differential capacitor, which together store a charge. As the accelerometer moves back and forth, the charge stored between the fingers gets changed, causing a flow of current. These changes in capacitances are used to detect the motion.

Sensor Motion Effect
Figure 5: Effect of motion on the sensor

We know that capacitance is inversely proportional to the distance between the plates or electrodes, i.e.,

Where,

  • C = Capacitance
  • 𝜖 = permittivity of a dielectric material
  • A = area of the plates
  • d = distance between the plates

Initially, the capacitance C1 and C2 are equal. But when the sensor is under acceleration,

We get,

The change in capacitance is then recorded and passed through charge amplification, signal conditioning, low-pass filtering before it gets converted to a digital signal using an ADC. The digital bitstream from the ADC is then passed to the host using communication protocols like I2C or SPI. The result is that the accelerometer throws a bunch of numbers at you, and making sense of them involves quite a bit of math, which is done by our microcontroller!

Sometimes, the motion can be very hard to detect using a single differential capacitor. Hence, this makes it necessary to use multiple movable and fixed electrodes, all connected in a parallel configuration. This allows the system to become more accurate and sensitive to changes. But a massive parallel configuration would only allow us to sense motion in one direction. To overcome this problem and to detect motion in multiple directions, we just need to mount the accelerometer differently (at 90 degrees), and now we can detect the acceleration in two directions. Just like that, we can also extend it to 3-axis and make an accelerometer that covers all directions of motion in our 3D world!

Fabrication of these complex microscopic structures is an accomplishment for engineering as it makes it possible to fit sensors, which would earlier take a lot of space, in extremely tiny spaces now. These micro machines now exist inside our pockets! Earlier used only in industrial robots and automobiles, these MEMS sensors are now a part of every smartphone because they give us a new way to interact using motion and gestures. MEMS devices also allow us to create new devices that are profoundly changing how our movements, body motion, and gestures impact the way we live.

Authored By

Jayesh Upadhyay

An Electronics Engineer who loves where software and hardware meet. Always fascinated to see code change something in real life! Currently working on solving embedded system problems and helping others learn while enjoying reading science-fiction and gaming in free time.

Make Bread with our CircuitBread Toaster!

Get the latest tools and tutorials, fresh from the toaster.

What are you looking for?