MMA8652FC - Using "Standby" mode as a "Sleep" mode

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

MMA8652FC - Using "Standby" mode as a "Sleep" mode

841 Views
nkli
Contributor I

Hello,

On the MMA8652FC, I noticed there was an Auto-Sleep function that would set the ODR to a lower rate, if desired. I was looking into this because the solution I am working on is battery-powered and it would be preferred to have a lower power consumption. Because of this, I am trying to find ways to reduce the power consumption of the MMA8652FC.

I saw that writing 0x00 in CTRL_REG1 to put the mode on standby greatly reduces the power consumption. I have tried this and, indeed, saw that the power consumption of the accelerometer greatly decreased. However, I have been unsuccessful in trying to return the accelerometer to active mode. I did put a delay for about 20ms after reading that there is some time taken to transition between active and standby mode. This did not help. I also saw that the standby mode may wipe out some register values so I also tried to reinitialize the accelerometer but I do not think this goes through because it does not even go back into active mode.

Would this be a feasible solution at all? I would love to be able to switch between standby mode and active mode at will without only having to do this for register writes.

Any help would be appreciated. Thanks in advance.

NL

Labels (1)
0 Kudos
3 Replies

553 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Nicole,

First off, regarding the Auto-Wake/Sleep function I would recommend you to take a closer look at our AN4074 and this community project.

 

For even lower power operation, the Standby mode can indeed be used. In this mode, current consumption is reduced to max. 5µA, but as you know, no measurements are made. To enter the Active mode again, the ACTIVE bit needs to be set. Then you need to take into consideration the Turn-on time (Ton1) which is 2/ODR +1ms. Are you saying that even after that time no new data are available?

 

Let me add some general recommendations to reduce the overall current consumption:

1. Use interrupts instead of polling the data. This reduces I2C traffic and allows you to invoke the MCU’s low-power idle mode to reduce power consumption until the actual event (e.g. new data ready, change in orientation) occurs.

2. Similarly, the embedded FIFO buffer allows the MCU to sleep longer while samples are being collected inside the sensor and further minimizes the traffic across the I2C bus if samples are read using I2C burst read mode. For more information on the FIFO buffer, please refer to our AN4073.

3. Higher value of pull-up resistors reduces current consumption as each logical low on the I2C bus creates a path to ground.

Best regards,

Tomas

553 Views
nkli
Contributor I

Hello Tomas,

Thank you for your helpful reply.

I am currently having trouble writing the active bit after I set it to standby. It seems to be an I2C bus problem. The error is telling me that the transmission is in progress and it never returns from there. However, in other parts of the code that I have for setting the interrupts for the interrupt controller and initializing the MMA, it seems to be okay to set it to standby, write to the registers, and to set the MMA back to active mode. Does it matter how long I am putting the MMA in standby mode? If it is too long, does it shut down or do something in that matter? I am just trying to rule out if it is the MMA8652FC that is going to a state that needs to be woken up again, or if it is my microprocessor's problem because I am putting into a deep sleep mode which may affect how I2C transmits data.

Thanks,

NL

0 Kudos

553 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

You are welcome, Nicole.

It seems to me more like your MCU or code related problem, it does not matter how long the MMA8652FC stays in Standby mode.

Do you have a logic analyzer or an oscilloscope to see what is going on the I2C bus and INT pins?

Best regards,

Tomas

0 Kudos