Battery percentage measurement in nrf connect SDK

Hi Nordic,

I am exploring on how to use an ADC module for measuring the battery percentage for my nrf52840. I am working on the nrf connect SDK. Can anyone suggest me a sample for reading the battery percentage in the zephyr SDK?

Thanks,

Pranathi

Parents Reply Children
  • From the docs, I added this to the sample as an overlay:

    / {
       vbatt {
          compatible = "voltage-divider";
          io-channels = <&adc 4>;
          output-ohms = <180000>;
          full-ohms = <(1500000 + 180000)>;
          power-gpios = <&gpio0 4 0>;
       };
       zephyr,user {
          io-channels = <&adc 4>;
       };
    };
    

    Our nRF52840DK does not have a voltage divider to measure the power, so you will have to add this yourself and configure the overlay accordingly

Related