I2C error

Post Reply
aman.iit
Posts: 2
Joined: Thu Mar 14, 2013 7:20 pm

I2C error

Post by aman.iit »

i am using Crius MultiWii SE V2.0 for making a QuadcopterX.
Initially, when i connected the board to my computer without the props, and opened the MultiWii config GUI , it was working fine and the GUI showed the sensor readings correctly as i moved and rotated the board.
Then i got this manual -
http://www.robson.fr/wp-content/uploads ... -22-12.pdf

I used the MultiWii 2.1 as well as MultiWii 2.2 source code and made the required changes in the config.h file

#define QUADX
&
#define CRIUS_SE // Crius MultiWii SE

But when i uploaded the code on the board and opened the GUI , it did not show the sensors readings and the I2C error was fluctuating between -32000 to +32000.
Also the blue LED is blinking rapidly.

here is a pic of the GUI after uploading the MultiWii 2.2 code -

when internal  I2C pull ups was commented.
when internal I2C pull ups was commented.


I also tried the same with this additional change in the config.h file

/*************************** Internal i2c Pullups ********************************/
/* enable internal I2C pull ups (in most cases it is better to use external pullups) */
#define INTERNAL_I2C_PULLUPS

/**************************************************************************************/

and with this code uploaded , then also the GUI did not show any significant sensor values and the I2C error was moving between -32000 and 32000
( the blue LED still blinking ).
here is the pic of the GUI with this setting

when internal I2C pull ups was uncommented.
when internal I2C pull ups was uncommented.


Please help me how with this problem.

Here is the description of the FC -CRIUS MultiWii SE v2.0

The Multiwii SE V2.0 is a gyro/accelerometer based flight controller that is loaded with features. With expandability options and full programmability, this device can control just about any type of aircraft. This is the ideal flight controller for your multi-rotor aircraft.

Features:

• FTDI/UART TTL socket for debug, upload firmware or LCD display
• I2C socket for extend sensor, I2C LCD/OLED display or CRIUS I2c-GPS NAV board
• Separate 3.3V and 5V LDO voltage regulator
• ATMega 328P Microcontroller
• MPU6050 6 axis gyro/accelerometer with Motion Processing Unit
• HMC5883L 3-axis digital magnetometer
• BMP085 digital pressure sensor
• On board logic level converter

Flight mode:
• One of the following basic mode
- Acro
- Level
- Alt Hold
- Head Lock
• Optional mode
- HeadFree (CareFree)
- GPS Hold (Need GPS receiver + I2C-GPS NAV Board)
- GPS Return to home position (Need GPS receiver + I2C-GPS NAV Board)



The receiver that i have used is FUTABA R149DP .


so please help me how can i reduce the I2C errors and get the correct sensors values.

thank you in advance.

Also it would be really helpful if anyone can provide the codes that were previously uploaded in the FC board (the one that was already present in the board before i uploaded the new ones .. .. remember it was working nicely in the starting. ).

thanks a lot in advance.

User avatar
Gartenflieger
Posts: 65
Joined: Sat Oct 01, 2011 10:07 pm
Location: Dortmund, Germany

Re: I2C error

Post by Gartenflieger »

Why don't you try to contact the CRIUS guys to get the original firmware setup so you can verify your board isn't damaged.
Nevertheless, of course the board should work with the current MWC software. Many people are running it successfully.
So either the board is damaged or you messed up the config.h.

Regards
Christoph

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

Re: I2C error

Post by tovrin »

I2C errors are generally wiring or hardware related. did you make any changes, add any wiring, or components? check all your solder points check for loose wires, broken connections, etc.

especially since it did work

aman.iit
Posts: 2
Joined: Thu Mar 14, 2013 7:20 pm

Re: I2C error

Post by aman.iit »

thanks for the replies.
i have tried to get the contacts of the crius people on the internet but couldnt get any info about them.
it would be really helpful if anyone can provide the contact details ( email id or phone no.) .
thanks in advance.

Andy7
Posts: 129
Joined: Fri Dec 28, 2012 5:09 pm
Location: Oxford, UK
Contact:

Re: I2C error

