What is MPU 6050 Sensor Module? MPU 6050 sensor module is an integrated circuit board which is made up with the combination of three axis gyroscope, three axis accelerometer and digital motion control processor. All these items are packed in a small single device and this device provides complete solution for any six axis motion tracking system. Beside this, this device also has an extra features such as temperature sensor feature, 12C bus interface to communicate with microcontroller and 12C auxiliary bus interface to communicate with three axis magnetometer pressure sensor etc. If this magnetometer pressure sensor is connected with 12C auxiliary bus, then this MPU 6050 sensor module can easily provide nine axis motion fusion output. This sensor has so many applications such as in robot for self-balancing, UAVs smart phones and it also helps the object which is attached with this sensor to the get the exact position in three dimensional space. These are easily available in market and also available at online shop. A simple MPU 6050 sensor module is shown in figure 1
Figure 1 Simple MPU 6050 Sensor Module
Pin Configuration of MPU 6050 Sensor Module
Every MPU 6050 sensor module consists of 8 pins and these pins used for different configuration. First one is VCC pin that is used for power on this sensor and 3 to 5 volts dc voltages are applied to power on this sensor. Second one GND pin which is connected to source ground. Third one is SCL (serial clock) pin which is connected to microcontroller SCL pin. Forth one is SDA (serial data) pin which is connected to other 12C interface sensor for enable its pin form MPU 6050 sensor module. Fifth one is XDA (auxiliary data) pin which is connected to microcontroller XDA pin. Sixth one is XCL (Auxiliary clock) pin which is also connected to other 12C interface sensor to enable its pin from this sensor module. Seventh one is AD0 which is 12C slave address LSB pin. For changing the slave address and read logic one, this pin is directly connected to VCC pin. Similarly, the last one is INT (interrupt) pin which is interrupt digital output pin and used for giving any interruption to MPU 6050 sensor module. The pin configuration figure of MPU 6050 sensor module is shown in figure 2
Figure 2 Pin Configuration of MPU 6050 Sensor Module
Working Principle of MPU 6050 Sensor Module
MPU 6050 sensor works on the principle of MEMS (micro electro mechanically system) technology. Basically, this sensor module is a six DOF (degree of freedom) or six axis sensor module therefore it has six outputs. From these six outputs values, three are come form gyroscope and three are come from accelerometer. Because both gyroscope and accelerometer are embedded inside a single chip therefore it uses 12C (inter integrated circuit) protocol for communication. So, the accelerometer in this chip works on the principle of piezo electric effect. Suppose a small box which a ball inside it and the walls of this box are made with piezo electric crystal. When we tilt this box then the ball force to move in the direction of inclination due to gravity. When this ball collides with the wall of box then a small piezo electric current is produced. On the basis of this current we can determine the inclination angle and its magnitude. Similarly, the gyroscope works on the principle of Coriolis acceleration.
How to Interface MPU 6050 Sensor Module with PIC 18F452 Microcontroller
A controller such as Arduino or microcontroller is required for running the MPU 6050 sensor module. Here we will interface this sensor with pic microcontroller. Microcontroller is connected with this sensor according to above pin configuration figure. It is programmed in c language with the help of mikro/c software and it is also powered up with 5V dc voltages. After loading the program when this sensor is connected with any box whose walls are made up with piezo electric crystal then piezo electric current is produced by moving the ball then this current is sensed by the microcontroller. Because the microcontroller is programmed therefore on the basis of this program and current, it tells the user about ball inclination angle with magnitude.