Battery detection circuit, battery detection method, and electronic device

CN117705245BActive Publication Date: 2026-10-23BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211086100.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-06
Publication Date
2026-10-23
Estimated Expiration
2042-09-06

AI Technical Summary

Benefits of technology

本公开实施例提供了一种电池检测电路、电池的检测方法及电子设备,电池检测电路中的测重电路在电子设备与电池连接后,能够检测电池的实测重量和/或电池中的电芯的实测重量,并根据检测到的实测重量确定电池与电子设备是否匹配,继而基于匹配结果通过控制开关电路控制电子设备与电池之间的电流回路的通断。由于该电池的实测重量和/或电池中的电芯的实测重量是测重电路检测到的,因此可以确保电子设备能够基于该实测重量较为准确的识别出与电子设备连接的电池是否为原厂电池,进而可以避免非原厂电池为电子设备供电,从而可以避免损坏电子设备,确保使用安全。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117705245B_ABST
    Figure CN117705245B_ABST
Patent Text Reader

Abstract

The application discloses a battery detection circuit, a battery detection method and an electronic device, and belongs to the technical field of batteries. The weight measurement circuit in the battery detection circuit can detect the actual weight of the battery and / or the actual weight of the battery cell in the battery after the electronic device is connected with the battery, and determine whether the battery and the electronic device are matched according to the detected actual weight, and then control the on-off of the current loop between the electronic device and the battery based on the matching result by controlling the switching circuit. Since the actual weight of the battery and / or the actual weight of the battery cell in the battery is detected by the weight measurement circuit, it can be ensured that the electronic device can accurately identify whether the battery connected with the electronic device is a factory battery based on the actual weight, and then the non-factory battery can be avoided to supply power to the electronic device, so as to avoid damaging the electronic device and ensure the use safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of battery technology, and in particular to a battery detection circuit, a battery detection method, and an electronic device. Background Technology

[0002] Electronic devices contain batteries, and the longer these batteries are used, the weaker their battery life becomes. Consequently, the electronic device's overall battery life also decreases. To improve the battery life of electronic devices, the weaker battery can usually be replaced with a stronger one.

[0003] Currently, there are many counterfeit battery products on the market. When consumers use them, it can lead to a worse user experience of electronic devices, damage to electronic devices, and even the risk of explosion and fire. Therefore, after replacing the battery, electronic devices need to check whether the replacement battery is an original battery (i.e., a battery that is compatible with the electronic device). Summary of the Invention

[0004] This disclosure provides a battery detection circuit, a battery detection method, and an electronic device. The technical solutions are as follows: On the one hand, a battery detection circuit is provided, the battery detection circuit including: a switching circuit and a weight measuring circuit; The first terminal of the switching circuit is connected to the first connection terminal of the target device, and the second terminal of the switching circuit is connected to the second connection terminal of the target device, wherein the target device includes: electronic equipment and / or battery; The weighing circuit is connected to the control terminal of the switching circuit. The weighing circuit is used to detect the actual weight of the battery and / or the actual weight of the cells in the battery after the electronic device is connected to the battery, and to determine whether the battery is matched with the electronic device based on the actual weight, and to control the on / off state of the first terminal and the second terminal of the switching circuit based on the matching result, so as to disconnect or connect the current loop between the electronic device and the battery.

[0005] On the other hand, a battery detection method is provided, using an electronic device, wherein the electronic device and / or the battery belong to a target device, the target device being equipped with a battery detection circuit, the battery detection circuit comprising: a switching circuit and a weighing circuit, a first terminal of the switching circuit being connected to a first connection terminal of the target device, a second terminal of the switching circuit being connected to a second connection terminal of the target device, and the weighing circuit being connected to a control terminal of the switching circuit; the method includes: After the electronic device is connected to the battery, the measured weight of the battery and / or the measured weight of the cells in the battery are obtained by the weighing circuit. Based on the measured weight, it is determined whether the battery is compatible with the electronic device, and the connection and disconnection of the first and second terminals of the switching circuit are controlled based on the matching result, so as to disconnect or connect the current loop between the electronic device and the battery.

[0006] In another aspect, an electronic device is provided, the electronic device being connected to a battery, the electronic device and / or the battery belonging to a target device, the target device being configured with a battery detection circuit, the battery detection circuit including: a switching circuit and a weighing circuit, a first terminal of the switching circuit being connected to a first connection terminal of the target device, a second terminal of the switching circuit being connected to a second connection terminal of the target device, wherein the target device is the electronic device or the battery, and the weighing circuit is connected to a control terminal of the switching circuit; the electronic device includes: The acquisition module is used to acquire the measured weight of the battery and / or the measured weight of the battery cells detected by the weighing circuit after the electronic device is connected to the battery. The control module is used to determine whether the battery is compatible with the electronic device based on the measured weight, and to control the switching of the first and second terminals of the switching circuit based on the matching result, so as to disconnect or connect the current loop between the electronic device and the battery.

[0007] In another aspect, an electronic device is provided, comprising: a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the battery detection method as described above.

[0008] In another aspect, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, the computer program being loaded and executed by a processor to implement the battery detection method as described above.

[0009] In another aspect, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the battery detection method described above.

[0010] The beneficial effects of the technical solutions provided in this disclosure include at least the following: This disclosure provides a battery detection circuit, a battery detection method, and an electronic device. The weighing circuit in the battery detection circuit, after the electronic device is connected to the battery, can detect the actual weight of the battery and / or the actual weight of the battery cells. Based on the detected actual weight, it determines whether the battery and electronic device are compatible. Then, based on the compatibility result, it controls the on / off state of the current loop between the electronic device and the battery through a control switching circuit. Since the actual weight of the battery and / or the actual weight of the battery cells are detected by the weighing circuit, it can ensure that the electronic device can accurately identify whether the battery connected to the electronic device is an original manufacturer's battery based on the actual weight. This prevents non-original batteries from powering the electronic device, thus avoiding damage to the electronic device and ensuring safe use. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a schematic diagram of the structure of a battery detection circuit provided in an embodiment of this disclosure; Figure 2 This is a schematic diagram of another battery detection circuit provided in an embodiment of this disclosure; Figure 3 This is a schematic diagram of another battery detection circuit provided in this embodiment; Figure 4 This is a schematic diagram of another battery detection circuit provided in an embodiment of the present disclosure; Figure 5 This is a schematic diagram of another battery detection circuit provided in an embodiment of the present disclosure; Figure 6 This is a schematic diagram of another battery detection circuit provided in an embodiment of the present disclosure; Figure 7 This is a schematic diagram of another battery detection circuit provided in an embodiment of the present disclosure; Figure 8 This is a schematic diagram of another battery detection circuit provided in an embodiment of the present disclosure; Figure 9 This is a schematic diagram of another battery detection circuit provided in an embodiment of the present disclosure; Figure 10 This is a flowchart of a battery detection method provided in an embodiment of this disclosure; Figure 11This is a flowchart of another battery detection method provided in this disclosure embodiment; Figure 12 This is a structural block diagram of an electronic device provided in an embodiment of this disclosure; Figure 13 This is a structural block diagram of another electronic device provided in the embodiments of this disclosure. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of this disclosure clearer, the embodiments of this disclosure will be described in further detail below with reference to the accompanying drawings.

[0014] This disclosure provides a battery detection circuit, see [link to relevant documentation] Figure 1 The battery detection circuit 00 includes: a switching circuit 01 and a weighing circuit 02. For example... Figure 1 As shown, the first terminal of the switch circuit 01 is connected to the first connection terminal a of the target device, and the second terminal b of the switch circuit 01 is connected to the second connection terminal b of the target device. The weighing circuit 02 is connected to the control terminal of the switch circuit 01.

