When powered by a lithium battery, the measurement circuit was originally designed like this...

Insert picture description here

With the development of the Internet of Things, the combination of single-chip computers and lithium batteries has become more and more common, and single-chip manufacturers have continuously introduced single-chip computers suitable for the Internet of Things.

Let me add the basic knowledge of lithium batteries...

When the lithium battery is fully charged, it is 4.2V; when it is used up, it is not 0V, but about 2.7V. The lithium batteries made by each manufacturer are slightly different...

In view of the limitations of lithium battery materials, if the voltage exceeds 4.2V, there will be dangers, such as burning; if the voltage is lower than about 2.7V, it will be impossible to recharge. In short...

Lithium battery voltage is too high or too low, will cause permanent damage, so...

When our products use lithium batteries, we need to monitor the voltage of the lithium battery at all times.

When charging, do not exceed 4.2V. This requirement requires a charging management chip to be added to the product. The charging management chip will automatically cut off charging at 4.2V.

When discharging, that is, when the product is in normal use, do not let the voltage of the lithium battery be lower than 2.7V, for example, at 2.7V, it will automatically shut down forcibly.

So, how should the lithium battery voltage monitoring circuit be designed?
Insert picture description here

As shown in the figure above, it should be the first method that beginners think of. However, after careful analysis, we will find that there are major problems, let’s analyze it...

VBAT is connected to the positive pole of the lithium battery, and connected to the ADC pin of the microcontroller through two resistor dividers. The voltage measured by the ADC is half the voltage of the lithium battery...

Because the voltage range of the lithium battery is approximately between 2.7V and 4.2V, the voltage of the ADC pin will be between 1.35~2.1V, which will not exceed the 3.3V voltage of an ordinary single-chip microcomputer. It seems reasonable, but...

When the product is turned off, we think that the lithium battery does not consume power. In fact, it can be found through the circuit that the lithium battery is actually still consuming power through two 10k resistors.··

As time goes by, the product will be reduced when the product is left, and when the battery voltage is reduced to 2.7V or less, it may not be able to charge.··

Insert picture description here

The MOS tube added here is not used to control "whether to measure the battery voltage", but to prevent the voltage of the lithium battery from passing through the two voltage dividers when the product is turned off.

At this time, there is still a problem to be solved...

During the normal use of the product, when the battery voltage is less than 3.3V, the output voltage of the LDO is no longer 3.3V. As the battery voltage decreases, the output voltage of the LDO will also decrease. At this time...

If you always use 3.3V as a reference to measure the battery voltage, an error will occur, so...

Need to use a single-chip microcomputer with a reference voltage pin, or a single-chip microcomputer with the function of "internal reference voltage" + "internal measurement channel"···

Use the reference voltage pin to calculate the battery voltage. Everyone knows this. I will focus on the function of "internal reference voltage" + "internal measurement channel".

Simply put, after having "internal reference voltage" + "internal measurement channel", we can directly obtain the accurate VDD voltage through the internal measurement channel without using a reference voltage chip, after all...

The reference voltage chip is also quite expensive, it also has to occupy a space on the circuit board, and a few cents more soldering costs...

Guess you like

Origin blog.csdn.net/sinat_41653350/article/details/108361290