Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

nPM1300-EK + NRF5 SDK: Is It Possible?

Hey,

I'm currently working on a legacy project that uses the NRF5 SDK. Rewriting the project to use the nRF Connect SDK would be tedious, time consuming and likely to introduce more bugs, causing me to miss my deadline. Is there a way to use the NRF5 SDK to retrieve the SoC (State of Charge) value with a library or something?Sweat

I've found that the algorithm is implemented in the nrf_fuel_gauge library. Do I just need to include the libnrf_fuel_gauge.a library in my project?

Thanks for the help!!!

Parents
  • Hi

    Glad you were able to make something work on your end. In the nrf_fuel_gauge process, the t_delta parameter refers to the time difference since the previous processed measurement.

    t_delta should reflect the actual time delta from the previous call to nrf_fuel_gauge_process(). However, the algorithm will consider the current consumption in between calls to nrf_fuel_gauge_process() to be an average between the two. If t_delta is large due to the system being in an idle state, it is better to use nrf_fuel_gauge_idle_set() function prior to entering the idle period. The next time nrf_fuel_gauge_process() is called, use the actual t_delta as normal.

    Also note that t_delta is a floating point value, so it would have to be very large for anything to start overflowing.

    Best regards,

    Simon

Reply
  • Hi

    Glad you were able to make something work on your end. In the nrf_fuel_gauge process, the t_delta parameter refers to the time difference since the previous processed measurement.

    t_delta should reflect the actual time delta from the previous call to nrf_fuel_gauge_process(). However, the algorithm will consider the current consumption in between calls to nrf_fuel_gauge_process() to be an average between the two. If t_delta is large due to the system being in an idle state, it is better to use nrf_fuel_gauge_idle_set() function prior to entering the idle period. The next time nrf_fuel_gauge_process() is called, use the actual t_delta as normal.

    Also note that t_delta is a floating point value, so it would have to be very large for anything to start overflowing.

    Best regards,

    Simon

Children
No Data
Related