I²C Errors after flashing 2.0

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
ApoC
Posts: 31
Joined: Fri Feb 10, 2012 2:16 pm

I²C Errors after flashing 2.0

Post by ApoC »

Hey

i had 1.8p2 on my Quad and it flies very well. today i flashed the 2.0 release. after that, i had I²C debug full of errors and no sensor data.

i have:

- pro mini 5v
- bma020
- wmp (original)
- paris board v4.r3 (with hardware enabled pullups and software disabled pullups)

ok, i thought, ive a problem with 2.0 and reflashed the 1.8p2. but ive still these errors. but i only connected the ftdi. no hardware change and no cable was touched.
so i disconnectet all sensors from the I²C bus, but...ive I²C errors....

i cant see the pid values in 2.0, but in 1.8p2. i can see this after clicking "read". but no sensor data and massive I²C errors...

what the....

can u explain this?

User avatar
UndCon
Posts: 293
Joined: Mon Feb 21, 2011 2:10 pm

Re: I²C Errors after flashing 2.0

Post by UndCon »

later versions of Multiwii is more sensitive to i2c errors. usually this means you have to verify all sensors and or replace the faulty one.
On 1 of my boards(a Flyduino MWC) I have a faulty WM+ sensor that I'm going to replace, and when I verified the board working I will add an ADXL345 (connecting with LLC)

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: I²C Errors after flashing 2.0

Post by Kayle »

Hi ApoC,

try to clear EEPROM before you flash a new Version. I got the same problems. Now i clear eeprom every time i flash a new version, and everything is fine.

Kayle
(FPV Community)

ApoC
Posts: 31
Joined: Fri Feb 10, 2012 2:16 pm

Re: I²C Errors after flashing 2.0

Post by ApoC »

My MWii is flown very good before.

And if i have NO senors connected, its the same. So this is not the problem.

clearing EEPROM? how?
This?

Code: Select all

#include <EEPROM.h>

void setup()
{
  // write a 0 to all 512 bytes of the EEPROM
  for (int i = 0; i < 512; i++)
    EEPROM.write(i, 0);
   
  // turn the LED on when we're done
  digitalWrite(13, HIGH);
}

void loop()
{
}


???

capt
Posts: 54
Joined: Wed Jan 19, 2011 10:54 pm

Re: I²C Errors after flashing 2.0

Post by capt »

Try powering the board with bec then connecting the FTDI.

User avatar
UndCon
Posts: 293
Joined: Mon Feb 21, 2011 2:10 pm

Re: I²C Errors after flashing 2.0

Post by UndCon »

I've had 2 strange problems where clearing EEPROM was the solution.

Depending on your board you might need power from separate BEC - I always use them and when I do I know servos work as well
(Arduino/USB alone is not powerful enough for servos)

//UndCon

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: I²C Errors after flashing 2.0

Post by Kayle »

Hey Apoc,

Ja dje Routine zum löschen ist korrekt.

Kayle

ApoC
Posts: 31
Joined: Fri Feb 10, 2012 2:16 pm

Re: I²C Errors after flashing 2.0

Post by ApoC »

Hey PPL

Plz read. Before flashing 2.0 my Arduino was fine. And all my Arduinos were fine. But after flashing 2.0, all my Arduinios are bad now.

I changed NOTHING, but the FW to 2.0.

So what is wrong with it?

Hint: If i had 2.0 ONCE flashed, i have I²C Errors all the time. With all older Versions like 1.8, 1.7 ...too....

So all my Ardus are bad now.

EEPROM Clear dont help. Tested it many times.

User avatar
fr3d
Posts: 97
Joined: Sun Feb 06, 2011 11:21 am
Location: Cappelle la grande near the ch'ti village
Contact:

fr3d outdated old board ic2

Post by fr3d »

on old board you can do this : (see picture.)

The idea is to make working external pullup (2k2 @ 5v) remmember
*to enable external pullup in multiwii "config.h" files or disable internal. It's the same can't remember. ic2 @ 100 khz rather than 400khz

*Unsolder any resistor with old pullups ( if pullups are connected to 3.3v or pullups connected to 5v with other values than 2.2k.)

now i2c error must disappear..

*Even better connect any i2c 3.3v device(s) like wmp+ into bma020 to prevent extra high voltage :mrgreen:
but now in paris r3 it sould works without any hardware modifications check your manual
Attachments
fr3d_using_bma_llc.jpg

tru168
Posts: 3
Joined: Fri Apr 13, 2012 5:00 pm

Re: I²C Errors after flashing 2.0

Post by tru168 »

I have the same problem!

I'm using BMA020 and WMP, works all version but when loaded with version 2.0 , I got I2C error. unselect the BMP020 in sketch and WMP works perfectly.

One weird thing happen if i use v2.0, when I check on my GUI, the I2C error keep counting fast , but when I turn my copter upside down, the I2C error stop counting and everything works again, turn my copter slowly, when it pass 90 degree and it start counting I2C error again.

IT IS A BUG for sure , I have 6 boards fitted with WMP and BMA020, some are homebrew, and some are PARIS board. All of them behave the same as mentioned above.

Now I can't fly all my copters , unless I downgrade to lower version.

I'm not a coder, I can't fix this bug. please help!

regards,
tru168

User avatar
fr3d
Posts: 97
Joined: Sun Feb 06, 2011 11:21 am
Location: Cappelle la grande near the ch'ti village
Contact:

Re: I²C Errors after flashing 2.0

Post by fr3d »

