Openlog Artemis sleep mode if not moving

Hi,

I need to log IMU 5 times / seconds during 2 weeks and can’t have more than 1Ah battery.

Is the OLA have a mode that will put it in sleep mode if the board isn’t moving ?

If not, how could I do it to preserve the lipo and extend the logging duration please ?

Thanks a lot for your help,

Olivier

Hi Olivier,

The IMU interrupt pin is connected to the Artemis on the OLA so, in theory, it would be possible for the IMU to wake the Artemis from sleep when a motion event occurs.

The software does not support this at the moment. Depending on your software skills, you may be able to implement it yourself (and send us a Pull Request please)? Or, please raise a “Feature Request” issue on GitHub and we will consider it:

https://github.com/sparkfun/OpenLog_Artemis/issues

Best wishes,

Paul

Thanks Paul

Effectively, the INT pin of the IMU is connected to the D37 of the MCU.

In the IMU’s data-sheet, I can see that there is an interrupt name : Wake On Motion.

How does it work ? When the IMU moves the interrupt is activated ?

I thought about a solution and it can be this :

  • Wake up the Artemis thanks to the Wake On Motion interrupt from IMU

  • Put the Artemis on sleep mode if data from the IMU shows that it’s not moving or very few.

Programming the Artemis it’s pretty easy I think, just need to change the Firmware from the github and then flash the new Firmware thanks to the Firmware Updater.

But how can I enable the Wake On Motion interrupt of the IMU ? I have no clue

Questions :

  • How works the Wake On Motion interrupt ?

  • How can I program the IMU ?

  • Is my solution suitable ?

Thanks a lot !

Hi Olivier,

Please see the interrupt example in the IMU library:

https://github.com/sparkfun/SparkFun_IC … Interrupts

Best wishes,

Paul

Hi Paul,

I’m working on it !

I’ve a little question, when the MCU goes to Sleep or Deep Sleep mode, will the sensor goes to Sleep or LP mode too? Or should this be explicity done by the MCU? (The goal is save power as much as possible)

Thanks a lot.

Hi Olivier,

I guess it depends what you are trying to achieve. Certainly you will need to leave the IMU power enabled when the Artemis calls goToSleep. You will need to change this part of the code:

https://github.com/sparkfun/OpenLog_Art … r.ino#L254

You might need to leave the SPI bus enabled too (I’m not sure - you will need to try a test):

https://github.com/sparkfun/OpenLog_Art … r.ino#L219

To let the IMU wake the Artemis, you will need to create a new interrupt. You could copy the code for the stop-logging pin:

https://github.com/sparkfun/OpenLog_Art … s.ino#L271

https://github.com/sparkfun/OpenLog_Art … #L778-L782

and create a new version for the IMU INT pin:

https://github.com/sparkfun/OpenLog_Art … s.ino#L108

You will need to leave the IMU INT pin enabled during sleep, so you will need to add it to this part of the code:

https://github.com/sparkfun/OpenLog_Art … r.ino#L244

After that, you need to learn the features of the IMU and work out what mode you need to put it into that will best meet your needs. Does it have a low-power mode where it can still generate interrupts when moved?

Good luck!

Paul