I am designing a battery monitoring circuit using PIC microcontroller and CR2 Battery (Li-MnO2),
the method that i am using is based on the concept of voltage divider, However, i don't think this is the best way to do it,
can someone help me understand the concept of battery monitoring, and how i can implement it in a circuit based on a microcontroller,
and if there is a better method to do it.
hi A,
As the voltage of a single CR2 cell is approx 3v, if you power the PIC from 5v, there is no need for a resistive divider for the ADC input.?
The input leakage current of a PIC's ADC input is in the order of 500nA.
hi A,
As the voltage of a single CR2 cell is approx 3v, if you power the PIC from 5v, there is no need for a resistive divider for the ADC input.?
The input leakage current of a PIC's ADC input is in the order of 500nA.
Hi ESP 1,
Thank you for your answer,
the power source of the system is CR2 3v battery, the microcontroller is operating on 3v battery,
However, if it possible for you, could you please explain what you are suggesting in a more detail, and how can i implement such method
hi A,
I assume that your CR2 battery monitor is going to be monitoring only the discharge voltage of a external CR2 and not a external CR2 being monitored also during a charge cycle.??
If that is discharge only of an external battery, then powering the PIC with its own CR2 will not be a problem, no voltage divider is required.
Note: if the monitoring is for the CR2 powering the PIC, you will require a fixed Vref for the ADC, as the PIC's ADC is ratiometric.
This means that as the CR2 battery voltage falls during discharge , so will the PIC's internal Vref will and it will always indicate the maximum voltage.
So a fixed Vref is required, say a 2.5Vref source.
This will then mean some form of divider for the PIC's ADC input from the CR2
Do you follow OK.?
Please confirm which battery is being monitored and if its being charged during monitoring.
E
But please note, that the system contains only 1 battery,
the battery is feeding the microcontroller and everything else,
I need to monitor the level of that one battery,
i think that the reference method will not be option, please correct me if i am wrong, and recommend me a better solution ,
I was thinking that maybe the problem with the voltage divider is that the reading may not be accurate, especially when driving a motor load,
Second, how can i measure the capacity of the battery by reading its voltage level,
Why not, particularly? To monitor the battery level, you measure it against an external or internal reference voltage. It's often appropriate to exchange the role of ADC input and reference voltage in this case, instead of measuring Vbat/Vref, you can measure Vref/Vbat by connecting Vbat(usually = Vdd) as ADC reference and Vref as ADC input. Many newer PIC controllers have a built-in band gap reference, e.g. 1.2 V.
It's often appropriate to exchange the role of ADC input and reference voltage in this case, instead of measuring Vbat/Vref, you can measuring Vref/Vbat by connecting Vbat(usually = Vdd) as ADC reference and Vref as ADC input. Many newer PIC controllers have a built-in band gap reference, e.g. 1.2 V.
@Atarek
Actually this procedure diverges somewhat from the standard method, and coincidentally recently I broke my mind to understand the circuit of a portable equipment based on the PIC microcontroller which I was examining that used exactly that approach mentioned above, so it's fine to do that.