Inertial Measurement Unit MPU-6050

 

Download Project 

 

This example project demonstrates how to measure accelerometer and gyroscope values from Invensense MPU-6050 IMU using CASP. MPU-9250 (additionally with magnetometer) can also be used in similar way.

 

Target

Arduino Uno is used in this project. However, any supported micro-controller board can be used.

 

Description

IMU MPU-6050 is connected to the target board as shown in the circuit diagram. A model is developed to communicate with the IMU and read the accelerometer and gyroscope values along x, y, z axes. The measured values are then send to the serial port for remote access from the host PC. A logic is also developed such that if the IMU is kept vertical (i.e. Z value of the accelerometer is less than 100) the on-board LED is ON.

User can see the measured data (6 integer values) from the ‘Configure Simulation Hardware’ interface window by clicking on Simulation->Configure Simulation IO menu item from the CASP main tool bar. Please go through the individual block parameters used in the model along with respective documentation for better understanding.

 

Circuit Diagram

 

Model

Screen shot of the Configure Simulation Hardware window

 

References

Please go through our video tutorials, tutorial projects and CASP main documentation for getting started with CASP.