MAG3110: excessive power consumption and unable to place it into standby mode correctly.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MAG3110: excessive power consumption and unable to place it into standby mode correctly.

1,252 Views
EgleTeam
Contributor V

Hi,

we have a design that uses MAG3110. The measurement works right but we have some problems with the power comsumption. 1st one is that the sensor draws around 12ma, is not too much?. The circuit is battery powered but the sensor is not working all the time so we could stand this problem. The big one, problem, is that once we initialize the sensor we are unable to place it in standby mode again, so it still drawing 12ma. I mean CTRL_REG1 "says" AC bit is '0' (standby mode) but the sensor continues drawing 12ma. Here the code for init and close:

//Init

I2C_Write_Byte(0x11,0x10,MAG_CONTROL_BYTE);//CTRL_REG2, MAG_RST
while(I2C_Read_Byte(0x11,MAG_CONTROL_BYTE));//Wait until reset
I2C_Write_Byte(0x11,0xA0,MAG_CONTROL_BYTE);//CTRL_REG2, RAW MODE, AUTO_MRST
I2C_Write_Byte(0x10,0x18,MAG_CONTROL_BYTE);//CTRL_REG1, MAG_ON, 10hz, 128-OSR
I2C_Write_Byte(0x10,0x19,MAG_CONTROL_BYTE);//Active Mode

//Init

//Close

I2C_Write_Byte(0x11,0x00,MAG_CONTROL_BYTE);//CTRL_REG2, Restore defaultt
I2C_Write_Byte(0x10,0x18,MAG_CONTROL_BYTE);//STANDBY MODE
APP_TMR_DelayMS(150); //Wait for STANDBY MODE, Min 1/ODR = 1/10 = 100ms
I2C_Write_Byte(0x10,0x00,MAG_CONTROL_BYTE);//CTRL_REG1, MAG_OFF

//Close

Any advice?.
Thanks,
Manuel.

Labels (1)
6 Replies

923 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi,

How are you measuring this current consumption? Are not there other devices drawing current as well? Could you share your schematic?

 

Also be aware that the current consumption stated in the datasheet applies for VDD=2.4V and has been measured with an amperemeter between 2.4V voltage rail and VDD input only.

Capture.JPG

Best regards,

Tomas

923 Views
EgleTeam
Contributor V

Thx Tomas,

here the schematic:

Sin título.jpg

As you can see there's nothing "strange". 99% sure that the power consumption is due the sensor since when I place the microcontroller in sleep without init the sensor the board draws around 1mA and when I place it in sleep whith the sensor initializated the current draw is around 11ma. On any case my configuration is ODR = 10hz OSR = 128 and according to the datasheet current draw should be 900uA.... :-(. And as I said before the real problem is that I can't place the sensor in sleep mode so I guess there's something wrong in the initialization. If I init in trigger mode the power comsumption is the expected but I always get the same x,y,z measurements.... :-(

Regards,
Manuel.

0 Kudos

924 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Manuel,

Do you have an oscilloscope or a logic analyzer to monitor INT1, SCL and SDA lines? These pins may draw significant current which is not taken into account in the characteristics shown in Table 6 (as I said it applies for VDD=2.4V and has been measured with an amperemeter between 2.4V voltage rail and VDD input only).

Also magnetic reset draws current during certain phase of ODR cycle, so please try to initialize the MAG3110 without setting the Mag_RST bit and eventually also the AUTO_MRST_EN bit. 

I hope it helps.

Best regards,

Tomas

924 Views
EgleTeam
Contributor V

Hi Tomas,

SDA and SCL seem to work right. Here SDA:

sda.png

Well not so usual since I2C is sending a lot of data and the reason is in INT1:

int1.png

As you can see, besides that is a noisy signal, the interruption is being triggered with an irrational frequency: 200Khz!. It should  be 10hz according with the registers. When I place the uC in sleep SDA/SCL go high but even when I can read the AC bit as '0' (standby) time before the sleep, INT1 continues being triggered.

Same behaviour with Mag_RST & AUTO_MRST_EN disabled.

By the way, I've tested with diffetent boards and the behaviour is the same.

Would you be so kind as to share "a piece" of code with an initialization (any ODR/OSR is suitable) and the closing (placing the sensor in standby) that has been tested?

Thanks and regards,
Manuel.

0 Kudos

924 Views
EgleTeam
Contributor V

Newby newby mistake :-(. I configured the uC GPIO for ÏNT1 wrong (I confused PINx with PINy). It was configured as if it was an unsused GPIO, those GPIOs that I always place as output at  level '0' to minimize power consumption, so I had a shortcircuit between INT1 an the uC GPIO... and going crazy the sensor.. Afortunately the sensors have not spoiled :-).

So: solved!.
Thanks a lot Tomas!
Manuel.

0 Kudos

924 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

OK, glad to hear it has been solved, Manuel!

Best regards,

Tomas

0 Kudos