Method and system for self-making battery curve data based on MTK platform

文档序号:1200229 发布日期:2020-09-01 浏览:4次 中文

阅读说明:本技术 一种基于mtk平台自制电池曲线数据方法及系统 (Method and system for self-making battery curve data based on MTK platform ) 是由 马保军 范德业 张龙 张振林 郭炎军 于 2020-06-09 设计创作,主要内容包括:本发明提供一种基于MTK平台自制电池曲线数据方法及系统,属于电池测试领域。本发明基于MTK平台自制电池曲线数据方法,包括如下步骤:开机,读取设定分区中的客制化位置信息中的数据;如果存在客制化数据信息,根据客制化数据进入对应的工作模式;分别进行自动校准电流补偿参数、充电模式或放电模式;读取设定分区中自制电池曲线相关的数据,处理成需要的数据格式并导出。本发明的有益效果为:低成本,高效率,操作简单,全自动化。(The invention provides a method and a system for self-making battery curve data based on an MTK platform, and belongs to the field of battery testing. The invention discloses a self-made battery curve data method based on an MTK platform, which comprises the following steps: starting up, reading data in the customized position information in the set partition; if the customized data information exists, entering a corresponding working mode according to the customized data; respectively carrying out automatic calibration on a current compensation parameter, a charging mode or a discharging mode; and reading data related to the self-made battery curve in the set partition, processing the data into a required data format and exporting the data. The invention has the beneficial effects that: low cost, high efficiency, simple operation and full automation.)

1. A self-made battery curve data method based on an MTK platform is characterized by comprising the following steps:

s1: starting up, reading the data in the customized information position in the subarea;

s2: judging whether customized information data exist or not, if not, normally starting up the computer, and if so, entering a corresponding working mode according to a mode bit in the customized data;

s3: if the mode bit of the customized data is the set value of the mode one, automatically calibrating the current compensation parameter, completing the calibration, setting the mode bit of the customized data as the set value of the mode two, shutting down the device, and then executing the step S1;

if the mode bit of the customized data is the set value of the mode two, entering a charging mode, finishing charging, setting the mode bit of the customized data to be the set value of the mode three, setting the timing for 30 minutes, then executing the step S1, and shutting down;

and if the mode bit of the customized data is the mode three set value, entering a discharging mode until the open-circuit voltage is less than the set voltage, finishing discharging and shutting down.

S4: reading the data related to the curve of the self-made battery in the set subarea, processing the data into a required data format and exporting the data,

wherein, the discharge mode comprises the following processing procedures:

(1) reading an open circuit voltage OCV before starting up stored in a power management chip pmic;

(2) judging whether the open-circuit voltage OCV is smaller than a set voltage, if not, finishing discharging, and if so, adjusting the backlight in real time to maintain the current at 400 ma;

(3) after the discharge setting time, recording the closed circuit voltage, the discharge current and the coulomb quantity at the moment;

(4) after the set timing is 30 minutes, step S1 is executed to shut down the device.

2. The MTK platform-based homemade battery curve data method of claim 1, which is characterized in that: in step S1, the MTK platform motherboard 1k is read.

3. The MTK platform-based homemade battery curve data method of claim 1, which is characterized in that: in step S3, the processing method for automatically calibrating the current compensation parameter includes:

(1) a hardware environment is built, one end of a resistor rfg of a mainboard is connected with the cathode of a battery, the other end of the resistor rfg of the mainboard is connected with a system ground, the anode of the battery is connected with the anode of a 4V power supply, the cathode of the battery is connected with the cathode of a constant current source, and the cathode of the 4V power supply and the anode of the constant current source are both connected with the system ground;

(2) adjusting the current Icc of the constant current source at 500 ma;

(3) the power management chip pmic reads the current Ibat0 flowing through the resistor rfg;

(4) setting an initial VALUE of a calibration parameter CAR _ TUNE _ VALUE to be 1000, and setting a calibrated current Ibat so that Icc (Ibat) (Ibat 0) CAR _ TUNE _ VALUE/1000;

