Skip to main content
Visitor II
June 22, 2016
Question

LIS3MDL large power consumption

  • June 22, 2016
  • 9 replies
  • 4675 views
Posted on June 22, 2016 at 19:45

I am using the LIS3MDL magnetometer on a custom PCB I recently designed.  In addition to the sensor, the PCB has an STM32F101 and a HopeRF LoRa radio.  I am measuring current consumption by the LIS3MDL much larger than that stated in the data sheet.  I've also measured higher than stated current consumption on the ST evaluation board.  

Has anyone else seen higher than stated values?  Are the datasheet numbers accurate?  FYI I'm using SPI interface and I've tried active high and active low interrupt config as well.  I've also verified DRDY rate of 20Hz.  Thanks!

Test &sharp1:  Total board current of 185uA (uP in stop mode with interrupts disabled, radio in sleep mode, LIS3MDL in power down mode)

Test &sharp2: 

Total board current of 

780uA (uP in stop mode with interrupts disabled, radio in sleep mode, LIS3MDL in 20Hz ODR low power mode).

I'm able to see baseline current consumption in the sensor when changing modes.  Running sensor at 20Hz low power mode adds 595uA (vs 40uA from datasheet).

Sensor config code for Test &sharp2:

// Control register 1 & 4:

 

LIS3MDL_set_ODR

(

ODR_20HZ

)

;

// Control register 2: 

LIS3MDL_set_FS

(

FS_4GAUSS

)

;

 

// Control register 3: 

tmp

=

0x00

;

 

LIS3MDL_write

(

REG_CTRL_REG3

1U

&

tmp

)

;

 

// Control register 5: 

tmp

=

0x00

;

 

LIS3MDL_write

(

REG_CTRL_REG5

1U

&

tmp

)

;

 

// Interrupt configuration. 

tmp

=

0x25

;

 

LIS3MDL_write

(

REG_INT_CFG

1U

&

tmp

)

;

 

// Interrupt threshold registers. 

LIS3MDL_set_detect_threshold

(

THRESHOLD_DEFAULT

)

;

 

tmp

