Categories: How does it work
Number of views: 3097
Comments on the article: 0

What is a gyroscope and accelerometer

 

Many modern devices and gadgets have gyroscopes and accelerometers built into them. Smartphones, video and cameras, tablets, readers, etc. - these devices are found almost everywhere, although their presence is not at all noticeable if you look at the device from the outside. The gyroscope is also called the gyro sensor, and the accelerometer is called the G-sensor. Working in pairs, these devices perfectly complement each other, providing usability and flexibility of the gadget functions.

What is a gyroscope and accelerometer

Accelerometer

The accelerometer in its simplest form is a weight mounted on a spring, installed in its own housing. When shaking or turning the body, the weight moves inside it by inertia. And since the weight moves during acceleration in the corresponding direction, it inevitably pulls the spring along with it, the oscillations of which can be taken into account to determine the direction and accelerate the change in the position of the entire body.

So, three springs with weights installed along three spatial axes allow you to get a complete picture of the direction and magnitude of the acceleration relative to the ground of the object to which they are attached.

In a smartphone, for example, this entire structure is located inside a small microcircuit, and all movements of the "weights" occur inside it. However, as a result, it becomes possible to determine the acceleration of the entire smartphone in space.


Gyroscope

The gyroscope acts very differently. The top, fixed on an axis in the first frame, and rotates at high speed. The first frame has freedom of rotation, being fixed on an axis (perpendicular to the axis of the top) inside the second frame. The third frame bears the axis of rotation for the second frame (perpendicular to the axes of rotation of the top and the first frame).

As a result, no matter how you turn this design, the spinning top will tend to maintain a vertical position, although the rings will rotate.

Gyroscope

To more accurately determine the parameters of the movement of an object in space, the gyroscope usually works in conjunction with an accelerometer, allowing you to get a complete picture of the physical movement of the body of a gadget.


Functioning

So, the accelerometer measures the projection of the resulting apparent acceleration and allows you to determine the angle of inclination of the device relative to the ground, and the program can, for example, rotate, for example, the image on the screen of the device in which this accelerometer is installed. Turn the reader from a vertical position - on its side, and the page orientation on the display will immediately change to landscape.

The current orientation of the device in space is determined by the gyro sensor. The program responds to movement, and is able to quickly track the moment when the device, for example, crashes. The laptop overturns - the system of fixing the hard drive is activated inside.

Arduino gyro sensor

By playing computer games earlier, a person could control the game process using the joystick, mouse, or keyboard. Today, you can play racing on a smartphone, and just moving, shaking or tilting it in different directions, fully control the gameplay - drive a virtual car.

At the moment, a lot of interactive games have been invented, taking into account the control capabilities that have opened thanks to a pair of accelerometer and gyroscope. Games have become more fun since they are almost real.

The principle of operation of the gyroscope and accelerometer

An accelerometer with a gyroscope everywhere controls the orientation of the image on the screen. If you tilt your smartphone, the orientation will become landscape (convenient for watching videos), and return it to a vertical position - it will again turn into a standard, convenient for reading from web pages.

In a similar way, the view in applications is automatically adjusted - the player’s view changes, the cover of the album being listened becomes visible when the screen orientation is horizontal, but only the basic music control buttons remain in the upright position.

In GPS navigators, the map rotates on the screen like a compass needle, when you turn it around and around, moving in the area with it in your hands, but the arrow indicating the direction remains directed in accordance with the position in the space of your hands.

Auto image rotation depending on orientation

A pedometer is another simple but useful application of the accelerometer. You can set individual settings, and you will learn not only the number of steps taken, but you can estimate the approximate distance that you have run or passed.

Of course, using a device with a gyroscope and an accelerometer, it is necessary to take into account the fact that these sensors react not only to consciously made movements, but also to random ones.

Sometimes this is harmful, for example, you lie on the sofa with a reader, wanting to read a book, tossing and turning for a while, and he, being sensitive, reacts to random movement and turns the page, translating it into landscape view.

In such situations, it will be very useful to adjust the sensitivity of the sensor when you set the angle of the device at which the sensor understands whether it is necessary to rotate the orientation accurately or is it just an awkward movement.

See also at i.electricianexp.com:

  • How the joystick is arranged and works
  • Fibaro Starter Kit for creating a smart home
  • How the servo is arranged and works
  • How to connect incremental encoder to Arduino
  • Principles of electric motor for dummies

  •