This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PPK - long term logging?

We have been using the Nordic PPK to optimise the power usage of our nRF52840 based application - very useful tool.

However, our application changes modes over time (e.g. changing BLE to higher connection interval when syncing data) and we would like to profile power usage over a few days of "real world" usage to determine average current and estimate likely battery life.

Is there a way to have the PPK log usage over extended periods? Ideally we would log the total (cumulative) current consumed at 1 minute intervals.

I see from another devzone ticket that there used to be a python script available to drive the PPK which would have opened the option to roll our own logging, but it seems this is no longer available?

Any advice gratefully received!

Parents
  • I just added a github repo with a python script that should help you get further.

    https://github.com/chriswils/ppk_api

    Just download the zip and run ´ python main.py´. 

    There are some variables you might need to change:
    ´write_firmware´ to ´True´ if you dont have the official firmware running.
    `measurement_time` to whatever time in seconds you need to run it for. 

    Note that I haven't tested this for extended periods of time, since I just made it, so if there are some buffer errors when things starts to fill up, they are not covered. I would appreciate if you raise a pull request if you find anything that can improve the functionality :) 

    For your use case though, you can have a script on the top of this, that runs this script (set at 60 seconds measurement time) over and over again, and accumulate the output over time. 

    PS: The smu2450 is a Source Meter Unit that I use to manipulate different current draws with, so just ignore that.

Reply
  • I just added a github repo with a python script that should help you get further.

    https://github.com/chriswils/ppk_api

    Just download the zip and run ´ python main.py´. 

    There are some variables you might need to change:
    ´write_firmware´ to ´True´ if you dont have the official firmware running.
    `measurement_time` to whatever time in seconds you need to run it for. 

    Note that I haven't tested this for extended periods of time, since I just made it, so if there are some buffer errors when things starts to fill up, they are not covered. I would appreciate if you raise a pull request if you find anything that can improve the functionality :) 

    For your use case though, you can have a script on the top of this, that runs this script (set at 60 seconds measurement time) over and over again, and accumulate the output over time. 

    PS: The smu2450 is a Source Meter Unit that I use to manipulate different current draws with, so just ignore that.

Children
No Data
Related