You are on page 1of 5

University of Ruhuna

Faculty of Technology
Department of Engineering Technology
ENT2232 – Instrumentation and Calibration – Lab Manual

Laboratory 04: Calibration & Measurements of Gyroscope Module 3 hours

Objectives:

 To Understand the working principle of the gyroscope module.


 To Understand the calibration process of gyroscope module.
 To Understand the sensor offset.
 Learn to use as a measuring instrument.
 To Understand the uncertainties involved in calibration.

Apparatus: • 1 × MPU6050 Sensor Module


• 1 × Arduino board
• Jumper Wires

Theory:
An MPU6050 sensor module contains the MPU-6050 Six-Axis (Gyro +
Accelerometer) MEMS (Micro-Electro-Mechanical-System) and provides
acceleration, rotation, and temperature sensor readings over an I2C or SPI serial bus
interface. The MPU6050 IMU has both 3-Axis accelerometer and 3-Axis gyroscope
integrated on a single chip. However, the precision of MEMS gyroscopes is generally
not high and altitude error may accumulate quickly. Therefore, MEMS gyroscopes
must be calibrated before use.
Working Principle
Besides sensing the angular velocity, Gyroscope sensors can also measure the motion
of the object. For more robust and accurate motion sensing, in consumer electronics
Gyroscope sensors are combined with Accelerometer sensors. Depending on the
direction there are three types of angular rate measurements.
Yaw- the horizontal rotation on a flat surface when seen the object from above
Pitch- Vertical rotation as seen the object from front
Roll- the horizontal rotation when seen the object from front.
The concept of Coriolis force is used in Gyroscope sensors. In this sensor to measure
the angular rate, the rotation rate of the sensor is converted into an electrical signal.
Working principle of Gyroscope sensor can be understood by observing the working
of Vibration Gyroscope sensor.

Page 1 of 5
This sensor consists of an internal vibrating element made up of crystal material in the
shape of a double – T- structure. This structure comprises a stationary part in the center
with ‘Sensing Arm’ attached to it and ‘Drive Arm’ on both sides.
This double-T-structure is symmetrical. When an alternating vibration electrical field
is applied to the drive arms, continuous lateral vibrations are produced. As Drive arms
are symmetrical, when one arm moves to left the other moves to the right, thus
canceling out the leaking vibrations. This keeps the stationary part at the center and
sensing arm remains static.
When the external rotational force is applied to the sensor vertical vibrations are caused
on Drive arms. This leads to the vibration of the Drive arms in the upward and
downward directions due to which a rotational force acts on the stationary part in the
center.
Rotation of the stationary part leads to the vertical vibrations in sensing arms. These
vibrations caused in the sensing arm are measured as a change in electrical charge. This
change is used to measure the external rotational force applied to the sensor as Angular
rotation.
Measuring Acceleration
The MPU6050 has an on-chip accelerometer that can measure acceleration.

Figure 01: Three axes of the sensor module

Page 2 of 5
Measuring Rotation
The MPU6050 has an on-chip gyroscope that can measure angular rotation.

Figure 02: Angular rotations of the sensor module


Measuring Temperature
The MPU6050 has an on-chip temperature sensor that can measure the temperature.
MPU6050 Breakout Board
The GY-521 module is a breakout board for the MPU-6050 MEMS that features a 3-
axis gyroscope, a 3-axis accelerometer, a digital motion processor (DMP), and a
temperature sensor. The digital motion processor can be used to process complex
algorithms directly on the board. Usually, the DMP processes algorithms that turn the
raw values from the sensors into stable position data. The sensor values are retrieved
by using the I2C serial data bus, which requires only two wires (SCL and SDA).
Wiring Scheme
The MPU6050 has eight pins:

• VCC (The breakout board has a voltage regulator. Therefore, you can connect
the board to 3.3V and 5V sources.)
• GND
• SCL (Serial Clock Line of the I2C protocol.)
• SDA (Serial Data Line of the I2C protocol.)
• XDA (Auxiliary data => I2C master serial data for connecting the module to
external sensors.)
• XCL (Auxiliary clock => I2C master serial clock for connecting the module to
external sensors.)
• AD0 (If this pin is LOW, the I2C address of the board will be 0x68. Otherwise,
if the pin is HIGH, the address will be 0x69.)
• INT (Interrupt digital output)

Page 3 of 5
Figure 03: Circuit diagram for MPU6050 interfacing with Arduino

Practical Instructions:
Session A
1. Connect the sensor module to the Arduino as shown in Figure 03.
2. Open Arduino IDE.
3. Go to Tools and click on Manage Libraries. (A new window will open which will have
a search bar, therein type MPU6050).
4. Install the library MPU6050 by Electronic Cats.
5. Once the libraries are installed, let’s utilize the IMU_Zero example sketch from the
MPU6050 library to calibrate the module with new offsets for the onboard
accelerometer and gyroscope data registers. This essentially “resets” the sensor
readings to the current orientation of the module. For that, open the Arduino IDE and
select File > Examples > MPU6050 > IMU_Zero from the main menu to open the
example sketch.
6. Start the calibration process by uploading the example sketch to the Arduino board.
Open the Serial Monitor window so that you can see the program’s output.
7. Follow the instructions within the comments section of the sketch to calibrate your
module. Once completed, you should see the word “-------done-------” in your serial
monitor.

Session B

8. Design and implement X, Y, Z angle measuring instrument using MPU6050 Sensor.

Page 4 of 5
Questions
Session A

1. Discuss the accuracy of the calibration process.


2. What is meant by Gyroscope sensor offset?

Session B
3. Describe the Procedure and design steps.
4. Discuss the issues of the practical.
5. Provide solutions to overcome the mentioned issues.

****

Page 5 of 5

You might also like