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.