Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

10 DOF IMU not functioning
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

10 DOF IMU not functioning

by chunkit on Wed Nov 25, 2015 3:59 am

Hi, my 10 DOF adafuit IMU sensor is not working well, there is no output data from the IMU. The data will hang in the middle while displaying through Arduino serial monitor. Sometime, the data will not even displayed in the serial monitor. Please refer to the print screen results showing that the data was stopped in the halfway and data failed to display in serial monitor. Is this caused by IMU itself?

Capture.JPG
Capture.JPG (69.12 KiB) Viewed 680 times


Code: Select all | TOGGLE FULL SIZE
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_LSM303_U.h>
#include <Adafruit_BMP085_U.h>
#include <Adafruit_L3GD20_U.h>
#include <Adafruit_10DOF.h>

/* Assign a unique ID to the sensors */
Adafruit_LSM303_Accel_Unified accel = Adafruit_LSM303_Accel_Unified(30301);
Adafruit_LSM303_Mag_Unified   mag   = Adafruit_LSM303_Mag_Unified(30302);
Adafruit_BMP085_Unified       bmp   = Adafruit_BMP085_Unified(18001);
Adafruit_L3GD20_Unified       gyro  = Adafruit_L3GD20_Unified(20);

void displaySensorDetails(void)
{
  sensor_t sensor;
 
  accel.getSensor(&sensor);
  Serial.println(F("----------- ACCELEROMETER ----------"));
  Serial.print  (F("Sensor:       ")); Serial.println(sensor.name);
  Serial.print  (F("Driver Ver:   ")); Serial.println(sensor.version);
  Serial.print  (F("Unique ID:    ")); Serial.println(sensor.sensor_id);
  Serial.print  (F("Max Value:    ")); Serial.print(sensor.max_value); Serial.println(F(" m/s^2"));
  Serial.print  (F("Min Value:    ")); Serial.print(sensor.min_value); Serial.println(F(" m/s^2"));
  Serial.print  (F("Resolution:   ")); Serial.print(sensor.resolution); Serial.println(F(" m/s^2"));
  Serial.println(F("------------------------------------"));
  Serial.println(F(""));

  gyro.getSensor(&sensor);
  Serial.println(F("------------- GYROSCOPE -----------"));
  Serial.print  (F("Sensor:       ")); Serial.println(sensor.name);
  Serial.print  (F("Driver Ver:   ")); Serial.println(sensor.version);
  Serial.print  (F("Unique ID:    ")); Serial.println(sensor.sensor_id);
  Serial.print  (F("Max Value:    ")); Serial.print(sensor.max_value); Serial.println(F(" rad/s"));
  Serial.print  (F("Min Value:    ")); Serial.print(sensor.min_value); Serial.println(F(" rad/s"));
  Serial.print  (F("Resolution:   ")); Serial.print(sensor.resolution); Serial.println(F(" rad/s"));
  Serial.println(F("------------------------------------"));
  Serial.println(F(""));
 
  mag.getSensor(&sensor);
  Serial.println(F("----------- MAGNETOMETER -----------"));
  Serial.print  (F("Sensor:       ")); Serial.println(sensor.name);
  Serial.print  (F("Driver Ver:   ")); Serial.println(sensor.version);
  Serial.print  (F("Unique ID:    ")); Serial.println(sensor.sensor_id);
  Serial.print  (F("Max Value:    ")); Serial.print(sensor.max_value); Serial.println(F(" uT"));
  Serial.print  (F("Min Value:    ")); Serial.print(sensor.min_value); Serial.println(F(" uT"));
  Serial.print  (F("Resolution:   ")); Serial.print(sensor.resolution); Serial.println(F(" uT")); 
  Serial.println(F("------------------------------------"));
  Serial.println(F(""));

  bmp.getSensor(&sensor);
  Serial.println(F("-------- PRESSURE/ALTITUDE ---------"));
  Serial.print  (F("Sensor:       ")); Serial.println(sensor.name);
  Serial.print  (F("Driver Ver:   ")); Serial.println(sensor.version);
  Serial.print  (F("Unique ID:    ")); Serial.println(sensor.sensor_id);
  Serial.print  (F("Max Value:    ")); Serial.print(sensor.max_value); Serial.println(F(" hPa"));
  Serial.print  (F("Min Value:    ")); Serial.print(sensor.min_value); Serial.println(F(" hPa"));
  Serial.print  (F("Resolution:   ")); Serial.print(sensor.resolution); Serial.println(F(" hPa")); 
  Serial.println(F("------------------------------------"));
  Serial.println(F(""));
 
  delay(500);
}

