cancel
Showing results for 
Search instead for 
Did you mean: 

LSM303AGR Single Measurement Mode current consumption appears to be twice what is expected?

SKarj
Associate II

When manually polling (single measurement mode) the LSM303AGR at rates such as 50Hz, 80Hz, 100Hz), the current consumption appears to be double would it should be.

I would expect similar consumption values to what I get using the continuous mode at the same rate, yet I seem to be consuming around double the current, irregardless of offset cancellation settings (BTW, I would expect offset cancellation to NOT be doing a double read in single measurement mode, given the way the datasheet is written).

Does single measurement mode consume do a double read of the field, or otherwise consume twice the current, as compared to continuous mode (where offset cancellation is disabled in continuous mode) .

NOTE: temperature compensation is enabled under my test conditions.

5 REPLIES 5
Eleon BORLINI
ST Employee

Hi, how did you configure the device (accelerometer and magnetometer)? Are you measuring the average current consumption on 1/ODR integration time in both cases (continuous and one-shot mode), and did you use this formula for the calculation:

(Current_consumption_10Hz - Current_consumption_in_power_down) / (10 Hz / ODR) + Current_consumption_in_power_down 

Regards

SKarj
Associate II

Hi,

I've just been measuring microcontroller + magnetometer combined current, on both 5999 and 19999 count DMM, and subtracting the microcontroller average current + current required to write to LSM303AGR register 60h (MD bits set to 11 to go idle) and to read the LSM303AGR OUT_ registers (68h to 6Dh).

I utilise a microcontroller timer to program in the desired polling rates. I have tried 50Hz, 80Hz and 100Hz.

After running the baseline current measuring mode (i.e. run the micro + write 60h and read OUT_ registers for 60 seconds and record average reading), the mode auto switches to now start writing 0x9D to register 60h, and again over a minute or so I note the average current reading from the DMM.

I'm using 3-wire SPI, I have programmed the accelerometer section to utilise 3-wire SPI (BTW, how do we disable I2C on the accelerometer side of things?) and then programmed it to power down. After that the CS_XL pin remains perpetually high.

On the magnetometer, I have tried nearly every conceivable combination of register settings in single measurement mode (enable and disable offset cancellation per datasheet, enable and disable temperature compensation, change the ODR bit values etc).

Typical settings per below:

magn_write_reg(spi_bus, 0x60, 0x9f);

// magn_write_reg(spi_bus, 0x61, 0x12); // ENABLE OFFSET CANCELLATION - Single measurement mode

magn_write_reg(spi_bus, 0x61, 0x00); // DISABLE OFFSET CANCELLATION

magn_write_reg(spi_bus, 0x62, 0x21); // ENABLE DATA-READY signal

magn_write_reg(spi_bus, 0x63, 0x00);

Then wait for timer interrupt, then: magn_write_reg(spi_bus, 0x60, 0x9d) to trigger single measurement.

Then wait for DRDY, then read in all 6 OUT_ registers using a multi-byte read starting at 0x68.

So and so forth.

I have tried adjusting pull-up, pull-down and no-pull settings across the various pins in the hope that it was some kind of pin leakage current.

Nothing seems to be able to bring the average current down to whats in the datasheet for LP=1, OFFSET_CANC = 0. I'm getting readings quite consistent with the LP=1, OFFSET_CANC = 1 column.

Regards,

Sam

SKarj
Associate II

Further; The appnote AN4825 states that the formula is only valid for ODR < 10 Hz?

Utilising that formula I would expect lsm303agr current to be 186uA at 80Hz correct? Going by the current consumption table, I'm expecting about 200uA at 80Hz.

Hi Eleon,

Please see my replies in the "answers" section. I'm new to this site and in my hurry have replied to the wrong place it would seem.

Regards,

Sam

Eleon BORLINI
ST Employee

So the issue is related to the magnetometer and not to the accelerometer consumption, right?​ Are you using an ST board or is a custom one? Do you have pull-ups on INT_MAG/DRDY pin? Regards