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

NRF51822 LiPo Voltage Reading

Hi! I am trying to read the voltage of a LiPo battery as explained in this blog post. The code on github however, is not compatible with the latest SDK for the SOC (12.3). Does anybody have an upgraded version or knows which function calls to swap? It is only a few lines of code so I hope somebody could help me with that.

Thank you!

Parents
  • Hi,

    We do not have a update of the github example, but you can refer to the ADC example in SDK 12.3.

    The important point is anyway the schematics in the blog post, showing how you use a resistor network to charge a capacitor (with high resistance resistors to reduce the current leakage). In turn, this capacitor charges the internal capacitor of the ADC during sampling. If this was not present, charging the internal capacitance would increase the current draw from the battery, pulling down the voltage, so the measurement would be incorrect. The ADC sampling code itself is straightforward.

Reply
  • Hi,

    We do not have a update of the github example, but you can refer to the ADC example in SDK 12.3.

    The important point is anyway the schematics in the blog post, showing how you use a resistor network to charge a capacitor (with high resistance resistors to reduce the current leakage). In turn, this capacitor charges the internal capacitor of the ADC during sampling. If this was not present, charging the internal capacitance would increase the current draw from the battery, pulling down the voltage, so the measurement would be incorrect. The ADC sampling code itself is straightforward.

Children
Related