(5) determining whether Ibat is greater than Icc, if yes, CAR _ TUNE _ VALUE-1, if no, CAR _ TUNE _ VALUE +1, and then looping through step (5) until Ibat is greater than Icc;

(6) and recording the VALUE of the calibration parameter CAR _ TUNE _ VALUE, writing the VALUE into the set partition, and then shutting down.

4. The MTK platform-based homemade battery curve data method of claim 3, which is characterized in that: and (4) after the power is turned on, repeatedly executing the steps (1) to (6) for a set number of times, and taking the average VALUE of the calibration parameter CAR _ TUNE _ VALUE VALUE recorded each time as a final current compensation parameter.

5. The MTK platform-based homemade battery curve data method of claim 1, which is characterized in that: the processing procedure of the charging mode comprises the following steps:

(1) configuring charging parameters according to customized battery information, wherein the charging parameters comprise high/low voltage charging, charging current and cut-off charging current;

(2) discharging the battery at constant current until the voltage of the battery is smaller than the voltage value set by the mode II;

(3) constant-current charging, namely changing constant-voltage charging into constant-current charging until the electric quantity of the battery exceeds a set threshold;

(4) when the charging current is smaller than the cut-off charging current, the battery is considered to be fully charged, and the charging is finished;

(5) after the set timing is 30 minutes, step S1 is executed to shut down the device.

6. The MTK platform-based homemade battery curve data method of claim 5, which is characterized in that: after full charge, the RTC clock chip is powered on after 30 minutes, the open-circuit voltage ocv before the RTC clock chip is powered on after 30 minutes is stored in a register of the power management chip pmic, the open-circuit voltage ocv is read and stored after the RTC clock chip is powered on, and then the coulometer is initialized.

7. A system for realizing the self-made battery curve data method based on the MTK platform according to any one of claims 1 to 6, which is characterized in that: the system comprises a mainboard, a display screen and an incubator, wherein the mainboard is provided with an MTK platform, the display screen is connected with the mainboard, the mainboard and the display screen are arranged in the incubator, the mainboard is provided with a customized tool for self-making battery curve data, the mainboard further comprises a power management chip, a charging chip, a clock chip and a setting partition, and the power management chip is used for measuring battery open-circuit voltage, battery closed-circuit voltage, battery discharge current and battery capacity; the charging chip is used for battery charging management and charging current control; the clock chip is used for timing on-off; the setting partition is used for storing data required by the customized program.

8. The system of claim 7, wherein: the customization tool includes:

customizing a bin file: the device is used for selecting a setting partition as a carrier for storing data, and writing customized data at a specific position;

reading and writing partition interface functions: the system comprises a storage unit, a data acquisition unit and a data processing unit, wherein the storage unit is used for storing customized data of a specific position and storing battery data measured in a discharging process;

the screen displays information: the display device is used for displaying information to be displayed in real time, and comprises the voltage, the charging and discharging current, the accumulated capacity and the recorded data of a battery;

test small program: for running an auto-calibration current compensation parameter, a charging mode or a discharging mode;

data export and processing function: and the data related to the self-made battery curve in the set partition is processed into a required data format and is exported.

Technical Field

The invention relates to the field of battery testing, in particular to a method and a system for self-making battery curve data based on an MTK platform.

Background

Battery power is a critical piece of information in mobile smart devices (cell phones/tablets) and its accuracy depends on battery curve data. Currently, there are 3 approaches to acquiring battery curve data:

1. supplied by the battery manufacturer;

2. sending the sample to a platform for business help;

3. companies purchase specialized instruments to make.