void setup(void)
{
  Serial.begin(115200);
  Serial.println(F("Adafruit 10DOF Tester")); Serial.println("");
 
  /* Initialise the sensors */
  if(!accel.begin())
  {
    /* There was a problem detecting the ADXL345 ... check your connections */
    Serial.println(F("Ooops, no LSM303 detected ... Check your wiring!"));
    while(1);
  }
  if(!mag.begin())
  {
    /* There was a problem detecting the LSM303 ... check your connections */
    Serial.println("Ooops, no LSM303 detected ... Check your wiring!");
    while(1);
  }
  if(!bmp.begin())
  {
    /* There was a problem detecting the BMP085 ... check your connections */
    Serial.print("Ooops, no BMP085 detected ... Check your wiring or I2C ADDR!");
    while(1);
  }
  if(!gyro.begin())
  {
    /* There was a problem detecting the L3GD20 ... check your connections */
    Serial.print("Ooops, no L3GD20 detected ... Check your wiring or I2C ADDR!");
    while(1);
  }
 
  /* Display some basic information on this sensor */
  displaySensorDetails();
}

void loop(void)
{
  /* Get a new sensor event */
  sensors_event_t event;
   
  /* Display the results (acceleration is measured in m/s^2) */
  accel.getEvent(&event);
  Serial.print(F("ACCEL "));
  Serial.print("X: "); Serial.print(event.acceleration.x); Serial.print("  ");
  Serial.print("Y: "); Serial.print(event.acceleration.y); Serial.print("  ");
  Serial.print("Z: "); Serial.print(event.acceleration.z); Serial.print("  ");Serial.println("m/s^2 ");

  /* Display the results (magnetic vector values are in micro-Tesla (uT)) */
  mag.getEvent(&event);
  Serial.print(F("MAG   "));
  Serial.print("X: "); Serial.print(event.magnetic.x); Serial.print("  ");
  Serial.print("Y: "); Serial.print(event.magnetic.y); Serial.print("  ");
  Serial.print("Z: "); Serial.print(event.magnetic.z); Serial.print("  ");Serial.println("uT");

  /* Display the results (gyrocope values in rad/s) */
  gyro.getEvent(&event);
  Serial.print(F("GYRO  "));
  Serial.print("X: "); Serial.print(event.gyro.x); Serial.print("  ");
  Serial.print("Y: "); Serial.print(event.gyro.y); Serial.print("  ");
  Serial.print("Z: "); Serial.print(event.gyro.z); Serial.print("  ");Serial.println("rad/s "); 

  /* Display the pressure sensor results (barometric pressure is measure in hPa) */
  bmp.getEvent(&event);
  if (event.pressure)
  {
    /* Display atmospheric pressure in hPa */
    Serial.print(F("PRESS "));
    Serial.print(event.pressure);
    Serial.print(F(" hPa, "));
    /* Display ambient temperature in C */
    float temperature;
    bmp.getTemperature(&temperature);
    Serial.print(temperature);
    Serial.print(F(" C, "));
    /* Then convert the atmospheric pressure, SLP and temp to altitude    */
    /* Update this next line with the current SLP for better results      */
    float seaLevelPressure = SENSORS_PRESSURE_SEALEVELHPA;
    Serial.print(bmp.pressureToAltitude(seaLevelPressure,
                                        event.pressure,
                                        temperature));
    Serial.println(F(" m"));
  }
 
  Serial.println(F(""));
  delay(1000);
}

chunkit
 
Posts: 12
Joined: Mon Feb 09, 2015 8:56 pm

Re: 10 DOF IMU not functioning

by adafruit_support_bill on Wed Nov 25, 2015 8:00 am

