bjohnsonfl / Inertial_Measurment_Unit

MPU-9250 IMU sampled from an Xmega and displayed on an UART device

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IMU

You can read about this project on my website here.

About

An embedded program to read raw sensor data, process them via sensor fusion, and return the orientation of the device.

An Atmel Xmega 128a1u MCU communicates with a MPU 9250 inertial measturement unit over SPI. The IMU has 9 degrees of freedom from its 3 axis Accelerometer, Gyroscope, and Magnetometer, and while it does have its own sensor fusion module, I will bypass it due to wanting to implement my own. While ideally the output of the AHRS could be inputs to a PID control system, I am displaying them on my computer via UART.

The displayment of data will be done with a Node.js Express app that uses SerialPort.io to communicate with the MCU and socket.io to send data to the client. With this model, I am free to create as many different real time graphics of the data as I want to. A MATLAB or Python solution are always available as well.

Things to do

  • SPI interface
  • USART interface
  • MPU_9250 Configuration
  • MPU_9250 Read raw Accelerometer and Gyroscope data
  • Create a Node.js server with Express.js and use socket.io to send data to the GUI
  • Create GUI to display Data from serialPort.io source
  • MPU_9250 Configure internal I2C Master
  • MPU_9250 Read raw Magnetometer data from AK8963c via I2C Master
  • MPU_9250 Interrupt based data collection
  • Accelerometer and Gyroscope calibration
  • Magnetometer hard iron calibration
  • Magnetometer soft iron calibration

The next three overlap but follow the general progression

  • Accelerometer + Gyroscope Sensor Fusion
  • Accelerometer + Gyroscope + Magnetometer Sensor fusion
  • Madgwick Filter (Quaternion based)

About

MPU-9250 IMU sampled from an Xmega and displayed on an UART device


Languages

Language:C 62.1%Language:JavaScript 18.4%Language:HTML 12.9%Language:CSS 6.6%