Interfacing gyroscope to arduino
This article is about interfacing gyroscope to arduino. Gyroscope is a device used for measuring the angular velocity in the three axes. It works under the concepts of angular momentum and can be used to determine the orientation of an object. Typical applications of gyroscope includes missile guidance, flight control, smart phones, game station joy sticks etc. Mechanical gyroscopes, MEMS gyroscope, optic fiber gyroscope, ring laser gyroscope.
Here we deal with the MEMS gyroscope. MEMS is the abbreviation of micro electro mechanical system. The MEMS gyroscope works under the principle of Focault pendulum and has a vibrating electro mechanical element for sensing the orientation. MEMS gyroscopes are very compact and comparatively cheap. They are widely used in consumer products like smart phones, joysticks, RC toys etc.
The gyroscope module used here is GY521. GY521 is a 3 axis gyroscope plus accelerometer module based on MEMS IC MPU6050. The MPU6050 has 6 built in 16 bit ADC channels, three for the gyroscope outputs and three for the accelerometer outputs. It communicates with the microcontroller using the I2C protocol. The operating voltage range of MCU6050 is from 2.37v to 3.46V. A low drop out regulator is provided on the GY521 board for providing this voltage. The full scale ranges of the acclelerometer and gyroscope are user programmable and they are +/- 2g, 4g, 8g and 16g for the accelerometer and +/- 250 °/S, 500 °/S, 1000 °/S and 2000 °/S. The photograph of a GY521 module is shown below.
Here in this article we are considering the gyroscope only. Many guys find it very difficult to interface gyroscope to arduino or any other microcontroller based system. But it can be done very easily and I will show how it is done. According to the MPU6050 datasheet, the raw gyroscope output values in three directions can be converted into angular velocity in the three directions using the following equations.
For more detail: Interfacing gyroscope to arduino