[0015] The target device includes electronic devices and / or batteries. The electronic device is one whose battery is replaceable. For example, the electronic device could be a mobile phone, tablet, laptop, or electric vehicle (such as an electric bicycle).

[0016] The weighing circuit 02 is used to detect the actual weight of the battery and / or the actual weight of the cells in the battery after the electronic device is connected (i.e., snapped in), and to determine whether the battery and the electronic device are matched based on the detected actual weight, and to control the on / off state of the first and second terminals of the switching circuit 01 based on the matching result, so as to disconnect or connect the current loop between the electronic device and the battery.

[0017] For example, if the weighing circuit 02 determines that the battery and electronic device are incompatible based on the detected weight, it can control the first and second terminals of the switching circuit 01 to disconnect, thus breaking the current loop between the electronic device and the battery. This prevents the battery from supplying power to the electronic device, avoiding damage caused by an incompatible battery supplying power. Conversely, if the weighing circuit 02 determines that the battery and electronic device are compatible based on the detected weight, it can control the first and second terminals of the switching circuit 01 to connect, thus opening the current loop between the electronic device and the battery, allowing the battery to supply power to the electronic device.

[0018] In summary, this disclosure provides a battery detection circuit. The weighing circuit within this circuit, after the electronic device is connected to the battery, can detect the actual weight of the battery and / or the actual weight of the battery cells. Based on the detected actual weight, it determines whether the battery and electronic device are compatible. Then, based on the compatibility result, it controls the on / off state of the current loop between the electronic device and the battery via a control switching circuit. Since the actual weight of the battery and / or the actual weight of the battery cells are detected by the weighing circuit, it ensures that the electronic device can accurately identify whether the battery connected to the electronic device is an original manufacturer's battery based on the actual weight. This prevents non-original batteries from powering the electronic device, thus avoiding damage to the electronic device and ensuring safe use.

[0019] In this embodiment, since the weight of original battery cells and non-original battery cells usually differs significantly, the weighing circuit 02 can determine the difference between the detected measured weight and the corresponding calibrated weight, and then determine whether the battery is compatible with the electronic device based on this difference. If the weighing circuit 02 determines that the difference is greater than a difference threshold, it can be determined that the battery is incompatible with the electronic device, i.e., the battery is an original battery. If the weighing circuit 02 determines that the difference is less than or equal to the difference threshold, it can be determined that the battery is compatible with the electronic device, i.e., the battery is a non-original battery.

[0020] The measured weight of the battery corresponds to the calibrated weight of the original battery, and the measured weight of the battery cell corresponds to the calibrated weight of the original battery cell (i.e., the cell in the original battery). Accordingly, if the weight detected by the weighing circuit 02 includes the measured weight of the battery, then the corresponding calibrated weight includes the weight of the original battery. If the weight detected by the weighing circuit 02 includes the measured weight of the battery cell, then the corresponding calibrated weight includes the weight of the original battery cell.

[0021] Furthermore, the calibrated weight of the battery can be pre-stored in the electronic device. The calibrated weight of the battery cell can also be pre-stored in the electronic device or received by the electronic device. For example, the electronic device can determine the calibrated weight of the battery cell as the actual measured weight of the battery cell received for the first time after leaving the factory.

[0022] In the first implementation, the target device includes a battery, and a battery detection circuit 00 is located inside the battery. The first terminal of the switching circuit 01 is connected to the first connection terminal of the battery, and the second terminal of the switching circuit 01 is connected to the second connection terminal of the battery. The measured weight detected by the weighing circuit 02 is the measured weight of the battery cell.

[0023] See Figure 2The battery 10 has a charging / discharging interface 101. A first connection terminal a of the battery 10 is a first pin of the charging / discharging interface 101, and a second connection terminal b is a second pin of the charging / discharging interface 101. This charging / discharging interface 101 is used to connect to an electronic device.

[0024] The first terminal of the battery cell 102 in the battery 10 is connected to the first pin a, and the second terminal of the battery cell 102 is connected to the first terminal of the switching circuit 01. The first terminal of the battery cell 102 can be either a positive or a negative terminal, and the second terminal of the battery cell 102 can be either a positive or a negative terminal. For example, the first terminal of the battery cell 102 is positive, and the second terminal is negative.

[0025] The weighing circuit 02 can detect the actual weight of the battery cell 102 after detecting that the charging / discharging interface 101 is connected to the electronic device, and send the actual weight of the battery cell 102 to the electronic device. After receiving the actual weight of the battery cell 102 sent by the weighing circuit 02, the electronic device can determine whether the battery 10 is compatible with the electronic device based on the actual weight of the battery cell 102. If the electronic device determines that the battery 10 is incompatible with the electronic device, it can send a shutdown command to the weighing circuit 02. After receiving the shutdown command sent by the electronic device, the weighing circuit 02 can control the first and second terminals of the switching circuit 01 to disconnect, so that the battery cannot supply power to the electronic device, thereby preventing the battery from damaging the electronic device.

[0026] If the electronic device determines that the battery 10 is compatible with it, it can send a connection command to the weighing circuit 02. Upon receiving the connection command, the weighing circuit 02 controls the first and second terminals of the switching circuit 01 to conduct, enabling the battery 10 to power the electronic device. Specifically, the battery can power the electronic device when the voltage applied to the electronic device by the battery cell 102 is the operating voltage of the electronic device.

[0027] Understandably, the electronic device can determine the difference between the measured weight and the calibrated weight of the battery cell 102, and then determine whether this difference is greater than a difference threshold. If the difference is greater than the difference threshold, the electronic device can determine that the battery 10 connected to the electronic device is not an original battery, and therefore can determine that the battery 10 is incompatible with the electronic device. If the electronic device determines that the difference is less than or equal to the difference threshold, the electronic device can determine that the battery 10 connected to the electronic device is an original battery, and therefore can determine that the battery 10 is compatible with the electronic device. The difference threshold is pre-stored by the electronic device.

[0028] In this embodiment of the disclosure, the electronic device may include a microcontroller unit (MCU). After the charging / discharging interface 101 of the battery 10 is connected to the electronic device, the weighing circuit 02 can be connected to the MCU of the electronic device. Furthermore, the weighing circuit 02 and the MCU of the electronic device can communicate via an inter-integrated circuit (I2C) bus.

[0029] In this embodiment of the present disclosure, after the charging and discharging interface 101 of the battery 10 is connected to the electronic device, the battery 10 can provide power to the electronic device to power it on. After the electronic device is powered on, it can receive the measured weight sent by the weighing circuit 02, and identify whether the battery 10 is an original battery based on the measured weight, thereby determining whether the battery 10 is compatible with the electronic device.

[0030] In the second implementation, the target device includes an electronic device, and the battery detection circuit 00 is located within the electronic device. The first terminal of the switching circuit 01 is connected to the first connection terminal of the electronic device, and the second terminal of the switching circuit 01 is connected to the second connection terminal of the electronic device. The measured weight detected by the weighing circuit 02 is the measured weight of the battery.

[0031] See Figure 3 The first connection terminal a of the electronic device 20 is the first interface of the electronic device, and the second connection terminal b of the electronic device 20 is the second interface of the electronic device. Both the first interface and the second interface are used to connect to the battery. The weighing circuit 02 can be used to detect the actual weight of the battery after the electronic device is connected to the battery, and after determining that the battery and the electronic device are incompatible based on the actual weight of the battery, control the first terminal and the second terminal of the switching circuit 01 to disconnect.

