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

Thingy52 battery reads are not consistent

Seems battery reads are not consistent in thngy52 2.1.0 software. Observed a ~4% difference in the consequent battery reads. This difference is high (upto ~40%) if the thingy is connected to USB charger. Is it expected? Br, Ggotta

  • Hi Govind, it is to be expected that the consequent battery reads can vary. Do you have a graph that you could post? Would be interesting to see the variation over time. When you say the difference is high if the Thingy is connected to a USB charger, do you mean the difference between the state of charge (%) before & after you connect the USB charger? Could you post a graph of this occurrence too please?

    If you take a look at the Thingy:52 FW source code, navigate to the thingy_sdk_v2.1.0/source/modules/m_batt_meas.c file. In this file, look for the function static void batt_voltage_to_percent(). As the comment above shows, this function converts the battery voltage to a state of charge value in percent. If you want a more detailed answer for how to calculate this state of charge vs open circuit voltage relationship, have a look at these two cases here: case 1 & case 2.

    But to answer your question, most likely this is related to the ADC that calculates the battery voltage of the Thingy:52. Most likely some noise is being picked up by the ADC, which then results in the "noisy" state of charge estimates. I will let the responsible people know about this issue & hopefully we can figure out how to make the state of charge estimates less noisy.

    Are you using a wall charger to charge your Thingy:52 via the USB port? Or are you using the usb port on your computer? What happens when you plug in your charger is that the voltage will increase quickly in an exponential manner similar to this figure below:

    image description

    This figure below shows the relationship between the battery voltage & the state of charge of three different batteries (green, red & blue lines). It can be found in Gregory Plett's lecture notes. These notes are amazing if you want to find out more about Li-Ion batteries in general and detailed state of charge estimation techniques. If you look at the blue line, you can see that charging a battery from around 0% leads to a large increase in open circuit voltage over the first 5-10% state of charge. So what you are witnessing most likely is that the increase in state of charge is quite drastic once you plug in the usb. Hope that helps!

  • Thanks for the detailed explanation. "When you say the difference is high if the Thingy is connected to a USB charger, do you mean the difference between the state of charge (%) before & after you connect the USB charger? Could you post a graph of this occurrence too please? " In this case, it is not at the time we connect charger, it is observed over a period of time. Noticed 89% of battery percentage after connecting the wall charger, before it was 32%. And from that instance the % values were sometimes 32-36% and sometimes it was ~89%. I observer for couple of minutes and then moved onto some other task. I didn't capture any graphs or logs for this.

  • I have talked to an expert here at Nordic and he believes it should not be too difficult to filter out more noise to get more stable state of charge values when the Thingy is discharging (i.e. not charging via the usb cable). It seems slightly weird that the state of charge would vary that much while you are charging the Thingy. Might be some inaccurate voltage measurements during the charging phase that leads to the big discrepancy that you describe. I will talk to our Thingy:52 experts & get back to you.

Related