Skip to content

Latest commit

 

History

History
78 lines (53 loc) · 2.68 KB

File metadata and controls

78 lines (53 loc) · 2.68 KB

Inertial Measurement Unit (IMU)

  • The IMUs are navigational electronic devices comprising of accelerometers, gyroscopes, and sometimes magnetometers. wikipedia

Apollo_11_IMU

Applications

  • Spacecrafts
  • Airplanes
  • Submarines
  • Satellites
  • UAVs
  • Smartphones (e.g changing screen orientation by tilting the phone)

Working Mechanism - (https://www.arrow.com/)

IMUs can measure a variety of factors, including speed, direction, acceleration, specific force, angular rate, and (in the presence of a magnetometer), magnetic fields surrounding the device.

Each tool in an IMU is used to capture different data types:

  • Accelerometer:

    • measures velocity and acceleration
  • Gyroscope:

    • measures rotation and rotational rate
  • Magnetometer:

    • establishes cardinal direction (directional heading)

IMUs combine input from several different sensor types in order to accurately output movement.

Today's activity!

  • Experiment with IMU chips

    • GY-521 (ITG/MPU)

      GY-521
    • LSM303DLHC

      GY-521
    • MMA8451

      GY-521
  • Program the chips with Arduino

  • Generate csv data from the chips

  • Plot csv data in excel

Arduino libraries required

  • "Adafruit MPU6050" (with depedencies), for the GY-521 chip

  • "Adafruit LSM303DLHC", for the LSM303DLHC chip

  • "Adafruit MMA8451", for the MMA8451 chip

Wiring instructions

All chips are I2C. So, only 4 wires (+5V, GND, SDA, SCL) are used.

  • VCC/Vin --> Arduino +5V

  • GND --> Arduino GND

  • SDA --> Arduino SDA (pin A4 on UNO)

  • SCL --> Arduino SCL (pin A5 on UNO)

Generating csv data (accelerometer only for simplicity)

void setup() {

//put your CSV headers here, so they are written once.
// example: timestamp, x, y, z

}

void loop() {
// create a comma-separated string with x, y, and z acceleration values in m/s2 and use the built-in millis() function as a timestamp
}

Then copy the output of the serial monitor to a file and save the file with a .csv extension. Then load the csv file into excel and plot the data.