[0032] For example, the weighing circuit 02 can determine the difference between the battery's measured weight and its calibrated weight. Then, if the weighing circuit 02 determines that the difference is greater than a threshold value, it can determine that the battery and electronic device are incompatible. If the weighing circuit 02 determines that the difference is less than or equal to the threshold value, it can determine that the battery and electronic device are compatible.

[0033] Please continue reading Figure 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.

[0034] In the third implementation, the target device includes an electronic device and a battery. 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 can be located in one of the electronic device and the battery, and the other detection sub-circuit can be located in the other of the electronic device and the battery. For example, see... Figure 4 The first detection sub-circuit 100 can be located in the battery 10, and the second detection sub-circuit 200 can be located in the electronic device 20.

[0035] In this implementation, the first end of the target device includes: the first end of the battery and the first end of the electronic device, and the second end of the target device includes: the second end of the battery and the second end of the electronic device. Each detection sub-circuit in the first detection sub-circuit 100 and the second detection sub-circuit 200 may include: a switching sub-circuit and a weighing sub-circuit.

[0036] The connection method and working principle of the switching subcircuit in each detection subcircuit with other devices (such as the weighing subcircuit) can be referred to the relevant implementation method of the switching circuit 01 in the first (or second) implementation method described above. The connection method and working principle of the weighing subcircuit in each detection subcircuit with other devices (such as the switching subcircuit) can be referred to the relevant implementation method of the weighing circuit 02 in the first (or second) implementation method described above. Further details of the embodiments disclosed herein will not be repeated.

[0037] by Figure 4 The following is an example of how the weighing circuit 02 detects the actual weight of the battery and the actual weight of the battery cell: The weighing subcircuit in the first detection subcircuit 100 (hereinafter referred to as the first weighing subcircuit for ease of description) can detect the actual weight of the battery cell, and the weighing subcircuit in the second detection subcircuit 200 (hereinafter referred to as the second weighing subcircuit for ease of description) can detect the actual weight of the battery. Thus, the weighing circuit 02 can detect the actual weight of both the battery and the battery cell.

[0038] Continue with Figure 4 Taking the implementation shown as an example, the following is an exemplary description of how the weighing circuit 02 determines whether the battery is compatible with the electronic device, and how it controls the on / off state of the first and second terminals of the switching circuit 01 based on the compatibility result: After the first weighing subcircuit detects the measured weight of the battery cell 102, it can send the measured weight of the battery cell 102 to the second weighing subcircuit. The second weighing subcircuit can determine whether the battery 10 is compatible with 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 weighing subcircuit determines that the battery 10 is compatible with the electronic device, it can first send a shutdown command to the battery 10, and then control the first and second terminals of the switch subcircuit located in the electronic device 20 to disconnect. The shutdown command is used to instruct the first and second terminals of the switch subcircuit located in the battery to disconnect.

[0039] In this embodiment, the second weighing subcircuit can determine the difference between the measured weight and the calibrated weight of the battery 10, and the difference between the measured weight and the calibrated weight of the cell 102. If the second weighing subcircuit determines that the difference between the measured weight and the calibrated weight of the battery 10, and the difference between the measured weight and the calibrated weight of the cell 102, are both less than or equal to a difference threshold, then the battery 10 can be determined to be an original battery, and thus the battery 10 can be determined to be compatible with the electronic device 20. If the second weighing subcircuit determines that at least one of the differences between the measured weight and the calibrated weight of the battery 10, and the difference between the measured weight and the calibrated weight of the cell 102, is greater than a difference threshold, then the battery 10 can be determined to be a non-original battery, and thus the battery 10 can be determined to be incompatible with the electronic device 20.

[0040] Optionally, the weighing circuit 02 in this embodiment can also acquire a verification code and determine whether the battery is compatible with the electronic device based on the detected measured weight and the verification code. For example, the weighing circuit 02 can determine the difference between the detected measured weight and the corresponding calibrated weight. Then, if the weighing circuit 02 determines that the difference is greater than a difference threshold and the verification code fails verification, it can be determined that the battery is incompatible with the electronic device. If the weighing circuit 02 determines that the difference is less than or equal to the difference threshold and the verification code passes verification, it can be determined that the battery is incompatible with the electronic device.

[0041] It is understood that in the first implementation described above (i.e., the implementation where the battery detection circuit is located within the battery), the weighing circuit 02 can pre-store a verification code and send this verification code to the electronic device. Correspondingly, the electronic device can determine that the battery 10 and the electronic device 20 are mismatched after determining that the difference between the measured weight of the battery cell 102 and its calibrated weight is greater than a difference threshold, and that the verification code has failed verification, and then send a shutdown command to the weighing circuit 02. Optionally, the verification code can be a string.

[0042] In this embodiment of the disclosure, the electronic device pre-stores a target code for verifying the verification code. Upon receiving the verification code, the electronic device compares it with the target code. If the electronic device determines that the verification code is the same as the target code, it determines that the verification code has passed verification. If the electronic device determines that the verification code is different from the target code, it determines that the verification code has failed verification.

[0043] Optionally, the weighing circuit 02 can encrypt the measured weight of the battery cell 102 and send the encrypted measured weight to the electronic device.

[0044] For example, the weighing circuit 02 can convert the data format of the measured weight to achieve encryption processing of the measured weight. Alternatively, the weighing circuit 02 can add the measured weight to a target value to achieve encryption processing of the measured weight. The target value can be a positive real number or a negative real number; this embodiment does not limit the type of value.

[0045] In the second implementation described above (i.e., the implementation where the battery detection circuit is located in the electronic device), the weighing circuit 02 can receive the verification code sent by the battery, and after determining that the difference between the actual weight of the battery 10 and the calibrated weight of the battery 10 is greater than the difference threshold, and after the verification code passes the verification, it determines that the battery 10 and the electronic device 20 are mismatched, and then controls the first terminal and the second terminal of the switch circuit 01 to disconnect.

[0046] In the third implementation described above (i.e., the battery detection circuit is partially located in the electronic device and partially in the battery), the first weighing sub-circuit can send the detected measured weight of the battery cell and a verification code to the second weighing sub-circuit. This verification code is pre-stored in the first weighing sub-circuit. After determining that the difference between the received measured weight of the battery cell and its calibrated weight, the difference between the detected measured weight of the battery and its calibrated weight are both greater than a difference threshold, and the verification code fails verification, the second weighing sub-circuit can determine that the battery 10 and the electronic device 20 are mismatched. It can then send a shutdown command to the battery 10 and control the first and second terminals of the switching sub-circuit located in the electronic device to disconnect.

[0047] In this disclosed embodiment, please continue to refer to Figure 2 and Figure 3 The weighing circuit 02 may include a processing circuit 021 and a 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.

[0048] The weight sensor 022 is used to detect the measured weight of the battery and / or the measured weight of the cells in the battery after the electronic device is connected to the battery, and sends the detected measured weight to the processing circuit 021. The processing circuit 021 is used to determine whether the battery is matched with the electronic device based on the measured weight detected by the weight sensor 022, and controls the on / off state of the first and second terminals of the switching circuit 01 based on the matching result, so as to disconnect or connect the circuit loop between the electronic device and the battery.

