Its time for me to post about my work. So as I mentioned in my abstract, I will be working with low-cost IMUs. Last week, we procured Sparkfun’s MPU6050 IMU. It costs around $40 ( shipping not included). You can view the IMU here.
Hardware Connections: The connections are pretty simple as MPU6050 follows I2C. So I connected VDD and VIO of MPU6050 to 3.3V from the Arduino board. Note that do not connect VIO to 5v of Arduino without using a resistor, else you will fry your MPU6050 board. Next, connect SDA ( Serial Data ) pin from MPU6050 board to Analog pin 4 and the SCL ( Serial Clock ) to Analog pin 5. Lastly connect Ground to your Arduino ground and your hardware connections are good to go!😀
Code: Since I am pretty lazy to write my code, I forked Jeff Rowberg’s awesome library. Yeah it works with an MSP too! You can install the library easily on the Arduino board. If you find some difficulty, you can follow these steps:
- If you have freshly installed the Arduino IDE, I suggest you save a simple code. It can be any code.
- Once you have saved, press Ctrl+K in Arduino IDE. It will open up the sketch folder. Usually it’s located in Home directory or Documents.
- Go to the sketchbook folder -> libraries and copy the I2Cdev and MPU6050 folder from Jeff’s code.
- Close and restart Arduino IDE. You should be able to see your library in the Examples folder.
I will attach a small screenshot of the sample program – MPU6050 s raw data.
My next step will be to interface more than one MPU to the Arduino board and save their data. Once done with that, I can try to make some sense of the data which I will receive. Till then adios!