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

How to measure Battery state using VDDH on NRF52840?

Hello,

I am new user for the Nordic NRF528400 microcontroller.
I am working on a project that is using the 8 channels of ADCs to get data from sensors. The system is powered by an external battery and it is necessary to know its status at all times in order to control the system to be powered by the battery or it is necessary to connect the charger.
I searched in the microcontroller datasheet and on Nordic dev zone; I found that even if the 8 channels of the ADC are used, we can use the VDDH pin of the µC (capture diagram_block)

My concern is how I can set the reference voltage? Can I connect VDDH directly to the battery and do I need to add elements like resistors or capacitors?

Cordially.

  • Hello A_Has,

    I am new user for the Nordic NRF528400 microcontroller.

    Welcome, and welcome to the forum!
    Please do not hesitate to use the forum for any issues or questions you might have - that is why the forum is here! :) 

    I searched in the microcontroller datasheet and on Nordic dev zone; I found that even if the 8 channels of the ADC are used, we can use the VDDH pin of the µC (capture diagram_block)

    I am not sure exactly what you mean when you say this - the nRF52850's SAADC only has 8 channels in total, these channels may be connected to any of the available inputs as shown in the diagram you have linked, through setting the PSEL register for the particular Channel you intend to use.

    My concern is how I can set the reference voltage? Can I connect VDDH directly to the battery and do I need to add elements like resistors or capacitors?

    Each channel's reference is set as part of the channels configuration, you may either use the internal 600 mV option, or the VDD/4. When using the SAADC to measure its own VDD, it is recommended to use the internal 600 mV reference - since using the VDD/4 reference will skew your measurements as the battery discharge.

    As for the need for external circuitry, do you then mean in regards to how you connect the battery to the device at all, or how you connect the SAADC to measure the VDDH/5 pin?
    The latter is done through setting PSEL of the selected channel to 0x0D. The former depends on your power supply configuration for your chip.
    In order to answer the former, I will need you to elaborate on your power configuration.

    Best regards,
    Karl

  • Hello Karl,
    Thank you for your feedback.
    When I mentioned the 8 channels of the ADC are used, I wanted to say that the channels AIN0,..., AIN7 are already connected to some sensors.
    So I would like to know how can I use the VDDH pin of NRF528400 microcontroller to measure the state of an extern battery?

  • A_Has said:
    Thank you for your feedback.

    No problem at all, I am happy to help!

    A_Has said:
    When I mentioned the 8 channels of the ADC are used, I wanted to say that the channels AIN0,..., AIN7 are already connected to some sensors.
    So I would like to know how can I use the VDDH pin of NRF528400 microcontroller to measure the state of an extern battery?

    Ah, then it seems I have misunderstood your last question. 
    A SAADC channel can be connected directly to the VDDH internally, through setting the channels PSEL to 0x0D, no external circuitry needed.
    Same goes for the VDD bus.

    Could you confirm for me which power supply configuration you are using for your device? And that by state, you mean to ask about the voltage level presumably connected to the VDDH pin of the nRF52840?

    Best regards,
    Karl

  • Thank you for availability and your feedback.
    The power supply I want to use is 3.3V on the NRF528400 microcontroller.  

    I want to connect the VDDH pin to an external battery of a type of Li-ion Polymer Battery (Model:UFX251416, Capacity:35mAh).
    For the state, I need to check the battery's state to switch, when it is necessary, to a charger (STBC15QTR).
    Cordially.

  • A_Has said:
    Thank you for availability and your feedback.

    No problem at all, I am happy to help!

    A_Has said:
    I want to connect the VDDH pin to an external battery of a type of Li-ion Polymer Battery (Model:UFX251416, Capacity:35mAh).

    What is the operational voltage range of this particular battery?
    I am unable to find a datasheet the particular part number you reference.
    From your schematic it seems that you will operate in Normal Voltage Mode - since you have shorted VDD and VDDH - which means that the VDD supply must never exceed 3.6V.

    A_Has said:
    The power supply I want to use is 3.3V on the NRF528400 microcontroller. 

    I am assuming that this means that your VDD supply will be a constant 3.3V, regulated somewhere else before being supplied to the nRF52840. However, your wording is a little ambiguous here, so if you could please confirm whether this is the case, that would be great.
    My alternate reading of this is that you intend to use the onboard buck regulator to realize the 3.3 V supply. If this is the case, I would need to know the operational voltage range of the intended battery before I can give any comment.

    Furthermore, I also notice that you are using lower-than-recommended values for your VDD decoupling capacitors. Is there a reason for this?

    Best regards,
    Karl

Related