MPU 6050 Quadcopter IMU has arrived

The  3 x MPU 6050 breakout boards (GY521) I ordered on Alibaba arrived from China yesterday. I’m looking at using a device which has both an accelerometer & gyroscope in one package rather than an IMU assembled from several discrete devices to make the software simpler (only one I2C bus address).

To make the Microsoft I2C implementation work with multiple discrete devices usually requires a layer of abstraction like commonly used AbstractI2CDevice class which I was wanting to avoid in this project.

The test rig for my light weight high performance driver, a netduino 2 plus & breakout board.

Image

If I need a compass to make the Quadcopter controller work I’ll upgrade to an MPU 9150.

I2C read rates on Netduino Plus vs Netduino plus 2

As part of my quadcopter project I purchased a Netduino Plus 2 for the flight controller. The increased performance 48MHz vs. 168MHz CPU and other improvements looked like it could make it possible to implement most or all of the control algorithms in C#.

So I could compare the performance of the I2C interfaces I setup two test rigs which polled an ADXL345 Accelerometer (using the Love Electronics sample code) 10,000 times for X,Y & Z acceleration values.

NetduinoPlusAccelerometer

The different I2C pins on the Netduino plus 2 required some jumper cables

Netduino2PlusAccelerometer

Both devices were running NetMF 4.2 and I monitored the output of the test harness using MF Deploy.

Netduino Plus

22.2797,22.3126,22.3313,22.3129,22.3590,22.3689,22.3497,22.3049,22.3649,22.3836

Average 22.3 seconds roughly 450/sec

Netduino Plus 2

6.8312,6.8059,6.8003,6.8051,6.8319,6.7999,6.8104,6.8194,6.8233,6.8096

Average 6.8 seconds roughly 1470/sec

NetMF Quadcopter Proof of Concept

A few weeks ago I read a number of conversation on the Netduino and TinyCLR Forums about building a quadcopter. Often there was discussion about how .NetMF wasn’t a viable platform and this got me thinking…

Today, I purchased a Crazyflie Nano Quadcopter Kit 10-DOF as a research platform. I also purchased a Netduino Plus 2 (faster processor than my current Netduino Plus and Fez Panda II boards) and an MPU 6050 breakout board as the start of my control system.

First thing to confirm is that I can read the gyro and accelerometer data from the MPU 6050 at a high enough rate to enable controlled flight. The next step will be to confirm that the processor can process the gyro & accelerometer data at a high enough rate to enable controlled flight.

If these initial investigations are successful start to purchase the parts for a development system based on this Beginners Quadcopter Kit buying guide. I won’t need the remote control hardware (I will use Zigbee or similar) or the controller board.

Using a proven should reduce the risk, plus if I can’t get it to work I can purchase the necessary Openpilot or similar kit and have a working quadcopter.