[0049] In this embodiment, the implementation of the first detection sub-circuit located in the battery in the third implementation can refer to the implementation of the battery detection circuit 00 (i.e., the battery detection circuit located in the battery) in the first implementation; the implementation of the second detection sub-circuit located in the electronic device can refer to the implementation of the battery detection circuit 00 (i.e., the battery detection circuit located in the electronic device) in the second implementation. Since the implementation of the weighing circuit 02 in the first implementation differs from that in the second implementation, this embodiment uses the weighing circuits in the first and second implementations as examples to exemplarily describe the battery detection circuit 00 provided in this embodiment.

[0050] In the first implementation, see Figure 5 The processing circuit 021 in the weighing 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. Figure 5 The SCL1 pin), the first serial data (SDA) pin (i.e. Figure 5 The SDA1 pin), the second SCL pin (i.e. Figure 5 The SCL2 pin), the second SDA pin (i.e. Figure 5 The SDA2 pin), the first input / output (IO) pin (i.e. Figure 5 The IO1 pin), the second IO pin (i.e. Figure 5 The second chip U2 has a third SCL pin, a third SDA pin, a battery (BAT) pin (also known as a pack pin), a sampling resistor positive (SRP) pin, a sampling resistor negative (SRN) pin, and a common connection pin. Figure 5The pins shown are VSS, charging (CHG), and discharging (DHG).

[0051] Among them, the first SCL pin, first SDA pin, first IO pin, and second IO pin of the first chip U1 are all used for connection with electronic devices. For example... Figure 5 As shown, the second SCL pin of the first chip U1 can be connected to the third SCL pin of the second chip U2, and the second SDA pin of the first chip U1 can 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 charging / discharging interface 101.

[0052] The pack pin of the second chip U2 can be connected to the first terminal of the battery cell 102. The SRP pin of the second chip U2 can be connected to the positive terminal of the weight sensor 022, and the SRN pin can be connected to the negative terminal of the weight sensor 022. The DHG and CHG pins 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.

[0053] It is understandable that, since the SRP pin is connected to the positive terminal of the weight sensor 022, the SRP pin can also be called the WRP pin. Similarly, since the SRN pin is connected to the negative terminal of the weight sensor 022, the SRN pin can also be called the WRN pin.

[0054] It is also understood that the first chip U1 may include a power-on pin, which can be connected to the first terminal of the battery cell 102. The first chip U1 can send the measured weight of the battery cell 102 to the electronic device through the second SDA pin, and can receive the shutdown command sent by the electronic device through the second IO pin.

[0055] In this embodiment, the weight sensor 022 can send the detected measured weight of the battery cell 102 to the second chip U2, which in turn can send the measured weight to the first chip U1. The first chip U1 can then send the measured weight to an electronic device. For example, the weight sensor 022 can determine the measured weight of the battery cell based on the collected weight signal.

[0056] Optionally, the weight signal can be an analog signal. In this case, the second chip U2 also has an analog-to-digital converter (ADC). The ADC can convert the analog signal into a digital signal, so that the second chip U2 can determine the measured weight of the cell based on the digital signal.

[0057] It is understandable that the first chip U1 and the second chip U2 can be like Figure 5The individual configuration shown is acceptable. Alternatively, the first chip U1 and the second chip U2 can be integrated. The weight sensor 022 can be a thin-film sensor, and it can be attached to the surface of the battery cell 102. Optionally, the weight sensor 022 can be a pressure-sensitive sensor.

[0058] Optional, from Figure 5 It can be seen that the weighing circuit 02 may further include: a first resistor R1 to a third resistor R3. One end of the first resistor R1 can be connected to the first terminal of the battery cell 102, and the other end can be connected to the pack pin of the second chip U2. That is, the first resistor R1 can be connected in series between the first terminal of the battery cell 102 and the second chip U2.

[0059] The second resistor R2 and the third resistor R3 can be connected in series between the WRP pin and the WRN pin of the second chip U2. For example, as Figure 5 As shown, 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.

[0060] The first resistor R1 prevents the current output from the battery cell 102 from damaging the second chip U2. The second resistor R2 and the third resistor R3 can be used to adjust the voltage applied to the weight sensor 022 by the second chip U2 to ensure the normal operation of the weight sensor 022.

[0061] See Figure 5 The weighing 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 terminal 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 charging / discharging interface 101. That is, the first capacitor C1 and the second capacitor C2 are connected in parallel with the second chip U2. In this way, the problem of short circuit of the battery cell 102 causing damage to the second chip U2 can be avoided.

[0062] In this embodiment of the disclosure, the processing circuit 02 (e.g., the second chip U2 in the processing circuit 02) can encrypt the measured weight of the battery cell 102 and send the encrypted measured weight to the electronic device 20 so that the electronic device 20 can determine whether the battery 10 is an original battery based on the measured weight.

[0063] For example, after the second chip U2 encrypts the measured weight of the battery cell 102, it can send it to the first chip U1, so that the first chip U1 can send the encrypted measured weight to the electronic device.

[0064] It is understandable that, in the case where the weighing circuit 02 also sends a verification code to the electronic device, the verification code can be stored in the first chip U1.

[0065] In the second implementation (i.e., the implementation where the battery detection circuit 00 is located in the electronic device), see [link to relevant documentation]. Figure 6 and Figure 7 The processing circuit 021 of the weighing circuit 02 may include an MCU 0221 and a third chip U3 of the electronic device. The third chip U3 is connected to both the MCU 0221 and the weight sensor 022. The control terminal of the switching circuit 01 may be connected to the third chip U3 or to the MCU 0221.

[0066] Understandably, in this implementation, the electronic device 20 has a battery mounting slot, and the weight sensor 022 can be located in the battery mounting slot. For example, the weight sensor 022 can be located at the bottom of the battery mounting slot. Alternatively, the weight sensor 022 can be located on the side wall of the battery mounting slot.

[0067] It is also understandable that the third chip U3 and MCU 0221 can be configured separately or integrated.

[0068] In one optional example, see Figure 6 The third chip U3 is connected to the control terminal of the switching circuit 01, and the third chip U3 is the same as the second chip U2 mentioned above. From Figure 6 As can be seen, the third SCL pin and the third SDA pin of the second chip U2 are both connected to the MCU 0221. In this implementation, the connection method between the third chip U3 and the weight sensor 022 is detailed in the first implementation, and will not be repeated here.

[0069] In another alternative example, MCU 0221 is connected to the control terminal of switching circuit 01. See also Figure 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-on pin (i.e., Figure 7 (The VDD pin is shown). This MCU 0221 has a CHG pin, a DHG pin, and a power-on pin.

[0070] Specifically, the SCL4 and SDA4 pins of the third chip U3 are connected to the MCU 0221. The VSS pin of the third chip U3 is grounded, and the VDD pin is connected to the first connection terminal a. The SRP and SRN pins of the third chip U3 are both connected to the weight sensor 022. The control terminal of the switch circuit 01 is connected to the CHG and DHG pins of the MCU 0221, and the VDD pin of the MCU 0221 is connected to the first connection terminal a.

[0071] Understandably, please continue to see Figure 6 and Figure 7 The processing circuit 021 may further include: a fourth resistor R4 to a seventh resistor R7. One end of the fourth resistor R4 can be connected to the first connection terminal a of the electronic device, and the other end can be connected to the VDD pin of the third chip U3. The fifth resistor R5 and the sixth resistor R6 can be connected in series between the WRP pin and the WRN pin of the third chip U3. One end of the seventh resistor R7 can be connected to the first connection terminal a, and the other end can be connected to the VDD pin of the MCU 0221.

[0072] In this disclosure embodiment, see Figures 5 to 7 The switching circuit 01 includes a transistor. The gate (G) of the transistor is connected to the weighing circuit 02. The first terminal of the transistor is connected to one of the first connection terminal a and the second connection terminal b, and the second terminal of the transistor is connected to the other of the first connection terminal a and the second connection terminal b. The first terminal of the transistor can be either the source (S) or the drain (D), and the second terminal of the transistor can be either the source or the drain.

[0073] from Figures 5 to 7 It can also be seen that the switching circuit 01 may include another transistor. For ease of distinction, the first transistor is referred to as the first transistor 011, and the second transistor as the second transistor 012. The gate G of the second transistor 012 is connected to the weighing circuit 02. The first terminal of the second transistor 012 can be connected to the second terminal of the first transistor 011, and the second terminal of the second transistor 012 can be connected to one of the first connection terminal a and the second connection terminal. Thus, the first terminal of the first transistor 011 can be connected to a connection terminal through the second transistor 012.

[0074] The first transistor 011 can be turned on when the battery is discharging, and can be turned off when the battery voltage falls below a first voltage threshold to prevent over-discharging. The second transistor 012 can be turned on when the battery is charging, and can be turned off when the battery voltage rises above a second voltage threshold to prevent over-charging. The first voltage threshold is less than the second voltage threshold; for example, the first voltage threshold is 2.5 volts (V), and the second voltage threshold is 4.5V.

[0075] In the first implementation, where the battery detection circuit 00 is located within the battery, the first terminal of the first transistor 011 can be connected to the first connection terminal a, and the second terminal of the first transistor 011 can be connected to the second connection terminal b. For example, see... Figure 5 The gate of the first transistor 011 is connected to the DHG pin of the second chip U2. The first terminal of the first transistor 011 can be connected to the second terminal of the battery cell 102. The second terminal of the first transistor 011 is connected to the first terminal of the second transistor 012. The gate of the second transistor 012 is connected to the CHG pin of the second chip U2. The second terminal of the second transistor 012 is connected to the second pin b of the charging / discharging interface 101.

[0076] In the second implementation, where the battery detection circuit 00 is located within the electronic device, the first terminal of the first transistor 011 can be connected to the second connection terminal b, and the second terminal of the first transistor 011 is connected to the first connection terminal a. For example, see... Figure 6 The gate of the first transistor 011 is connected to the DHG pin of the third chip U3. The first terminal of the first transistor 011 can be connected to the second connection terminal b. The second terminal of the first transistor 011 is connected to the first terminal of the second transistor 012. The gate of the second transistor 012 is connected to the CHG pin of the third chip U3. The second terminal of the second transistor 012 is connected to the load 201.

[0077] In this embodiment, after the electronic device is connected to the battery, the weighing circuit 02 can control the first transistor 011 to conduct. At this time, the parasitic diode in the second transistor 012 conducts. The battery, the parasitic diode, and the first transistor 011 can form a current loop, and correspondingly, the battery cell 102 can provide power to the electronic device through this current loop to power on the electronic device.

[0078] It is understandable that, in the scenario where the battery cell 102 provides power to the electronic device by turning on the first transistor 011, the voltage applied to the electronic device by the battery cell 102 is greater than or equal to the operating voltage of the electronic device.

[0079] It is also understandable that if the battery cell 102 is a non-original cell, meaning the battery is not an original manufacturer, then after the first and second terminals of the switching circuit 01 are connected, the battery cell 102 may output a large current to the electronic device, which could damage the electronic device. Therefore, see [link to relevant documentation]. Figure 8 and Figure 9 The battery may also include a current-limiting resistor R8. One end of the current-limiting resistor R8 can be connected to the first terminal of the first transistor 011, and the other end of the current-limiting resistor R8 can be connected to the second terminal of the first transistor 011. For example, the other end of the current-limiting resistor R8 can be connected to the second terminal of the second transistor 012, that is, the other end of the current-limiting resistor R8 can be connected to the second terminal of the first transistor 011 through the second transistor 012.

[0080] Based on this, after the battery is connected to the electronic device, the weighing circuit 02 does not need to control the first and second terminals of the switching circuit 01 to conduct. The battery cell 102 can then provide power to the electronic device through the current-limiting resistor R8, enabling the electronic device to power on and determine whether the connected battery is an original battery based on the measured weight detected by the weighing circuit 02, thereby determining whether the battery is compatible with the electronic device. Furthermore, 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 supplied by the battery cell 102 to the electronic device can be kept small, thus avoiding damage to the electronic device.

[0081] Understandably, in scenarios where the battery cell 102 provides power to the electronic device through the current-limiting resistor R8, the voltage applied by the battery cell 102 to the electronic device can be much lower than the operating voltage of the electronic device. For example, the voltage applied by the battery cell 102 to the electronic device can be equal to the operating voltage of the electronic device's MCU. Therefore, when the battery cell 102 provides power to the electronic device through the current-limiting resistor R8, the voltage applied by the battery cell 102 to the electronic device can only drive the MCU, and cannot drive other loads in the electronic device. This not only ensures that the electronic device can receive and detect whether the difference between the measured weight and the calibrated weight of the battery cell 102 exceeds a threshold difference, but also avoids damage to the electronic device during the process of detecting the measured weight.

[0082] It is also understandable that, based on the conduction command sent by the electronic device, the weighing circuit 02 controls the first and second terminals of the switching circuit 01 to conduct, and the resistance of the switching circuit 01 is much smaller than the current-limiting resistor R8. Therefore, it can be ensured that the battery cell 102 can provide a large driving current to the electronic device through the switching circuit 01, so that all loads in the electronic device can operate normally.

[0083] by Figure 8Using the battery shown as an example, the process of the electronic device recognizing and controlling the battery after it is connected to the device is illustrated below: After the battery's charging / discharging interface 101 is connected to the electronic device, the battery cell 102 can provide power to the electronic device through the current-limiting resistor R8, thus powering on the electronic device. Once powered on, the electronic device receives the measured weight of the battery cell from the weighing circuit 02 and checks whether the difference between the measured weight and the calibrated weight is greater than a threshold difference. If the electronic device determines that the difference is greater than the threshold difference, it can determine that the battery is incompatible with the electronic device, i.e., the battery is not an original manufacturer's battery. It can then send a shutdown command to the weighing circuit 02, instructing the weighing circuit 02 to disconnect the first and second terminals of the switching circuit 01 (i.e., to disconnect the first transistor 011). Since the current through the current-limiting resistor R8 is less than the operating current of the electronic device, the electronic device cannot start at this time.

[0084] If the electronic device determines whether the difference is not greater than the difference threshold, it can determine that the battery is compatible with the electronic device, that is, the battery is an original battery. Then it can send a conduction command to the weighing circuit 02 to instruct the weighing circuit 02 to conduct the first and second terminals of the switching circuit 01 (that is, to control the first transistor 011 to conduct). The current can then flow through the first transistor 011 to the electronic device to power the electronic device, thereby enabling the electronic device to start.

[0085] In summary, this disclosure provides a battery detection circuit. The weighing circuit within this circuit, after the electronic device is connected to the battery, can detect the actual weight of the battery and / or the actual weight of the battery cells. Based on the detected actual weight, it determines whether the battery and electronic device are compatible. Then, based on the compatibility result, it controls the on / off state of the current loop between the electronic device and the battery via a control switching circuit. Since the actual weight of the battery and / or the actual weight of the battery cells are detected by the weighing circuit, it ensures that the electronic device can accurately identify whether the battery connected to the electronic device is an original manufacturer's battery based on the actual weight. This prevents non-original batteries from powering the electronic device, thus avoiding damage to the electronic device and ensuring safe use.

[0086] This disclosure also provides a battery detection method applied to an electronic device. The electronic device is used to connect to a battery, and the electronic device and / or battery belong to a target device, which is equipped with a battery detection circuit. The battery detection circuit includes a switching circuit and a weighing circuit. A first terminal of the switching circuit is connected to a first connection terminal of the target device, a second terminal of the switching circuit is connected to a second connection terminal of the target device, and the weighing circuit is connected to a control terminal of the switching circuit. See also... Figure 10 The method includes: Step 301: After the electronic device is connected to the battery, obtain the actual weight of the battery and / or the actual weight of the cells in the battery detected by the weighing circuit.

[0087] In this embodiment of the disclosure, if the target device includes a battery and the battery detection circuit is configured in the battery, then after the electronic device is connected to the battery, the electronic device can obtain the measured weight of the battery cell detected by the weighing circuit.

[0088] If the target device includes electronic equipment and the battery detection circuit is configured in the electronic equipment, then after the electronic equipment is connected to the battery, the electronic equipment can directly obtain the actual measured weight of the battery detected by the weighing circuit.

[0089] If the target device includes a battery and an electronic device, and the first detection sub-circuit of the battery detection circuit is configured in the battery, and the second detection sub-circuit of the battery detection circuit is configured in the electronic device, then after the electronic device is connected to the battery, the electronic device can obtain the measured weight of the battery detected by the weighing sub-circuit in the second detection sub-circuit, and can receive the measured weight of the battery cell detected by the weighing sub-circuit in the first detection sub-circuit.

[0090] Step 302: Based on the measured weight, determine whether the battery is compatible with the electronic device, and control the switching on and off of the first and second terminals of the switching circuit based on the matching result, so as to disconnect or connect the current loop between the electronic device and the battery.

[0091] In this embodiment of the disclosure, after the electronic device obtains the measured weight detected by the weighing circuit, it can determine the difference between the measured weight and the corresponding calibrated weight. Then, if the electronic device determines that the difference is greater than the difference threshold, it can determine that the battery and the electronic device are mismatched, and then it can control the first terminal and the second terminal of the switching circuit to disconnect, so as to disconnect the current loop between the electronic device and the battery.

[0092] If the electronic device determines that the difference is less than or equal to the difference threshold, it can determine that the battery and the electronic device are matched, and then it can control the first and second terminals of the switching circuit to conduct, so that the current loop between the electronic device and the battery is connected.

[0093] Specifically, if the measured weight detected by the weighing circuit includes the measured weight of the battery, then the corresponding calibrated weight includes the weight of the original battery. If the measured weight detected by the weighing circuit includes the measured weight of the battery cell, then the corresponding calibrated weight includes the weight of the original battery cell.

[0094] The calibrated weight of a battery is pre-stored in the electronic device. For example, the calibrated weight of a battery may be written to the electronic device by staff before it leaves the factory. The calibrated weight of a battery cell may be pre-stored in the electronic device, or it may be received by the electronic device. For example, electronic devices are usually equipped with original factory batteries when they leave the factory, and the original factory batteries are connected to the electronic device. Therefore, the electronic device can determine the measured weight of the battery cell it receives for the first time after leaving the factory (i.e., the first measured weight received) as the calibrated weight of the battery cell and store this calibrated weight.

[0095] In this embodiment, if the target device includes a battery, the electronic device can obtain the measured weight of the battery cell sent by the weighing circuit and determine whether the battery connected to the electronic device is compatible with the electronic device based on the measured weight of the battery cell. If the electronic device determines that the battery is incompatible with the electronic device, it can determine that the battery is not an original battery and then send a shutdown command to the weighing circuit. After receiving the shutdown command sent by the electronic device, the weighing circuit in the battery can control the first and second terminals of the switching circuit to disconnect, so that the battery cell cannot supply power to the electronic device to enable the electronic device to work, thereby preventing the battery from damaging the electronic device. That is, the electronic device can control the first and second terminals of the switching circuit to disconnect through the weighing circuit in the battery. If the electronic device determines that the battery is compatible with the electronic device, it can determine that the battery is an original battery and then send a conduction command to the weighing circuit. After receiving the conduction command sent by the electronic device, the weighing circuit can control the first and second terminals of the switching circuit to conduct, so that the battery supplies power to the electronic device to enable the electronic device to work.

[0096] If the target device includes electronic equipment, the electronic equipment can directly obtain the measured weight of the battery detected by the weighing circuit and determine whether the battery is compatible with the electronic equipment based on the measured weight. If the electronic equipment determines that the battery is incompatible with the electronic equipment, it can directly control the first and second terminals of the switching circuit to disconnect. If the electronic equipment determines that the battery is compatible with the electronic equipment, it can directly control the first and second terminals of the switching circuit to conduct.

[0097] If the target device includes a battery and an electronic device, the electronic device can obtain the measured weight of the battery cell and the measured weight of the battery detected by the weighing circuit, and determine whether the battery is compatible with the electronic device based on the measured weight of the battery cell and the measured weight of the battery. Specifically, when the target device includes a battery and an electronic device, the implementation method of controlling the switching on and off of the first and second terminals of the switching circuit based on the matching result of the battery and the electronic device can be referred to the relevant implementation process in the third implementation method of the above-described device embodiments, and will not be repeated here.

[0098] In summary, this disclosure provides a battery detection method. After an electronic device is connected to a battery, it can obtain the measured weight of the battery and / or the measured weight of the battery cell detected by a weighing circuit. Based on the detected measured weight, it can determine whether the battery and the electronic device are compatible. Then, based on the compatibility result, it controls the on / off state of the current loop between the electronic device and the battery through a control switching circuit. Since the measured weight of the battery and / or the measured weight of the battery cell is detected by the weighing circuit, it can ensure that the electronic device can accurately identify whether the battery is an original manufacturer's battery based on this measured weight. This prevents non-original batteries from powering the electronic device, thus avoiding damage to the electronic device and ensuring safe use.

[0099] Figure 11 This is a flowchart of another battery detection method provided in an embodiment of this application. This method can be applied to an electronic device for connection to a battery. The electronic device and / or the battery are part of a target device, which is equipped with a battery detection circuit. This battery detection circuit can be the battery detection circuit provided in the above-described device embodiment. See also... Figure 11 The method may include: Step 401: After connecting to the battery, obtain the actual weight of the cell and / or the actual weight of the battery sent by the weighing circuit.

[0100] The implementation process of step 401 can refer to the implementation process of step 301 above, and will not be repeated here in this embodiment.

[0101] Step 402: Obtain the verification code.

[0102] After the electronic device is connected to the battery, the battery's weighing circuit can also send a verification code to the electronic device. The electronic device can then obtain this verification code.

[0103] Step 403: Based on the measured weight and verification code, determine whether the battery is compatible with the electronic device, and control the switching on and off of the first and second terminals of the switching circuit based on the matching result, so as to disconnect or connect the current loop between the electronic device and the battery.

[0104] In this embodiment of the disclosure, the electronic device can determine the difference between the measured total amount detected by the weighing circuit and the calibrated weight. Then, if the electronic device determines that the difference is greater than the difference threshold and the verification code fails the verification, it can determine that the battery is incompatible with the electronic device, that is, the battery is a non-original battery. Subsequently, it can control the first and second terminals of the switching circuit to disconnect, so as to disconnect the current loop between the electronic device and the battery, thereby avoiding damage to the electronic device by the battery.

[0105] If the electronic device determines that the difference is less than or equal to the difference threshold and the verification code passes the verification, it can be determined that the battery is a match for the electronic device, that is, the battery is an original battery. Then, the first and second terminals of the switching circuit can be controlled to conduct, so that the current loop between the electronic device and the battery is connected.

[0106] It should be noted that the order of steps in the battery detection method provided in this disclosure can be appropriately adjusted, and steps can also be deleted as needed. For example, step 402 can be deleted as needed. Any variations that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the protection scope of this disclosure, and therefore will not be elaborated further.

[0107] In summary, this disclosure provides a battery detection method. After an electronic device is connected to a battery, the method can determine whether the battery and the electronic device are compatible based on the detected measured weight. Then, based on the compatibility result, a control switch circuit is used to control the on / off state of the current loop between the electronic device and the battery. Since the measured weight of the battery and / or the measured weight of the battery cell is detected by the weighing circuit, it can ensure that the electronic device can accurately identify whether the battery is an original manufacturer's battery based on this measured weight. This prevents non-original batteries from powering the electronic device, thereby avoiding damage to the electronic device and ensuring safe use.

[0108] Figure 12 This is a structural block diagram of an electronic device provided in an embodiment of this disclosure. The electronic device is used to connect to a battery, and the electronic device and / or battery belong to a target device, which is equipped with a battery detection circuit. The battery detection circuit includes a switching circuit and a weighing circuit. A first terminal of the switching circuit is connected to a first connection terminal of the target device, and a second terminal of the switching circuit is connected to a second connection terminal of the target device. The target device is either an electronic device or a battery. The weighing circuit is connected to the control terminal of the switching circuit. See also... Figure 12 The electronic device 500 includes: The acquisition module 501 is used to acquire the actual weight of the battery or / and the actual weight of the cells in the battery detected by the weighing circuit after the electronic device is connected to the battery.

[0109] The control module 502 is used to determine whether the battery is matched with the electronic device based on the measured weight, and to control the on / off state of the first and second terminals of the switching circuit based on the matching result, so as to disconnect or connect the current loop between the electronic device and the battery.

[0110] Optionally, the control module 502 can be used for: Determine the difference between the measured weight and the corresponding calibrated weight, where the calibrated weight corresponding to the measured weight of the battery cell is the weight of the original battery cell received by the electronic device. If the difference is greater than the difference threshold, it is determined that the battery and electronic device are matched, and the first and second terminals of the switching circuit are disconnected to disconnect the current loop between the electronic device and the battery. If the difference is less than or equal to the difference threshold, the battery and electronic device are matched, and the first and second terminals of the switching circuit are turned on to make the current loop between the electronic device and the battery open.

[0111] Optionally, the battery is equipped with a battery detection circuit. The acquisition module 501 can be used to: receive the measured weight of the battery cell sent by the weighing circuit.

[0112] The control module 502 can be used to determine whether the battery is compatible with electronic devices based on the measured weight of the battery cell.

[0113] Optionally, the electronic device is equipped with a battery detection circuit. The acquisition module 501 can be used to acquire the measured weight of the battery detected by the weighing circuit.

[0114] The control module 502 can be used to determine whether the battery is compatible with electronic devices based on the measured weight of the battery.

[0115] Optionally, the control module 502 can be used to: acquire the verification code; and determine whether the battery is compatible with the electronic device based on the measured weight and the verification code.

[0116] In summary, this disclosure provides an electronic device that, after being connected to a battery, can determine whether the battery and the electronic device are compatible based on the detected measured weight. Then, based on the compatibility result, a control switch circuit controls the on / off state of the current loop between the electronic device and the battery. Since the measured weight of the battery and / or the measured weight of the battery cell is detected by the weighing circuit, it can ensure that the electronic device can accurately identify whether the battery is an original manufacturer's battery based on this measured weight. This prevents non-original batteries from powering the electronic device, thus avoiding damage to the electronic device and ensuring safe use.

[0117] Figure 13 This is a structural block diagram of another electronic device provided in an embodiment of this disclosure, see below. Figure 13 The electronic device 600 may include: a processor 601, a memory 602, and a display screen 603.

[0118] Processor 601 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 601 may be implemented using at least one hardware form selected from DSP (digital signal processing), FPGA (field-programmable gate array), and PLA (programmable logic array). Processor 601 may also include a main processor and a coprocessor. The main processor, also known as a CPU (central processing unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 601 may integrate a GPU (graphics processing unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 601 may also include an AI (artificial intelligence) processor, which is used to handle computational operations related to machine learning.

[0119] 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 and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 602 are used to store at least one instruction, which is executed by the processor 601 to implement the battery detection method provided in the method embodiments of this disclosure.

[0120] Display screen 603 is used to display a user interface (UI). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 603 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 601 for processing. In this case, display screen 603 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 603, disposed on the front panel of electronic device 600; in other embodiments, there may be at least two display screens, disposed on different surfaces of electronic device 600 or in a folded design; in still other embodiments, display screen 603 may be a flexible display screen, disposed on a curved or folded surface of electronic device 600. Furthermore, display screen 603 may be configured as a non-rectangular irregular shape, i.e., a non-rectangular screen. Display screen 603 may be made of materials such as LCD (liquid crystal display) or OLED (organic light-emitting diode).

[0121] Optionally, continue to refer to Figure 13 The electronic device 600 may further include a peripheral device interface 604 and at least one peripheral device. The processor 601, memory 602, and peripheral device interface 604 can be connected via a bus or signal lines. Each peripheral device can be connected to the peripheral device interface 604 via a bus, signal lines, or a circuit board. For example, the peripheral device may include one of the following: a radio frequency circuit 605, a camera assembly 606, and an audio circuit 607. The display screen 603 is also a peripheral device.

[0122] Peripheral interface 604 can be used to connect at least one I / O (Input / Output) related peripheral device 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, any one or two of processor 601, memory 602 and peripheral interface 604 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0123] The radio frequency (RF) circuit 605 is used to receive and transmit RF (radio frequency) signals, also known as electromagnetic signals. The RF circuit 605 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 605 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 605 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 605 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi networks. In some embodiments, the RF circuit 605 may also include circuitry related to NFC (near-field communication), which is not limited in this disclosure.

[0124] The camera assembly 606 is used to acquire images or videos. Optionally, the camera assembly 606 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (virtual reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 606 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0125] The audio circuit 607 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 601 for processing, or input to the radio frequency circuit 605 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located in a different part of the electronic device 600. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert the electrical signals from the processor 601 or the radio frequency circuit 605 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 607 may also include a headphone jack.

[0126] Those skilled in the art will understand that Figure 13 The structure shown does not constitute a limitation on the electronic device 600, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0127] This disclosure also provides a computer-readable storage medium storing a computer program that is loaded and executed by a processor to implement the battery detection method provided in the above-described method embodiments.

[0128] This disclosure provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a display device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the battery detection method provided in the above-described method embodiments.

[0129] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0130] It is understood that in the embodiments of this disclosure, the term "multiple" means two or more.

[0131] In this article, "and / or" indicates that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0132] In the embodiments of this disclosure, the terms "first," "second," etc., are used to distinguish identical or similar items with essentially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "n," nor is there any limitation on the quantity or execution order.

