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.

Parents
  • 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

Reply
  • 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

Children
No Data
Related