CN117705245A - Battery detection circuit, battery detection method and electronic equipment - Google Patents

Battery detection circuit, battery detection method and electronic equipment Download PDF

Info

Publication number
CN117705245A
CN117705245A CN202211086100.1A CN202211086100A CN117705245A CN 117705245 A CN117705245 A CN 117705245A CN 202211086100 A CN202211086100 A CN 202211086100A CN 117705245 A CN117705245 A CN 117705245A
Authority
CN
China
Prior art keywords
battery
weight
circuit
electronic device
electronic equipment
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.)
Pending
Application number
CN202211086100.1A
Other languages
Chinese (zh)
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202211086100.1A priority Critical patent/CN117705245A/en
Publication of CN117705245A publication Critical patent/CN117705245A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The application discloses a battery detection circuit, a battery detection method and electronic equipment, and belongs to the technical field of batteries. The weight measuring circuit in the battery detection circuit can detect the actual measurement weight of the battery and/or the actual measurement weight of the battery core in the battery after the electronic equipment is connected with the battery, and determine whether the battery is matched with the electronic equipment or not according to the detected actual measurement weight, and then control the on-off of a current loop between the electronic equipment and the battery by controlling the switch circuit based on a matching result. Because the measured weight of the battery and/or the measured weight of the battery core in the battery are detected by the weight measuring circuit, the electronic equipment can be ensured to accurately identify whether the battery connected with the electronic equipment is a primary battery or not based on the measured weight, and the non-primary battery can be further prevented from supplying power to the electronic equipment, so that the electronic equipment can be prevented from being damaged, and the use safety is ensured.

Description

