Virus scan in progress. Please wait to download attachments.
I bought an MPU 6050 6DOF (Degrees of Freedom) it has 3 accelerometers and 3 gyro sensors. I had an Arduino Uno and set about programming the Arduino to read the sensor values, once I had the raw values I wanted to pass them through a complentry filter and a Kalman filter. I wrote some additional code on the Arduino to implement the two filters. I was able to see the values for pitch,roll and yaw in my terminal Software putty, but this was not very meaningful seeing just numbers. I wanted to have a graphical representaion of what was happening. So I used a 3D picture control in LabVIEW and was able to stream the values from the MPU into LabVIEW via serial. I also wanted to be able to see the different data components, Raw Data, Complimentry Filter data and Kalman Filter data.
The MPU 6050 communicates with the Arduino over I2C. The .ino included with this commnity example sets up the I2C communication with the Arduino.
Wire Connection diagram
AI 4 SDA
AI 5 SCL
SDA (Pin 20) SDA
SCL (Pin 21) SCL
What the VI does is gives a 3D picture control that models the moevment of the MPU. There are subVI's in the project that can pull out the Raw gyro data, complementry filter data and the kalman filter data.
Steps to Implement or Execute code
1. Install Arduino programming Enviroment (1.0.5 or later)