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

measuring battery level problem

Hi to all,

i am working on a project based on nrf51822 soc, i want measure level of battery with nrf51822 ADC channel.

i have an example code that measure the level of battery but it return different value each time that i measure the battery level,i think this problem occur because in different times according to that radio part of bluetooth is on or off it return different values. now i want know that there is any notification or event that can i use to know that radio part is turned off to measure the battery level at that moment?? or can any one give me an advice to solv this problem??

thanks

Parents
  • And a trick on this that works well is set the radio notification distance to the maximum (5500usec in SDK 11) so you have time to do a proper A/D conversion with some averaging if you wish.

    Then measure the battery voltage before the radio goes active not after.  This way you are assured of some radio inactivity to allow your battery to recover and show its true nominal voltage.

    To do this just add "if (radio_evt)" in the handler.  If true then the radio is getting ready to go active after the notification distance period.

Reply
  • And a trick on this that works well is set the radio notification distance to the maximum (5500usec in SDK 11) so you have time to do a proper A/D conversion with some averaging if you wish.

    Then measure the battery voltage before the radio goes active not after.  This way you are assured of some radio inactivity to allow your battery to recover and show its true nominal voltage.

    To do this just add "if (radio_evt)" in the handler.  If true then the radio is getting ready to go active after the notification distance period.

Children
No Data
Related