Battery detection circuit, battery detection method and electronic equipment
Technical Field
The disclosure relates to the technical field of batteries, and in particular relates to a battery detection circuit, a battery detection method and electronic equipment.
Background
The electronic device is provided with a battery, and the longer the battery is used, the weaker the cruising ability of the battery is. Accordingly, the weaker the endurance of the electronic device. In order to improve the cruising ability of the electronic device, the battery with weak cruising ability in the electronic device can be replaced by the battery with strong cruising ability.
At present, a plurality of imitated and counterfeited battery products exist on the market, and when the consumer uses the battery products, the use experience of the electronic equipment is deteriorated, the electronic equipment is damaged, and even the danger of explosion and combustion exists; therefore, after replacing the battery, the electronic device needs to detect whether the replaced battery is a factory battery (i.e., a battery that matches the electronic device).
Disclosure of Invention
The embodiment of the disclosure provides a battery detection circuit, a battery detection method and electronic equipment, wherein the technical scheme is as follows:
in one aspect, there is provided a battery detection circuit including: a switching circuit and a weight measurement circuit;
the first end of the switch circuit is connected with the first connection end of the target device, and the second end of the switch circuit is connected with the second connection end of the target device, wherein the target device comprises: an electronic device and/or a battery;
The weight measuring circuit is connected with the control end of the switching circuit, and is used for detecting the actual measured weight of the battery and/or the actual measured weight of the battery core in the battery after the electronic equipment is connected with the battery, determining whether the battery is matched with the electronic equipment or not according to the actual measured weight, and controlling the on-off of the first end and the second end of the switching circuit based on a matching result so as to disconnect or connect a current loop between the electronic equipment and the battery.
On the other hand, a battery detection method is provided, an electronic device is applied, the electronic device and/or the battery belong to a target device, a battery detection circuit is configured in the target device, and the battery detection circuit comprises: the device comprises a switch circuit and a weight measuring circuit, wherein a first end of the switch circuit is connected with a first connecting end of target equipment, a second end of the switch circuit is connected with a second connecting end of the target equipment, and the weight measuring circuit is connected with a control end of the switch circuit; the method comprises the following steps:
after the electronic equipment is connected with the battery, acquiring the measured weight of the battery and/or the measured weight of an electric core in the battery, which are detected by the weight measuring circuit;
And determining whether the battery is matched with the electronic equipment according to the actually measured weight, and controlling the on-off of the first end and the second end of the switching circuit based on a matching result so as to disconnect or connect a current loop between the electronic equipment and the battery.
In yet another aspect, an electronic device is provided, the electronic device being configured to be connected to a battery, the electronic device and/or the battery belonging to a target device, the target device having a battery detection circuit configured therein, the battery detection circuit comprising: the first end of the switch circuit is connected with the first connecting end of the target equipment, the second end of the switch circuit is connected with the second connecting end of the target equipment, the target equipment is the electronic equipment or the battery, and the weight measuring circuit is connected with the control end of the switch circuit; the electronic device includes:
the acquisition module is used for acquiring the measured weight of the battery and/or the measured weight of the battery core in the battery, which are detected by the weight measuring circuit after the electronic equipment is connected with the battery;
and the control module is used for determining whether the battery is matched with the electronic equipment or not according to the actually measured weight, and controlling the on-off of the first end and the second end of the switching circuit based on a matching result so as to disconnect or connect a current loop between the electronic equipment and the battery.
In yet another aspect, an electronic device is provided, the electronic device comprising: a processor and a memory storing a computer program that is loaded and executed by the processor to implement the battery detection method as described in the above aspect.
In yet another aspect, a computer readable storage medium is provided, the computer readable storage medium storing a computer program loaded and executed by a processor to implement the method of detecting a battery as described in the above aspect.
In yet another aspect, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the electronic device performs the battery detection method described in the above aspect.
The technical scheme provided by the embodiment of the disclosure has the beneficial effects that at least:
the embodiment of the disclosure provides a battery detection circuit, a battery detection method and electronic equipment, wherein a weight measurement circuit in the battery detection circuit can detect actual measurement weight of a battery and/or actual measurement weight of a battery core in the battery after the electronic equipment is connected with the battery, determine whether the battery is matched with the electronic equipment or not according to the detected actual measurement weight, and then control on-off of a current loop between the electronic equipment and the battery through a control switch circuit based on a matching result. Because the measured weight of the battery and/or the measured weight of the battery core in the battery are detected by the weight measuring circuit, the electronic equipment can be ensured to accurately identify whether the battery connected with the electronic equipment is a primary battery or not based on the measured weight, and the non-primary battery can be further prevented from supplying power to the electronic equipment, so that the electronic equipment can be prevented from being damaged, and the use safety is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 is a schematic diagram of a battery detection circuit according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of another battery detection circuit according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a further battery detection circuit provided by an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a structure of a further battery detection circuit provided in an embodiment of the disclosure;
fig. 5 is a schematic diagram of a structure of a further battery detection circuit provided in an embodiment of the disclosure;
fig. 6 is a schematic diagram of a structure of a further battery detection circuit provided in an embodiment of the present disclosure;
fig. 7 is a schematic diagram of a structure of a further battery detection circuit provided in an embodiment of the disclosure;
fig. 8 is a schematic diagram of a structure of a further battery detection circuit provided in an embodiment of the present disclosure;
Fig. 9 is a schematic diagram of a structure of a further battery detection circuit provided in an embodiment of the present disclosure;
fig. 10 is a flowchart of a method for detecting a battery according to an embodiment of the present disclosure;
FIG. 11 is a flowchart of another battery detection method provided by an embodiment of the present disclosure;
FIG. 12 is a block diagram of an electronic device provided by an embodiment of the present disclosure;
fig. 13 is a block diagram of still another electronic device provided by an embodiment of the present disclosure.
Detailed Description
For the purposes of clarity, technical solutions and advantages of the present disclosure, the following further details the embodiments of the present disclosure with reference to the accompanying drawings.
The disclosed embodiment provides a battery detection circuit, referring to fig. 1, the battery detection circuit 00 includes: a switching circuit 01 and a weight measurement circuit 02. As shown in fig. 1, a first terminal of the switching circuit 01 is connected to a first connection terminal a of the target device, and a second terminal b of the switching circuit 01 is connected to a second connection terminal b of the target device. The weight measuring circuit 02 is connected with the control end of the switch circuit 01.
Wherein the target device comprises an electronic device and/or a battery. The electronic device is a device capable of replacing a battery. For example, the electronic device may be a cell phone, tablet computer, notebook computer, or electric vehicle (e.g., electric bicycle).
The weight measurement circuit 02 is configured to detect an actual measurement weight of the battery and/or an actual measurement weight of a battery cell in the battery after the electronic device is connected (i.e., buckled) with the battery, determine whether the battery and the electronic device are matched according to the detected actual measurement weight, and control on-off of the first end and the second end of the switch circuit 01 based on a matching result, so as to disconnect or connect a current loop between the electronic device and the battery.
For example, if the weight measurement circuit 02 determines that the battery is not matched with the electronic device according to the detected measured weight, the first end and the second end of the switch circuit 01 can be controlled to be disconnected, so that a current loop between the electronic device and the battery is disconnected, and the battery cannot supply power to the electronic device, so that damage to the electronic device caused by the fact that the battery which is not matched with the electronic device supplies power to the electronic device is avoided. If the weight measurement circuit 02 determines that the battery is matched with the electronic device according to the detected measured weight, the first end and the second end of the switch circuit 01 can be controlled to be conducted so as to conduct a current loop between the electronic device and the battery, and therefore the battery supplies power for the electronic device.
In summary, the embodiment of the disclosure provides a battery detection circuit, where after an electronic device is connected to a battery, a weight measurement circuit in the battery detection circuit can detect an actual measurement weight of the battery and/or an actual measurement weight of a battery core in the battery, determine whether the battery is matched with the electronic device according to the detected actual measurement weight, and then control on/off of a current loop between the electronic device and the battery by controlling a switch circuit based on a matching result. Because the measured weight of the battery and/or the measured weight of the battery core are detected by the weight measuring circuit, the electronic equipment can be ensured to accurately identify whether the battery connected with the electronic equipment is a primary battery or not based on the measured weight, and the battery which is not primary can be further prevented from supplying power to the electronic equipment, so that the electronic equipment can be prevented from being damaged, and the use safety is ensured.
In the embodiment of the disclosure, since the weight of the factory cell and the weight of the non-factory cell are generally different greatly, the weight measurement circuit 02 may determine a difference between the detected measured weight and the corresponding calibration weight, and then determine whether the battery is matched with the electronic device based on the difference. If the weight measurement circuit 02 determines that the difference is greater than the difference threshold, it may determine that the battery is not matched with the electronic device, i.e., the battery is a factory battery. If the weight measurement circuit 02 determines that the difference is less than or equal to the difference threshold, it may determine that the battery matches the electronic device, i.e., the battery is a non-genuine battery.
The calibration weight corresponding to the measured weight of the battery can be the weight of the battery of the primary factory, and the calibration weight corresponding to the measured weight of the battery cell can be the weight of the battery cell of the primary factory (namely, the battery cell in the battery of the primary factory). Correspondingly, if the weight detected by the weight measuring circuit 02 comprises the measured weight of the battery, the corresponding calibration weight comprises the weight of the primary battery. If the weight detected by the weight measuring circuit 02 comprises the measured weight of the battery cell, the corresponding calibration weight comprises the weight of the battery cell of the original factory.
And, the calibration weight of the battery may be pre-stored in the electronic device. The nominal weight of the cell may be pre-stored by the electronic device or may be received by the electronic device. For example, the electronic device may determine the measured weight of the battery cell that is first received after shipment as the nominal weight of the battery cell.
In a first implementation, the target device includes a battery in which the battery detection circuit 00 is located. The first end of the switch circuit 01 is connected with the first connection end of the battery, the second end of the switch circuit 01 is connected with the second connection end of the battery, and the measured weight detected by the weight measuring circuit 02 is the measured weight of the battery cell.
Referring to fig. 2, the battery 10 has a charge-discharge interface 101. The first connection terminal a of the battery 10 is a first pin of the charge/discharge interface 101 of the battery 10, and the second connection terminal b of the battery is a second pin of the charge/discharge interface 101 of the battery 10. The charge-discharge interface 101 is used for connection with an electronic device.
A first pole of the battery cell 102 in the battery 10 is connected to the first pin a, and a second pole of the battery cell 102 is connected to the first end of the switching circuit 01. The first pole of the battery 102 may be one of the positive pole and the negative pole, and the second pole of the battery 102 may be the other of the positive pole and the negative pole. For example, the first pole of the cell 102 is positive and the second pole is negative.
The weight measurement circuit 02 may be configured to detect the measured weight of the battery cell 102 after detecting that the charge/discharge interface 101 is connected to the electronic device, and send the measured weight of the battery cell 102 to the electronic device. After the electronic device receives the measured weight of the battery cell 102 sent by the weight measurement circuit 02, whether the battery 10 is matched with the electronic device can be determined according to the measured weight of the battery cell 102. If the electronic device determines that the battery 10 does not match the electronic device, a shutdown instruction may be sent to the weight measurement circuit 02. After receiving the turn-off instruction sent by the electronic device, the weight measurement circuit 02 can control the first end and the second end of the switch circuit 01 to be disconnected, so that the battery cannot supply power to the electronic device, and the battery can be prevented from damaging the electronic device.
If the electronic device determines that the battery 10 matches the electronic device, a communication instruction may be sent to the weight measurement circuit 02. After receiving the communication instruction, the weight measurement circuit 02 can control the first end and the second end of the switch circuit 01 to be conducted, so that the battery 10 can supply power to the electronic equipment. When the voltage applied by the battery cell 102 to the electronic device is the operating voltage of the electronic device, the battery can supply power to the electronic device.
It will be appreciated that the electronics can determine the difference between the measured weight of the cell 102 and the nominal weight of the cell 102, and then determine whether the difference is greater than a difference threshold. If the difference is greater than the difference threshold, it may be determined that the battery 10 connected to the electronic device is not a factory battery, and then it may be determined that the battery 10 does not match the electronic device. If the electronic device determines that the difference is less than or equal to the difference threshold, it may be determined that the battery 10 connected to the electronic device is a genuine battery, and then it may be determined that the battery 10 matches the electronic device. Wherein the difference threshold is pre-stored by the electronic device.
In an embodiment of the present disclosure, an electronic device may include: the micro control unit (microcontroller unit, MCU) is connected to the battery 10 at its charge/discharge interface 101, and then the weight measurement circuit 02 can be connected to the MCU of the electronic device. And the weight measurement circuit 02 and the MCU of the electronic equipment can communicate through an integrated circuit bus (inter-integrated circuit, I2C).
In the embodiment of the present disclosure, after the charge-discharge interface 101 of the battery 10 is connected to the electronic device, the battery 10 can provide electric energy for the electronic device so as to power up the electronic device. After the electronic device is powered on, the measured weight sent by the weight measurement circuit 02 can be received, and whether the battery 10 is a primary battery or not can be identified based on the measured weight, and then whether the battery 10 is matched with the electronic device or not can be determined.
In a second implementation, the target device comprises an electronic device in which the battery detection circuit 00 is located. The first end of the switch circuit 01 is connected with the first connecting end of the electronic equipment, the second end of the switch circuit 01 is connected with the second connecting end of the electronic equipment, and the measured weight detected by the weight measuring circuit 02 is the measured weight of the battery.
Referring to fig. 3, the first connection terminal a of the electronic device 20 is a first interface of the electronic device, and the second connection terminal b of the electronic device 20 is a second interface of the electronic device. The first interface and the second interface are both configured to connect to a battery. The weight measurement circuit 02 may be configured to detect an actual measured weight of the battery after the electronic device is connected to the battery, and to control the first end and the second end of the switch circuit 01 to be disconnected after determining that the battery is not matched with the electronic device according to the actual measured weight of the battery.
For example, the weight measurement circuit 02 may determine a difference between the measured weight of the battery and the nominal weight of the battery. Then, if the weight measurement circuit 02 determines that the difference is greater than the difference threshold, it may be determined that the battery does not match the electronic device. If the weight measurement circuit 02 determines that the difference is less than or equal to the difference threshold, it may be determined that the battery matches the electronic device.
With continued reference to fig. 3, the electronic device 20 may further include: a load 201. The load 201 may be connected in series between the first interface a and the first terminal of the switching circuit 01.
In a third implementation, the target device includes an electronic device and a battery, and the battery detection circuit 00 includes: a first detection sub-circuit 100 and a second detection sub-circuit 200. One of the first detection sub-circuit 100 and the second detection sub-circuit 200 may be located in one of the electronic device and the battery, and the other of the first detection sub-circuit 100 and the second detection sub-circuit 200 may be located in the other of the electronic device and the battery. For example, referring to fig. 4, the first detection subcircuit 100 may be located in the battery 10, and the second detection subcircuit 200 may be located in the electronic device 20.
In this implementation, the first end of the target device includes: a first end of the battery and a first end of the electronic device, a second end of the target device comprising: a second end of the battery and a second end of the electronic device. Each of the first and second detection subcircuits 100 and 200 may include: a switch sub-circuit and a weight measurement sub-circuit.
The connection manner and the working principle of the switch sub-circuit and other devices (such as the weight measuring sub-circuit) in each detection sub-circuit can be referred to as the related implementation manner of the switch circuit 01 in the first (or second) implementation manner. The connection manner and the working principle of the weight measurement sub-circuit and other devices (such as the switch sub-circuit) in each detection sub-circuit can be referred to the related implementation manner of the weight measurement circuit 02 in the first (or second) implementation manner. The embodiments of the present disclosure are not described herein.
Taking the implementation shown in fig. 4 as an example, a process in which the weight measurement circuit 02 detects the measured weight of the battery and the measured weight of the battery cell is described as an example:
the weight measuring sub-circuit (hereinafter referred to as a first weight measuring sub-circuit for convenience of description) in the first sensing sub-circuit 100 may sense the measured weight of the battery cell, and the weight measuring sub-circuit (hereinafter referred to as a second weight measuring sub-circuit for convenience of description) in the second sensing sub-circuit 200 may sense the measured weight of the battery cell. Thus, the weight measurement circuit 02 can detect the measured weight of the battery and the measured weight of the battery cell.
Continuing with the implementation shown in fig. 4 as an example, an exemplary description is given of the weight measurement circuit 02 determining whether the battery is matched with the electronic device, and controlling the on-off of the first terminal and the second terminal of the switch circuit 01 based on the matching result:
After the first weight measuring sub-circuit detects the measured weight of the battery cell 102, the measured weight of the battery cell 102 may be sent to the second weight measuring sub-circuit. The second weight sub-circuit may determine whether the battery 10 matches the electronic device based on the detected measured weight of the battery 10 and the received measured weight of the battery cell 102. If the second weight sub-circuit determines that the battery 10 matches the electronic device, a turn-off command may be sent to the battery 10 first, and then the first end and the second end of the switch sub-circuit located in the electronic device 20 may be controlled to be disconnected. Wherein the off command is for directing a first terminal of a switching sub-circuit located in the battery to be controlled to be disconnected from a second terminal.
In the disclosed embodiment, the second weight sub-circuit may determine the difference between the measured weight of the battery 10 and the nominal weight of the battery 10, and the difference between the measured weight of the battery cell 102 and the nominal weight of the battery cell 102. If the second weight measurement sub-circuit determines that the difference between the measured weight of the battery 10 and the calibration weight of the battery 10 and the difference between the measured weight of the battery cell 102 and the calibration weight of the battery cell 102 are smaller than or equal to the difference threshold, it may be determined that the battery 10 is a factory battery, and then it may be determined that the battery 10 is matched with the electronic device 20. If the second weight measurement sub-circuit determines that at least one of the difference between the measured weight of the battery 10 and the calibrated weight of the battery 10 and the difference between the measured weight of the battery cell 102 and the calibrated weight of the battery cell 102 is greater than the difference threshold, it may be determined that the battery 10 is a non-genuine battery, and then it may be determined that the battery 10 and the electronic device 20 do not match.
Optionally, the weight measurement circuit 02 in the embodiments of the present disclosure may further obtain a verification code, and may determine whether the battery matches the electronic device based on the detected measured weight and the verification code. For example, the weight measurement circuit 02 may determine a difference between the detected measured weight and the corresponding calibration weight. Then, if the weight measurement circuit 02 determines that the difference is greater than the difference threshold and the verification code fails to pass the verification, it may be determined that the battery and the electronic device are not matched. If the weight measurement circuit 02 determines that the difference is less than or equal to the difference threshold and the verification code passes the verification, then it may be determined that the battery and the electronic device are not matched.
It will be appreciated that in the first implementation described above (i.e. the implementation in which the battery detection circuit is located in the battery), the weight measurement circuit 02 may have a validation code stored in advance and may send the validation code to the electronic device. Accordingly, the electronic device may determine that the battery 10 is not matched with the electronic device 20 and send a turn-off instruction to the weight measurement circuit 02 after determining that the difference between the measured weight of the battery cell 102 and the calibrated weight of the battery cell 102 is greater than the difference threshold and determining that the verification code is not verified. Alternatively, the validation code may be a string of characters.
In the embodiment of the disclosure, the target code for verifying the verification code is stored in the electronic device in advance. After the electronic device receives the verification code, it may compare whether the verification code is the same as the target code. If the electronic device determines that the verification code is the same as the target code, it may be determined that the verification code is verified. If the electronic device determines that the verification code is different from the target code, it may be determined that the verification code is not verified.
Alternatively, the weight measurement circuit 02 may encrypt the measured weight of the battery cell 102, and may send the encrypted measured weight to the electronic device.
For example, the weight measurement circuit 02 may convert the data format of the measured weight to realize encryption processing of the measured weight. Alternatively, the weight measurement circuit 02 may add the measured weight to the target value to realize encryption processing of the measured weight. The target value may be a positive real number or a negative real number, which is not limited in the embodiment of the disclosure.
In the second implementation (i.e., the implementation in which the battery detection circuit is located in the electronic device) described above, the weight measurement circuit 02 may receive the verification code sent by the battery, and may determine that the battery 10 does not match the electronic device 20 after determining that the difference between the measured weight of the battery 10 and the calibration weight of the battery 10 is greater than the difference threshold, and the verification code passes the verification, and then control the first end and the second end of the switch circuit 01 to be disconnected.
In the third implementation described above (i.e., where a portion of the battery detection circuit is located in the electronic device and a portion is located in the battery), the first weight-measuring sub-circuit may send the detected measured weight of the battery cell to the second weight-measuring sub-circuit, along with a verification code. The verification code is pre-stored in the first weight sub-circuit. After determining that the difference between the received measured weight of the battery cell and the calibration weight of the battery cell is greater than the difference threshold, and the verification code fails to be verified, the second weight measurement sub-circuit can determine that the battery 10 is not matched with the electronic device 20, and then can send a turn-off instruction to the battery 10, and control the first end and the second end of the switch sub-circuit in the electronic device to be disconnected.
In an embodiment of the present disclosure, referring to fig. 2 and 3, the weight measurement circuit 02 may include: a processing circuit 021 and a weight (weight) sensor 022. The processing circuit 021 may be connected to the first connection terminal a, the control terminal of the switching circuit 01, and the weight sensor 022, respectively.
The weight sensor 022 is configured to detect a measured weight of the battery and/or a measured weight of a battery cell in the battery after the electronic device is connected to the battery, and send the detected measured weight to the processing circuit 021. The processing circuit 021 is used for determining whether the battery is matched with the electronic device according to the actually measured weight detected by the weight sensor 022, and controlling the on-off of the first end and the second end of the switch circuit 01 based on the matching result so as to disconnect or connect a circuit loop between the electronic device and the battery.
In the embodiment of the present disclosure, the implementation of the first detection sub-circuit located in the battery in the third implementation may refer to the implementation of the battery detection circuit 00 (i.e., the battery detection circuit located in the battery) in the first implementation; for an implementation of the second detection subcircuit located in the electronic device, reference may be made to an implementation of the battery detection circuit 00 in the second implementation (i.e. the battery detection circuit located in the electronic device). Since the implementation manner of the weight measurement circuit 02 in the first implementation manner is different from the implementation manner of the weight measurement circuit 02 in the second implementation manner, the battery detection circuit 00 provided in the embodiment of the present disclosure is exemplarily described by taking the weight measurement circuit in the first implementation manner and the weight measurement circuit in the second implementation manner as examples.
In a first implementation, referring to fig. 5, the processing circuit 021 in the weight measurement circuit 02 includes: a first chip U1 and a second chip U2. The first chip U1 has a first Serial Clock (SCL) pin (i.e., SCL1 pin in fig. 5), a first Serial Data (SDA) pin (i.e., SDA1 pin in fig. 5), a second SCL pin (i.e., SCL2 pin in fig. 5), a second SDA pin (i.e., SDA2 pin in fig. 5), a first Input Output (IO) pin (i.e., IO1 pin in fig. 5), a second IO pin (i.e., IO2 pin in fig. 5), and a plurality of Ground (GND) pins. The second chip U2 has a third SCL pin, a third SDA pin, a Battery (BAT) pin (may also be referred to as pack pin), a sampling resistor positive (sampling resistor positive, SRP) pin, a sampling resistor negative (sampling resistor positive, SRN) pin, a common connection pin (VSS pin shown in fig. 5), a Charging (CHG) pin, and a Discharging (DHG) pin.
The first SCL pin, the first SDA pin, the first IO pin and the second IO pin of the first chip U1 are all used for being connected with the electronic equipment. As shown in fig. 5, the second SCL pin of the first chip U1 may be connected to the third SCL pin of the second chip U2, and the second SDA pin of the first chip U1 may be connected to the third SDA pin of the second chip U2. Each GND pin of the first chip U1 is connected to the second pin 012 of the charge-discharge interface 01.
The pack pin of the second chip U2 may be connected to the first pole of the battery cell 102, the SRP pin of the second chip U2 may be connected to the positive pole of the weight sensor 022, and the SRN pin may be connected to the negative pole of the weight sensor 022. The DHG pin and CHG pin of the second chip U2 are both connected to the control terminal of the switching circuit 01. The VSS pin of the second chip U2 is grounded.
It is appreciated that since the SRP pin is connected to the positive pole of the weight sensor 022, the SRP pin may also be referred to as a WRP pin. Since the SRN pin is connected to the negative electrode of the weight sensor 022, the SRN pin may also be referred to as a WRN pin.
It is also understood that the first chip U1 may also include a powered pin that may be connected to the first pole of the battery cell 102. The first chip U1 may send the measured weight of the power core 102 to the electronic device through the second SDA pin, and may receive the turn-off instruction sent by the electronic device through the second IO pin.
In the disclosed embodiment, the weight sensor 022 may send the detected measured weight of the battery cell 102 to the second chip U2, which in turn may send the measured weight to the first chip U1. The first chip U1 may then send the measured weight to the electronic device. For example, the weight sensor 022 may determine a measured weight of the battery cell based on the collected weight signal.
Alternatively, the weight signal may be an analog signal. At this time, the second chip U2 also has an analog-to-digital converter (ADC). The ADC may convert the analog signal to a digital signal so that the second chip U2 may determine the measured weight of the cell based on the digital signal.
It is understood that the first chip U1 and the second chip U2 may be separately provided as shown in fig. 5. Alternatively, the first chip U1 and the second chip U2 may be integrally provided. The weight sensor 022 may be a film type sensor, and the weight sensor 022 may be attached to the surface of the battery cell 102. Alternatively, the weight sensor 022 may be a pressure sensitive sensor.
Optionally, as can be seen from fig. 5, the weight measurement circuit 02 may further include: the first resistor R1 to the third resistor R3. One end of the first resistor R1 may be connected to the first pole of the battery cell 102, and the other end may be connected to the pack pin of the second chip U2. I.e., the first resistor R1 may be connected in series between the first pole of the cell 102 and the second chip U2.
The second resistor R2 and the third resistor R3 may be connected in series between the WRP pin and the WRN pin of the second chip U2. For example, as shown in fig. 5, one end of the second resistor R2 is connected to the WRP pin, and the other end of the second resistor R2 is connected to one end of the weight sensor 022. One end of the third resistor R3 is connected to the other end of the weight sensor 022, and the other end of the third resistor R3 is connected to the WRN pin.
The first resistor R1 can prevent the second chip U2 from being damaged by the current output from the battery cell 102. The second resistor R2 and the third resistor R3 may be used to regulate the voltage applied by the second chip U2 to the weight sensor 022 to ensure proper operation of the weight sensor 022.
Referring to fig. 5, the weight measurement circuit 02 may further include: a first capacitor C1 and a second capacitor C2. One end of the first capacitor C1 is connected to the first pole of the battery cell 102, and the other end of the first capacitor C1 is connected to one end of the second capacitor C2. The other end of the second capacitor C2 is connected to the second pin b of the charge-discharge interface 101. Namely a first capacitor C1 and a second capacitor C2, in parallel with the second chip U2. Thus, the problem that the second chip U2 is damaged due to the short circuit of the battery cell 102 can be avoided.
In the embodiment of the disclosure, the processing circuit 02 (for example, the second chip U2 in the processing circuit 02) may encrypt the actually measured weight of the battery cell 102, and may send the actually measured weight after the encryption process to the electronic device 20, so as to determine, by the electronic device 20, whether the battery 10 is a primary battery based on the actually measured weight.
For example, after the second chip U2 encrypts the measured weight of the battery cell 102, the encrypted measured weight may be sent to the first chip U1, so that the first chip U1 sends the encrypted measured weight to the electronic device.
It will be appreciated that for the case where the weight-measuring circuit 02 also sends a verification code to the electronic device, the verification code may be stored in the first chip U1.
In a second implementation (i.e., an implementation in which the battery detection circuit 00 is located in an electronic device), referring to fig. 6 and 7, the processing circuit 021 of the weight-measuring circuit 02 may include: an MCU 0221 and a third chip U3 of the electronic device. The third chip U3 is connected to the MCU 0221 and the weight sensor 022, respectively. The control terminal of the switching circuit 01 may be connected to the third chip U3, or may be connected to the MCU 0221.
It will be appreciated that in this implementation, the electronic device 20 has a battery mounting slot in which the weight sensor 022 may be located. For example, the weight sensor 022 may be located at the bottom of the battery mounting groove. Alternatively, the weight sensor 022 may be located at a side wall of the battery mounting groove.
It is further understood that the third chip U3 and the MCU 0221 may be separately provided or may be integrally provided.
In an alternative example, referring to fig. 6, the third chip U3 is connected to the control terminal of the switch circuit 01, and the third chip U3 is the second chip U2 described above. As can be seen from fig. 6, the third SCL pin and the third SDA pin of the second chip U2 are both connected to the MCU 0221. In this implementation manner, the connection manner between the third chip U3 and the weight sensor 022 is detailed in the connection manner between the second chip U2 and the weight sensor 022 in the first implementation manner, and the embodiments of the present disclosure are not described herein again.
In another alternative example, the MCU0221 is connected to a control terminal of the switching circuit 01. Referring to fig. 7, the third chip U3 has a fourth SCL pin, a fourth SDA pin, an SRP pin, an SRN pin, a VSS pin, and a power-up pin (i.e., VDD pin shown in fig. 7). The MCU0221 has a CHG pin, a DHG pin, and a power-up pin.
The SCL4 pin and the SDA4 pin of the third chip U3 are connected to the MCU0221, respectively. The VSS pin of the third chip U3 is grounded, and the VDD pin is connected to the first connection terminal a. The SRP pin and the SRN pin of the third chip U3 are both connected to the weight sensor 022. The control terminal of the switching circuit 01 is connected to the CHG pin and DHG pin of the MCU0221, and the VDD pin of the MCU0221 is connected to the first connection terminal a.
As will be appreciated, with continued reference to fig. 6 and 7, the processing circuit 021 may further comprise: fourth resistor R4 to seventh resistor R7. One end of the fourth resistor R4 may be connected to the first connection terminal a of the electronic device, and the other end may be connected to the VDD pin of the third chip U3. The fifth resistor R5 and the sixth resistor R6 may be connected in series between the WRP pin and the WRN pin of the third chip U3. One end of the seventh resistor R7 may be connected to the first connection terminal a, and the other end may be connected to the VDD pin of the MCU 0221.
In the embodiment of the present disclosure, referring to fig. 5 to 7, the switching circuit 01 includes: and a transistor 011. The gate (gate, G) of the transistor 011 is connected to the weight measuring circuit 02, the first pole of the transistor 011 is connected to one of the first connection terminal a and the second connection terminal b, and the second pole of the transistor 011 is connected to the other of the first connection terminal a and the second connection terminal b. The first pole of the transistor 011 may be one of a source (S) and a drain (D), and the second pole of the transistor 011 may be the other of the source and the drain.
As can also be seen from fig. 5 to 7, the switching circuit 01 may further comprise: a transistor 012. For convenience of distinction, the transistor 011 is referred to as a first transistor 011, and the transistor 012 is referred to as a second transistor 012. The gate G of the second transistor 012 is connected to the weight measurement circuit 02, a first pole of the second transistor 012 may be connected to a second pole of the first transistor 011, and a second pole of the second transistor 012 may be connected to one of the first connection terminal a and the second connection terminal. It can be seen that the first pole of the first transistor 011 can be connected to a connection terminal via the second transistor 012.
The first transistor 011 may be turned on when the battery is in a discharge state, and the first transistor 011 may be turned off after the voltage of the battery is lower than a first voltage threshold value, so as to avoid overdischarging the battery. The second transistor 012 may be turned on when the battery is in a charged state, and the second transistor 012 may be turned off after the voltage of the battery is higher than a second voltage threshold to avoid overcharge of the battery. Wherein the first voltage threshold is less than the second voltage threshold, e.g., the first voltage threshold is 2.5 volts (V), and the second voltage threshold is 4.5V.
In a first implementation, i.e. an implementation in which the battery detection circuit 00 is located in a battery, a first pole of the first transistor 011 may be connected to the first connection a and a second pole of the transistor 011 is connected to the second connection b. For example, referring to fig. 5, the gate of the first transistor 011 is connected to the DHG pin of the second chip U2, the first pole of the first transistor 011 may be connected to the second pole of the battery 102, and the second pole of the first transistor 011 is connected to the first pole of the second transistor 012. The gate of the second transistor 012 is connected to the CHG pin of the second chip U2, and the second pole of the second transistor 012 is connected to the second pin b of the charge-discharge interface 101.
In a second implementation, i.e. an implementation in which the battery detection circuit 00 is located in an electronic device, a first pole of the first transistor 011 may be connected to the second connection b, and a second pole of the transistor 011 is connected to the first connection a. For example, referring to fig. 6, the gate of the first transistor 011 is connected to the DHG pin of the third chip U3, the first pole of the first transistor 011 may be connected to the second connection terminal b, and the second pole of the first transistor 011 is connected to the first pole of the second transistor 012. The gate of the second transistor 012 is connected to the CHG pin of the third chip U3, and the second pole of the second transistor 012 is connected to the load 201.
In the embodiment of the present disclosure, after the electronic device is connected to the battery, the weight measurement circuit 02 may control the first transistor 011 to be turned on. At this time, the parasitic diode in the second transistor 012 is turned on. The battery, the parasitic diode, and the first transistor 011 may form a current loop, and accordingly, the battery cell 102 can supply power to the electronic device through the current loop to power up the electronic device.
It can be appreciated that, in the scenario that the first transistor 011 is turned on to enable the battery core 102 of the battery to provide the electric energy for the electronic device, the voltage applied by the battery core 102 to the electronic device is greater than or equal to the operating voltage of the electronic device.
It will be further understood that if the battery cell 102 is a non-factory cell, that is, the battery is a non-factory battery, the battery cell 102 of the battery may output a larger current to the electronic device after the first end and the second end of the switch circuit 01 are conducted, and the larger current may damage the electronic device. Thus referring to fig. 8 and 9, the battery may further include: and a current limiting resistor R8. One end of the current limiting resistor R8 may be connected to a first pole of the first transistor 011, and the other end of the current limiting resistor R8 may be connected to a second pole of the first transistor 011. For example, the other end of the current limiting resistor R8 may be connected to the second pole of the second transistor 012, i.e., the other end of the current limiting resistor R8 may be connected to the second pole of the first transistor 011 through the second transistor 012.
Based on this, after the battery is connected to the electronic device, the weight measurement circuit 02 does not need to control the first end and the second end of the switch circuit 01 to be conducted, and the battery core 102 of the battery can provide electric energy for the electronic device through the current limiting resistor R8, so that the electronic device is powered on, and whether the battery connected with the electronic device is a primary battery or not is determined based on the measured weight detected by the weight measurement circuit 02, and then whether the battery is matched with the electronic device is determined. In addition, since the current limiting resistor R8 is connected in series in the current path between the battery cell 102 and the electronic device, the current provided by the battery cell 102 to the electronic device can be made small, and damage to the electronic device can be avoided.
It can be appreciated that, in the scenario that the current limiting resistor R8 enables the battery 102 to provide the electric energy for the electronic device, the voltage applied by the battery 102 to the electronic device may be far less than the operating voltage of the electronic device. For example, the voltage applied by the battery cell 102 on the electronic device may be equal to the operating voltage of the MCU of the electronic device. Therefore, when the current limiting resistor R8 is used to make the battery 102 provide the electric energy for the electronic device, the voltage applied by the battery 102 to the electronic device can only drive the MCU to operate, but not drive other loads in the electronic device to operate. Therefore, the electronic equipment can be ensured to receive and detect whether the difference value between the measured weight and the calibration weight of the battery cell 102 is larger than the difference value threshold value, and damage to the electronic equipment in the process of detecting the measured weight can be avoided.
It can also be understood that, based on the on command sent by the electronic device, the weight measurement circuit 02 controls the resistance of the switch circuit 01 to be far smaller than the current limiting resistance R8 after the first end and the second end of the switch circuit 01 are turned on. Thus, it can be ensured that the battery cell 102 can provide a larger driving current for the electronic device through the switch circuit 01 so as to drive each load in the electronic device to work normally.
Taking the battery shown in fig. 8 as an example, the process of the electronic device identifying the battery and controlling the battery after the battery is connected to the electronic device is described as an example:
after the charge-discharge interface 101 of the battery is connected with the electronic device, the battery core 102 can provide electric energy for the electronic device through the current-limiting resistor R8, so that the electronic device is powered on. After the electronic equipment is electrified, the measured weight of the battery cell sent by the weight measuring circuit 02 can be received, and whether the difference value between the measured weight and the calibration weight is larger than a difference value threshold value is detected. If the electronic device determines that the difference is greater than the difference threshold, it may be determined that the battery is not matched with the electronic device, i.e., the battery is a non-factory battery, and then an off command may be sent to the weight measurement circuit 02 to instruct the weight measurement circuit 02 to control the first terminal and the second terminal of the switch circuit 01 to be turned off (i.e., to control the first transistor 011 to be turned off). Since the current through the current limiting resistor R8 is smaller than the operating current of the electronic device, the electronic device cannot be started at this time.
If the electronic device determines that the difference is not greater than the difference threshold, the electronic device may determine that the battery is matched with the electronic device, that is, the battery is a primary battery, and then may send a turn-on instruction to the weight measurement circuit 02 to instruct the weight measurement circuit 02 to turn on the first end and the second end of the switch circuit 01 (that is, control the first transistor 011 to turn on), and current may flow to the electronic device through the first transistor 011 to supply power to the electronic device, so that the electronic device is started.
In summary, the embodiment of the disclosure provides a battery detection circuit, where after an electronic device is connected to a battery, a weight measurement circuit in the battery detection circuit can detect an actual measurement weight of the battery and/or an actual measurement weight of a battery core in the battery, determine whether the battery is matched with the electronic device according to the detected actual measurement weight, and then control on/off of a current loop between the electronic device and the battery by controlling a switch circuit based on a matching result. Because the measured weight of the battery and/or the measured weight of the battery core are detected by the weight measuring circuit, the electronic equipment can be ensured to accurately identify whether the battery connected with the electronic equipment is a primary battery or not based on the measured weight, and the battery which is not primary can be further prevented from supplying power to the electronic equipment, so that the electronic equipment can be prevented from being damaged, and the use safety is ensured.
The embodiment of the disclosure also provides a battery detection method, which is applied to electronic equipment. The electronic device is used for being connected with the battery, the electronic device and/or the battery belong to a target device, and a battery detection circuit is configured in the target device. The battery detection circuit includes: the device comprises a switching circuit and a weight measuring circuit, wherein a first end of the switching circuit is connected with a first connecting end of target equipment, a second end of the switching circuit is connected with a second connecting end of the target equipment, and the weight measuring circuit is connected with a control end of the switching circuit. Referring to fig. 10, the method includes:
Step 301, after the electronic device is connected with the battery, the measured weight of the battery and/or the measured weight of the battery core in the battery detected by the weight measurement circuit are obtained.
In the embodiment of the disclosure, if the target device includes a battery and the battery detection circuit is configured in the battery, the electronic device may obtain the measured weight of the battery core in the battery detected by the weight measurement circuit after the electronic device is connected with the battery.
If the target device comprises an electronic device and the battery detection circuit is configured in the electronic device, the electronic device can directly acquire the measured weight of the battery detected by the weight measurement circuit after the electronic device is connected with the battery.
If the target device comprises a battery and an electronic device, a first detection sub-circuit included in the battery detection circuit is configured in the battery, and a second detection sub-circuit included in the battery detection circuit is configured in the electronic device, after the electronic device is connected with the battery, the electronic device can acquire the measured weight of the battery detected by a weight measurement sub-circuit in the second detection sub-circuit, and can receive the measured weight of the battery core detected by the weight measurement sub-circuit in the first detection sub-circuit.
Step 302, determining whether the battery is matched with the electronic device according to the actually measured weight, and controlling the on-off of the first end and the second end of the switch circuit based on the matching result so as to disconnect or connect a current loop between the electronic device and the battery.
In the embodiment of the disclosure, after the electronic device obtains the measured weight detected by the weight measuring circuit, a difference value between the measured weight and the corresponding calibration weight can be determined. Then, if the electronic device determines that the difference is greater than the difference threshold, it may be determined that the battery does not match the electronic device, and then the first end and the second end of the switching circuit may be controlled to be disconnected so as to disconnect a current loop between the electronic device and the battery.
If the electronic device determines that the difference is less than or equal to the difference threshold, it may be determined that the battery is matched with the electronic device, and then the first end and the second end of the switching circuit may be controlled to be conducted so as to conduct a current loop between the electronic device and the battery.
If the measured weight detected by the weight measuring circuit comprises the measured weight of the battery, the corresponding calibration weight comprises the weight of the primary battery. If the measured weight detected by the weight measuring circuit comprises the measured weight of the battery cell, the corresponding calibration weight comprises the weight of the battery cell of the original factory.
The calibration weight of the battery is pre-stored by the electronic device. For example, the nominal weight of the battery may be written to the electronic device by a worker prior to shipment of the electronic device. The nominal weight of the cell may be pre-stored by the electronic device or may be received by the electronic device. For example, when the electronic device leaves the factory, a factory battery is usually provided, and the factory battery is connected to the electronic device, so that the electronic device can determine the measured weight of the battery cell (i.e., the first measured weight received) received for the first time after leaving the factory as the calibration weight of the battery cell, and store the calibration weight.
In the embodiment of the disclosure, if the target device includes a battery, the electronic device may obtain the measured weight of the battery cell sent by the weight measurement circuit, and determine whether the battery connected to the electronic device is matched with the electronic device based on the measured weight of the battery cell. If the electronic device determines that the battery is not matched with the electronic device, the battery can be determined to be not a primary battery, and then a turn-off instruction is sent to the weight measurement circuit. After the weight measurement circuit in the battery receives a turn-off instruction sent by the electronic equipment, the first end and the second end of the switch circuit can be controlled to be disconnected, so that the battery core cannot supply power to the electronic equipment to enable the electronic equipment to work, and then the battery can be prevented from damaging the electronic equipment. I.e. the electronic device may control the first and second terminals of the switching circuit to be disconnected by a weight measuring circuit in the battery. If the electronic device determines that the battery is matched with the electronic device, the battery can be determined to be a primary battery, and then a conduction instruction can be sent to the weight measurement circuit. After receiving a conduction instruction sent by the electronic equipment, the weight measurement circuit can control the first end and the second end of the switch circuit to be conducted, so that the battery supplies power to the electronic equipment to enable the electronic equipment to work.
If the target device includes an electronic device, the electronic device may directly obtain the measured weight of the battery detected by the weight measurement circuit, and may determine whether the battery is matched with the electronic device according to the measured weight of the battery. If the electronic device determines that the battery is not matched with the electronic device, the first end and the second end of the switch circuit can be directly controlled to be disconnected. If the electronic device determines that the battery is matched with the electronic device, the first end and the second end of the switch circuit can be directly controlled to be conducted.
If the target device comprises a battery and an electronic device, the electronic device can acquire the measured weight of the battery core and the measured weight of the battery detected by the weight measuring circuit, and can determine whether the battery is matched with the electronic device according to the measured weight of the battery core and the measured weight of the battery. In the case where the target device includes a battery and an electronic device, the electronic device controls the implementation manner of on-off of the first end and the second end of the switch circuit based on the matching result of the battery and the electronic device, and reference may be made to a related implementation process in the third implementation manner in the above apparatus embodiment, which is not described herein again.
In summary, the embodiment of the disclosure provides a method for detecting a battery, after an electronic device is connected with the battery, the measured weight of the battery and/or the measured weight of a battery core detected by a weight measurement circuit can be obtained, whether the battery is matched with the electronic device or not can be determined according to the detected measured weight, and then on-off of a current loop between the electronic device and the battery is controlled by a control switch circuit based on a matching result. Because the measured weight of the battery and/or the measured weight of the battery core are detected by the weight measuring circuit, the electronic equipment can be ensured to accurately identify whether the battery is a primary battery or not based on the measured weight, and the non-primary battery can be further prevented from supplying power to the electronic equipment, so that the electronic equipment can be prevented from being damaged, and the use safety is ensured.
Fig. 11 is a flowchart of another method for detecting a battery according to an embodiment of the present application, where the method may be applied to an electronic device, where the electronic device is used to connect to the battery. The electronic device and/or the battery belong to a target device, and a battery detection circuit is configured in the target device, and the battery detection circuit can be the battery detection circuit provided by the device embodiment. Referring to fig. 11, the method may include:
step 401, after being connected with a battery, obtaining the measured weight of the battery core and/or the measured weight of the battery, which are sent by the weight measurement circuit.
The implementation process of step 401 may refer to the implementation process of step 301, which is not described herein.
Step 402, acquiring verification codes.
After the electronic device is connected with the battery, the weight measurement circuit of the battery can also send a verification code to the electronic device. Accordingly, the electronic device may obtain the verification code.
Step 403, determining whether the battery is matched with the electronic device according to the measured weight and the verification code, and controlling the on-off of the first end and the second end of the switch circuit based on the matching result so as to disconnect or connect a current loop between the electronic device and the battery.
In embodiments of the present disclosure, the electronic device may determine a difference between the measured total amount detected by the weight measurement circuit and the nominal weight. Then, if the electronic device determines that the difference is greater than the difference threshold and the verification code fails to pass the verification, it may be determined that the battery is not matched with the electronic device, i.e., the battery is a non-factory battery, and then the first end and the second end of the switch circuit may be controlled to disconnect so as to disconnect a current loop between the electronic device and the battery, so as to avoid the battery from damaging the electronic device.
If the electronic device determines that the difference is less than or equal to the difference threshold and the verification code passes the verification, the battery can be determined to be matched with the electronic device, namely the battery is a primary battery, and then the first end and the second end of the switching circuit can be controlled to be conducted so as to conduct a current loop between the electronic device and the battery.
It should be noted that, the sequence of the steps of the method for detecting a battery provided in the embodiment of the present disclosure may be appropriately adjusted, and the steps may be deleted according to circumstances. For example, step 402 may be deleted as appropriate. Any method that can be easily conceived by those skilled in the art within the technical scope of the present disclosure should be covered in the protection scope of the present disclosure, and thus will not be repeated.
In summary, the embodiment of the disclosure provides a method for detecting a battery, after an electronic device is connected with the battery, whether the battery is matched with the electronic device or not can be determined according to detected actually measured weight, and then a control switch circuit is controlled to switch on and off a current loop between the electronic device and the battery based on a matching result. Because the measured weight of the battery and/or the measured weight of the battery core are detected by the weight measuring circuit, the electronic equipment can be ensured to accurately identify whether the battery is a primary battery or not based on the measured weight, and the non-primary battery can be further prevented from supplying power to the electronic equipment, so that the electronic equipment can be prevented from being damaged, and the use safety is ensured.
Fig. 12 is a block diagram of an electronic device according to an embodiment of the present disclosure. The electronic device is used for being connected with the battery, the electronic device and/or the battery belong to a target device, and a battery detection circuit is configured in the target device. The battery detection circuit includes: the device comprises a switch circuit and a weight measuring circuit, wherein a first end of the switch circuit is connected with a first connecting end of target equipment, a second end of the switch circuit is connected with a second connecting end of the target equipment, the target equipment is electronic equipment or a battery, and the weight measuring circuit is connected with a control end of the switch circuit. Referring to fig. 12, the electronic device 500 includes:
The acquiring module 501 is configured to acquire, after the electronic device is connected to the battery, the measured weight of the battery or/and the measured weight of the battery cell in the battery detected by the weight measurement circuit.
The control module 502 is configured to determine whether the battery is matched with the electronic device according to the measured weight, and control on-off of the first end and the second end of the switch circuit based on the matching result, so as to disconnect or connect a current loop between the electronic device and the battery.
Alternatively, the control module 502 may be configured to:
determining a difference value between the measured weight and the corresponding calibration weight, wherein the calibration weight corresponding to the measured weight of the battery cell is the weight of the battery cell of the original factory received by the electronic equipment;
if the difference is greater than the difference threshold, determining that the battery is matched with the electronic equipment, and controlling the first end and the second end of the switch circuit to be disconnected so as to disconnect a current loop between the electronic equipment and the battery;
if the difference is smaller than or equal to the difference threshold, the battery is determined to be matched with the electronic equipment, and the first end and the second end of the switch circuit are controlled to be conducted so as to conduct a current loop between the electronic equipment and the battery.
Optionally, a battery detection circuit is configured in the battery. The acquisition module 501 may be configured to: and receiving the measured weight of the battery cell sent by the weight measurement circuit.
The control module 502 may be configured to: and determining whether the battery is matched with the electronic equipment according to the measured weight of the battery cell.
Optionally, the electronic device is configured with a battery detection circuit. The acquisition module 501 may be configured to: and obtaining the actually measured weight of the battery detected by the weight measuring circuit.
The control module 502 may be configured to: and determining whether the battery is matched with the electronic equipment according to the measured weight of the battery.
Alternatively, the control module 502 may be configured to: the acquired verification code; and determining whether the battery is matched with the electronic device according to the measured weight and the verification code.
In summary, the embodiment of the disclosure provides an electronic device, after the electronic device is connected with a battery, whether the battery is matched with the electronic device or not can be determined according to the detected actually measured weight, and then the on-off of a current loop between the electronic device and the battery is controlled by a control switch circuit based on a matching result. Because the measured weight of the battery and/or the measured weight of the battery core are detected by the weight measuring circuit, the electronic equipment can be ensured to accurately identify whether the battery is a primary battery or not based on the measured weight, and the non-primary battery can be further prevented from supplying power to the electronic equipment, so that the electronic equipment can be prevented from being damaged, and the use safety is ensured.
Fig. 13 is a block diagram of another electronic device provided by an embodiment of the disclosure, referring to fig. 13, the electronic device 600 may include: a processor 601, a memory 602 and a display 603.
Processor 601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 601 may be implemented in at least one hardware form of DSP (digital signal processing ), FPGA (field-programmable gate array, field programmable gate array), PLA (programmable logic array ). The processor 601 may also include a main processor, which is a processor for processing data in an awake state, also called a CPU (central processing unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 601 may be integrated with a GPU (graphics processing unit, image processor) for taking care of rendering and rendering of content that the display screen is required to display. In some embodiments, the processor 601 may also include an AI (artificial intelligence ) processor for processing computing operations related to machine learning.
The memory 602 may include one or more computer-readable storage media, which may be non-transitory. The memory 602 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 602 is used to store at least one instruction for execution by processor 601 to implement the method of detecting a battery provided by the method embodiments of the present disclosure.
The display screen 603 is used to display a UI (user interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 603 is a touch display, the display 603 also has the ability to collect touch signals at or above the surface of the display 603. The touch signal may be input as a control signal to the processor 601 for processing. At this time, the display 603 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display screen 603 may be one and disposed on the front panel of the electronic device 600; in other embodiments, the display screen 603 may be at least two, and disposed on different surfaces of the electronic device 600 or in a folded design; in other embodiments, the display 603 may be a flexible display disposed on a curved surface or a folded surface of the electronic device 600. Even more, the display screen 603 may be arranged in an irregular pattern that is not rectangular, i.e. a shaped screen. The display 603 may be made of LCD (liquid crystal display ), OLED (organic light-emitting diode) or other materials.
Optionally, with continued reference to fig. 13, the electronic device 600 may further include: a peripheral interface 604 and at least one peripheral. The processor 601, memory 602, and peripheral interface 604 may be connected by a bus or signal line. Individual peripheral devices may be connected to the peripheral device interface 604 by buses, signal lines or a circuit board. For example, the peripheral device may include: one of radio frequency circuitry 605, camera assembly 606 and audio circuitry 607. Wherein the display 603 also belongs to the peripheral device.
Peripheral interface 604 may be used to connect at least one Input/Output (I/O) related peripheral to processor 601 and memory 602. In some embodiments, processor 601, memory 602, and peripheral interface 604 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 601, memory 602, and peripheral interface 604 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The radio frequency circuit 605 is used to receive and transmit RF (radio frequency) signals, also known as electromagnetic signals. The radio frequency circuit 605 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 605 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 605 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuit 605 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the world wide web, metropolitan area networks, intranets, generation mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi networks. In some embodiments, the radio frequency circuit 605 may also include NFC (near field communication, short range wireless communication) related circuits, which are not limited by the disclosed embodiments.
The camera assembly 606 is used to capture images or video. Optionally, the camera assembly 606 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera, and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and VR (virtual reality) shooting function or other fusion shooting functions. In some embodiments, camera assembly 606 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuit 607 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 601 for processing, or inputting the electric signals to the radio frequency circuit 605 for voice communication. For purposes of stereo acquisition or noise reduction, the microphone may be multiple and separately disposed at different locations of the electronic device 600. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 601 or the radio frequency circuit 605 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, the audio circuit 607 may also include a headphone jack.
Those skilled in the art will appreciate that the structure shown in fig. 13 is not limiting of the electronic device 600 and may include more or fewer components than shown, or may combine certain components, or may employ a different arrangement of components.
The present disclosure also provides a computer readable storage medium storing a computer program loaded and executed by a processor to implement the method for detecting a battery provided by the above method embodiment.
Embodiments of the present disclosure provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the display device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the method for detecting a battery provided by the above method embodiment.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
It is understood that the meaning of the term "plurality" in the embodiments of the present disclosure means two or more.
Reference herein to "and/or" means that there may be three relationships, e.g., a and/or B, which may represent: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The terms "first," "second," and the like in the embodiments of the present disclosure are used to distinguish between identical or similar items that have substantially identical function and function, and it should be understood that the terms "first," "second," and "n" do not have a logical or chronological dependency relationship, nor do they limit the number and order of execution.
The foregoing description of the preferred embodiments of the present disclosure is provided for the purpose of illustration only, and is not intended to limit the disclosure to the particular embodiments disclosed, but on the contrary, the intention is to cover all modifications, equivalents, alternatives, and alternatives falling within the spirit and principles of the disclosure.

Claims (19)

1. A battery detection circuit, characterized in that the battery detection circuit comprises: a switching circuit and a weight measurement circuit;
the first end of the switch circuit is connected with the first connection end of the target device, and the second end of the switch circuit is connected with the second connection end of the target device, wherein the target device comprises: an electronic device and/or a battery;
The weight measuring circuit is connected with the control end of the switching circuit, and is used for detecting the actual measured weight of the battery and/or the actual measured weight of the battery core in the battery after the electronic equipment is connected with the battery, determining whether the battery is matched with the electronic equipment or not according to the actual measured weight, and controlling the on-off of the first end and the second end of the switching circuit based on a matching result so as to disconnect or connect a current loop between the electronic equipment and the battery.
2. The battery detection circuit of claim 1, wherein the weight measurement circuit is configured to:
determining a difference value between the measured weight and the corresponding calibration weight, wherein the calibration weight corresponding to the measured weight of the battery cell is the weight of the battery cell of the original factory received by the electronic equipment;
if the difference is greater than a difference threshold, determining that the battery is not matched with the electronic equipment, and controlling the first end and the second end of the switching circuit to be disconnected so as to disconnect a current loop between the electronic equipment and the battery;
and if the difference value is smaller than or equal to the difference value threshold value, determining that the battery is matched with the electronic equipment, and controlling the first end and the second end of the switching circuit to be conducted so as to conduct a current loop between the electronic equipment and the battery.
3. The battery detection circuit of claim 1, wherein the weight measurement circuit comprises: a processing circuit and a weight sensor;
the processing circuit is respectively connected with the first connecting end, the control end of the switch circuit and the weight sensor;
the weight sensor is used for detecting the actual measured weight of the battery and/or the actual measured weight of an electric core in the battery after the electronic equipment is connected with the battery, and sending the detected actual measured weight to the processing circuit;
the processing circuit is used for determining whether the battery is matched with the electronic equipment according to the actually measured weight, and controlling the first end and the second end of the switching circuit to be on-off based on a matching result so as to disconnect or connect a current loop between the electronic equipment and the battery.
4. The battery detection circuit of claim 3, wherein the target device comprises the battery, the battery detection circuit is located in the battery, and the measured weight detected by the weight measurement circuit is the measured weight of the battery cell;
the processing circuit is used for encrypting the measured weight of the battery cell after detecting that the electronic equipment is connected with the battery, sending the encrypted measured weight to the electronic equipment, and controlling the first end and the second end of the switch circuit to be disconnected after receiving a turn-off instruction sent by the electronic equipment;
The turn-off instruction is sent after the electronic device determines that the battery is not matched with the electronic device according to the measured weight of the battery cell.
5. The battery detection circuit of claim 4, wherein the weight sensor is a thin film sensor and is attached to the surface of the cell.
6. The battery detection circuit of claim 3, wherein the target device comprises the electronic device, the battery detection circuit being located in the electronic device;
the weight sensor is located in a battery mounting groove of the electronic device.
7. The battery detection circuit of claim 1, wherein the target device is the battery, the battery detection circuit is located in the battery, the battery has a charge-discharge interface, the first connection terminal is a first pin of the charge-discharge interface, and the second connection terminal is a second pin of the charge-discharge interface;
the first pole of the battery cell is connected with the first pin, and the second pole of the battery cell is connected with the first end of the switch circuit;
the weight measuring circuit is used for detecting the actual measured weight of the battery cell after detecting that the charge-discharge interface is connected with the electronic equipment, sending the actual measured weight of the battery cell to the electronic equipment, and controlling the first end and the second end of the switch circuit to be disconnected after receiving a turn-off instruction sent by the electronic equipment so as to disconnect a current loop between the electronic equipment and the battery;
The turn-off instruction is sent after the electronic device determines that the battery is not matched with the electronic device according to the measured weight of the battery cell.
8. The battery detection circuit of claim 1, wherein the target device is the electronic device, the battery detection circuit is located in the electronic device, the first connection terminal is a first interface of the electronic device, the second connection terminal is a second interface of the electronic device, and the first interface and the second interface are both used for connecting with the battery;
the weight measuring circuit is used for detecting the measured weight of the battery after the electronic equipment is connected with the battery, and controlling the first end and the second end of the switch circuit to be disconnected after the fact that the battery is not matched with the electronic equipment is determined according to the measured weight of the battery.
9. The battery detection circuit of any one of claims 1 to 8, wherein the weight measurement circuit is further configured to:
acquiring a verification code;
and determining whether the battery is matched with the electronic equipment according to the measured weight and the verification code.
10. The battery detection circuit according to any one of claims 1 to 8, wherein the switching circuit includes: a transistor;
The grid of the transistor is connected with the weight measuring circuit, the first pole of the transistor is connected with one of the first connecting end and the second connecting end, and the second pole of the transistor is connected with the other of the first connecting end and the second connecting end.
11. The battery detection circuit of claim 10, wherein the battery detection circuit further comprises: a current limiting resistor;
one end of the current limiting resistor is connected with the first pole of the transistor, and the other end of the current limiting resistor is connected with the second pole of the transistor.
12. A method for detecting a battery, wherein an electronic device is applied, the electronic device is used for being connected with the battery, the electronic device and/or the battery belong to a target device, a battery detection circuit is configured in the target device, and the battery detection circuit comprises: the device comprises a switch circuit and a weight measuring circuit, wherein a first end of the switch circuit is connected with a first connecting end of target equipment, a second end of the switch circuit is connected with a second connecting end of the target equipment, and the weight measuring circuit is connected with a control end of the switch circuit; the method comprises the following steps:
After the electronic equipment is connected with the battery, acquiring the measured weight of the battery and/or the measured weight of an electric core in the battery, which are detected by the weight measuring circuit;
and determining whether the battery is matched with the electronic equipment according to the actually measured weight, and controlling the on-off of the first end and the second end of the switching circuit based on a matching result so as to disconnect or connect a current loop between the electronic equipment and the battery.
13. The method of claim 12, wherein said determining whether the battery matches the electronic device based on the measured weight comprises:
determining a difference value between the measured weight and the corresponding calibration weight, wherein the calibration weight corresponding to the measured weight of the battery cell is the weight of the battery cell of the original factory received by the electronic equipment;
if the difference is greater than a difference threshold, determining that the battery is matched with the electronic equipment, and controlling the first end and the second end of the switching circuit to be disconnected so as to disconnect a current loop between the electronic equipment and the battery;
and if the difference value is smaller than or equal to the difference value threshold value, determining that the battery is matched with the electronic equipment, and controlling the first end and the second end of the switching circuit to be conducted so as to conduct a current loop between the electronic equipment and the battery.
14. The method of claim 12, wherein the battery is configured with a battery detection circuit; the obtaining the measured weight of the battery and/or the measured weight of the battery core detected by the weight measuring circuit comprises the following steps:
receiving the measured weight of the battery cell sent by the weight measuring circuit;
the determining whether the battery is matched with the electronic equipment according to the measured weight comprises the following steps:
and according to the measured weight of the battery cell.
15. The method of claim 12, wherein the electronic device has a battery detection circuit configured therein; the obtaining the measured weight of the battery and/or the measured weight of the battery core detected by the weight measuring circuit comprises the following steps:
obtaining the actually measured weight of the battery detected by the weight measuring circuit;
the determining whether the battery is matched with the electronic equipment according to the measured weight comprises the following steps:
and determining whether the battery is matched with the electronic equipment according to the measured weight of the battery.
16. The method of any of claims 12 to 15, wherein said determining whether the battery matches the electronic device based on the measured weight comprises:
The acquired verification code;
and determining whether the battery is matched with the electronic equipment according to the measured weight and the verification code.
17. An electronic device, wherein the electronic device is configured to be connected to a battery, the electronic device and/or the battery belong to a target device, and a battery detection circuit is configured in the target device, and the battery detection circuit comprises: the first end of the switch circuit is connected with the first connecting end of the target equipment, the second end of the switch circuit is connected with the second connecting end of the target equipment, the target equipment is the electronic equipment or the battery, and the weight measuring circuit is connected with the control end of the switch circuit; the electronic device includes:
the acquisition module is used for acquiring the measured weight of the battery and/or the measured weight of the battery core in the battery, which are detected by the weight measuring circuit after the electronic equipment is connected with the battery;
and the control module is used for determining whether the battery is matched with the electronic equipment or not according to the actually measured weight, and controlling the on-off of the first end and the second end of the switching circuit based on a matching result so as to disconnect or connect a current loop between the electronic equipment and the battery.
18. An electronic device, the electronic device comprising: a processor and a memory storing a computer program that is loaded and executed by the processor to implement the method of detecting a battery as claimed in any one of claims 12 to 16.
19. A computer readable storage medium storing a computer program loaded and executed by a processor to implement the method of detecting a battery according to any one of claims 12 to 16.
CN202211086100.1A 2022-09-06 2022-09-06 Battery detection circuit, battery detection method and electronic equipment Pending CN117705245A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211086100.1A CN117705245A (en) 2022-09-06 2022-09-06 Battery detection circuit, battery detection method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211086100.1A CN117705245A (en) 2022-09-06 2022-09-06 Battery detection circuit, battery detection method and electronic equipment

Publications (1)

Publication Number Publication Date
CN117705245A true CN117705245A (en) 2024-03-15

Family

ID=90146617

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211086100.1A Pending CN117705245A (en) 2022-09-06 2022-09-06 Battery detection circuit, battery detection method and electronic equipment

Country Status (1)

Country Link
CN (1) CN117705245A (en)

Similar Documents

Publication Publication Date Title
US11288407B2 (en) Method and electronic device for controlling voltage output to external electronic device according to size of voltage detected at signal terminal connected to external electronic device
US11336105B2 (en) Multi-battery charging and discharging device and mobile terminal
KR102405865B1 (en) Electronic device for controlling communication connection with input device and method for controlling thereof
US8552691B2 (en) Charging circuit with function of avoiding battery pulling down voltage output from charging device and charging method thereof
US8217639B2 (en) System for supplying and receiving power, power supply device and method thereof
US9979220B2 (en) Electronic device and method for controlling charging of the same
KR20090011171A (en) Mobile phone and method for charging through discernment charging cable
US20190372376A1 (en) Electronic device including control circuits controlling switches connected to charging circuit
CN111239617B (en) Control method and device for charge and discharge test, storage medium and system
US11379026B2 (en) Electronic device for preventing damage of USB device and operating method thereof
KR102540749B1 (en) An electronic device determining a power transmission path at least based on a property of a power being supplied from outside of the electronic device and a status of the electronic device and control method thereof
JP2016531368A (en) Apparatus and method for changing current limit value
CN112311029B (en) Charging method, electronic device and storage medium
US7552245B2 (en) Communication card with three operational states
US11824378B2 (en) Method and device for identifying battery, battery, and storage medium
KR102507526B1 (en) Electronic device and method for controlling wireless charging according to state of external device mounted to electronic device
KR20200094926A (en) Method to control charging of multiple batteries and electronic device applying the method
US20130103878A1 (en) Universal usb charger
US11394225B2 (en) Method and apparatus for changing impedance of terminal included in connector
KR20210037309A (en) Electronic device and method for controlling reset of control integrated circuit
KR20210033758A (en) Method for power supply and an electronic device thereof
CN117705245A (en) Battery detection circuit, battery detection method and electronic equipment
CN113162131A (en) Reverse charging system, reverse charging method and terminal equipment
US20130221904A1 (en) Terminal and method for charging battery of sub terminal connected to main terminal
JP7462838B2 (en) Electronic device providing charging prohibition and/or user interface based on battery over-discharge state and control method thereof

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