Accelerometer

CE351 2020 Fall
John Hitti

jdhitti@fortlewis.edu


Introduction

In this lab we were directed connect our Arduino with a MPU 6050 or "Accelerometer". This device is capable of measuring changes in acceleration. This is done through I2C serial communication.

TASK 1

In task one we connected the hardware of our MPU to the Arduino using the SCL and SDA pins which allow for the I2C communication.  Then, using code to tell the Arduino to communicate with the MPU we are able to measure the accelerations of the device in the X, Y, and Z axis. In the code we can specify specific settings of the MPU. This will allow us to measure a full +/- 4g of force on the accelerometer. Our output is then divided by our selected sensitivity value of 8192 to output an appropriate reading.

Figure 1. Shows the driver code for communicating with the MPU.

Video 1: Displays the measurement of the accelerations

TASK 2

The MPU also features a gyroscope sensor. By changing the reading settings in our code we can tell the MPU to send us gyroscopic data. We have also set our range and sensitivity accordingly.

Figure 2: Shows the driver code for communicating with the MPU.

Video 2: Displays the measurement of gyroscopic accelerations

Discussion

This lab provided an excellent look into how serial communication operates and can help connect microcontrollers with external module. This proved to be a very efficient way to connect these two devices with minimal hardware setup. It was also very helpful to be able to familiarize  ourselves with the MPU 6050 module. This device could have many uses in future projects.