Hanging up is often a symptom of an intermittent connection. Please post photos showing your soldering and connections between the IMU and Arduino.

adafruit_support_bill
 
Posts: 78721
Joined: Sat Feb 07, 2009 10:11 am

Re: 10 DOF IMU not functioning

by chunkit on Wed Nov 25, 2015 12:18 pm

12287304_1163268083686654_1779775555_o.jpg
12287304_1163268083686654_1779775555_o.jpg (114.31 KiB) Viewed 657 times

12286982_1163268100353319_1298494447_o.jpg
12286982_1163268100353319_1298494447_o.jpg (164.4 KiB) Viewed 657 times

12297776_1163268060353323_1764349686_o.jpg
12297776_1163268060353323_1764349686_o.jpg (118.78 KiB) Viewed 657 times

chunkit
 
Posts: 12
Joined: Mon Feb 09, 2015 8:56 pm

Re: 10 DOF IMU not functioning

by adafruit_support_bill on Wed Nov 25, 2015 2:05 pm

The solder looks OK. Make sure that all of your jumper connections are solid. They should be gripped securely by the spring contacts for a good electrical connection.

adafruit_support_bill
 
Posts: 78721
Joined: Sat Feb 07, 2009 10:11 am

Re: 10 DOF IMU not functioning

by chunkit on Wed Nov 25, 2015 2:13 pm

Hi, i supply 5v into the IMU and by using the digital Multimeter to measure the SCL is 4.89V and the SDA is 0.28V.
is the output looks normal or the IMU is spoiled ?

chunkit
 
Posts: 12
Joined: Mon Feb 09, 2015 8:56 pm

Re: 10 DOF IMU not functioning

by adafruit_support_bill on Wed Nov 25, 2015 2:51 pm

Is this with or without an SDA/SCL connection to the Arduino?

When idle, both SDA and SCL are typically pulled high. Please post a clear close-up photo of the front of the IMU.

adafruit_support_bill
 
Posts: 78721
Joined: Sat Feb 07, 2009 10:11 am

Re: 10 DOF IMU not functioning

by chunkit on Sat Jan 23, 2016 12:58 pm

last time the IMU is functioning well but dunno why now i run the sample code the data is stuck at there cant continue running.

chunkit
 
Posts: 12
Joined: Mon Feb 09, 2015 8:56 pm

Re: 10 DOF IMU not functioning

by adafruit_support_bill on Sat Jan 23, 2016 2:07 pm

That sounds like a connection problem. Please post a clear close-up photo of the front of the IMU.

adafruit_support_bill
 
Posts: 78721
Joined: Sat Feb 07, 2009 10:11 am

Re: 10 DOF IMU not functioning

by chunkit on Sun Jan 31, 2016 12:00 pm

The IMU got warranty ?

chunkit
 
Posts: 12
Joined: Mon Feb 09, 2015 8:56 pm

Re: 10 DOF IMU not functioning

by adafruit_support_bill on Sun Jan 31, 2016 1:25 pm

Please post a clear close-up photo of the front of the IMU.

adafruit_support_bill
 
Posts: 78721
Joined: Sat Feb 07, 2009 10:11 am

Re: 10 DOF IMU not functioning

by chunkit on Tue Feb 02, 2016 12:54 pm

12669108_1203192826360846_647673698_o.jpg
12669108_1203192826360846_647673698_o.jpg (231.3 KiB) Viewed 503 times
12633270_1203192833027512_579665915_o.jpg
12633270_1203192833027512_579665915_o.jpg (207.61 KiB) Viewed 503 times
Capture.JPG
Capture.JPG (41.99 KiB) Viewed 503 times

chunkit
 
Posts: 12
Joined: Mon Feb 09, 2015 8:56 pm

Re: 10 DOF IMU not functioning

by chunkit on Tue Feb 02, 2016 12:55 pm

The data is hanging on there

chunkit
 
Posts: 12
Joined: Mon Feb 09, 2015 8:56 pm

Re: 10 DOF IMU not functioning

by adafruit_support_bill on Tue Feb 02, 2016 1:14 pm

We can try replacing the sensor. Please contact support@adafruit.com with a link to this thread.

adafruit_support_bill
 
Posts: 78721
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.