I'm using 3.6v battery and I want to read the battery voltage, can I get the power ping directly to the any ADC pin of nrf52833 ? Or it cause any damage to the ic ?
I'm using 3.6v battery and I want to read the battery voltage, can I get the power ping directly to the any ADC pin of nrf52833 ? Or it cause any damage to the ic ?
Hello,
If you wish to sample the VDD of the device, I would recommend defining a channel to monitor the VDD bus of the device, using the drivers internal define.
The SAADC peripheral example demonstrates how to setup the SAADC peripheral and have it monitor the AIN0 pin.
By changing the argument of line 153 in main.c from NRF_SAADC_INPUT_AIN0 to NRF_SAADC_INPUT_VDD you will be measuring the device VDD instead.
You will also need to make some changes to ensure that the range of the SAADC is correct with regards to the voltage you are measuring - please see the SAADC peripheral documentation's Reference section to read about how prescaling and reference choice affects available measuring range.
Bear in mind that the samples written to the serial terminal is the raw SAADC output - not scaled and converted to millivolts.
To see a demonstration of how to measure battery voltage, you could take a look at the BLE proximity peripheral example, where it is demonstrated in the battery level service update handler.
Best regards,
Karl
Hello again,
FirazAhmed said:Ty for your reply !
No problem at all, I am happy to help!
I see now that I forgot to link you the Absolute Maximum Ratings for the nRF52833 SoC, you might also benefit from seeing its POWER documentation.
Please do not hesitate to open a new ticket if you should encounter any other issues or questions.
Good luck with your development, and have a great weekend!
Best regards,
Karl