CN108254697B - Battery type detection method, detection terminal and storage medium - Google Patents

Battery type detection method, detection terminal and storage medium Download PDF

Info

Publication number
CN108254697B
CN108254697B CN201810024681.3A CN201810024681A CN108254697B CN 108254697 B CN108254697 B CN 108254697B CN 201810024681 A CN201810024681 A CN 201810024681A CN 108254697 B CN108254697 B CN 108254697B
Authority
CN
China
Prior art keywords
battery
detected
value
temperature
current voltage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810024681.3A
Other languages
Chinese (zh)
Other versions
CN108254697A (en
Inventor
宾华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Chuanying Information Technology Co Ltd
Original Assignee
Shanghai Spreadrise Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Spreadrise Technologies Co Ltd filed Critical Shanghai Spreadrise Technologies Co Ltd
Priority to CN201810024681.3A priority Critical patent/CN108254697B/en
Publication of CN108254697A publication Critical patent/CN108254697A/en
Application granted granted Critical
Publication of CN108254697B publication Critical patent/CN108254697B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/36Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC]

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Secondary Cells (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The invention discloses a battery type detection method, a detection terminal and a storage medium, wherein when the detection terminal detects that a battery to be detected is in a charging state, the detection terminal reads a current voltage value on a temperature detection pin of the battery to be detected, converts the current voltage value according to a preset mapping relation to obtain a target temperature value corresponding to the current voltage value, judges whether the target temperature value is within a preset temperature range or not, determines the type of the battery to be detected according to a judgment result, judges the type of the battery to be detected according to whether the temperature value of the battery to be detected is within the preset temperature range or not, can improve the speed and efficiency for identifying the type of the battery to be detected, improve the accuracy for identifying the type of the battery to be detected, reduce the software versions required for identifying batteries of different types and specifications, and reduce the cost of software development, and the user experience is improved.

Description

Battery type detection method, detection terminal and storage medium
Technical Field
The present invention relates to the field of mobile communications, and in particular, to a battery type detection method, a detection terminal, and a storage medium.
Background
The mobile phone has become an indispensable communication tool in daily life, and the battery is one of the most important parts for manufacturing the mobile phone, and at present, there are two types of batteries with different specifications, namely, a battery with Negative Temperature Coefficient (NTC) and a battery without NTC, and because there is a certain difference in price between the batteries and the standard of the mobile phone battery in different countries, the batteries with the two specifications are often required to be switched and matched. It is now common that different battery specifications, i.e. with NTC battery and without NTC battery, respectively, are made into one software version, but this increases the software version, which results in more software version management being added during factory production, after-market maintenance and development by software engineers. Therefore, a detection scheme which can identify batteries with different specifications by only one uniform software version is urgently needed.
Disclosure of Invention
The invention mainly aims to provide a battery type detection method, a detection terminal and a storage medium, and aims to solve the technical problems that in the prior art, different software versions are needed for identifying batteries with different specifications, so that the software development cost is high, and the after-sale maintenance is complex.
In order to achieve the above object, the present invention provides a battery type detection method, including the steps of:
when the detection terminal detects that the battery to be detected is in a charging state, reading a current voltage value on a temperature detection pin of the battery to be detected;
converting the current voltage value according to a preset mapping relation to obtain a target temperature value corresponding to the current voltage value;
and judging whether the target temperature value is within a preset temperature range, and determining the type of the battery to be detected according to a judgment result.
Preferably, the determining whether the target temperature value is within a preset temperature range and determining the type of the battery to be detected according to the determination result specifically includes:
judging whether the target temperature value is within the preset temperature range or not;
when the judgment result is that the target temperature value is within the preset temperature range, judging that the battery to be detected is an NTC detection functional battery;
and when the judgment result shows that the target temperature value is not within the preset temperature range, judging that the battery to be detected is a non-NTC detection function battery.
Preferably, when the detection terminal detects that the battery to be detected is in a charging state, before reading a current voltage value on a temperature detection pin of the battery to be detected, the battery type detection method further includes:
and identifying the pins of the battery to be detected, selecting a target pin from the identified pins, and using the target pin as the battery temperature detection pin.
Preferably, the converting the current voltage value according to the preset mapping relationship to obtain the target temperature value corresponding to the current voltage value specifically includes:
when the current voltage value is read, generating a starting conversion instruction;
and starting an analog-to-digital converter according to the starting conversion instruction so that the analog-to-digital converter converts the current voltage value according to the preset mapping relation, converts the current voltage value into a corresponding temperature value, and takes the temperature value as the target temperature value.
Preferably, before the starting an analog-to-digital converter according to the starting conversion instruction so that the analog-to-digital converter converts the current voltage value according to the preset mapping relationship, converts the current voltage value into a corresponding temperature value, and takes the temperature value as the target temperature value, the method for detecting a battery type further includes:
and acquiring the preset mapping relation according to a preset temperature conversion algorithm, wherein the preset mapping relation is used for reflecting the mapping relation between the voltage and the temperature.
Preferably, before the obtaining the preset mapping relationship according to a preset temperature conversion algorithm, and the preset mapping relationship is used to reflect a mapping relationship between voltage and temperature, the method for detecting a battery type further includes:
acquiring a change vector point cluster of temperature and resistance values, fitting the change vector point cluster, and generating a temperature and resistance value change curve chart;
and obtaining a functional relation between the temperature and the resistance value according to the temperature and resistance value change curve graph, and taking the functional relation as the preset temperature conversion algorithm.
Preferably, after the current voltage value is converted according to the preset mapping relationship and the target temperature value corresponding to the current voltage value is obtained, the method for detecting the battery type further includes:
acquiring current test environment parameters, and calculating a temperature fine adjustment difference value according to the current test environment parameters;
and carrying out fine adjustment on the target temperature value according to the temperature fine adjustment difference value, and taking the target temperature value subjected to fine adjustment as a new target temperature value.
Preferably, when the detection terminal detects that the battery to be detected is in a charging state, before reading a current voltage value on a temperature detection pin of the battery to be detected, the battery type detection method further includes:
when a detection instruction is obtained, obtaining the physical interface state of the current mobile terminal corresponding to the battery to be detected and the level change value of the battery to be detected according to the detection instruction;
and judging whether the battery to be detected is in a charging state or not according to the physical interface state and the level change value.
In addition, to achieve the above object, the present invention further provides a detection terminal, including: a memory, a processor and a battery type detection program stored on the memory and executable on the processor, the battery type detection program being configured to implement the steps of the battery type detection method as described above.
Furthermore, to achieve the above object, the present invention also proposes a storage medium having a battery type detection program stored thereon, which when executed by a processor implements the steps of the battery type detection method as described above.
According to the battery type detection method provided by the invention, when the detection terminal detects that the battery to be detected is in a charging state, the current voltage value on the temperature detection pin of the battery to be detected is read, the current voltage value is converted according to a preset mapping relation, a target temperature value corresponding to the current voltage value is obtained, whether the target temperature value is within a preset temperature range is judged, the type of the battery to be detected is determined according to a judgment result, and the type of the battery to be detected is judged according to whether the temperature value of the battery to be detected is within the preset temperature range.
Drawings
Fig. 1 is a schematic structural diagram of a detection terminal of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a first embodiment of a battery type detection method according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a method for detecting battery type according to the present invention;
fig. 4 is a flowchart illustrating a battery type detecting method according to a third embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The solution of the embodiment of the invention is mainly as follows: the invention reads the current voltage value on the temperature detection pin of the battery to be detected when the battery to be detected is detected to be in a charging state through the detection terminal, converts the current voltage value according to the preset mapping relation, obtains the target temperature value corresponding to the current voltage value, judges whether the target temperature value is in the preset temperature range or not, determines the type of the battery to be detected according to the judgment result, judges the type of the battery to be detected according to whether the temperature value of the battery to be detected is in the preset temperature range or not, can improve the speed and efficiency for identifying the type of the battery to be detected, improves the accuracy for identifying the type of the battery to be detected, reduces the software versions required for identifying the batteries with different types and specifications, reduces the cost for software development, improves the user experience, and solves the problem that the prior art needs different software versions for identifying the batteries with, the technical problems of high software development cost and complex after-sale maintenance are caused.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a detection terminal of a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the detection terminal may include: a processor 1001, such as a CPU, a communication bus 1002, a user side interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration of the test terminals shown in FIG. 1 is not intended to be limiting of the test terminals and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, the memory 1005, which is a storage medium, may include an operating system, a network communication module, a client interface module, and a battery type detection program.
The detection terminal of the present invention calls the battery type detection program stored in the memory 1005 through the processor 1001, and performs the following operations:
when the detection terminal detects that the battery to be detected is in a charging state, reading a current voltage value on a temperature detection pin of the battery to be detected;
converting the current voltage value according to a preset mapping relation to obtain a target temperature value corresponding to the current voltage value;
and judging whether the target temperature value is within a preset temperature range, and determining the type of the battery to be detected according to a judgment result.
Further, the processor 1001 may call the battery type detection program stored in the memory 1005, and also perform the following operations:
judging whether the target temperature value is within the preset temperature range or not;
when the judgment result is that the target temperature value is within the preset temperature range, judging that the battery to be detected is an NTC detection functional battery;
and when the judgment result shows that the target temperature value is not within the preset temperature range, judging that the battery to be detected is a non-NTC detection function battery.
Further, the processor 1001 may call the battery type detection program stored in the memory 1005, and also perform the following operations:
and identifying the pins of the battery to be detected, selecting a target pin from the identified pins, and using the target pin as the battery temperature detection pin.
Further, the processor 1001 may call the battery type detection program stored in the memory 1005, and also perform the following operations:
when the current voltage value is read, generating a starting conversion instruction;
and starting an analog-to-digital converter according to the starting conversion instruction so that the analog-to-digital converter converts the current voltage value according to the preset mapping relation, converts the current voltage value into a corresponding temperature value, and takes the temperature value as the target temperature value.
Further, the processor 1001 may call the battery type detection program stored in the memory 1005, and also perform the following operations:
and acquiring the preset mapping relation according to a preset temperature conversion algorithm, wherein the preset mapping relation is used for reflecting the mapping relation between the voltage and the temperature.
Further, the processor 1001 may call the battery type detection program stored in the memory 1005, and also perform the following operations:
acquiring a change vector point cluster of temperature and resistance values, fitting the change vector point cluster, and generating a temperature and resistance value change curve chart;
and obtaining a functional relation between the temperature and the resistance value according to the temperature and resistance value change curve graph, and taking the functional relation as the preset temperature conversion algorithm.
Further, the processor 1001 may call the battery type detection program stored in the memory 1005, and also perform the following operations:
acquiring current test environment parameters, and calculating a temperature fine adjustment difference value according to the current test environment parameters;
and carrying out fine adjustment on the target temperature value according to the temperature fine adjustment difference value, and taking the target temperature value subjected to fine adjustment as a new target temperature value.
Further, the processor 1001 may call the battery type detection program stored in the memory 1005, and also perform the following operations:
when a detection instruction is obtained, obtaining the physical interface state of the current mobile terminal corresponding to the battery to be detected and the level change value of the battery to be detected according to the detection instruction;
and judging whether the battery to be detected is in a charging state or not according to the physical interface state and the level change value.
According to the scheme, when the detection terminal detects that the battery to be detected is in the charging state, the current voltage value on the temperature detection pin of the battery to be detected is read, the current voltage value is converted according to the preset mapping relation, the target temperature value corresponding to the current voltage value is obtained, whether the target temperature value is within the preset temperature range is judged, the type of the battery to be detected is determined according to the judgment result, and the type of the battery to be detected is judged according to whether the temperature value of the battery to be detected is within the preset temperature range, so that the speed and the efficiency for identifying the type of the battery to be detected can be improved, the accuracy for identifying the type of the battery to be detected is improved, the software versions required for identifying the batteries with different types and specifications are reduced, the cost of software development is.
Based on the hardware structure, the embodiment of the battery type detection method is provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of a battery type detection method according to the present invention.
In a first embodiment, the battery type detection method includes the steps of:
step S10, when the detection terminal detects that the battery to be detected is in a charging state, reading the current voltage value on the temperature detection pin of the battery to be detected;
it should be noted that the detection terminal may be a terminal device with a battery detection function, a fixed desktop personal computer, a testing machine, a movable notebook computer, a tablet computer, a mobile terminal device, or other terminal devices with a battery detection function, which is not limited in this embodiment; the battery to be detected is a battery to be detected and identified in type specification, when the battery to be detected is in the charging state, the current voltage value on the temperature detection pin of the battery to be detected can be read through the detection terminal, the temperature detection pin of the battery to be detected is a target pin selected from pins outside the positive and negative pins of the battery to be detected and serves as the temperature detection pin, and the voltage value on the temperature detection pin of the battery to be detected is read and serves as the current voltage value.
It is understood that the battery to be detected may be a lithium battery, a nickel-metal hydride battery, or other types of batteries, which is not limited in this embodiment; the battery to be detected generally has four pins, that is, a positive electrode pin, a Negative electrode pin, an identification ID pin, and a Negative Temperature Coefficient (NTC) pin of the battery, and may also include other types of pins that are more or less than the above-mentioned example, which is not limited in this embodiment.
Accordingly, before the step S10, the battery type detecting method further includes the steps of:
and identifying the pins of the battery to be detected, selecting a target pin from the identified pins, and using the target pin as the battery temperature detection pin.
It should be understood that the temperature detection pin of the battery to be detected selects a target pin from pins outside the positive electrode and the negative electrode of the battery to be detected as the temperature detection pin, may use an NTC pin end of the battery to be detected as the temperature detection pin, may select a preset target pin from pins outside the positive electrode and the negative electrode of the battery to be detected as the temperature detection pin, and certainly, the temperature detection pin of the battery to be detected may be determined in other manners, which is not limited in this embodiment.
In a specific implementation, a mobile phone system platform based on Media Tek (MTK) generally detects a battery to be detected through a detection terminal, a Temperature detection pin of the battery to be detected may be connected to a pin of the MTK platform, whether the battery to be detected exists or not is determined through an identifier returned by a function, when the battery to be detected is in a charging state, a current voltage value on the Temperature detection pin of the battery to be detected may be read through the detection terminal, the battery to be detected may be a lithium ion battery, a current voltage value is obtained through a Negative Temperature Coefficient (NTC) end pin of the lithium ion battery, that is, the Temperature detection pin, and is achieved through a thermistor with a Negative Temperature Coefficient, or certainly, a current voltage value is obtained through a Positive Temperature Coefficient (PTC) end pin of the battery, that is, the Temperature detection pin, the current voltage value of the battery to be detected can be obtained through a thermistor with a positive temperature coefficient, and the current voltage value of the battery to be detected can also be obtained through other methods, which is not limited in this embodiment.
Step S20, converting the current voltage value according to a preset mapping relation to obtain a target temperature value corresponding to the current voltage value;
it should be noted that the preset mapping relationship is used to reflect a corresponding relationship between the current voltage value and the temperature value, and the preset mapping relationship is a preset mapping relationship, and may be a relatively accurate mapping relationship obtained by a technician according to a large amount of data experiments or training, or a fixed mapping relationship determined by the technician according to daily operation experience, or may be a preset mapping relationship determined by other manners, which is not limited in this embodiment.
It can be understood that the preset mapping relationship may be used to convert the current voltage value into a corresponding temperature value, and the temperature value is used as the target temperature value, the preset mapping relationship may also be used to reflect a relationship between a current or a resistance value on a temperature detection pin of the battery to be detected and the temperature value, and indirectly obtain the mapping relationship between the current voltage value and the temperature value, and certainly, the corresponding relationship between the current voltage value and the temperature value may be obtained through other manners, which is not limited in this embodiment.
And step S30, judging whether the target temperature value is within a preset temperature range, and determining the type of the battery to be detected according to the judgment result.
It should be noted that, the target temperature value is compared with the preset temperature range, whether the target temperature value is within the preset temperature range is determined, and the type of the battery to be detected can be quickly and accurately determined according to the determination result, where the preset temperature range is a preset temperature range, may be a more accurate temperature range obtained by a technician through experiments or training based on a large amount of data, may also be a fixed temperature range determined by the technician according to daily operation experience, and certainly may also be a preset temperature range determined by other manners, which is not limited in this embodiment.
In the specific implementation, a software running version does not need to be developed independently for each type of battery, the same software version can be unified, the battery types of the batteries to be detected with different types and specifications can be quickly and accurately identified by setting a judgment program for judging a target temperature value and a preset temperature range, the cost and resources of software development can be saved, and the speed and the efficiency for identifying the types of the batteries to be detected are improved.
According to the scheme, when the detection terminal detects that the battery to be detected is in the charging state, the current voltage value on the temperature detection pin of the battery to be detected is read, the current voltage value is converted according to the preset mapping relation, the target temperature value corresponding to the current voltage value is obtained, whether the target temperature value is within the preset temperature range is judged, the type of the battery to be detected is determined according to the judgment result, and the type of the battery to be detected is judged according to whether the temperature value of the battery to be detected is within the preset temperature range, so that the speed and the efficiency for identifying the type of the battery to be detected can be improved, the accuracy for identifying the type of the battery to be detected is improved, the software versions required for identifying the batteries with different types and specifications are reduced, the cost of software development is.
Further, fig. 3 is a schematic flow chart of a second embodiment of the battery type detection method of the present invention, and as shown in fig. 3, the second embodiment of the battery type detection method of the present invention is proposed based on the first embodiment, and in this embodiment, the step S20 specifically includes the following steps:
step S21, when the current voltage value is read, a starting conversion instruction is generated;
it should be noted that when the current voltage value is read, the start conversion instruction may be generated according to a preset instruction trigger condition, or the start conversion instruction may be directly generated by detecting a corresponding relationship between the current voltage value and the start conversion instruction, or the start conversion instruction may be generated by reading the current voltage value in other manners, which is not limited in this embodiment.
Step S22, starting an analog-to-digital converter according to the start conversion instruction, so that the analog-to-digital converter converts the current voltage value according to the preset mapping relationship, converts the current voltage value into a corresponding temperature value, and takes the temperature value as the target temperature value.
It should be noted that, after receiving the start conversion instruction, the analog-to-digital converter converts the current voltage value according to the preset mapping relationship, converts the current voltage value into a corresponding temperature value, and takes the temperature value as the target temperature value, the current voltage value can be converted by the analog-to-digital converter, or the current voltage value on the temperature detection pin of the battery to be detected can be directly acquired by the analog-to-digital converter, or measuring a voltage value on a pin on the MTK platform connected to the temperature detection pin of the battery to be detected, and obtaining the target temperature value after performing temperature value conversion, or converting the current voltage value into a corresponding temperature value in other manners, and using the temperature value as the target temperature value, which is not limited in this embodiment.
In a specific implementation, after the analog-to-digital converter is started according to the start conversion instruction, the analog-to-digital converter converts the current voltage value according to the preset mapping relationship, converts the current voltage value into a corresponding temperature value, may call a function on the MTK platform to further quickly determine the target temperature value, and certainly, may determine the target temperature value by using a manner other than that of the analog-to-digital converter, which is not limited in this embodiment.
Further, before the step S22, the method for detecting battery type further includes:
and acquiring the preset mapping relation according to a preset temperature conversion algorithm, wherein the preset mapping relation is used for reflecting the mapping relation between the voltage and the temperature.
It can be understood that the preset temperature conversion algorithm is a preset algorithm for converting a voltage value into a corresponding temperature value, and may be a relatively accurate temperature conversion algorithm obtained by a technician according to a lot of data experiments or training, or a fixed temperature conversion algorithm determined by the technician according to daily operation experience, or a preset temperature conversion algorithm determined by other manners, which is not limited in this embodiment.
Further, before the step of obtaining the preset mapping relationship according to a preset temperature conversion algorithm, where the preset mapping relationship is used to reflect a mapping relationship between voltage and temperature, the method for detecting a battery type further includes:
acquiring a change vector point cluster of temperature and resistance values, fitting the change vector point cluster, and generating a temperature and resistance value change curve chart;
obtaining a functional relation between the temperature and the resistance value according to the temperature and resistance value change curve graph;
and calculating the preset temperature conversion algorithm according to the functional relation.
It should be noted that the vector point cluster of the temperature and resistance values is an experimental result obtained by a technician during a large number of experiments and training, and a curve graph of the temperature and resistance values can be generated after fitting the vector point cluster of the temperature and resistance values, of course, the curve graph of the temperature and resistance values may also be directly input, generally, a battery manufacturer directly provides a curve graph of the temperature and resistance values, or a table of a corresponding relationship between the temperature and resistance values generated through a MTK platform by function operation may be used, and the curve graph of the temperature and resistance values may be further obtained according to the table of the corresponding relationship between the temperature and resistance values, or the curve graph of the temperature and resistance values may be generated in other manners, which is not limited in this embodiment.
It can be understood that the temperature-resistance value variation curve is used for reflecting a functional relationship between the temperature and the resistance value, the preset temperature conversion algorithm can be calculated through the functional relationship, the temperature-resistance value variation curve can be generally obtained through the constant variation between the thermistor and the temperature, the resistance value decreases with the increase of the temperature, the resistance value can be calculated through the voltage value of the pin of the MTK platform, the temperature value is calculated according to the resistance value, the functional relationship between the temperature and the resistance value is calculated, and the preset temperature conversion algorithm is calculated according to the functional relationship.
Correspondingly, the step S30 specifically includes the following steps:
step S31, judging whether the target temperature value is within the preset temperature range;
step S32, when the judgment result is that the target temperature value is within the preset temperature range, judging that the battery to be detected is an NTC detection function battery;
and step S33, when the judgment result shows that the target temperature value is not within the preset temperature range, judging that the battery to be detected is a non-NTC detection function battery.
It should be understood that, comparing the target temperature value with the preset temperature range, determining whether the target temperature value is within the preset temperature range, and quickly and accurately determining the type of the battery to be detected according to the determination result, where the preset temperature range is a preset temperature range, and may be a more accurate temperature range obtained by a technician through experiments or training based on a large amount of data, or may be a fixed temperature range determined by the technician according to daily operation experience, or may be a preset temperature range determined by other manners, which is not limited in this embodiment.
In a specific implementation, a resistor with a fixed value is generally added to the temperature detection pin of the non-NTC battery, so that a fixed voltage value can be obtained, and then the fixed voltage value is converted into a fixed temperature value so as to ensure that the fixed temperature value is not in the preset temperature range of the NTC detection function battery, thereby being capable of directly distinguishing on software, only needing to develop a uniform software version and not needing to separately develop a software running version for each type of battery, the same software version can be unified, the battery types of the batteries to be detected with different types and specifications can be quickly and accurately identified by setting a judgment program for judging the target temperature value and the preset temperature range, the cost and the resource of software development can be saved, and the speed and the efficiency for identifying the types of the batteries to be detected are improved.
In this embodiment, by using the above scheme, when the current voltage value is read, a start conversion instruction is generated, an analog-to-digital converter is started according to the start conversion instruction, so that the analog-to-digital converter converts the current voltage value according to the preset mapping relationship, converts the current voltage value into a corresponding temperature value, uses the temperature value as the target temperature value, determines whether the target temperature value is within the preset temperature range, determines that the battery to be detected is an NTC-type detection function battery when the determination result is that the target temperature value is within the preset temperature range, determines that the battery to be detected is a non-NTC-type detection function battery when the determination result is that the target temperature value is not within the preset temperature range, and can quickly convert the voltage value and the temperature value through the analog-to-digital converter, by judging whether the target temperature value can be rapidly and accurately acquired within the preset temperature range, the type specification of the battery to be detected is obtained, a software running version does not need to be independently developed for each type of battery, the same software version can be unified, resources spent by software development can be saved, the speed and efficiency for identifying the type of the battery to be detected can be improved, the accuracy for identifying the type of the battery to be detected is improved, software versions required for identifying batteries with different types of specifications are reduced, the cost of software development is reduced, and the user experience is improved.
Further, fig. 4 is a schematic flow chart of a third embodiment of the battery type detection method of the present invention, and as shown in fig. 4, the third embodiment of the battery type detection method of the present invention is proposed based on the second embodiment, and in this embodiment, before the step S10, the battery type detection method further includes the following steps:
step S101, when a detection instruction is obtained, obtaining the physical interface state of the current mobile terminal corresponding to the battery to be detected and the level change value of the battery to be detected according to the detection instruction;
it should be noted that the detection instruction may be a detection instruction input by a detection person, which is used to detect the battery type of the battery to be detected through the detection device, may also be a detection instruction automatically generated at intervals of a preset time, may also be a detection instruction passively generated when a certain preset trigger detection condition is reached, and may also be a detection instruction input from the outside in other manners, such as from a mobile terminal or in a remote transmission control manner, which is not limited in this embodiment.
It can be understood that The physical interface state is an interface state of a physical interface of a current mobile terminal corresponding to The battery to be detected, The battery to be detected can be located in The current mobile terminal and used for conveniently detecting The battery Type, The physical interface can be one of a USB Type C interface, a Micro USB interface and a lightning interface L lightening interface, The USB Type C interface is a connection interface of a USB 3.1 standard and has The characteristics of both positive and negative insertion, high transmission speed and The like, although The USB Type C interface is designed based On The USB 3.1 standard, The USB Type C interface does not support The USB 3.1 standard by using The interface connection mode, The Micro USB interface is a portable version of a USB 2.0 standard and is designed for a foolproof blind-plug structure, only single-sided insertion, The function of supporting OTG (On The Go, OTG) is mainly applied to connection among various devices or mobile devices to perform data exchange, data transmission is realized without Host, USB1.1 and USB 2.0.otg are compatible with a multi-function of OTG, and are not designed according to The other high-speed interfaces L, and have The characteristics of a specific accessory for transmitting signals to this embodiment.
And S102, judging whether the battery to be detected is in a charging state or not according to the physical interface state and the level change value.
It should be understood that the physical interface state may be a connected state or a disconnected state, or may be other states that may exist, which is not limited by the embodiment; whether the battery to be detected is in the charging state can be quickly and accurately judged through the physical interface state and the level change value, when the physical interface state is in the connected state and the level change value is larger than a preset level change range threshold value, it is judged that the battery to be detected is in the charging state, otherwise, it is judged that the battery to be detected is not in the charging state, of course, it can also be judged whether the battery to be detected is in the charging state through other similar physical interface states and level change values, and this embodiment is not limited thereto.
Further, after the step S20, the battery type detecting method further includes the steps of:
step S23, obtaining current testing environment parameters, and calculating a temperature fine adjustment difference value according to the current testing environment parameters;
it should be noted that the current testing environment parameter is a corresponding parameter of a testing environment where the battery to be tested is currently located, the current testing environment parameter may include environment parameters of the battery to be tested, such as temperature, humidity, electromagnetic radiation dose, infrared intensity, and the like, and the current testing environment parameter may generate a certain error value for measurement of the battery to be tested, for example, a voltage value of the battery to be tested is measured in a high-temperature environment, and a temperature value is converted to have a large error.
It can be understood that the calculation of the temperature trimming difference value according to the current testing environment parameter may be performed through a preset functional relationship between the testing environment parameter and the temperature trimming difference value, or may be performed through a large amount of training and learning to establish a mapping relationship table between the current testing environment parameter and the temperature trimming difference value, and the temperature trimming difference value calculated by looking up the mapping relationship table may of course be calculated by other methods, which is not limited in this embodiment.
And step S24, carrying out fine adjustment on the target temperature value according to the temperature fine adjustment difference value, and taking the target temperature value subjected to fine adjustment as a new target temperature value.
It should be understood that the target temperature value is finely adjusted by the temperature fine adjustment difference value, and corresponding temperature compensation can be performed on the target temperature value, so that the temperature measurement on the battery to be detected is closer to a true value, and further, the battery type detection on the battery to be detected is more accurate and rapid, the time for detecting the battery type to be detected is saved, and after the target temperature value is finely adjusted, the finely adjusted target temperature value can be used as a new target temperature value, so that the detection terminal can judge the relationship between the new target temperature value and the preset temperature range, and further judge the type of the battery to be detected.
According to the scheme, by receiving an externally input detection instruction, the present embodiment obtains the physical interface state of the current mobile terminal corresponding to the battery to be detected and the level change value of the battery to be detected according to the detection instruction, and determines whether the battery to be detected is in the charging state according to the physical interface state and the level change value. The method comprises the steps of obtaining current testing environment parameters, calculating a temperature fine-tuning difference value according to the current testing environment parameters, fine-tuning a target temperature value according to the temperature fine-tuning difference value, taking the target temperature value after fine-tuning as a new target temperature value, fine-tuning the target temperature value through the temperature fine-tuning difference value, and performing corresponding temperature compensation on the target temperature value so as to enable the temperature measurement of the battery to be detected to be closer to a true value, further more accurately and quickly detect the battery type of the battery to be detected, improve the speed and efficiency for identifying the type of the battery to be detected, improve the accuracy for identifying the type of the battery to be detected, reduce software versions required for identifying batteries of different types and specifications, reduce the cost of software development, and improve user experience.
In addition, an embodiment of the present invention further provides a storage medium, where a battery type detection program is stored on the storage medium, and when executed by a processor, the battery type detection program implements the following operations:
when the detection terminal detects that the battery to be detected is in a charging state, reading a current voltage value on a temperature detection pin of the battery to be detected;
converting the current voltage value according to a preset mapping relation to obtain a target temperature value corresponding to the current voltage value;
and judging whether the target temperature value is within a preset temperature range, and determining the type of the battery to be detected according to a judgment result.
Further, the battery type detection program when executed by the processor further performs the following operations:
judging whether the target temperature value is within the preset temperature range or not;
when the judgment result is that the target temperature value is within the preset temperature range, judging that the battery to be detected is an NTC detection functional battery;
and when the judgment result shows that the target temperature value is not within the preset temperature range, judging that the battery to be detected is a non-NTC detection function battery.
Further, the battery type detection program when executed by the processor further performs the following operations:
and identifying the pins of the battery to be detected, selecting a target pin from the identified pins, and using the target pin as the battery temperature detection pin.
Further, the battery type detection program when executed by the processor further performs the following operations:
when the current voltage value is read, generating a starting conversion instruction;
and starting an analog-to-digital converter according to the starting conversion instruction so that the analog-to-digital converter converts the current voltage value according to the preset mapping relation, converts the current voltage value into a corresponding temperature value, and takes the temperature value as the target temperature value.
Further, the battery type detection program when executed by the processor further performs the following operations:
and acquiring the preset mapping relation according to a preset temperature conversion algorithm, wherein the preset mapping relation is used for reflecting the mapping relation between the voltage and the temperature.
Further, the battery type detection program when executed by the processor further performs the following operations:
acquiring a change vector point cluster of temperature and resistance values, fitting the change vector point cluster, and generating a temperature and resistance value change curve chart;
acquiring a change vector point cluster of temperature and resistance values, fitting the change vector point cluster, and generating a temperature and resistance value change curve chart;
and obtaining a functional relation between the temperature and the resistance value according to the temperature and resistance value change curve graph, and taking the functional relation as the preset temperature conversion algorithm.
Further, the battery type detection program when executed by the processor further performs the following operations:
acquiring current test environment parameters, and calculating a temperature fine adjustment difference value according to the current test environment parameters;
and carrying out fine adjustment on the target temperature value according to the temperature fine adjustment difference value, and taking the target temperature value subjected to fine adjustment as a new target temperature value.
Further, the battery type detection program when executed by the processor further performs the following operations:
when a detection instruction is obtained, obtaining the physical interface state of the current mobile terminal corresponding to the battery to be detected and the level change value of the battery to be detected according to the detection instruction;
and judging whether the battery to be detected is in a charging state or not according to the physical interface state and the level change value.
According to the scheme, when the detection terminal detects that the battery to be detected is in the charging state, the current voltage value on the temperature detection pin of the battery to be detected is read, the current voltage value is converted according to the preset mapping relation, the target temperature value corresponding to the current voltage value is obtained, whether the target temperature value is within the preset temperature range is judged, the type of the battery to be detected is determined according to the judgment result, and the type of the battery to be detected is judged according to whether the temperature value of the battery to be detected is within the preset temperature range, so that the speed and the efficiency for identifying the type of the battery to be detected can be improved, the accuracy for identifying the type of the battery to be detected is improved, the software versions required for identifying the batteries with different types and specifications are reduced, the cost of software development is.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A battery type detection method, characterized in that the battery type detection method comprises:
when the detection terminal detects that the battery to be detected is in a charging state, reading a current voltage value on a temperature detection pin of the battery to be detected;
converting the current voltage value according to a preset mapping relation to obtain a target temperature value corresponding to the current voltage value;
judging whether the target temperature value is within a preset temperature range or not, and determining the type of the battery to be detected according to a judgment result;
the converting the current voltage value according to the preset mapping relationship to obtain the target temperature value corresponding to the current voltage value specifically includes:
when the current voltage value is read, generating a starting conversion instruction;
and starting an analog-to-digital converter according to the starting conversion instruction so that the analog-to-digital converter converts the current voltage value according to the preset mapping relation, converts the current voltage value into a corresponding temperature value, and takes the temperature value as the target temperature value.
2. The method according to claim 1, wherein the determining whether the target temperature value is within a preset temperature range and determining the type of the battery to be detected according to the determination result specifically includes:
judging whether the target temperature value is within the preset temperature range or not;
when the judgment result is that the target temperature value is within the preset temperature range, judging that the battery to be detected is an NTC detection functional battery;
and when the judgment result shows that the target temperature value is not within the preset temperature range, judging that the battery to be detected is a non-NTC detection function battery.
3. The battery type detection method according to claim 2, wherein before the detection terminal reads the current voltage value on the temperature detection pin of the battery to be detected when detecting that the battery to be detected is in the charging state, the battery type detection method further comprises:
and identifying the pins of the battery to be detected, selecting a target pin from the identified pins, and using the target pin as the battery temperature detection pin.
4. The battery type detection method according to claim 1, wherein before starting an analog-to-digital converter according to the start conversion instruction, so that the analog-to-digital converter converts the current voltage value according to the preset mapping relationship, converts the current voltage value into a corresponding temperature value, and takes the temperature value as the target temperature value, the battery type detection method further comprises:
and acquiring the preset mapping relation according to a preset temperature conversion algorithm, wherein the preset mapping relation is used for reflecting the mapping relation between the voltage and the temperature.
5. The battery type detection method according to claim 4, wherein before the preset mapping relationship is obtained according to a preset temperature conversion algorithm and used for reflecting the mapping relationship between the voltage and the temperature, the battery type detection method further comprises:
acquiring a change vector point cluster of temperature and resistance values, fitting the change vector point cluster, and generating a temperature and resistance value change curve chart;
and obtaining a functional relation between the temperature and the resistance value according to the temperature and resistance value change curve graph, and taking the functional relation as the preset temperature conversion algorithm.
6. The battery type detection method according to any one of claims 1 to 5, wherein after the current voltage value is converted according to a preset mapping relationship and a target temperature value corresponding to the current voltage value is obtained, the battery type detection method further comprises:
acquiring current test environment parameters, and calculating a temperature fine adjustment difference value according to the current test environment parameters;
and carrying out fine adjustment on the target temperature value according to the temperature fine adjustment difference value, and taking the target temperature value subjected to fine adjustment as a new target temperature value.
7. The battery type detection method according to any one of claims 1 to 5, wherein before the detection terminal reads the current voltage value on the temperature detection pin of the battery to be detected when detecting that the battery to be detected is in the charging state, the battery type detection method further comprises:
when a detection instruction is obtained, obtaining the physical interface state of the current mobile terminal corresponding to the battery to be detected and the level change value of the battery to be detected according to the detection instruction;
and judging whether the battery to be detected is in a charging state or not according to the physical interface state and the level change value.
8. A detection terminal, characterized in that the detection terminal comprises: memory, a processor and a battery type detection program stored on the memory and executable on the processor, the battery type detection program being configured to implement the steps of the battery type detection method according to any one of claims 1 to 7.
9. A storage medium, characterized in that the storage medium has stored thereon a battery type detection program which, when executed by a processor, implements the steps of the battery type detection method according to any one of claims 1 to 7.
CN201810024681.3A 2018-01-10 2018-01-10 Battery type detection method, detection terminal and storage medium Active CN108254697B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810024681.3A CN108254697B (en) 2018-01-10 2018-01-10 Battery type detection method, detection terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810024681.3A CN108254697B (en) 2018-01-10 2018-01-10 Battery type detection method, detection terminal and storage medium

Publications (2)

Publication Number Publication Date
CN108254697A CN108254697A (en) 2018-07-06
CN108254697B true CN108254697B (en) 2020-07-21

Family

ID=62724923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810024681.3A Active CN108254697B (en) 2018-01-10 2018-01-10 Battery type detection method, detection terminal and storage medium

Country Status (1)

Country Link
CN (1) CN108254697B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110346732B (en) * 2019-07-23 2021-09-14 广东以诺通讯有限公司 Battery detection method and device based on characteristic value identification
CN110794315B (en) * 2019-08-06 2022-07-12 厦门亿联网络技术股份有限公司 Method for detecting electric quantity of rechargeable battery
CN110596627B (en) * 2019-08-22 2021-09-03 深圳市鹏巨术信息技术有限公司 Detection method and device for vehicle diagnosis box
CN111506526A (en) * 2020-04-20 2020-08-07 北京易点淘网络技术有限公司 Battery model identification method and device, electronic equipment and storage medium
CN111679597B (en) * 2020-05-13 2023-04-07 深圳拓邦股份有限公司 Electronic product power control method and device and electronic product
CN112526365A (en) * 2020-11-26 2021-03-19 武汉飞恩微电子有限公司 Method, device, storage medium and apparatus for detecting battery state
CN112821506B (en) * 2021-02-02 2023-10-20 山东奥德智慧新能源有限公司 Mobile terminal charging control method and device, storage medium and mobile terminal
CN114069764A (en) * 2021-09-30 2022-02-18 科华数据股份有限公司 Charging temperature compensation method and device for shared battery and power conversion equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101354431A (en) * 2008-08-26 2009-01-28 崧顺电子(深圳)有限公司 Apparatus and method for recognizing battery types
CN102035243A (en) * 2010-11-29 2011-04-27 东莞韵邦变压器有限公司 Switch power supply-based intelligent charging system for various batteries and control method thereof
CN103197258A (en) * 2013-04-09 2013-07-10 青岛海信移动通信技术股份有限公司 Battery type detection method and mobile terminal
CN103268965A (en) * 2013-04-18 2013-08-28 深圳市金立通信设备有限公司 Battery detection circuit, battery and mobile terminal
JP5508771B2 (en) * 2009-07-08 2014-06-04 パナソニック株式会社 Battery pack and battery system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101354431A (en) * 2008-08-26 2009-01-28 崧顺电子(深圳)有限公司 Apparatus and method for recognizing battery types
JP5508771B2 (en) * 2009-07-08 2014-06-04 パナソニック株式会社 Battery pack and battery system
CN102035243A (en) * 2010-11-29 2011-04-27 东莞韵邦变压器有限公司 Switch power supply-based intelligent charging system for various batteries and control method thereof
CN103197258A (en) * 2013-04-09 2013-07-10 青岛海信移动通信技术股份有限公司 Battery type detection method and mobile terminal
CN103268965A (en) * 2013-04-18 2013-08-28 深圳市金立通信设备有限公司 Battery detection circuit, battery and mobile terminal

Also Published As

Publication number Publication date
CN108254697A (en) 2018-07-06

Similar Documents

Publication Publication Date Title
CN108254697B (en) Battery type detection method, detection terminal and storage medium
US9160833B2 (en) Method and apparatus for dynamic battery management control in a mobile communication device
US20180120384A1 (en) Tester for equipment, apparatus or component with distributed processing function
CN102271177B (en) Method and system for calibrating proximity sensor of mobile phone
CN111183561A (en) Charging control method and device, electronic equipment and computer readable storage medium
CN102984368B (en) A kind of mobile terminal for automatically identifying genuine battery and recognition methods thereof
CN110888065B (en) Battery pack state of charge correction method and device
CN111817097A (en) Charging control method and data line
US20220404427A1 (en) Simulated battery control device, electronic apparatus, charger, and simulated battery control method
CA2692581C (en) Method and apparatus for dynamic battery management control in a mobile communication device
CN112165143A (en) Wireless earphone charging method, device, equipment and storage medium
CN111426969A (en) Method and device for detecting internal resistance of battery and method and device for detecting aging of battery
CN111323713A (en) Battery testing method, testing device, production system and readable storage medium
CN104360281A (en) Mobile-terminal-based battery identification method and system and mobile terminal
WO2023179255A1 (en) Charging device and method, and related equipment
CN110970954B (en) Charging control method and device, storage medium and split type electronic equipment
KR102552684B1 (en) Method for calibrating battery measurement data and apparatus therefor
CN108075548B (en) Charging control method, mobile terminal and computer readable storage medium
US20220349944A1 (en) Battery performance evaluation device, electronic apparatus, charger, and battery performance evaluation method
CA3219970A1 (en) Battery performance evaluation device and battery performance evaluation method
CN108683721B (en) Parameter adjusting method, device and equipment
CN110970948A (en) Charging control method and device, storage medium and split type electronic equipment
CN111638460A (en) Battery testing apparatus, system and method
CN117148172B (en) Battery state detection method, device, computing equipment and medium
CN110970950B (en) Charging control method and device, storage medium and split type electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221213

Address after: 201203 1st floor, building 1, Lane 36, Xuelin Road, China (Shanghai) pilot Free Trade Zone, Pudong New Area, Shanghai, 201203

Patentee after: SHANGHAI TRANSSION INFORMATION TECHNOLOGY Ltd.

Address before: Room 922 / 926, block a, No. 1, Lane 399, shengxia Road, China (Shanghai) pilot Free Trade Zone, Pudong New Area, Shanghai, 201203

Patentee before: SHANGHAI SPREADRISE COMMUNICATION TECHNOLOGY Ltd.