[0133] The above description is merely an optional embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.

Claims

1. A battery detection circuit, characterized in that, The battery detection circuit includes: a switching circuit and a weight measuring circuit; The first terminal of the switching circuit is connected to the first connection terminal of the battery, and the second terminal of the switching circuit is connected to the second connection terminal of the battery. The weighing circuit includes a processing circuit and a weight sensor; the processing circuit is connected to the first connection terminal, the control terminal of the switching circuit, and the weight sensor respectively; the weight sensor is a thin-film sensor and is attached to the surface of the battery cell. The weighing circuit is used to obtain electrical energy through the first connection terminal after the battery is connected to the electronic device, detect the actual weight of the battery cell, determine whether the battery is matched with the electronic device based on the actual weight, and control the on / off state of the first and second terminals of the switching circuit based on the matching result, so as to disconnect or connect the current loop between the electronic device and the battery.

2. The battery detection circuit according to claim 1, characterized in that, The weighing circuit is used for: Determine the difference between the measured weight and the corresponding calibrated weight, wherein the calibrated weight corresponding to the measured weight of the battery cell is the weight of the original battery cell received by the electronic device; If the difference is greater than the difference threshold, it is determined that the battery and the electronic device are incompatible, and the first terminal and the second terminal of the switching circuit are disconnected to disconnect the current loop between the electronic device and the battery. If the difference is less than or equal to the difference threshold, it is determined that the battery is matched with the electronic device, and the first and second terminals of the switching circuit are turned on to make the current loop between the electronic device and the battery open.

