DIY Flight Controller

Post Reply
copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

DIY Flight Controller

Post by copterrichie »

I hope someone can help me out here please, I have this breadboard Flight Controller I am building with a MPU6050 that I would like to add Mag HMC5883L to. I have read somewhere that the MPU650 has a secondary I2C port or something to that effect. On the MPU6050, there is a ASCL and a ASDA, would I connect the HMC5883L to these lines or would I connect the HMC5883L to Arduino's I2C bus?

Thank you.

Image

I know, I know, I just enjoy breadboard projects. :)

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: DIY Flight Controller

Post by copterrichie »

Never mind, I figured it out. The MWC supports Pass-thru so all I have to do is follow the example (MPU6050_I2C_AUX_MASTER). :)

Code: Select all

#if defined(FREEIMUv043)
  #define MPU6050
  #define HMC5883
  #define MS561101BA
  #define ACC_ORIENTATION(X, Y, Z)  {accADC[ROLL]  = -X; accADC[PITCH]  = -Y; accADC[YAW]  =  Z;}
  #define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] =  Y; gyroADC[PITCH] = -X; gyroADC[YAW] = -Z;}
  #define MAG_ORIENTATION(X, Y, Z)  {magADC[ROLL]  =  X; magADC[PITCH]  =  Y; magADC[YAW]  = -Z;}
  #define MPU6050_I2C_AUX_MASTER // MAG connected to the AUX I2C bus of MPU6050
  #undef INTERNAL_I2C_PULLUPS
#endif

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: DIY Flight Controller

Post by copterrichie »

She is ALIVE. :D
Attachments
VTOLwithMag.jpg

User avatar
NikTheGreek
Posts: 348
Joined: Thu Dec 08, 2011 4:17 pm
Location: Greece
Contact:

Re: DIY Flight Controller

Post by NikTheGreek »

:lol: :lol:

tovrin
Posts: 705
Joined: Tue Sep 20, 2011 4:08 pm

Re: DIY Flight Controller

Post by tovrin »

+1

chenkingwen
Posts: 7
Joined: Tue Mar 12, 2013 6:09 am

Re: DIY Flight Controller

Post by chenkingwen »

may it connect the HMC5883L to XCL and XDA of Mpu 6050

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: DIY Flight Controller

Post by copterrichie »

chenkingwen wrote:may it connect the HMC5883L to XCL and XDA of Mpu 6050


I think that is the another name for the Auxiliary port.

chenkingwen
Posts: 7
Joined: Tue Mar 12, 2013 6:09 am

Re: DIY Flight Controller

Post by chenkingwen »

I used mpu6050 module and arduino promini.But when I rotate horizontally 6050 the model does not respond. can you tell me what the problem is?Thank you very much.
Attachments
1.jpg

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: DIY Flight Controller

Post by copterrichie »

We need a little more information then what is given, How do you have the 6050 wired and settings in the config.h file.

Post Reply