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

Battery level measurement without SAADC

Hi!

The nRF52820 chip does not have the SAADC module used to estimate the battery life in its larger counterparts (nrf52840 and nrf52833).
Is there a different way to estimate battery life without an SAADC?
I'm hoping for a method which does not include adding external components, and is measurement based rather then estimation based.

We had considered an estimation method which is a summation of the current estimate per 'time used', 'advertisement cycles' passed, 'connection cycles passed' etc. The problem here is that a. I would need to estimate all possible parameters (TX power for example, time until advertisement is caught etc)
b. I would not be able to catch leaking parts, as the leak is not part of my estimation.

Adding an external ADC is a possibility, but would require us to change our PCB which is not something we want.

we're using the VDD tied to VDDH and expect the Vin to be 1.8-3.3V.

Any other ideas?

  • There are internal references generated by the chip at 1.2, 1.8, and 2.4 V. Note that the specifications requires you to have supply voltage (VDD) of minimum VREF + 0.3V for the used reference. You can also provide an external reference, which may make the battery voltage measurements simpler, but it would require external components to have a stable reference voltage.

  • You can be creative and measure the voltage by charging or discharging a capacitor and measuring the time taken to hit the comparator trigger voltage. Two pins can be used, one as the charge pin and one as the sense pin, or better use a single pin as I show here:

    //                 +---------------------------------
    //                 |                 nRF52832
    //                 |
    //                 |    VDD
    //                 |   --#--
    //                 |     |
    //                 |     |
    //                 |     +-|
    //                 |       |<- High
    //                 |     +-|
    //                 |     |
    //   #-------#-----O-----#--------------#--> P0.nn COMP
    //   |       |     |     |              |    Ref = VDD/n
    //  +++      |     |     +-|            |
    //  | |    -----   |       |<- Low    -----
    //  | |    -----   |     +-|          -----
    //  | |      |     |     |              |
    //  +++      |     |     |              |
    //   |       |     |   =====          =====
    // =====   =====   |    ===            ===
    //  ===     ===    |     =              =
    //   =       =     |
    //                 +----------------------------------
    

    Conceptual Steps:

    Set the port pin to an output, drive high to charge the capacitor

    start a timer

    set up comparator to detect voltage falling below a threshold, which releases the pin drive

    comparator trip captures timer value

    Vo = Vi.e^(-t/CR) where Vi is your Vdd voltage and Vo the comparator trip voltage

    Use a lookup table to map result

    The above example is charge-measure discharge time, but you can also discharge-measure charge time. The comparator options will probably make one of these easier.

    Maybe study the Capsense examples for help in driving the peripherals

  • Hi Jørgen!
    Thank you for the answer.
    I'm slightly confused. Lets say I want to use the comperator to know if my VDD voltage has fallen below 2.4V, the higher reference generated by the pin. That would mean I would be comparing VDD with VREF(2.4V), but VDD must be 0.3V higher than VREF, which means that as VDD drops below 2.7V, I can not use the reference voltage to say anything about the VDD voltage.
    Am I misunderstanding something?

  • Thank you hmoleshworth!
    That is indeed a good idea. I will have to see if we can spare a GPIO for this purpose, as well as check if we have any capacitors we can use for this.

    Thank you for the idea!

  • Yes, you are understanding it correctly. The internal regulators can only regulate down the voltage from VDD, if VDD drops below the reference the chip will no longer be able to regulate it.

    You will need to use an external voltage/resistor divider together with one of the lower internal references.

Related