cancel
Showing results for 
Search instead for 
Did you mean: 

LSM9DS0 Temperature Sensor

bhostetler
Associate
Posted on March 04, 2014 at 01:07

I am using the LSM9DS0 as a 9DOF IMU for a motion sensing application.  I need the temperature sensor to compensate for temperature-induced gyro drift.  I can get everything to work, but the temperature always reads 0x00 on both the high and low byte.  I set the TEMP_EN bit high and read both high and low OUT_TEMP_XM registers.  I have everything enabled and the mag/acc/gyro all update properly.  I have tried many combinations of settings and still read 0x0000 for temperature.  I have also tried multiple physical parts, so that's not the problem.  Anyone know if there's a known issue with the temperature sensor?  Thanks.

Here's the code for my control register settings:

LDD_TError set_XM_control_regs() {

    LDD_TError I2C_Error;

    

    I2C_Error = Hand_SelectSlaveDevice(MAGNETOMETER_ADDR);

    if (I2C_Error != ERR_OK) {

        return I2C_Error;

    }

    I2C_OutBuffer[0] = LSM9_CTRL_REG0_XM | 0x80;

    I2C_OutBuffer[1] = 0x00; // no FIFO or filter

    I2C_OutBuffer[2] = 0x3F; // 12.5Hz accelerometer

    I2C_OutBuffer[3] = 0x00; // +/- 2 g

    I2C_OutBuffer[4] = 0x00; // no interrupts

    I2C_OutBuffer[5] = 0x00; // no interrupts

    I2C_OutBuffer[6] = 0xE8; // temperature, high res, 12.5Hz magnetometer

    I2C_OutBuffer[7] = 0x60; // +/- 12 gauss

    I2C_OutBuffer[8] = 0x80; // magnetometer continuous conversion

    return Hand_MasterSendBlock(9);

}

Also, the FIFO in the mag/accel portion is disabled. FIFO_CTRL_REG is set to 0x00.

#temperature-sensor-lsm9ds0
6 REPLIES 6
bhostetler
Associate
Posted on March 07, 2014 at 23:04

Has anyone been able to get temperature readings to work at all with a LSM9DS0?  I just want to know if it's even possible.

gwall
Associate II
Posted on March 20, 2014 at 16:59

I have the same question. I've tried reading the temperature registers after setting the ''TEMP_EN'' bit in CTRL_REG5_XM and enabling the magnetometer, but I just get zeros.

j-van-der-zande
Associate
Posted on May 11, 2014 at 14:43

Hi there all,

We seem to have an issue with LSM9DS0 on the temperature sensor.

According to the datasheets there is not much info left anymore about enabling this temperature sensor. It reads all zeros on the output values on TEMP_L and TEM_H byte (05h and 06h).

Same problem as anyone else for the time being.

I bought a breakout board LSM9DS0 from Sparkfun (Antratek in the Netherlands).

I use I2C communication on the Arduino UNO board and library file WIRE.H.

Information on the IC-package:

 9S0

2330

AHGFA

So is there a faulty temperature sensor in the chip? Or is this sensor not available ?

Everything else seems to work fine.

onehorse
Associate II
Posted on May 21, 2014 at 07:36

I modified the Sparkfun LSM9DS0 sketch to calculate temperature and am getting a sensible reading from a NorDevX breakout board. The data sheet says 8 LSB per degree C for the temperature sensor sensitivity (slope) but doesn't mention the intercept. If I assume 21 C then I get a reasonable 22+ degrees C in my house. The DS3231 RTC says 22.25C. I didn't get anything from the Sparkfun breakout board; maybe they forgot to hook up a lead or something. I'll be submitting a pull request with the new temperature edit.

Posted on May 26, 2014 at 18:53

I have the sensor running with spi interface and the temperature reading gives 0 at abt. 22 degrees centigrade. Could this be an issue with i2c ?

onehorse
Associate II
Posted on May 30, 2014 at 18:00

I am using I2C and get a reasonable temperature with the NorDevX board and zero with the Sparkfun board using the same code and TWI protocol. I can only speculate that there might be some dependence on the way the chip connections were made..? I don't know. It is passing strange that it works on one breakout board and not another.