Among them, most of the battery curve data provided by the battery manufacturers (especially the battery manufacturers) are inaccurate and undesirable in practical applications. As a scheme company, a plurality of projects are provided, a large number of batteries need debugging, and the problem that the batteries are sent to a platform provider is not practical. Although a professional instrument is used for manufacturing a relatively accurate profile, the purchase price of the professional instrument recommended by the MTK is more than 3 thousands of cells, the standard manufacturing period of one battery is about 20 days, and most scheme companies do not purchase the instrument specially to manufacture the instrument in consideration of time and cost.

Based on the background, a scheme for acquiring battery curve data relatively accurately, with low cost and high efficiency is born.

Disclosure of Invention

In order to solve the problems in the prior art, the invention provides a method and a system for self-making battery curve data based on an MTK platform.

The invention discloses a self-made battery curve data method based on an MTK platform, which comprises the following steps:

s1: starting up, reading the data in the customized information position in the subarea;

s2: judging whether customized information data exist or not, if not, normally starting up the computer, and if so, entering a corresponding working mode according to a mode bit in the customized data;

s3: if the mode bit of the customized data is the set value of the mode one, automatically calibrating the current compensation parameter, completing the calibration, setting the mode bit of the customized data as the set value of the mode two, shutting down the device, and then executing the step S1;

if the mode bit of the customized data is the set value of the mode two, entering a charging mode, finishing charging, setting the mode bit of the customized data to be the set value of the mode three, setting the timing for 30 minutes, then executing the step S1, and shutting down;

and if the mode bit of the customized data is the mode three set value, entering a discharging mode until the open-circuit voltage is less than the set voltage, finishing discharging and shutting down.

S4: reading the data related to the curve of the self-made battery in the set subarea, processing the data into a required data format and exporting the data,

wherein, the discharge mode comprises the following processing procedures:

(1) reading an open circuit voltage OCV before starting up stored in a power management chip pmic;

(2) judging whether the open-circuit voltage OCV is smaller than a set voltage, if not, finishing discharging, and if so, adjusting the backlight in real time to maintain the current at 400 ma;

(3) after the discharge setting time, recording the closed circuit voltage, the discharge current and the coulomb quantity at the moment;

(4) after the set timing is 30 minutes, step S1 is executed to shut down the device.

The present invention is further improved, in step S1, reading is performed at the stage of the MTK platform motherboard 1 k.

The present invention further improves, in step S3, the processing method for automatically calibrating the current compensation parameter includes:

(1) a hardware environment is built, one end of a resistor rfg of a mainboard is connected with the cathode of a battery, the other end of the resistor rfg of the mainboard is connected with a system ground, the anode of the battery is connected with the anode of a 4V power supply, the cathode of the battery is connected with the cathode of a constant current source, and the cathode of the 4V power supply and the anode of the constant current source are both connected with the system ground;

(2) adjusting the current Icc of the constant current source at 500 ma;

(3) the power management chip pmic reads the current Ibat0 flowing through the resistor rfg;

(4) setting an initial VALUE of a calibration parameter CAR _ TUNE _ VALUE to be 1000, and setting a calibrated current Ibat so that Icc (Ibat) (Ibat 0) CAR _ TUNE _ VALUE/1000;

(5) determining whether Ibat is greater than Icc, if yes, CAR _ TUNE _ VALUE-1, if no, CAR _ TUNE _ VALUE +1, and then looping through step (5) until Ibat is greater than Icc;

(6) and recording the VALUE of the calibration parameter CAR _ TUNE _ VALUE, writing the VALUE into the set partition, and then shutting down.

The invention is further improved, after the power is turned on, after the steps (1) to (6) are repeatedly executed for the set times, the average VALUE of the calibration parameter CAR _ TUNE _ VALUE VALUE recorded each time is taken as the final current compensation parameter.

The invention is further improved, and the processing process of the charging mode comprises the following steps:

(1) configuring charging parameters according to customized battery information, wherein the charging parameters comprise high/low voltage charging, charging current and cut-off charging current;

(2) discharging the battery at constant current until the voltage of the battery is smaller than the voltage value set by the mode II;

