IMU comm error (KOMPASS)

n3nxez

Member
Hallo, erst mal vielen dank an alle Entwickler von diesem Projekt. Wirklich tolle Arbeit. Ich bin jetzt auch Besitzer eines Ardumowers und nach ein paar Anpassungen lauft das teil schon super. Perimeter, Ladestation, Sonar, Bumper funktioniert alles super. Was mich allerdings schon einige Zeit die nerven raubt ist die IMU. Den GY-801 hab ich bei Marotronics mit dem Ardumower zusammen bestellt und habe schon von Herr Lübon ein 2tes Modul zu gesendet bekommen. Vielen Dank an der stelle dafür. Leider beide Module den gleichen Fehler. Also entweder beide Kaputt oder was anderes faul. Komisch ist das mein IMU Problem eigentlich identisch zu dem Thread "Motoren laufen kurz bis zum Fehler" ist.

Das findet der I2C Scanner:

Code:
Scanning for I2C devices...
I2C device found at address 0x50 (probably AT24C32)
I2C device found at address 0x53 (probably ADXL345B)
I2C device found at address 0x68 (probably DS1307)
I2C device found at address 0x69 (probably MPU6050/9150 or L3G4200D)
I2C device found at address 0x77 (probably BMP180)
done


Das sagt der rs232:

Code:
IMU comm error
IMU comm error
IMU comm error


Die Kalibrierung von dem Gyro funktioniert der liefert auch Daten. Die hole ich mir über den ESP alles super. Der Beschleunigungssensor geht auch. Was aber absolut nix ausspuckt ist der Kompass. Mit der 1.0a9-Azurit und der aktuellen DEV das gleiche. Bei der Kompass Kalibrierung ist der Buzzer auch stille wenn ich das richtig verstehe sollte der bei der Kalibrierung was von sich geben da kommt nix. Ich verstehe auch nicht warum der Kompass nicht im I2C Scanner auftaucht.

Über rs232 ist auch nen bug die Menü Einträge sind vertauscht (consoleui.h Zeile 108,109 und 289-295):

Code:
Console.println(F("5=calibrate IMU compass start/stop"));  
Console.println(F("6=calibrate IMU acceleration next side"));



Code:
case '5':
imu.calibAccNextAxis();
printMenu();
break;
case '6':
imu.calibComStartStop();          
break;


In der IMU.cpp steht auch was von GY-80 ist der von den I2C Adressen gleich mit dem GY-801?

Code:
// -------------I2C addresses ------------------------
#define ADXL345B (0x53)          // ADXL345B acceleration sensor (GY-80 PCB)
#define HMC5883L (0x1E)          // HMC5883L compass sensor (GY-80 PCB)
#define L3G4200D (0xD2 >> 1)     // L3G4200D gyro sensor (GY-80 PCB)


Sollte der HMC5883L nicht mit der Adresse 1E im I2C Scanner auftauchen? Ich hab hier was von Passthrough gelesen aber welcher der Steine auf dem GY-801 macht da ein Passthrough? Laut Datenblatt hängt doch der HMC5883L direkt an I2C.

Ein RIGOL DS1054 steht hier auch rum Spannung sind alle IO. Allerdings hab ich von I2C und Gyros kein plan. In der Testapp ist der Kompass auch auskommentiert.
imuahrs

Code:
/*Console.print(imu.com.x);        
Console.print(",");          
Console.print(imu.com.y);        
Console.print(",");          
Console.print(imu.com.z);*/


Da es sich Praktisch um den gleichen Code handelt wie in Azurit gleicher Fehler Gyro geht Kompass nix...
Evtl. hat ja einer noch ein paar Infos für mich.

VIELEN DANK

UND GANZ HERZLICHEN DANK AN DIE ENTWICKLER DEN AUCH OHNE IMU LÄUFT DER ARDUMOWER BESSER WIE INDEGO UND ALDI ZUSAMMEN
 
Kleines UPDATE

Ich hab die IMU mal an ein ESP32 gebaumelt mit dieser Libary:

Code:
 [URL]https://github.com/jongio/i2cdevlib[/URL]


und das kommt raus:

Code:
accel:	-260	17	-61
angular velocity:	-20	28	460
T/P/A	29.20	101364.00	-3.25
mag:	0	0	0	heading:	0.00
accel:	-260	18	-61
angular velocity:	-14	18	470
T/P/A	29.20	101369.00	-3.66
mag:	0	0	0	heading:	0.00
accel:	-259	18	-61
angular velocity:	-18	26	464
T/P/A	29.20	101369.00	-3.66
mag:	0	0	0	heading:	0.00
accel:	-260	18	-61
angular velocity:	-20	25	466
T/P/A	29.20	101367.00	-3.50
mag:	0	0	0	heading:	0.00


Ich hab fast die Vermutung das beide IMU defekt sind...
 