=

 ((

abs

(

LIS3MDL_get_detect_threshold

()) 

&

0xFF00

>>

8U

)

;

 

LIS3MDL_write

(

REG_INT_THS_H

1U

&

tmp

)

;

 

tmp

=

 (

abs

(

LIS3MDL_get_detect_threshold

()) 

&

0x00FF

)

;

 

LIS3MDL_write

(

REG_INT_THS_L

1U

&

tmp

)

;

 

// Read data once to clear out interrupt. 

LIS3MDL_read

(

REG_OUT_Z_H

1U

&

tmp

)

;

#lis3mdl
    This topic has been closed for replies.

    9 replies

    Visitor II
    July 6, 2016
    Posted on July 06, 2016 at 21:02

    I cannot say that I've seen your issue. In Continuous mode, I'm seeing ~40 uA increase in current. However, I cannot get the Idle mode current down to the stated 1 uA. I've even gone so far as to pull everything off the board except the LIS3MDL, it Caps, and the I2C pullups (CS tied high, SDO tied low). So now when power is applied, it should go directly into Idle mode. However, at 1.8V it pulls 32.5uA and at 3.3V it's pulling 133uA. 

    Has anyone else seen this before?

    Visitor II
    July 7, 2016
    Posted on July 08, 2016 at 00:21

    Found my problem. It appears the SDO line is internally pulled up. So on my PCB, where it's tied to ground, it is constantly consuming current. I highly suggest you leave this line floating or pulled up. 

    P.S. I'd like to give a shout out to ST customer service for pretending to offer help for that last several days before finally surrendering (no real surprise there). 

    Visitor II
    December 18, 2018

    Hi, whereabouts did you find that SDO is internally pulled up? I cannot see this is the datasheet.

    Visitor II
    December 18, 2018

    This was the problem, that the behavior is not mentioned in the datasheet. You can only measure it. I had the same problem if you can read, then my answer below will confirm the behavior which mattwo has found.

    Visitor II
    September 7, 2016
    Posted on September 07, 2016 at 13:48

    hello matt,

    thank you very much for your post.

    I had the same problem, 4 LIS3MDL connected at one IIC interface. I used the SDO/SA1 line for adress selection (with low-state in standby) and current was around 450µA at 3.0V.

    Now switched to high-state in standby and, the current was as low (around 5µA for 4 Sensors) as described in the app-note and the datasheet.

    I don't understand why ST won't add a note into the datasheet regarding this behavior.

    Visitor II
    January 11, 2018
    Posted on January 11, 2018 at 08:52

    I have the same problem. When I cut the pin 9 line to gnd the power down current drop to correct about 1uA value. Then magnetometer I2C bus did not work anymore. Then I connected it to VDD. Current was ok but bus was still broken. Is it really so that the line needs to be connected to IO and to switch up and downd debendin on mode?

    ST Employee
    January 11, 2018
    Posted on January 11, 2018 at 09:27

    jussi.mutila

    ‌ can you be more specific? What do you mean by the same problem?

    If you use the I2C bus (CS connected to VDD_IO) the pin 9 (SDO/SA1) needs to be connected either to VDD_IO or to GND and it definesonebit of the device address.

    0690X00000609PsQAI.png

    Visitor II
    September 16, 2016
    Posted on September 16, 2016 at 23:48

    Thanks for your post Matt.  Just wanted to confirm that you are measuring ~40uA increase in current draw in 20Hz ODR continuous mode.  Even though I now see 1uA in Idle mode, I still see ~480uA in 20Hz ODR continuous mode using one sensor.  Have you discovered any other register settings that decrease power?

    Visitor II
    September 21, 2016
    Posted on September 21, 2016 at 17:29

    I discovered that the additional current draw was actually coming from the uP (STM32F101).  Prior to placing the uP in Stop low power mode, I switch the LIS3MDL sensor from 1000Hz ODR LP to 20Hz ODR LP mode.  However, the DRDY signal quickly becomes active but is not handled by the uP as it is in Stop mode.  I had disabled the NVIC for the DRDY external pin interrupt prior to entering Stop mode, but still had the EXTI for DRDY enabled.  This condition in uP Stop mode caused ~450uA additional current draw as the uP latched the DRDY signal.  As soon as I disabled the EXTI and reran the code, the current draw was much lower as expected.  I didn't see this occur on my STM32F103 eval board so it must be something inherent to the STM32F101.

    I'll also post this in the uP section of the forum.

    Thanks for sharing your experiences everyone!

    Visitor II
    April 5, 2017
    Posted on April 05, 2017 at 12:25

    ‌ Are u sure? Have you connected 4 lis3mdl sensors on one I2c bus? 

    as mentioned on page 17 of datasheet it has only 2 address(

    00111x0b

    ) so only 2 sensors can be on one i2c bus
    Visitor II
    April 5, 2017
    Posted on April 05, 2017 at 15:36

    Yes i am sure.

    For static addresses it is right that only 2 sensors can be used at one IIC bus. But if you connect the SDO/SA1 pin of the sensor to a GPIO pin of the MCU you can switch dynamically the addresses and with this fact you can connect as much sensors as you want (and you can drive the capacity) to the bus. The one sensor you will talk to get the address

    0011100b all others 0011110b later you switch your GPIOS and this Sensor get 0011110b and the new one you will talk to get 0011100b and so on.

    Visitor II
    September 12, 2019

    Hello,

    I came across the same issue with the LIS3MDL and found this thread here. Finally I got confirmation from STM, that the SA1 pin is really pulled high internally. Really annoying, that this has still not being added to the data sheet since over the last three years from when this thread started.

    Additionally I got the information from STM that the internal pullup resistor can be disabled by setting bit zero of register 0x1B while keeping the rest of the register at their original values. In the data sheet this register is mentioned as "reserved".

    So with disabling the internal pull up the current consumption in power down mode is as low as few µA as expected.

    Hope that helps,

    ER!K

    Visitor II
    May 15, 2021

    Thanks all of you for confirming the issue and workarounds!

    It's May/2021 and still the same undocumented trap. I've spent/wasted **2 full days** of my life fighting this.

    Thanks ST for still not documenting this in the datasheet... I'll keep it in mind for future sensors selection.

    ST Employee
    May 21, 2021

    Let me try to notify internally this omission again...

    -Eleon