(3) constant-current charging, namely changing constant-voltage charging into constant-current charging until the electric quantity of the battery exceeds a set threshold;

(4) when the charging current is smaller than the cut-off charging current, the battery is considered to be fully charged, and the charging is finished;

(5) after the set timing is 30 minutes, step S1 is executed to shut down the device.

The invention is further improved, after full charge, the RTC clock chip is shut down and set to start up after 30 minutes, the open-circuit voltage ocv before starting up after 30 minutes is stored in a register of the power management chip pmic, the open-circuit voltage ocv is read and stored after starting up, and then the coulometer is initialized.

The invention also provides a system for realizing the method for self-making the battery curve data based on the MTK platform, which comprises a mainboard provided with the MTK platform, a display screen and a warm box, wherein the mainboard is connected with the display screen, the mainboard and the display screen are arranged in the warm box, the mainboard is provided with a customized tool for self-making the battery curve data, the mainboard further comprises a power management chip, a charging chip, a clock chip and a setting partition, wherein the power management chip is used for measuring the open-circuit voltage of the battery, the closed-circuit voltage of the battery, the discharging current of the battery and the capacity of the battery; the charging chip is used for battery charging management and charging current control; the clock chip is used for timing on-off; the setting partition is used for storing data required by the customized program.

In a further refinement of the present invention, the customization tool comprises:

customizing a bin file: the device is used for selecting a setting partition as a carrier for storing data, and writing customized data at a specific position;

reading and writing partition interface functions: the system comprises a storage unit, a data acquisition unit and a data processing unit, wherein the storage unit is used for storing customized data of a specific position and storing battery data measured in a discharging process;

the screen displays information: the display device is used for displaying information to be displayed in real time, and comprises the voltage, the charging and discharging current, the accumulated capacity and the recorded data of a battery;

test small program: for running an auto-calibration current compensation parameter, a charging mode or a discharging mode;

data export and processing function: and the data related to the self-made battery curve in the set partition is processed into a required data format and is exported.

Compared with the prior art, the invention has the beneficial effects that: the cost is low, the battery curve can be measured by using the machine, and the cost for buying special instruments is saved; the method has the advantages of high efficiency, simple operation and full automation, and the derived data format is the format required by the code; the method is relatively more accurate, and the result is theoretically more accurate because the hardware environment of the data measuring process is the same as the hardware environment of the machine in use, namely the hardware environment is taken from the mainboard and used as the mainboard.

Drawings

FIG. 1 is a flow chart of a measurement method provided by MTK;

FIG. 2 is a flow chart of a method according to an embodiment of the present invention;

FIG. 3 is a block diagram of a test tool according to the present invention;

FIG. 4 is a schematic diagram of a method for calculating the internal resistance of a battery;

FIG. 5 is a diagram of a hardware environment for calibrating current compensation parameters;

fig. 6 is a schematic diagram of data processing.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples.

The information in the battery curve data includes:

battery voltage and internal resistance, battery voltage and current percentages, and capacity at different temperatures.

To make a battery curve, the data that needs to be measured are: battery open circuit voltage, battery closed circuit voltage, battery discharge current, battery capacity.

The required auxiliary peripherals include: a charge management chip (rechargeable high/low voltage battery), controllable charge and discharge current, a display (displaying state information), a timer (realizing timing on/off automation), controllable ambient temperature (used for measuring battery curves at different temperatures), a carrier for storing data, and an algorithm for processing data.

The self-made battery curve data is realized by adopting the self-contained resources on the MTK platform mainboard. Specifically, the motherboard resource includes: the device comprises a power management chip pmic, a charging chip, a clock chip RTC and a setting partition, wherein the power management chip is used for measuring the open-circuit voltage of a battery, the closed-circuit voltage of the battery, the discharging current of the battery and the capacity of the battery; the charging chip is used for battery charging management and charging current control; the clock chip RTC is used for being responsible for timing on-off; the setting partition is used for storing data required by the customized program. The unique feature of this embodiment is that customized tools are provided on the motherboard for self-manufacturing the battery curve data.

