Accelerometers and gyroscope

Let's first start with accelerometers. As the name suggests, these are meant to measure acceleration in any body. Hence, whenever there is any acceleration in any body, then the accelerometers have the work to sense that acceleration and give the corresponding reading. 

A gyroscope is a device that uses Earth's gravity to help determine orientation of the robot. An accelerometer is a device designed to measure non-gravitational acceleration. Whenever there is any acceleration, the crystals in the accelerometer excite and provide a voltage corresponding to it.

The main difference between these devices is simple: the gyroscope can sense rotation, whereas the accelerometer cannot. In a way, the accelerometer can gauge the orientation of a stationary item with relation to Earth's surface. When accelerating in a particular direction, the accelerometer is unable to distinguish between that and the acceleration provided through Earth's gravitational pull. The gyroscope measures the rate of rotation around a particular axis. In comparison, the accelerometer measures linear acceleration.

Here in this chapter, we will be using a sensor called MPU 6050, which is one of the most common sensors that has both the accelerometers and gyroscope built into one single package. 

Preceding is a photograph of it. As you can see, it has SCL and SDA lines. Hence, you can be sure that this sensor works on I2C protocol. This is cool because we have already had a good experience working with I2C type sensors. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.196.59