This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to measure Lithium battery voltage

How to measure Lithium battery voltage with the nRF51 ADC

Parents
  • Is there anyway to get these links working again? They don't seem to be functional. Also, I'm assuming that the output of the voltage divider is unaffected by the capacitor.

    So with a fully charged lithium ion batter (4.2V) you would expect to see a voltage of

    4.2*(2.2/10) = .924V

    Is the functionality of the circuit as follows? The capacitor is just acting to store up some charge to dump charge into the internal capacitor used by the ADC. It is essentially acting as a low impedance voltage source for the ADC sampling circuit?

Reply
  • Is there anyway to get these links working again? They don't seem to be functional. Also, I'm assuming that the output of the voltage divider is unaffected by the capacitor.

    So with a fully charged lithium ion batter (4.2V) you would expect to see a voltage of

    4.2*(2.2/10) = .924V

    Is the functionality of the circuit as follows? The capacitor is just acting to store up some charge to dump charge into the internal capacitor used by the ADC. It is essentially acting as a low impedance voltage source for the ADC sampling circuit?

Children
  • Hi Lucas

    I have refreshed the links.

    Actually, the maximum voltage that is input to the ADC for this setup is approximately:

    4.2V * (2.2M/(2.2M+10M))=0.76V

    and the minimum voltage is approximately

    2.7V * (2.2M/(2.2M+10M))=0.49V

    Your assumption is correct, the capacitor charges up before sampling, and holds the voltage steady for adequate time during the sampling period. The voltage will of course drop a little bit but the capacitor is dimensioned so that discharging during the sampling period (68 microseconds)is less than what corresponds to 1 bit when sampling with 10-bit resolution, so the error is not noticable.

  • Stefan,

    Would it be possible to adjust resistor values to set the 4.2V sample closer to the 1.2V reference? To maximize the range of the ADC? Or is this the best possible setup for a 4.2V battery the one listed above?

  • The thought behind this setup is to have the voltage in the ADC input pin as close to 0.6V as possible. Then the current flowing in and out of the ADC is minimal and you can therefore have a small capacitor. If you would set the maximum ADC input voltage close to 1.2V then you would need a larger capacitor, perhaps 100 nF, which would also take longer to charge up between samples, and would limit the maximum sampling frequency a little more. But if you sample the battery with <1Hz then you could set R1=6Mohm and C=100nF which would lead to:

    Maximum voltage on ADC input: 4.2V * 2.2M/(2.2M+6M) = 1.126V Maximum ADC output value, 10-bit sampling: 1.126/1.21023= 961 Minimum voltage on ADC input: 2.7V * 2.2M/(2.2M+6M) = 0.724V Minimum ADC output value, 10-bit sampling: 0.724/1.21023 = 617 Usable ADC resolution is: 961- 617 = 344

    To compare, usable ADC resolution for the 10Mohm setup is 230

  • Stefan, Thank you for the answer. My team and I are only planning to sample once a minute. So no issues on sampling rate. Does Nordic publish the approximate size on the internal ADC sampling cap? The setup you just suggested will work great for our current application, but in the future it might be nice to know the size of the internal cap. That way we could properly figure out what value the external cap needs to be.

  • I aggree, It would be convenient to have a general formula to output a good capacitor value. Unfortunately, it does not exist yet, but I will try to work on making something that I can publish here shortly

Related