Hi.
You need to see the 0x1E adress on I2c scan (it's the compass)

Code:
GY801 + RTC on I2C 
I2C device found at address 0x1E
I2C device found at address 0x50
I2C device found at address 0x53
I2C device found at address 0x68
I2C device found at address 0x69
I2C device found at address 0x77


Or it can't work
 
Thank you. Okay everything is wrong with the module.

I check with i2c scanner on esp32 ONLY IMU connected to i2c:

Code:
// --------------------------------------
// i2c_scanner
//
// Version 1
//    This program (or code that looks like it)
//    can be found in many places.
//    For example on the Arduino.cc forum.
//    The original author is not know.
// Version 2, Juni 2012, Using Arduino 1.0.1
//     Adapted to be as simple as possible by Arduino.cc user Krodal
// Version 3, Feb 26  2013
//    V3 by louarnold
// Version 4, March 3, 2013, Using Arduino 1.0.3
//    by Arduino.cc user Krodal.
//    Changes by louarnold removed.
//    Scanning addresses changed from 0...127 to 1...119,
//    according to the i2c scanner by Nick Gammon
//    [URL]http://www.gammon.com.au/forum/?id=10896[/URL] // Version 5, March 28, 2013
//    As version 4, but address scans now to 127.
//    A sensor seems to use address 120.
//
//
// This sketch tests the standard 7-bit addresses
// Devices with higher bit address might not be seen properly.
//
bool blinkState = false;
#include <Wire.h>


void setup()
{
  Wire.begin();

  Serial.begin(115200);
  Serial.println("nI2C Scanner");
  pinMode(3, OUTPUT);
}


void loop()
{
  byte error, address;
  int nDevices;

  Serial.println("Scanning...");

  nDevices = 0;
  for(address = 1; address < 127; address++ )
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    error = Wire.endTransmission();

    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.print(address,HEX);
      Serial.println("  !");
        blinkState = !blinkState;
        digitalWrite(3, blinkState);
      nDevices++;
    }
    else if (error==4)
    {
      Serial.print("Unknow error at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.println(address,HEX);
    }   
  }
  if (nDevices == 0)
    Serial.println("No I2C devices foundn");
  else
    Serial.println("donen");

  delay(5000);           // wait 5 seconds for next scan
}


The result is:

Code:
Scanning...
I2C device found at address 0x30  !
I2C device found at address 0x53  !
I2C device found at address 0x69  !
I2C device found at address 0x77  !
done


Maybe the 0x30 is the compass module?
 
On PCB1.3 you have I2C1 (direct I2C due) connector and you can connect a 3.3V module to test it
I have used it in the past to connect a GY87 module to my code and the result show also the compass at 0x1E

Code:
Connect a GY87 on I2C1 native USB PCB1.3 

Scanning bus I2C1...
I2C1 device found at address 0x1E
I2C1 device found at address 0x68
I2C1 device found at address 0x77
4177


Here the link scanner for Wire1 Library: https://github.com/Boilevin/AzuritBer/blob/master/TEST FILE/I2C1_SCANNER/I2C1_SCANNER.ino
So maybe you can do a last chance check (Remember it's 3.3V)
 
THANK YOU

I test due next day but i thing wont work. I test with esp32 only connect gy-801 to i2c so cant conflict with rtc.

I test the wire1 libary (github.com/Boilevin/AzuritBer/blob/maste...NER/I2C1_SCANNER.ino) with esp32 but i change Wire1 to Wire. I think ESP32 hast only one i2c. The result is the same:

Code:
Native DUE I2C Scanner
Scanning bus I2C1...
I2C1 device found at address 0x30
I2C1 device found at address 0x53
I2C1 device found at address 0x69
I2C1 device found at address 0x77
55
Scanning bus I2C1...
I2C1 device found at address 0x30
I2C1 device found at address 0x53
I2C1 device found at address 0x69
I2C1 device found at address 0x77
574
Scanning bus I2C1...
I2C1 device found at address 0x30
I2C1 device found at address 0x53
I2C1 device found at address 0x69
I2C1 device found at address 0x77
1093


I add some pictures of wire esp and gy-801.

wireoverview.jpg

hmc5883.png

wire-gy801.jpg

wire-5v-gnd.jpg

gy801front.png

gy801back.png

wiresda-io21.jpg

wirescl-io22.jpg


I test tomorrow on due and add capacitor to gy801 and check with oscilloscope pins of hmc but i think address 0x30 is strange. HMC chip looks also strange.
THANK FOR YOUR HELP
Attachment: https://forum.ardumower.de/data/media/kunena/attachments/4926/wire-gy801.jpg/
 
Zuletzt bearbeitet von einem Moderator:
So kurzes Update:
Hab ein neues Modul bestellt und das leppt so wie es soll. Der Chip sieht auch anders aus vom Kompass wie die Bilder überall im Netz. Auch der C ist bestückt auf dem neuen Modul.
Der Kompass meldet sich jetzt nicht mit 0x30 sondern mit 0x1E wie es sein soll.
Beim verwenden der IMU wackelt der Mower hin und her wie angestochen aber da werd ich mit den PID evtl mal spielen und mal in Code schauen... Könnte auch an Kalibrierung Störungen emv irgendwas liegen aber das teste ich noch die tage...

VIELEN DANK hier erst mal für die Unterstützung.
 
Oben