3. The battery detection circuit according to claim 1, characterized in that, The weight sensor is used to detect the actual weight of the battery cells after the electronic device is connected to the battery, and to send the detected actual weight to the processing circuit. The processing circuit is used to determine whether the battery is compatible with the electronic device based on the measured weight, and to control the first and second terminals of the switching circuit to open or close based on the matching result, so as to disconnect or open the current loop between the electronic device and the battery.

4. The battery detection circuit according to claim 3, characterized in that, The battery detection circuit is located in the battery; The processing circuit is used to encrypt the measured weight of the battery cell and send it to the electronic device after detecting that the electronic device is connected to the battery, and to control the first terminal and the second terminal of the switching circuit to disconnect after receiving the shutdown command sent by the electronic device. The shutdown command is sent by the electronic device after determining that the battery is incompatible with the electronic device based on the measured weight of the battery cell.

5. The battery detection circuit according to claim 1, characterized in that, The battery detection circuit is located in the battery, which has a charging and discharging interface. The first connection terminal is the first pin of the charging and discharging interface, and the second connection terminal is the second pin of the charging and discharging interface. The first electrode of the battery cell is connected to the first pin, and the second electrode of the battery cell is connected to the first terminal of the switching circuit; The weighing circuit is used to detect the actual weight of the battery cell after detecting that the charging and discharging interface is connected to the electronic device, and send the actual weight of the battery cell to the electronic device. After receiving the shutdown command sent by the electronic device, it controls the first terminal and the second terminal of the switching circuit to disconnect so that the current loop between the electronic device and the battery is disconnected. The shutdown command is sent by the electronic device after determining that the battery is incompatible with the electronic device based on the measured weight of the battery cell.

