CE 351, Fall 2020
Project 5
Name: Cesar Molina
Email: camolina@fortlewis.com
1. Title: Accelerometer - MPU 6050 and the I2C communication protocol
2. Introduction
The purpose of this project was to introduce
students to the I2C serial communication protocol by performing different tasks
using Arduino IDE and an accelerometer. The tasks included generating figures
of accelerations and angles on the x, y and z directions by moving or rotating
the sensor. By the end of this project, students gained an ability to use I2C
serial communication to transfer data from the MPU6050 accelerometer to the
Arduino.
3. Materials and Methods
|
Materials |
|
Computer |
|
Arduino
IDE |
|
Arduino
UNO R3 |
|
MPU6050 |
|
Breadboard |
The
Arduino code for I2C serial communication and circuit schematic was provided by
Dr. Li on his webpage and can be found here.
Project 6 consisted of the following tasks:
1. Generate figures that show accelerations on the
X, Y, and Z axis separately.
2. Generate figures that show angles on the X, Y,
and Z axis separately.
4. Results
Figure 1: Task 1 - Circuit Schematic
Figure 2: Task 1 - Arduino Code
Movie 1: Task 1 - Real time acceleration readings

Figure 3: Task 1 - Acceleration in the X-axis


Figure 5: Task 1 - Acceleration in the Z-axis

Figure 6: Task 1 - Acceleration in the X, Y and Z axis
Figure 7: Task 2 - Arduino Code

Figure 8: Task 2 - Rotation in the X-axis


Figure 10: Task 2 - Rotation in the Z-axis

Figure 11: Task 2 - Rotation in the X, Y and Z axis
5. Discussion
All
tasks were performed and executed successfully. The excel "data streamer" function was used to stream data to excel and then
import it to MATLAB. The ability to use PID I2C
communication protocol will be very useful for students throughout their
engineering careers.