Gyros & Accelerometers

From ProjectPages
Jump to: navigation, search

The aim of this project is to do some experiments around solid state Gyros and Accelerometers with a view to building an AVR-based Quadcopter.

I have decided that this breakout board is the way to go. Everything in one place and all accessible via I2C.

MPU 6050 3-axis Accelerometer and 3-Axis Gyro from Invensense

I got the board from an eBay seller 'bionicbot'. This is a UK seller, so the board came really quickly.

I decided to test the board using my Arduino.

I used the code from Krodal on the Arduino Playground. It worked a treat.

Serial Monitor Output


In order to make progress towards a Quadcopter, I have downloaded the MultiWii software. I built a prototype board running Arduino Uno firmware and connected the MPU-6050 Accelerometer / Gyroscope. The MultiWii already supports this device, so just a few changes to the config.h file were needed.

I picked the 'X' configuration for my Quadcopter. So just un-comment that line.

  /**************************    The type of multicopter    ****************************/
    //#define GIMBAL
    //#define BI
    //#define TRI
    //#define QUADP
    #define QUADX
    //#define Y4
    //#define Y6
    //#define HEX6

I then had to tell MultiWii that I was using the MPU6050. So, again in config.h

    /***************************    independent sensors    ********************************/
      /* leave it commented if you already checked a specific board above */
      /* I2C gyroscope */
      //#define WMP
      //#define ITG3200
      //#define L3G4200D
      #define MPU6050       //combo + ACC

The video shows the MultiWii Configurator displaying the changes in pitch and roll as I moved the board around.

Homebrew Arduino board with MPU-6050 Gyro/Accelerometer and NRF24L01 wireless transceiver

Found that you can't use the NRF24L01 as it uses up the PWM pins for the motors. I have successfully breadboarded an Arduino serial PPM receiver and built my own NRF24L01 transmitter with two joystick controllers. More details later.

Just taken delivery of this little board. So cheap on Ebay. You just have to be prepared to wait about 4 weeks for it to come from China! This should work with my MultiWii. I have connected it to the slave I2C port of the MPU6050. Uncomment the appropriate line in config.h and off it goes!

      /* I2C magnetometer */
      //#define HMC5843
      #define HMC5883
      //#define AK8975
      //#define MAG3110

HMC5883L Triple Axis Compass Magnetometer Sensor Module
HMC5883L Triple Axis Compass Magnetometer Sensor Module


Gyroscope Measurements for a Balancing Platform]