6. The battery detection circuit according to any one of claims 1 to 5, characterized in that, The weighing circuit is also used for: Obtain the verification code; Based on the measured weight and the verification code, it is determined whether the battery is compatible with the electronic device.

7. The battery detection circuit according to any one of claims 1 to 5, characterized in that, The switching circuit includes: a transistor; The gate of the transistor is connected to the weighing circuit, the first terminal of the transistor is connected to one of the first connection terminal and the second connection terminal, and the second terminal of the transistor is connected to the other of the first connection terminal and the second connection terminal.

8. The battery detection circuit according to claim 7, characterized in that, The battery detection circuit also includes: a current-limiting resistor; One end of the current-limiting resistor is connected to the first terminal of the transistor, and the other end of the current-limiting resistor is connected to the second terminal of the transistor.

9. A method for detecting a battery, characterized in that, An electronic device is used to connect to a battery, the battery of which is equipped with a battery detection circuit. The battery detection circuit includes a switching circuit and a weighing circuit. A first terminal of the switching circuit is connected to a first connection terminal of a target device, and a second terminal of the switching circuit is connected to a second connection terminal of the target device. The weighing circuit includes a processing circuit and a weight sensor. The processing circuit is connected to the first connection terminal, the control terminal of the switching circuit, and the weight sensor, respectively. The weight sensor is a thin-film sensor and is attached to the surface of the battery cell. The method includes: After the battery is connected to the electronic device, the weighing circuit obtains electrical energy from the electronic device through the first connection terminal and obtains the measured weight of the battery cell detected by the weighing circuit. Based on the measured weight, it is determined whether the battery is compatible with the electronic device, and the connection and disconnection of the first and second terminals of the switching circuit are controlled based on the matching result, so as to disconnect or connect the current loop between the electronic device and the battery.

