LIS3MDL large power consumption
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-06-22 10:45 AM
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- Labels:
-
E-Compasses
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-07-06 12:02 PM
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?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-07-07 03:21 PM
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).- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-07 04:48 AM
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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-16 02:48 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-21 08:29 AM
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!- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-04-05 03:25 AM
00111x0b
) so only 2 sensors can be on one i2c bus- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-04-05 08:36 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-01-11 12:52 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-01-11 01:27 AM
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.