Low duty cycle to save power: examples?

I am looking at an application (monitoring populations of birds) where battery life is important, and most of the time “nothing happens”.

I expect that it is possible to take a single image, perform some processing, and then “sleep”, either with pyb.stop() or pyb.standby(). I understand that pyb.standby() reduces power most, but will take longer to restart.

Are there examples of this low duty-cycle operation, which permit power consumption to be quantified at different sleep periods?

I imagine that there is some sleep period beyond which it is more advantageous to use pyb.standby(), even with the longer wake period. Has this been quantified?

Thx - Charles

see the low power examples in the menu.

I wrote my own example which I attach. If it is useful, you might consider tidying it and adding it to the Low Power Examples in the IDE.

The process raises a number of questions which are documented in the source code. I would be grateful if you had time to answer them. They are reasonable questions, I think, for anyone wanting to minimise power consumption, so it could be valuable if the issues could be documented.

There is one crash, and the script makes it easy to replicate this. (sensor.reset() crashes if you shut down the OV7725 regulator).

I have made a few observations conscerning the residual standby current - in principle it should be possible for this to be about 60uA, with the chips used, but it is about 10 times higher than that.
simple_sleep.py (6.75 KB)

If you think there’s a bug please report it on github, also if you want to add your script to the examples please send a pull request.

I think that’s an issue with OV7725 module hw design, the power off pin is left floating which makes it draw more current.