strange do you fly in acro or stab mode ?
when you see i2c error is your board powered by battery ?
For me I must plug battery and after plug usb In this way no i2c error (rememeber to remove props)
have you changed bma address ?
did you clean eeprom ?
can post your config.h def.h and any modified mw2.0 files ?

waxe
Posts: 1
Joined: Thu May 17, 2012 9:21 pm

Re: I²C Errors after flashing 2.0

Post by waxe »

One weird thing happen if i use v2.0, when I check on my GUI, the I2C error keep counting fast , but when I turn my copter upside down, the I2C error stop counting and everything works again, turn my copter slowly, when it pass 90 degree and it start counting I2C error again.


I had the same problem. If I turned the copter upside down the I2C error stop counting.

Two 2,2k resistors as pullup on the SDA and SCL works for me.

After installing the pullup resistors the I2C Error Count stops and everything works fine.

regards

waxe

tperraut
Posts: 3
Joined: Mon Apr 02, 2012 5:38 am

Re: I²C Errors after flashing 2.0

Post by tperraut »

would you have more info on how to do that? (add 2 2.2k resistors, but between what and what?)
thanks!
:-)

Federico
Posts: 64
Joined: Thu Apr 05, 2012 12:32 am
Location: Italy
Contact:

Re: I²C Errors after flashing 2.0

Post by Federico »

I do have this problem while testing the gps-tiny. Latest multiwii development. My copter fly wth the stable 2.0 but my tests on the desk with the last 2.0 multiwii gives just i2c errors. I'll try to clear the whole IC and see if it gets better.
Fede

robjames
Posts: 9
Joined: Thu Dec 22, 2011 8:28 pm

Re: I²C Errors after flashing 2.0

Post by robjames »

tperraut wrote:would you have more info on how to do that? (add 2 2.2k resistors, but between what and what?)
thanks!
:-)


Probably too late to answer you , but connect one resistor between SCL and the wire you're using to power the sensor and
connect another resistor between SDA and the power wire.
Have a look at this - http://www.microcopters.de/photos/95/bma020-pullups.gif

tperraut
Posts: 3
Joined: Mon Apr 02, 2012 5:38 am

Re: I²C Errors after flashing 2.0

Post by tperraut »

Thanks, that's helpful.
Of course I got a Quadrino Zoom (rev 1E) board with USB built-in, so that end up not being something I can do easily. But at least I understand what you are talking about :-)

Doron
Posts: 21
Joined: Mon Feb 14, 2011 3:01 pm

Re: I²C Errors after flashing 2.0

Post by Doron »

I also have a Promini-328p-5v with MPW and BMA020.


It is sitting on top of Multiwii shield v1.11 (it has i2c pull ups)

here is the schematics of the shield
http://www.rcgroups.com/forums/showthread.php?t=1347925

it claims to have 4,7k pull ups.

I have had this board sitting for a long time and now decided to fly it.

With version 2,3 running , the Configurator reports MANY i2c errors but when I flip it upside down, all errors are gone.

Any way to solve this ?

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: I²C Errors after flashing 2.0

Post by Hamburger »

Doron wrote:With version 2,3 running , the Configurator reports MANY i2c errors but when I flip it upside down, all errors are gone.

check soldering. What you describe should not be related to code but your hardware setup.

Doron
Posts: 21
Joined: Mon Feb 14, 2011 3:01 pm

Re: I²C Errors after flashing 2.0

Post by Doron »

the i2c Errors go away exactly as the board is tilted beyond 90 degrees.
Beyond that point till 270 degrees ->> no errors
When it is brought back beyond that same exact spot... Errors come at a very fast rate even thought the ACC numbers look good.

How can a 'soldering issue' create such a specific transition point ?

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: I²C Errors after flashing 2.0

Post by Hamburger »

Your hardware sensor is foobar

Doron
Posts: 21
Joined: Mon Feb 14, 2011 3:01 pm

Re: I²C Errors after flashing 2.0

Post by Doron »

I happened to have a spare BMA020 and I just finished soldering all the connection back to the board...
I removed the 4.7k pullup resistors to 3.3 on the Jussi shield and enable internal pull ups.

SAME RESULT.

I2c errors but when I flip it upside down all errors go away...

I also tried removing the 4.7k pull-up resistors to the 3.3 on the Jussi v1.1 shield and enable internal pull ups.
same error state

Its must be a software bug or config error.

Now how do I sort it out ?

Doron
Posts: 21
Joined: Mon Feb 14, 2011 3:01 pm

Re: I²C Errors after flashing 2.0

Post by Doron »

I happen to have a brand new spare BMA020.
I just finished soldering and am now getting the exact same I2C errors
... until I flip it upside down and then all the errors go away...

I also tried removing the 4k7 pull-ups to 3.3 on the jussi v1.11 board and enable the internal pull ups... :( exact same errors.

Something is wrong with config or software....

What do I do next ?

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: I²C Errors after flashing 2.0

Post by howardhb »

Have you calibrated the accelerometer at least once, using the button "CALIB_ACC" in the GUI ?

Doron
Posts: 21
Joined: Mon Feb 14, 2011 3:01 pm

Re: I²C Errors after flashing 2.0

Post by Doron »

i have done it many many times.
Also tried to erase eeprom ......
it shows level and responds to movements correctly but gets MANY ic2 errors.

When I flip it upside down all the errors stop.

Doron
Posts: 21
Joined: Mon Feb 14, 2011 3:01 pm

Re: I²C Errors after flashing 2.0

Post by Doron »

Tried soldering the 2.2k pull-ups on SCL and SDA.

---> NO MORE I2C Errors------ :)

Post Reply