Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is it possible to have an "activity schedule"? #137

Closed
jerabaul29 opened this issue Aug 31, 2022 · 10 comments
Closed

is it possible to have an "activity schedule"? #137

jerabaul29 opened this issue Aug 31, 2022 · 10 comments

Comments

@jerabaul29
Copy link

We were discussing with @tnn77 and wondering: does the OLA support having an "activity schedule"? I.e. for example:

  • when active, we want to measure GPS at 2 or 5 or 10Hz (one of these depending on the GPS model), and a 9dof accel gyro magnetometer output at 100Hz
  • when sleeping, we want to measure nothing and just sleep

In addition, we want to have a schedule like:

  • measure for 20 minutes
  • sleep for 40 minutes
  • loop on that schedule, creating a new file on SD card at the beginning of each measurement cycle.

Not sure, is that doable with the firmware as of today? If not, any hope a functionality like this could be added? This would be super useful in geo sciences.

@ryanneve
Copy link
Contributor

@jerabaul29 I looked at this a while ago. My feeling is that the hardware certainly supports it, but the changes to the firmware would be non-trivial.
If implemented, I would suggest a schedule file with on and off times on on time and duration. Perhaps using crontab syntax? The firmware would need to be able to set alarms in the Artemis RTC for each wake time and know when to go into deep sleep for each sleep period.
This functionality would be useful for applications which only occur during certain times or on a schedule. For our application (tidal), we would probably have to upload a new schedule file every few days.

@adamgarbo
Copy link
Contributor

adamgarbo commented Aug 31, 2022

@jerabaul29 This has been discussed before in #46. @PaulZC noted then that this type of functionality would be a major change. I suspect you'd be better off writing your own firmware.

On a side note, the schedule you've described is exactly what I've implemented in my glacier velocity project, which is based on the Artemis and MicroMod ecosystem. I've created daily, rolling or continuous logging schedules using the built-in RTC functionality of the Artemis.

@jerabaul29
Copy link
Author

I don t think I will have time myself to re write a firmware unfortunately. But think it is a natural expansion of the OLA functionality.

@PaulZC
Copy link
Collaborator

PaulZC commented Aug 31, 2022

Hi JR,

As reported by Adam, we have looked at this previously. The current firmware allows you to change between fast and slow logging once per day. However, as discussed previously, adding a logging schedule is a step too far. It would require completely bespoke firmware. So, with apologies, this is not something we can consider at this time.

Best wishes,
Paul

@PaulZC PaulZC closed this as completed Aug 31, 2022
@jerabaul29
Copy link
Author

I was thinking about this tonight, and wondering: could a possibility be to use an external timer, and have:

  • the external timer decide the wake cycle (20 mins per hour or 20 mins per 3 hours or something like this)
  • the AOL do the logging at full speed when getting power through the timer, and sleeping when no power through the timer
  • the AOL create a new file at each power cycling

@jerabaul29
Copy link
Author

Something based on https://www.sparkfun.com/products/15353 or similar?

If you think this could be doable, could we re-open the issue and discuss using such a hardware instead of software solution? :)

@PaulZC
Copy link
Collaborator

PaulZC commented Sep 1, 2022

Hi JR,

You can already use Pin 11 to select between fast and slow logging. But please be aware that it is not possible to 'wake' the OLA early by changing pin 11 part way through a slow logging sleep interval. Please see #108 for details.

Best wishes,
Paul

@jerabaul29
Copy link
Author

Thanks, that is really interesting :) . So does this well mean that we could:

  • have 1) a fast logging mode that is our "true data measurement" mode
  • have 2) a slow logging mode that is our "dumming logging mode corresponding to sleep"
  • have an external hardware timer that make us change between the modes 1) and 2) (changes will not happen in 2) while asleep)

to hack something similar to the functionality we need?

@PaulZC
Copy link
Collaborator

PaulZC commented Sep 1, 2022

Yes - exactly that. We added the "sleep on pin" feature in January 2021...

@jerabaul29
Copy link
Author

Excellent! Then @tnn77 , we should be able to "hack" something by adding a piece of extra hardware :) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants