Nrf9160: Battery ADC measurement off by ~100 mv

I'm getting a strange amount of error when trying to measure the battery for a custom PCB based on the nrf9160.

Details

  • My VCC_IO is 1.8V
  • My max battery voltage is 4.2V
  • I am using a slightly modified version of the battery sample from zephyr/samples/boards/nrf/battery.
    • I'm using a switch controlled voltage divider, where R1 is 3.01k and R2 is 2.0k

    • I am measuring the analog levels on adc line, the battery voltage going into the divider, and the battery voltage going into the switch.

    • I am using the internal reference of 600 mv.
    • I am using ADC_GAIN_1_3 
      • 600mv * 3 = 1800 mv (Within VCC_IO + 300 mv)
      • An analog value of 145 mv should result in a value of around 3630 mv to be reported from the device.
    • The device is reporting battery voltage of ~3570 mv. 

     This isn't necessarily useful information, but I have another custom PCB with an almost identical measurement circuit but VCC_IO is 3.0V. The device always reports an acceptable value.

    Am I missing something here?

    Parents Reply
    • Hello,

      I am sorry for the late reply. We are vert short staffed during Easter Holidays, so I will have to see whether I can either get time to test this myself (with my limited nRF91 knowledge), or if I can find anyone else who can test it and try to reproduce what you are seeing. 

      Just wanted to let you know that this case is not forgotten. I will get back to you as soon as I can.

      Best regards,

      Edvin

    Children
    Related