10. The method according to claim 9, characterized in that, The step of determining whether the battery is compatible with the electronic device based on the measured weight includes: Determine the difference between the measured weight and the corresponding calibrated weight, wherein the calibrated weight corresponding to the measured weight of the battery cell is the weight of the original battery cell received by the electronic device; If the difference is greater than the difference threshold, it is determined that the battery is matched with the electronic device, and the first terminal and the second terminal of the switching circuit are disconnected to disconnect the current loop between the electronic device and the battery. If the difference is less than or equal to the difference threshold, it is determined that the battery is matched with the electronic device, and the first and second terminals of the switching circuit are turned on to make the current loop between the electronic device and the battery open.

11. The method according to claim 10, characterized in that, The step of obtaining the measured weight of the battery cells detected by the weighing circuit includes: Receive the measured weight of the battery cell sent by the weighing circuit; The step of determining whether the battery is compatible with the electronic device based on the measured weight includes: Based on the measured weight of the battery cell.

12. The method according to any one of claims 9 to 11, characterized in that, The step of determining whether the battery is compatible with the electronic device based on the measured weight includes: The obtained verification code; Based on the measured weight and the verification code, it is determined whether the battery is compatible with the electronic device.

13. An electronic device, characterized in that, The electronic device is used to connect to a battery, which is equipped with a battery detection circuit. The battery detection circuit includes a switching circuit and a weight measuring circuit. A first terminal of the switching circuit is connected to a first connection terminal of a target device, and a second terminal of the switching circuit is connected to a second connection terminal of the target device. The target device is either the electronic device or the battery. The weight measuring circuit includes a processing circuit and a weight sensor. The processing circuit is connected to the first connection terminal, the control terminal of the switching circuit, and the weight sensor. The weight sensor is a thin-film sensor and is attached to the surface of the battery cell. The electronic device includes: The acquisition module is used to provide power to the weighing circuit through the first connection terminal after the battery is connected to the electronic device, and to acquire the measured weight of the battery cell detected by the weighing circuit. The control module is used to determine whether the battery is compatible with the electronic device based on the measured weight, and to control the switching of the first and second terminals of the switching circuit based on the matching result, so as to disconnect or connect the current loop between the electronic device and the battery.

14. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing a computer program that is loaded and executed by the processor to implement the battery detection method as described in any one of claims 9 to 12.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is loaded and executed by a processor to implement the battery detection method as described in any one of claims 9 to 12.

Citation Information

Patent Citations

  • Battery pack, electronic apparatus, power system and electric vehicle

    JP2012174487A

  • Anti-fake battery pack and identification system thereof

    US20110121951A1