Friday 12 May 2017

microcontroller - Can I estimate remaining battery life by measuring its voltage with the same MCU that it powers?


I'd like to estimate the remaining battery life of a battery that powers a microcontroller. Could I accomplish this by simply leading the battery into the MCU's built-in ADC?


My idea is that I could plot the voltage over time to figure out how much battery life remains. But would the change in voltage be noticeable? And would it be a problem that the same battery powers the MCU (and ADC)?



Answer



You can do this (assuming voltage is a predictable function of remaining life, but that's another issue) as long as there is a fixed voltage reference available in the system somewhere. Some micros have a fixed voltage reference built in, which can usually be read by the internal A/D or applied as the A/D scale. If not, you have to supply some external reference. Note that due to power consumption you may want the micro to switch on this reference only for a short time around battery readings, which don't need be very often relative to the time it takes to do a reading.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...