Magnetic attraction charging abnormity detection method
The method addresses the ineffective detection of magnetic charging abnormalities by calculating charging circuit impedance, enhancing detection accuracy and ensuring safe charging operations in devices with magnetic USB interfaces.
Patent Information
- Application Number
- CN202411398871.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2024-12-27
AI Technical Summary
Existing magnetic charging abnormality detection schemes fail to effectively detect abnormalities in the charging circuit due to dirtiness or misalignment, leading to issues like failure to charge or overheating, particularly in devices with magnetic USB interfaces.
The method involves the MCU of the magnetic charger detecting the magnetic output interface, calculating charging current using a current detection module, and sending external output voltage and current to the CPU of the electronic device for determining charging circuit impedance, which is compared against minimum input voltage and maximum impedance thresholds to detect abnormalities.
Accurately determines magnetic charging abnormalities by calculating charging circuit impedance, improving detection effectiveness and ensuring safe charging operations.
Smart Images

Figure CN119199659A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of magnetic charging technology, and in particular to a method for detecting abnormal magnetic charging. Background Art
[0002] At present, there are many types of charging interfaces for electronic devices, and the connection lines of charging interfaces are complex and varied. Magnetic charging interfaces are particularly common on devices with high waterproof requirements, such as wearable watches and headphones. It should be noted that the dirtiness or misalignment of the magnetic charging interface caused by user use will increase the impedance of the charging circuit, resulting in excessive voltage drop on the line, causing abnormalities such as failure to charge or heating of the magnetic charging interface. However, existing magnetic charging abnormality detection schemes are mostly aimed at detecting battery abnormalities, generally ignoring the charging circuit, and there is a technical problem of poor detection effect. Summary of the invention
[0003] An embodiment of the present invention provides a method for detecting abnormal magnetic charging, the method comprising:
[0004] The MCU of the magnetic charger detects the magnetic output interface of the magnetic charger. If it is detected that the magnetic output interface is connected to the magnetic charging interface of the electronic device and is in a charging state, the voltage across the current detection module of the magnetic charger is detected, and the current detection module is connected in series between the output end of the AC / DC module of the magnetic charger and the power line of the magnetic output interface; the current of the current detection module is calculated according to the voltage across the current detection module and the resistance of the current detection module, and is used as the charging current; the external output voltage and charging current of the magnetic charger are sent to the CPU of the electronic device through the data signal line of the magnetic output interface and the magnetic charging interface. The external output voltage of the magnetic charger is the voltage at one end of the voltage across the current detection module where the current detection module is connected to the power line of the magnetic output interface;
[0005] The CPU of the electronic device receives the external output voltage and charging current of the magnetic charger, and detects the input voltage of the charging chip of the electronic device; calculates the charging circuit impedance according to the external output voltage of the magnetic charger, the input voltage of the charging chip, and the charging current; calculates the maximum impedance of the charging circuit according to the external output voltage of the magnetic charger, the minimum input voltage required by the charging chip, and the charging current; determines whether the magnetic charging is abnormal according to the input voltage of the charging chip, the minimum input voltage required by the charging chip, the charging circuit impedance, and the maximum impedance of the charging circuit.
[0006] In some possible implementations, the magnetic output interface and the magnetic charging interface are both magnetic USB interfaces.
[0007] In some implementations, the current sensing module is a current sensing resistor.
[0008] In some possible implementations, detecting the voltage across the current sensing module of the magnetic charger includes:
[0009] The MCU detects the voltage at both ends of the current detection module through the 2-way analog-to-digital converter of the magnetic charger. The two input ends of the 2-way analog-to-digital converter are correspondingly connected to the two ends of the current detection module, and the output end of the 2-way analog-to-digital converter is connected to the MCU.
[0010] In some possible implementations, detecting an input voltage of a charging chip of an electronic device includes:
[0011] The CPU detects the input voltage of the charging chip through a single-channel analog-to-digital converter of the electronic device, the input end of the single-channel analog-to-digital converter is connected to the input end of the charging chip, and the output end of the single-channel analog-to-digital converter is connected to the CPU.
[0012] In some implementations, determining whether magnetic charging is abnormal is performed according to the input voltage of the charging chip, the minimum input voltage required by the charging chip, the charging circuit impedance, and the maximum impedance of the charging circuit, including:
[0013] The CPU compares the input voltage of the charging chip with the minimum input voltage required by the charging chip, and compares the charging loop impedance with the maximum impedance of the charging loop, and determines whether the magnetic charging is abnormal based on the comparison results.
[0014] In some possible implementations, determining whether the magnetic charging is abnormal according to the comparison result includes:
[0015] If the input voltage of the charging chip is less than the minimum input voltage required by the charging chip and / or the charging circuit impedance is greater than the maximum impedance of the charging circuit, the CPU determines that the magnetic charging is abnormal.
[0016] In some possible implementations, the method further includes:
[0017] The CPU periodically sends a request to the MCU to read the external output voltage and charging current of the magnetic charger through the data signal line of the magnetic charging interface and the magnetic output interface;
[0018] If the MCU does not respond for several cycles, the CPU controls the electronic device to stop charging;
[0019] If the MCU does not receive a request for multiple consecutive cycles, the MCU controls the magnetic charger to stop supplying power.
[0020] In some possible implementations, the method further includes:
[0021] If it is determined that the magnetic charging is abnormal, the CPU detects the state of the electronic device and outputs corresponding prompt information according to the state of the electronic device.
[0022] In some possible implementations, outputting corresponding prompt information according to the state of the electronic device includes:
[0023] If the electronic device is in a production test state, the CPU outputs a first prompt message to prompt the staff to check the assembly of the electronic device;
[0024] If the electronic device is in the factory-released state, the CPU outputs a second prompt message, prompting the user to wipe the magnetic output interface and the magnetic charging interface or the magnetic charger is under-voltage.
[0025] In an embodiment of the present invention, whether magnetic charging is abnormal can be accurately determined by obtaining the input voltage of the charging chip, the minimum input voltage required by the charging chip, the charging circuit impedance and the maximum impedance of the charging circuit, thereby effectively improving the effect of magnetic charging abnormality detection.
[0026] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The above and other features, advantages and aspects of the embodiments of the present invention will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. The accompanying drawings are provided for a better understanding of the present invention and do not constitute a limitation of the present invention. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0028] Figure 1 is a schematic diagram of an exemplary operating environment in which embodiments of the present invention can be implemented;
[0029] Figure 2 is a schematic diagram of another exemplary operating environment in which embodiments of the present invention can be implemented;
[0030] Figure 3 A schematic flow chart of a method for detecting abnormal magnetic charging provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] In addition, the term "and / or" in the present invention is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship.
[0033] In order to solve the technical problems arising in the background technology, an embodiment of the present invention provides a method for detecting magnetic charging anomalies. Specifically, the MCU of the magnetic charger detects the magnetic output interface of the magnetic charger. If it is detected that the magnetic output interface is connected to the magnetic charging interface of the electronic device and is in a charging state, the voltage across the current detection module of the magnetic charger is detected. The current detection module is connected in series between the output end of the AC / DC module of the magnetic charger and the power line of the magnetic output interface; the current of the current detection module is calculated according to the voltage across the current detection module and the resistance of the current detection module, and it is used as the charging current; the magnetic charger outputs external voltage and charging current to the CPU of the electronic device through the data signal line of the magnetic output interface and the magnetic charging interface, and the magnetic charger outputs external current. The voltage is the voltage at one end of the current detection module connected to the power line of the magnetic output interface among the voltages at both ends of the current detection module; the CPU of the electronic device receives the external output voltage and charging current of the magnetic charger, and detects the input voltage of the charging chip of the electronic device; the charging circuit impedance is calculated according to the external output voltage of the magnetic charger, the input voltage of the charging chip and the charging current, and the maximum impedance of the charging circuit is calculated according to the external output voltage of the magnetic charger, the minimum input voltage required by the charging chip and the charging current; whether the magnetic charging is abnormal is determined according to the input voltage of the charging chip, the minimum input voltage required by the charging chip, the charging circuit impedance and the maximum impedance of the charging circuit.
[0034] In this way, whether the magnetic charging is abnormal can be accurately determined by obtaining the input voltage of the charging chip, the minimum input voltage required by the charging chip, the charging circuit impedance and the maximum impedance of the charging circuit, thereby effectively improving the effect of magnetic charging abnormality detection.
[0035] A method for detecting abnormal magnetic charging provided by an embodiment of the present invention will be described in detail below with reference to the accompanying drawings through specific embodiments.
[0036] Figure 1 Schematic diagram of an exemplary operating environment in which an embodiment of the present invention can be implemented, such as Figure 1 As shown, the operating environment may include: a magnetic charger, electronic devices (such as smart watches, smart glasses, Bluetooth headsets, etc.).
[0037] The magnetic charger includes but is not limited to: a magnetic output interface, a current detection module, an AC / DC module and an MCU.
[0038] The current detection module is connected in series between the output end of the AC / DC module and the power line (VBUS) of the magnetic output interface, the MCU is connected to the data signal line (data positive and negative signal lines) and the ground line (GND) of the magnetic output interface, and the MCU is connected to both ends of the current detection module.
[0039] The electronic device includes but is not limited to: a magnetic charging interface, a charging chip and a CPU.
[0040] The charging chip is connected to the power line (VBUS) of the magnetic charging interface, the CPU is connected to the data signal line (data positive and negative signal lines) and the ground line (GND) of the magnetic charging interface, and the CPU is connected to the input end of the charging chip.
[0041] It is worth noting that the magnetic output interface and the magnetic charging interface are both magnetic USB interfaces; the current sensing module is a current sensing resistor.
[0042] Figure 2 is a schematic diagram of another exemplary operating environment in which the embodiment of the present invention can be implemented. Figure 1 The operating environment shown, Figure 2 The operating environment also includes a 2-channel analog-to-digital converter (2-channel ADC) and a single-channel analog-to-digital converter (single-channel ADC).
[0043] The two input ends of the 2-way ADC are connected to the two ends of the current detection module correspondingly, and the output ends of the 2-way ADC are connected to the MCU; the input end of the single-way ADC is connected to the input end of the charging chip, and the output end of the single-way analog-to-digital converter is connected to the CPU.
[0044] A method for detecting abnormal magnetic charging provided by an embodiment of the present invention will be described in detail below. The method for detecting abnormal magnetic charging can be applied to Figure 1-Figure 2 The operating environment shown.
[0045] Figure 3 A flowchart of a magnetic charging abnormality detection method provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the magnetic charging abnormality detection method 300 may include the following steps:
[0046] S310, the MCU of the magnetic charger detects the magnetic output interface of the magnetic charger. If it is detected that the magnetic output interface is connected to the magnetic charging interface of the electronic device and is in a charging state, the voltage across the current detection module of the magnetic charger is detected, and the current detection module is connected in series between the output end of the AC / DC module of the magnetic charger and the power line of the magnetic output interface; the current of the current detection module is calculated according to the voltage across the current detection module and the resistance of the current detection module, and is used as the charging current; the external output voltage and charging current of the magnetic charger are sent to the CPU of the electronic device through the data signal line of the magnetic output interface and the magnetic charging interface, and the external output voltage of the magnetic charger is the voltage at one end of the current detection module connected to the power line of the magnetic output interface among the voltage across the current detection module.
[0047] S320, the CPU of the electronic device receives the external output voltage and charging current of the magnetic charger, and detects the input voltage of the charging chip of the electronic device; calculates the charging circuit impedance according to the external output voltage of the magnetic charger, the input voltage of the charging chip, and the charging current, and calculates the maximum impedance of the charging circuit according to the external output voltage of the magnetic charger, the minimum input voltage required by the charging chip, and the charging current; determines whether the magnetic charging is abnormal according to the input voltage of the charging chip, the minimum input voltage required by the charging chip, the charging circuit impedance, and the maximum impedance of the charging circuit.
[0048] For further understanding, the above steps are described below in conjunction with specific embodiments:
[0049] In S310, the MCU detects the magnetic output interface. If it is detected that the magnetic output interface is connected to the magnetic charging interface and is in charging state, the voltages at both ends of the current detection module (current detection resistor) are detected through 2 ADCs, which are recorded as V1 and V2 respectively, where V1 is the voltage at one end of the current detection module connected to the power line of the magnetic output interface, and V2 is the voltage at one end of the current detection module connected to the output end of the AC / DC module.
[0050] The MCU calculates the current of the current detection module according to the voltages V1 and V2 at both ends of the current detection module and the resistance R1 of the current detection module, and uses it as the charging current I. The calculation formula of the charging current I is as follows:
[0051]
[0052] The MCU sends the magnetic charger's external output voltage (ie, V1) and charging current I to the CPU through the data signal lines (data positive and negative signal lines) of the magnetic output interface and the magnetic charging interface.
[0053] In S320, the CPU receives the external output voltage V1 and charging current I of the magnetic charger, and detects the input voltage of the charging chip through a single-channel ADC, denoted as V3.
[0054] The CPU calculates the charging loop impedance R2 based on the external output voltage V1 of the magnetic charger, the input voltage V3 of the charging chip, and the charging current I. The calculation formula for the charging loop impedance R2 is as follows:
[0055]
[0056] The CPU calculates the maximum charging loop impedance R3 based on the external output voltage V1 of the magnetic charger, the minimum input voltage V4 required by the charging chip, and the charging current I. The calculation formula for the charging loop impedance R3 is as follows:
[0057]
[0058] The CPU compares the input voltage V3 of the charging chip with the minimum input voltage V4 required by the charging chip, and compares the charging loop impedance R2 with the maximum charging loop impedance R3, and determines whether the magnetic charging is abnormal according to the comparison results. Exemplarily, if V3 < V4 and / or R2 > R3, the CPU determines that the magnetic charging is abnormal.
[0059] In summary, according to the embodiments of the present invention, at least the following technical effects are achieved:
[0060] It is possible to accurately determine whether the magnetic charging is abnormal by obtaining the input voltage of the charging chip, the minimum input voltage required by the charging chip, the charging loop impedance, and the maximum charging loop impedance, thereby effectively improving the detection effect of magnetic charging abnormalities.
[0061] Furthermore, the magnetic charging abnormality detection method 300 may further include:
[0062] If it is determined that the magnetic charging is abnormal, the CPU detects the state of the electronic device and outputs a corresponding prompt message according to the state of the electronic device. Exemplarily, if the state of the electronic device is production testing, the CPU outputs a first prompt message to prompt the staff to check the assembly of the electronic device; if the state of the electronic device is factory use, the CPU outputs a second prompt message to prompt the user to wipe the magnetic output interface and the magnetic charging interface or that the magnetic charger is under voltage.
[0063] In addition, the magnetic charging abnormality detection method 300 may further include:
[0064] The CPU periodically sends a request to the MCU to read the magnetic charger's external output voltage and charging current through the data signal lines of the magnetic charging interface and the magnetic output interface. If the MCU does not respond for multiple cycles, the CPU controls the electronic device to stop charging. Similarly, if the MCU does not receive a request for multiple cycles, the MCU controls the magnetic charger to stop supplying power.
[0065] For example, the CPU sends a request to the MCU to read the magnetic charger's output voltage and charging current through the data signal line of the magnetic charging interface and the magnetic output interface every 1 second. If the MCU does not respond for 3 consecutive times, the CPU controls the electronic device to stop charging. Similarly, if the MCU does not receive a request for 3 consecutive seconds, the MCU controls the magnetic charger to stop supplying power.
[0066] In this way, whether the communication is normal can be used to assist in determining whether the contact between the magnetic output interface and the magnetic charging interface is stable and normal.
[0067] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0068] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and the present invention is not limited here.
[0069] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for detecting abnormal magnetic charging, characterized in that: The method comprises: The MCU of the magnetic charger detects the magnetic output interface of the magnetic charger. If it is detected that the magnetic output interface is connected to the magnetic charging interface of the electronic device and is in a charging state, the voltage across the current detection module of the magnetic charger is detected, and the current detection module is connected in series between the output end of the AC / DC module of the magnetic charger and the power line of the magnetic output interface; the current of the current detection module is calculated according to the voltage across the current detection module and the resistance of the current detection module, and is used as the charging current; the external output voltage and charging current of the magnetic charger are sent to the CPU of the electronic device through the data signal line between the magnetic output interface and the magnetic charging interface, and the external output voltage of the magnetic charger is the voltage across the current detection module, at which end of the current detection module is connected to the power line of the magnetic output interface; The CPU of the electronic device receives the external output voltage of the magnetic charger and the charging current, and detects the input voltage of the charging chip of the electronic device; calculates the charging circuit impedance according to the external output voltage of the magnetic charger, the input voltage of the charging chip and the charging current, and calculates the maximum impedance of the charging circuit according to the external output voltage of the magnetic charger, the minimum input voltage required by the charging chip and the charging current; determines whether the magnetic charging is abnormal according to the input voltage of the charging chip, the minimum input voltage required by the charging chip, the charging circuit impedance and the maximum impedance of the charging circuit.
2. The method according to claim 1, characterized in that The magnetic output interface and the magnetic charging interface are both magnetic USB interfaces.
3. The method according to claim 1, characterized in that The current detection module is a current detection resistor.
4. The method according to claim 1, characterized in that: The method of detecting the voltage at both ends of the current detection module of the magnetic charger includes: The MCU detects the voltage at both ends of the current detection module through the 2-way analog-to-digital converter of the magnetic charger, the two input ends of the 2-way analog-to-digital converter are correspondingly connected to the two ends of the current detection module, and the output end of the 2-way analog-to-digital converter is connected to the MCU.
5. The method according to claim 1, characterized in that: The detecting the input voltage of the charging chip of the electronic device comprises: The CPU detects the input voltage of the charging chip through a single-channel analog-to-digital converter of the electronic device, the input end of the single-channel analog-to-digital converter is connected to the input end of the charging chip, and the output end of the single-channel analog-to-digital converter is connected to the CPU.
6. The method according to claim 1, characterized in that The determining whether the magnetic charging is abnormal according to the input voltage of the charging chip, the minimum input voltage required by the charging chip, the charging circuit impedance and the maximum impedance of the charging circuit includes: The CPU compares the input voltage of the charging chip with the minimum input voltage required by the charging chip, compares the charging loop impedance with the maximum impedance of the charging loop, and determines whether the magnetic charging is abnormal based on the comparison result.
7. The method according to claim 6, characterized in that The determining whether the magnetic charging is abnormal according to the comparison result includes: If the input voltage of the charging chip is less than the minimum input voltage required by the charging chip and / or the charging circuit impedance is greater than the maximum impedance of the charging circuit, the CPU determines that the magnetic charging is abnormal.
8. The method according to claim 1, characterized in that The method further comprises: The CPU periodically sends a request to the MCU to read the external output voltage and the charging current of the magnetic charger through the data signal line of the magnetic charging interface and the magnetic output interface; If the MCU does not respond for multiple cycles, the CPU controls the electronic device to stop charging; If the MCU fails to receive the request for multiple consecutive cycles, the MCU controls the magnetic charger to stop supplying power.
9. The method according to claim 1, characterized in that: The method further comprises: If it is determined that the magnetic charging is abnormal, the CPU detects the state of the electronic device and outputs corresponding prompt information according to the state of the electronic device.
10. The method according to claim 9, characterized in that Outputting corresponding prompt information according to the state of the electronic device includes: If the electronic device is in a production test state, the CPU outputs a first prompt message to prompt a worker to check the assembly of the electronic device; If the electronic device is in the factory-released state, the CPU outputs a second prompt message to prompt the user to wipe the magnetic output interface and the magnetic charging interface or the magnetic charger is under-voltage.
