How to determine battery level

    In the past few days, I have encountered the problem of how to determine the battery level in the graduation project of my classmates. I have consulted relevant materials and online literature. Although I am still a layman, I still want to share it.

    By consulting the data, the method of determining the battery power is basically based on the relationship between the battery power and the voltage. The software determines the battery level in the following three ways.

    1. Formula method

    Through simulation to establish the relationship curve between battery power and voltage, (you can refer to the relationship curve in http://blog.sina.com.cn/s/blog_53a811100100dvwa.html ), it is not difficult to see that when the battery power is one percent From 100 to 10 percent of the time and from 10 to 10 percent of battery power to no power, there is a correlation between battery power and voltage, which is roughly linear. Therefore, we can determine the formula for the appropriate number (could be two or more) by linear regression. Then in the program, the battery capacity is calculated by the formula according to the voltage value of AD conversion. As the battery life increases, the relationship between battery capacity and voltage will also change. If you need to detect the battery power for a long time, you can also determine the formula for battery power and voltage in different service life intervals.

    This method is only suitable for roughly determining the battery capacity, and it is ok to make a graduation project.

    2. Look-up table method

    Establish a data table corresponding to the battery power and voltage through actual measurement, and then look up the table according to the voltage value converted by AD in the program to determine the battery power. If long-term detection of battery power is required, a data table corresponding to battery power and voltage in different service life intervals can also be established.

    This method can more accurately determine the battery capacity, but the process of building a meter is cumbersome.

    3. Special measurement chip

    Now there are many specialized battery power measurement chips, and most of them calculate the battery power according to voltage and various compensations. The accuracy is different and the price is very cheap. Such as FAN4010, BQ27510 and so on.

    

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324941074&siteId=291194637