Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The battery detection method that the embodiment of the present invention provides, as shown in Figure 1, the method step comprises:
The total voltage that S101, electronic equipment provide according to battery current electric quantity acquisition battery.
It should be noted that the total voltage that this battery of electricity Real-time Obtaining that electronic equipment can be current according to the battery used provides is denoted as U.
S102, electronic equipment obtain the voltage of the first resistance arranged in battery according to total voltage.
Further, if in electronic equipment, and the circuit of the first resistant series of battery is not arranged other resistance, so the first voltage, is denoted as U
1equal with the total voltage U in step S101, that is: U
1=U; If be provided with other resistance in electronic equipment with on the circuit of the first resistant series of battery, as being provided with second resistance, so dividing potential drop on series circuit due to the first resistance and the second resistance, the voltage of the first resistance equals the voltage that total voltage U deducts the second resistance, is denoted as U
2, that is: U
1=U-U
2, wherein, the size of the voltage of the first resistance and the voltage of the second resistance is only subject to the impact of the resistance of the first resistance and the second resistance, does not have the restriction in size each other.
It should be noted that; although electronic equipment does not arrange the resistance that the second resistance also can obtain the first resistance; but if in the non-standard configuration battery used, the first resistance is not set; what so measure is the circuit of a short circuit; can cause damage to electronic equipment, can better protect electronic equipment not suffer damage so arrange the second resistance.
Preferably, the resistance R of the first resistance
1can be different according to distinct electronic apparatuses, span can be 220 Ω < R
1< 380 Ω.If model is can arrange R in the electronic equipment of A00
1first resistance of=240 Ω, model is can arrange R in the electronic equipment of A01
1first resistance etc. of=260 Ω.
S103, electronic equipment obtain the electric current on the first resistance place circuit.
Preferably, electric current on first resistance place circuit can be that electronic equipment is pre-configured, as can integrated package be provided with in electronic equipment, integrated package there is MPP (Multipurpose Pins, analog input pin), can to the pre-configured electric current of circuit connected, as can to the Circnit Layout electric current I=5mA being connected with the first resistance, electric current I=5mA can calculate as the electric current of the first resistance place circuit by electronic equipment, generally, the size of current of this configuration does not change along with the change of battery status, after pre-configured, this current value is definite value.
Exemplary, electronic equipment can also by obtaining voltage and the resistance of the second resistance arranged in the electronic equipment that be electrically connected with this battery, calculates the second resistance place, with the current value on the circuit of the first resistant series by Ohm law.
S104, electronic equipment obtain the resistance of the first resistance according to the voltage of the first resistance and the electric current of acquisition.
Exemplary, if the circuit at the first resistance place is only provided with the first resistance, then according to above-mentioned U
1the electric current I of=U and configuration, utilizes Ohm law, obtains the resistance of the first resistance
if the circuit at the first resistance place, except being provided with the first resistance, is also provided with the second resistance, then according to above-mentioned U
1=U-U
2electric current I with configuration, utilizes Ohm law, obtains the resistance of the first resistance
herein only for the circuit at the first resistance place is only provided with the first resistance and be provided with the first resistance, the second resistance is described, if there is other multiple resistance, by that analogy, no longer launch, also do not do any restriction with this.
If the resistance of S105 first resistance is in preset range, electronic equipment determination battery is standard configuration battery.
Exemplary, the error range that preset range can allow according to the resistance of the first resistance and setting, might as well suppose that the resistance of the first resistance is R1=300 Ω, the error range of permission is 5%, and so this preset range is set as 285 Ω≤R
1≤ 315 Ω.
Preferably, if R
1be more than or equal to 285 Ω and be less than or equal to 315 Ω, then determining that the resistance of the first resistance is in preset range, and then determining that battery is standard configuration battery.
In addition, if R1 is less than 285 Ω or is greater than 315 Ω, then determine that battery is non-standard configuration battery, and used this non-standard configuration battery to record to electronic equipment and carried out shutdown process etc.
It should be noted that, set preset range only illustratively according to the error range that the resistance of R1 allows, also can select optimum value range according to experimental result and set preset range, not do any restriction with this.
It is worthy of note, above-mentioned preset range can determine whether battery is standard configuration battery comparatively accurately, and should using that as above example is mentioned is provided with R
1the battery of first resistance of=300 Ω, but user error employs battery corresponding to other electronic appliance models, as employ electronic appliance models be A00 corresponding be provided with R
1the battery of first resistance of=240 Ω, then result of calculation 240 Ω is not at preset range 285 Ω≤R
1between≤315 Ω, be defined as the standard configuration battery of this electronic appliance models non-; If user employs the battery not arranging the first resistance, then result of calculation 0 Ω is not also at preset range 285 Ω≤R
1between≤315 Ω, be also defined as the standard configuration battery of this electronic appliance models non-, thus ensure that the standard configuration battery that this electronic appliance models is corresponding judged by electronic equipment.
The battery detection method that the embodiment of the present invention provides, the total voltage that electronic equipment provides according to battery current electric quantity acquisition battery, the voltage of the first resistance in battery is obtained according to total voltage, and the electric current obtained on the first resistance place circuit, the resistance of the first resistance is obtained according to the voltage of the first resistance and the electric current of acquisition, again according to the resistance of the first resistance whether in preset range, determine whether battery is standard configuration battery.So, electronic equipment can continue when determining that battery is standard configuration battery to use, and carries out warning, the process such as shutdown when determining that battery is non-standard configuration battery, to protect electronic equipment; And no longer as prior art, because whether None-identified battery is standard configuration battery, cause electronic equipment use non-standard configuration battery and cause damage.
The battery detection method that another embodiment of the present invention provides, above-mentioned electronic equipment is mobile phone, and the resistance of the first resistance in the standard configuration battery that this mobile phone model is corresponding is 300 ohm, and the resistance error of permission is 5%, so preset range is 285 Ω≤R
1≤ 315 Ω, be provided with the second resistance with the first resistant series in mobile phone, the present embodiment only illustrates with this, does not do any restriction with this, and as shown in Figure 2, the method step comprises:
Battery installed by S201, mobile phone, is electrically connected with battery.
It should be noted that, battery installed by mobile phone, after start, mobile phone is electrically connected with battery, connects to make the first resistance in battery and the second resistant series in mobile phone.
It is worthy of note, the model of mobile phone is different, the R arranged in the battery of configuration
1resistance can change, as can at 220 Ω≤R
1r is selected according to test optimal result between≤380 Ω
1resistance, so just can by different R
1resistance, identify that whether battery that different model mobile phone uses is the standard configuration battery of this mobile phone, and the second resistance R
2resistance due to conclusive impact can not be caused on other values, an optimum value can be selected to fix according to experimental results, conveniently to calculate.
S202, mobile phone for measuring go out voltage drop on the second resistance and the first resistor wiring to obtain the voltage of the second resistance.
It should be noted that, the voltage drop of the second resistance can by ADC (the Analog to Digital Converter on integrated package in mobile phone herein, analog-to-digital conversion device) measure and obtain, ADC is connected in the first resistance and the wiring of the second resistance outside battery, might as well suppose that the contact of ADC and the first resistance and the second resistance is P, ADC can measure the voltage drop obtaining P point, the value of this voltage drop equals the voltage of the second resistance, so the mobile phone voltage drop value that ADC can be measured is as the voltage U of the second resistance
2.In addition, mobile phone also can use other Voltage measure to measure the second voltage, and the measuring method that the above-mentioned ADC of utilization measures the second voltage is only citing, but does not do any restriction with this.
The voltage that S203, mobile phone utilize total voltage to deduct the second resistance obtains the voltage of the first resistance.
Preferably, mobile phone is according to model, configuration and mobile phone electricity etc. are corresponding is equipped with the battery providing different electrical power voltage, and the model of mobile phone and configuration have set before dispatching from the factory, generally can not change, the electricity of mobile phone constantly can change because user uses, the voltage that the acquisition battery that in can being used by battery or charge, the difference of electricity be real-time provides, the voltage of the first resistance utilizing the voltage of Real-time Obtaining to obtain as the voltage that total voltage deducts the second resistance, eliminate because mobile phone electricity is different, the virtual voltage provided there are differences, but use fixing total voltage value to cause the erroneous calculations of the resistance to the first resistance, ensure that mobile phone is accurate to the computing the resistor value of the first resistance under any electricity, and then improve mobile phone to the accuracy rate of the judgement of standard configuration battery.
It should be noted that, the first resistance and the second resistant series, on a circuit, have dividing potential drop effect to the total voltage of this circuit, so the voltage that total voltage can be utilized to deduct the second resistance obtains the voltage of the first resistance.
S204, mobile phone configure the electric current on the series circuit of the first resistance and the second resistance.
Exemplary, integrated package is provided with in mobile phone, this integrated package there is MPP, MPP is connected with the series circuit of the first resistance with the second resistance, it can be series circuit arrangement electric current, if current arrangements can be I=5mA by MPP, mobile phone by getting the electric current I=5mA of configuration, can calculate the first resistance on this circuit.
Exemplary, mobile phone can also by obtaining voltage and the resistance of the second resistance arranged in the mobile phone that be electrically connected with this battery, calculates the second resistance place, with the current value on the circuit of the first resistant series by Ohm law.
S205, mobile phone utilize the voltage/current of the first resistance to obtain the resistance R of the first resistance
1.
It should be noted that, R
1preset range is 285 Ω≤R
1≤ 315 Ω, if the resistance R of the first resistance of step S205 calculating
1in preset range, determine that battery is standard configuration battery, perform step S206, otherwise perform step S207.
S206, mobile phone enter normal operator scheme.
S207, mobile phone eject warning prompt to user, after record employs non-standard configuration battery, and automatic shutdown.
Exemplary, warning prompt can be information prompting, the tinkle of bells prompting or light flash prompting etc.
Further, when Mobile phone elastic goes out after warning prompt makes user learn oneself to employ non-standard configuration battery, mobile phone is by automatic shutdown; Mobile phone record employs non-standard configuration battery; It should be noted that record non-standard configuration battery and eject between warning prompt to user there is no precedence relationship, can carry out with random order, also can carry out simultaneously; Complete record and the rear mobile phone shutdown of warning, when mobile phone because employ non-standard configuration battery, and go wrong when needing repairing, by reading record, can recognize that once the present used non-standard configuration battery to mobile phone, helping user more effectively to keep in repair mobile phone, and carry out warning prompt to user and user can be allowed to learn employ non-standard configuration battery, mobile phone is by automatic shutdown, and after such user has changed standard configuration battery, mobile phone can normally use, in order to avoid user does not know shutdown reason and normally cannot use mobile phone.
The battery detection method that the embodiment of the present invention provides, the total voltage that electronic equipment provides according to battery current electric quantity acquisition battery, the voltage of the first resistance in battery is obtained according to total voltage, and the electric current obtained on the first resistance place circuit, the resistance of the first resistance is obtained according to the voltage of the first resistance and the electric current of acquisition, again according to the resistance of the first resistance whether in preset range, determine whether battery is standard configuration battery.So, electronic equipment can continue when determining that battery is standard configuration battery to use, and carries out warning, the process such as shutdown when determining that battery is non-standard configuration battery, to protect electronic equipment; And no longer as prior art, because whether None-identified battery is standard configuration battery, cause electronic equipment use non-standard configuration battery and cause damage.
The battery 30 that the embodiment of the present invention provides, as shown in Figure 3, comprising:
One end of first resistance 301, first resistance 301 is connected with the power supply 302 of battery 30, and the other end of the first resistance 301 is connected with electronic equipment 40.
When the first resistance 301 and electronic equipment 40, after mobile phone energising, electronic equipment is made to determine whether the first resistance 301 is standard configuration battery by the resistance of detection first resistance 301.
It should be noted that, in battery 30, the positive electrode of power supply 302 connects NTC (NegativeTemperature Coefficient, thermistor) positive terminal, and the negative electrode of power supply connects GND (Ground, ground connection) pin.
The method that this battery 30 can use above-described embodiment to provide carries out work, and the method that method of work and embodiment provide is identical, does not repeat them here.
The battery that the embodiment of the present invention provides, the first resistance is provided with in battery, to make electronic equipment when using this battery, according to the total voltage that current battery charge acquisition battery provides, obtain the voltage of the first resistance in battery according to total voltage, and configure the electric current on the first resistance place circuit, obtain the resistance of the first resistance according to the voltage of the first resistance, electric current, according to the resistance of the first resistance whether in preset range, determine whether battery is standard configuration battery.So, continue when electronic equipment is standard configuration battery according to the battery determined to use, for carrying out during non-standard configuration battery warning, the process such as shutdown, to protect electronic equipment; And no longer as prior art, because whether None-identified battery is standard configuration battery, cause electronic equipment use non-standard configuration battery and cause damage.
The electronic equipment 40 that the embodiment of the present invention provides, as shown in Figure 4, comprising:
The battery 30 that above-described embodiment provides.
First voltage-level detector 401, for obtaining the total voltage that battery provides according to battery 30 current electric quantity.
Central processing unit 402, the total voltage for obtaining according to the first voltage-level detector 401 obtains the voltage of the first resistance 301 arranged in battery 30.
Electric current getter 403, for obtaining the electric current on the first resistance 301 place circuit.
Central processing unit 402, the electric current also for obtaining according to the first voltage and current getter 403 obtained obtains the resistance of the first resistance.
If the resistance of the first resistance 301 is in preset range, central processing unit 402 determines that battery 30 is for standard configuration battery.
The method work that this electronic equipment can use above-described embodiment to provide, does not repeat them here.
Further, as shown in Figure 5, electronic equipment also comprises: the second resistance 404, second voltage-level detector 405 and integrated package 406.
Second resistance 404, for connecting with the first resistance 301, with the voltage making the second voltage-level detector 405 obtain the second resistance, thus obtained the voltage of the first resistance by central processing unit 402 according to series circuit dividing potential drop and the total voltage that obtained by the first voltage-level detector 401.
It should be noted that; although electronic equipment does not arrange the resistance that the second resistance also can obtain the first resistance; and judge whether obtain battery is standard configuration battery; but if in the non-standard configuration battery used, the first resistance is not set; what so measure is the circuit of a short circuit; can cause damage to electronic equipment, can better protect electronic equipment not suffer damage so arrange the second resistance.
Exemplary, as shown in Figure 6, second voltage-level detector 405 is the ADC of integrated package 406, it is the pre-configured electric current of the first resistance and the second resistance series circuit that electric current getter 403 obtains MPP on integrated package 406, wherein, integrated package 406 is connected with the second resistance 404, and ADC is for detecting voltage drop on the second resistance 404 and the first resistance 301 connecting line to obtain the second voltage; MPP, the electric current on the series circuit of pre-configured first resistance 301 and the second resistance 404.
ADC measures tie point on the second resistance 404 and the first resistance 301 connecting line, as the voltage drop of P tie point in figure, the value of this voltage drop equals the second voltage U 2 of the second resistance 404, the total voltage U that first voltage-level detector 401 provides according to the current electric quantity Real-time Obtaining battery of present battery 30, mistake can not be there is in the voltage of the first resistance that the voltage U 2 that such central processing unit 402 uses total voltage U to deduct the second resistance obtains because of battery electric quantity change, ensure that according to the real-time status of electronic equipment, central processing unit 402 can judge whether battery is standard configuration battery.
Central processing unit 402 obtains the resistance of the first resistance 301 according to the electric current that the first voltage and current getter 403 obtained obtains, if the resistance of the first resistance 301 is in preset range, central processing unit 402 determines that battery 30 is standard configuration battery; If the resistance of the first resistance 301 is outside preset range, then determine that battery is non-standard configuration battery, carry out shutdown process.
Exemplary, this preset range can be determined according to the error range of the first resistance and permission, and as being 300 Ω by the first resistance, the error range of permission is 5%, then calculating preset range is accordingly 285 Ω≤R
1≤ 315 Ω.That is: if the resistance of the first resistance 301 is more than or equal to 285 ohm and is less than or equal to 315 ohm, central processing unit 402 determines that the battery used is standard configuration battery, if the resistance of the first resistance 301 is less than 285 ohm or be greater than 315 ohm, central processing unit 402 determines that the battery used is non-standard battery.
Electronic equipment 40, as shown in Figure 7, also comprises:
Storer 407, before shutting down at central processing unit 402, recorded electronic equipment 40 employs non-standard configuration battery.So, electronic equipment 40 uses non-standard configuration battery to carry out record to this, during to make subsequent maintenance, obtains corresponding record, is convenient to the maintenance of electronic equipment 40.
And/or
Output unit 408, if central processing unit 402 determines that battery 30 is for non-standard configuration battery, exports warning prompt, know that to make user battery 30 is non-standard configuration battery, central processing unit will carry out shutdown process to electronic equipment 40.
Exemplary, output unit 408 can be screen, and the warning prompt as exported is this battery of mobile phone screen ejection dialog box prompting user is non-standard configuration battery, by automatic shutdown; Or output unit 408 can be loudspeaker, the warning prompt of output is that alerts triggered buzzer informs that tester or this battery of user are non-standard configuration battery etc.
It should be noted that, the connected mode in Fig. 4 to Fig. 7 and hardware setting mode are only citing, do not do any restriction with this, and in Fig. 7, storer 407 also can not be arranged, not to be illustrated as any restriction.
The method that this electronic equipment 40 can use above-described embodiment to provide carries out work, the method that method of work and embodiment provide is identical, and above-mentioned battery 30 can be used to carry out work, the structure that structure and above-described embodiment of battery 30 provide is identical, does not repeat them here.
The electronic equipment that the embodiment of the present invention provides, the total voltage that electronic equipment provides according to battery current electric quantity acquisition battery, the voltage of the first resistance in battery is obtained according to total voltage, and the electric current obtained on the first resistance place circuit, the resistance of the first resistance is obtained according to the voltage of the first resistance and the electric current of acquisition, again according to the resistance of the first resistance whether in preset range, determine whether battery is standard configuration battery.So, electronic equipment can continue when determining that battery is standard configuration battery to use, and carries out warning, the process such as shutdown when determining that battery is non-standard configuration battery, to protect electronic equipment; And no longer as prior art, because whether None-identified battery is standard configuration battery, cause electronic equipment use non-standard configuration battery and cause damage.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of described claim.