There is also a need for an auxiliary peripheral comprising:

a display screen: the LED display is connected to the mainboard, the discharge current is controllable by using the backlight intensity, and meanwhile, the state information can be displayed;

a temperature box: providing a controlled ambient temperature.

Therefore, the test equipment in this example is a motherboard using a flat panel, and the replay function used in the method is a function attached to the MTK download tool and only reads out the partition.

According to the measurement process provided by the MTK (detailed figure 1), the invention executes a small program for making a battery curve, and the test tool running environment of the embodiment is selected in an lk (boot program for Android startup of the MTK platform), and is initialized to a stage which has the lowest possible and controllable power consumption after necessary modules (a power management chip pmic, an LCD display module lcm, a charging chip charging ic and a partition initialization init) are initialized. The software is shown in fig. 3, and will be described in detail below.

1. Customized bin file

And (3) selecting to modify the logo subarea, writing customized data in a specific position of a logo.

2. Read-write partition interface function

The device is used for reading and writing logo subareas, reading customized data at a specific position and writing and recording battery data measured in the discharging process.

3. Screen display information

And displaying information needing to be prompted, such as the voltage, the charging and discharging current, the accumulated capacity, the recorded data and the like of the battery in real time.

"Small program"

The small program comprises: and automatically calibrating the current compensation parameters, the charging mode and the discharging mode. And after the computer is started, the computer can enter a corresponding program according to the customized data.

5. Data export and processing functions

And the data related to the self-made battery curve in the set partition is processed into a required data format and is exported.

As shown in fig. 2, the method for self-preparing battery curve data based on the MTK platform of the present embodiment includes the following steps:

s1: starting up, and reading data in the customized position information in the logo partition at the 1k stage;

s2: judging whether customized data information exists or not, if not, normally starting up the computer, and if so, entering a corresponding working mode according to a mode bit in the customized data;

s3: if the customized data mode bit value is 0, automatically calibrating the current compensation parameter, completing calibration, setting the customized data to be 1, shutting down, and then executing the step S1 to prepare for entering a charging mode;

if the customized data mode bit value is 1, entering a charging mode, finishing charging, setting the customized data to be 2, setting the timing to be 30 minutes, then executing step S1, shutting down, and preparing to enter a discharging mode;

and if the customized data mode bit value is 2, entering a discharging mode until the open-circuit voltage is less than the set voltage, finishing discharging and shutting down.

S4: and reading data related to the self-made battery curve in the set partition, processing the data into a required data format and exporting the data.

Specifically, in step S3, the auto-calibrating current compensation parameter of the present example is automatically calibrated and averaged a plurality of times. The processing method for automatically calibrating the current compensation parameter comprises the following steps:

(1) a hardware environment shown in fig. 5 is set up, so that one end of the resistor rfg of the mainboard is connected with the cathode of the battery, the other end is connected with the system ground, the anode of the battery is connected with the anode of the 4V power supply, the cathode of the battery is connected with the cathode of the constant current source, and the cathode of the 4V power supply and the anode of the constant current source are both connected with the system ground;

(2) adjusting the current Icc of the constant current source at 500 ma;

(3) the power management chip pmic reads the current Ibat0 flowing through the resistor rfg;

(4) setting an initial VALUE of a calibration parameter CAR _ TUNE _ VALUE to be 1000, and setting a calibrated current Ibat so that Icc (Ibat) (Ibat 0) CAR _ TUNE _ VALUE/1000;

(5) determining whether Ibat is greater than Icc, if yes, CAR _ TUNE _ VALUE-1, if no, CAR _ TUNE _ VALUE +1, and then looping through step (5) until Ibat is greater than Icc;

(6) and recording the VALUE of the calibration parameter CAR _ TUNE _ VALUE, writing the VALUE into the set partition, and then shutting down.

