SparkFun Forums 

Where electronics enthusiasts find answers.

Hardware or product specific questions are best asked here.
User avatar
By thethirdman
#218700
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
User avatar
By PaulZC
#218702
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
User avatar
By thethirdman
#218727
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 !
User avatar
By thethirdman
#218788
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.
User avatar
By PaulZC
#218857
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
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]