Post by Andy7 »

tovrin wrote:I2C errors are generally wiring or hardware related. did you make any changes, add any wiring, or components? check all your solder points check for loose wires, broken connections, etc.

especially since it did work

Yep,I found that wire length really affected i2c errors. I reduced the length from my nanowii from 7cm to about 3.5 and eliminated all errors. Maybe shielded wire might allow a longer cable run.

sixshooterstang
Posts: 41
Joined: Tue Apr 02, 2013 8:25 am

Re: I2C error

Post by sixshooterstang »

I am a=having this issue also. Gui gets zero sensor readings and I2c error is going nuts

Nicksdesign
Posts: 63
Joined: Sat Jan 26, 2013 6:49 am

Re: I2C error

Post by Nicksdesign »

When the FC quit working, had you added a NAV-GPS combo? If so, check the cable between the FC I2C header and the NAV board. On one of mine the data and clk lines were reversed. It drove the I2C bus nuts! It took me several days to figure it out.

Nick

sixshooterstang
Posts: 41
Joined: Tue Apr 02, 2013 8:25 am

Re: I2C error

Post by sixshooterstang »

nope I had no gps installed. I removed it cuz i gave up on that.

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: I2C error

Post by QuadBow »

Andy7 wrote:Yep,I found that wire length really affected i2c errors. I reduced the length from my nanowii from 7cm to about 3.5 and eliminated all errors. Maybe shielded wire might allow a longer cable run.


I2C cables of some feet shouldn't be a problem at 400kHz.
Have you mixed the internal pull-ups to 5V with the external ones to 3,3V of the sensor?

AlexTang
Posts: 1
Joined: Thu Dec 06, 2012 7:52 am

Re: I2C error

Post by AlexTang »

Hi:
Some suggestions for your reference since I am using the same board (Crius MultiWii SE V2.0) as QuadcopterX:
1.Does not use the definition for CRIUS_SE since it dedicates for the one with sensors(Gyro:ITG3200; ACC:BMA018/BMA020) model.
2.You should manually uncommand (remove '//') following lines in the Section 1:
2-1.#define MPU6050
2-2.#define BMP085
2-3.#define HMC5883
3.Modify the order and +/- in the following lines according to the sensors' orientation on MWC:
3-1.#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = -X; accADC[PITCH] = -Y; accADC[YAW] = Z;}
3-2.#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = Y; gyroADC[PITCH] = -X; gyroADC[YAW] = -Z;}
3-3.#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = X; magADC[PITCH] = Y; magADC[YAW] = Z;}

Without these steps might be frustrated since SE v2.0 replaces some sensors on it.

Then, you can verify the result with "MultiWiiConf" for correction.

Best regards,
Alex [\]

ahwong
Posts: 1
Joined: Sat Sep 14, 2013 11:10 am

Re: I2C error

Post by ahwong »

Today I have getting this problem also..My gyro and acc no longer working and I have a lot of i2c errors

My quad was flying well all along until I installed the I2C OLED this morning...

Now I removed the OLED and reversed the config.h but I couldn't get the gyro and acc back to work...

Any idea?

philipp280
Posts: 2
Joined: Thu Jul 17, 2014 11:29 am

Re: I2C error

Post by philipp280 »

I have a big problem. Ich have a very big board arduino mega i think 2560.
The GPS doesn't work and on my smartphone (over bluetooth) is scripted I2C error.
5 min. Before the board was very hot on the "AMS1117
5.0" (by the GPS Plug in).

Are you think that's the problem or why does GPS not work???

Arakon
Posts: 196
Joined: Thu Jul 17, 2014 2:22 pm

Re: I2C error

Post by Arakon »

That's a voltage regulator. If that overheats, you either mixed up the + and - lines or the GPS is drawing too much power.
If you still get errors now, with the GPS removed, chances are that you fried something on your flight controller.

philipp280
Posts: 2
Joined: Thu Jul 17, 2014 11:29 am

Re: I2C error

Post by philipp280 »

The GPS work perfekt :)

I have allowed too much (//) in the multiwii software

Now the problem is gone

Post Reply