And (4) after the steps (1) to (6) are repeatedly executed for 5 times, taking the average VALUE of the calibration parameter CAR _ TUNE _ VALUE VALUE recorded each time as the final current compensation parameter.

The processing procedure of the charging mode comprises the following steps:

(1) configuring charging parameters according to customized battery information, wherein the charging parameters comprise high/low voltage charging, charging current and cut-off charging current;

(2) discharging the battery at constant current until the voltage of the battery is smaller than the voltage value set by the mode II;

(3) constant-current charging, namely changing constant-voltage charging into constant-current charging until the electric quantity of the battery exceeds a set threshold;

(4) when the charging current is smaller than the cut-off charging current, the battery is considered to be fully charged, and the charging is finished;

(5) after the set timing is 30 minutes, step S1 is executed to shut down the device.

After full charge, the RTC clock chip is powered on after 30 minutes, the open-circuit voltage ocv before the RTC clock chip is powered on after 30 minutes is stored in a register of the power management chip pmic, the open-circuit voltage ocv is read and stored after the RTC clock chip is powered on, and then the coulometer is initialized.

The discharge mode comprises the following processing procedures:

during the discharging process, the screen starts to display the related information of the battery and the recorded data, and simultaneously, the discharging current is adjusted in real time by utilizing the addition and subtraction of the backlight value, so that the discharging current is maintained at 400 ma. The relationship between the time Δ t of each discharge cycle, the nominal capacity Q, and the number n of discharges is: and delta t is Q/n/400. After the discharge time delta t, the shutdown is prepared, and the preparation work comprises the following steps: starting up the RTC after setting the timing of the RTC for 30 minutes, and storing the coulomb quantity delta q accumulated in delta t time, and the closed-circuit voltage ccv and the discharge current i at the moment before the RTC is turned off. After the preparation is completed, the computer is shut down, and waits for the next startup, and the process is circulated until the battery voltage is less than 3.4v (in fig. 1, the battery voltage is less than 2.8v, and in actual use, only data of more than 3.4v are used, so that the voltage is set to 3.4 v).

The data exporting and processing method comprises the following steps:

and reading the logo partition data by using a readback function of the MTK machine tool after discharging. Fig. 4 shows a method for calculating the internal resistance of the battery, where V2 is an open-circuit voltage, V1 is a closed-circuit voltage, and the internal resistance r of the battery is (V2-V1)/400 ma. The actual total capacity Q of the battery is equal to the sum of the cumulative coulomb quantities Δ Q per discharge, and is processed by a series of algorithms, as shown in fig. 6, so that the battery curve data in the device tree format used in the kernel driver can be finally derived.

The operation process of the invention is as follows:

1. connecting a main board, a battery and a screen, and burning the modified lk and the customized logo subarea;

2. the access circuit is used for calibrating current compensation parameters according to the figure 5, and the charger is pulled out after the charging is completed after the calibration;

3. standing for 30 minutes, then automatically starting up, entering a discharging program, and only waiting for discharging;

4. reading back each group of logo subareas after discharging, wherein the content of each logo subarea comprises battery data measured in the whole discharging process, and a battery curve file used in a driver can be exported after script processing;

several sets of main boards, batteries and display screens can be prepared, the result is processed averagely, the accuracy is improved, and if data with different temperatures are needed, the data are measured only by being placed in a temperature box with the adjusted temperature.

The invention has the following outstanding advantages:

1. the cost is low. The battery curve can be measured by using the machine, so that the cost for buying a professional instrument is saved;

2. high efficiency. The operation is simple and full-automatic, and the exported data format is the format required by the code;

3. is relatively more accurate. Because the hardware environment of the data measuring process is the same as that of the machine in use, the result is theoretically more accurate because the hardware environment is 'taken from the mainboard and used as the mainboard'.

The above-described embodiments are intended to be illustrative, and not restrictive, of the invention, and all changes that come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种锂离子电池充电产热来源的估算方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类