CN111830394A - Charging circuit fault detection method, electronic device and computer readable storage medium - Google Patents

Charging circuit fault detection method, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN111830394A
CN111830394A CN202010634481.7A CN202010634481A CN111830394A CN 111830394 A CN111830394 A CN 111830394A CN 202010634481 A CN202010634481 A CN 202010634481A CN 111830394 A CN111830394 A CN 111830394A
Authority
CN
China
Prior art keywords
charging circuit
charging
actual
current
fault detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010634481.7A
Other languages
Chinese (zh)
Inventor
丁鹏
盛江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Chuanggong Telecom Technology Co Ltd
Original Assignee
Shanghai Chuanggong Telecom Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Chuanggong Telecom Technology Co Ltd filed Critical Shanghai Chuanggong Telecom Technology Co Ltd
Priority to CN202010634481.7A priority Critical patent/CN111830394A/en
Publication of CN111830394A publication Critical patent/CN111830394A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer
    • G01R31/282Testing of electronic circuits specially adapted for particular applications not provided for elsewhere
    • G01R31/2825Testing of electronic circuits specially adapted for particular applications not provided for elsewhere in household appliances or professional audio/video equipment
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R19/00Arrangements for measuring currents or voltages or for indicating presence or sign thereof
    • G01R19/165Indicating that current or voltage is either above or below a predetermined value or within or outside a predetermined range of values
    • G01R19/16533Indicating that current or voltage is either above or below a predetermined value or within or outside a predetermined range of values characterised by the application
    • G01R19/16538Indicating that current or voltage is either above or below a predetermined value or within or outside a predetermined range of values characterised by the application in AC or DC supplies

Abstract

The invention relates to the technical field of electronics, and discloses a charging circuit fault detection method, electronic equipment and a computer readable storage medium. The charging circuit fault detection method comprises the following steps: presetting a current corresponding relation between a charging circuit and a standard charging current; acquiring an actual charging circuit and acquiring an actual charging current; acquiring the standard charging current corresponding to the actual charging circuit according to the current corresponding relation as a reference charging current; and judging whether the difference value of the actual charging current and the reference charging current is greater than a preset threshold value, if so, judging that the actual charging circuit has a fault. Compared with the prior art, the charging circuit fault detection method, the electronic device and the computer readable storage medium provided by the embodiment of the invention have the advantages that no external device is needed, and the fault detection process is simplified.

Description

Charging circuit fault detection method, electronic device and computer readable storage medium
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a charging circuit fault detection method, an electronic device, and a computer-readable storage medium.
Background
In recent years, electronic devices such as notebook computers, desktop computers, tablet computers (PADs), mobile phones, multimedia players, Personal Digital Assistants (PDAs), and the like have become increasingly popular. Almost all electronic devices can be recharged by a rechargeable battery for the purpose of extended standby time and repeated use. With the development of battery technology and charging technology, some new charging methods are more applied to various electronic devices, such as wireless charging, base charging, and the like.
However, the inventor of the present invention finds that, when the charging circuit is subjected to fault detection in the prior art, external devices such as a multimeter are generally required to be used for detection, which is troublesome in detection process and has a high requirement on the professional degree of a detector.
Disclosure of Invention
An object of embodiments of the present invention is to provide a charging circuit fault detection method, an electronic device, and a computer-readable storage medium, which simplify a fault detection process without using an external device.
In order to solve the above technical problem, an embodiment of the present invention provides a charging circuit fault detection method, including: presetting a current corresponding relation between a charging circuit and a standard charging current; acquiring an actual charging circuit and acquiring an actual charging current; acquiring the standard charging current corresponding to the actual charging circuit according to the current corresponding relation as a reference charging current; and judging whether the difference value of the actual charging current and the reference charging current is greater than a preset threshold value, if so, judging that the actual charging circuit has a fault.
An embodiment of the present invention also provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a charging circuit fault detection method as described above.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program, wherein the computer program is used for realizing the charging circuit fault detection method when being executed by a processor.
Compared with the prior art, the method and the device have the advantages that the current corresponding relation between the charging circuit and the standard charging current is preset, the standard charging current is the charging current when the charging circuit normally works, when the charging circuit is subjected to fault detection, the actual charging circuit and the actual charging current are obtained, the standard charging current corresponding to the actual charging circuit can be obtained as the reference charging current according to the preset current corresponding relation, the reference charging current is the charging current when the actual charging circuit normally works, the actual charging current and the reference charging current are compared to obtain the difference value, and if the difference value is larger than the preset threshold value, namely the difference value between the current actual charging current and the charging current when the actual charging circuit normally works is larger, the current charging circuit is indicated to have a fault. In the whole fault detection process, any external measuring equipment is not needed, and any measuring operation is not needed, so that the fault detection of the charging circuit can be automatically completed while the electronic equipment is charged, and the fault detection process is simplified.
In addition, before acquiring the actual charging circuit, the method further includes: presetting a node value corresponding relation between the charging circuit and a charging node value; the acquiring of the actual charging circuit specifically includes: and acquiring an actual charging node value, and acquiring a charging circuit corresponding to the actual charging node value as the actual charging circuit according to the node value corresponding relation.
In addition, the acquiring of the actual charging current specifically includes: and acquiring at least one current node of the actual charging circuit, and acquiring the actual charging current through the current node.
In addition, the charging circuit at least comprises a universal serial bus charging circuit and/or a base charging circuit and/or a wireless charging circuit.
In addition, after determining that the actual charging circuit has a fault, the method further includes: and sending a charging circuit fault alarm. And sending a fault alarm after judging that the actual charging circuit has a fault, reminding a user that the current charging circuit has the fault, and avoiding the damage of the battery caused by long-time use of the fault circuit for charging.
In addition, after determining that the actual charging circuit has a fault, the method further includes: disabling the actual charging circuit. And after the actual charging circuit is judged to have a fault, the actual charging circuit is forbidden, so that the damage to the battery caused by long-time charging by using the fault circuit is further avoided.
Drawings
Fig. 1 is a flowchart of a charging circuit fault detection method according to a first embodiment of the present invention;
fig. 2 is a flowchart of a charging circuit fault detection method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a charging circuit fault detection method according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
A first embodiment of the present invention relates to a charging circuit fault detection method, and a specific flow is shown in fig. 1, including:
step S101: and presetting a current corresponding relation between the charging circuit and the standard charging current.
Specifically, in the present embodiment, when only one charging circuit is present in the electronic device, one standard charging current may be set in advance in the memory. When a plurality of charging circuits are present in the electronic device, a charging current corresponding to each charging circuit is set in the memory. For example, in the POS machine, there are a usb charging mode and a cradle charging mode, that is, there are two different charging circuits of a usb charging circuit and a cradle charging circuit, and the standard charging currents of the two different charging circuits are preset, for example, the standard charging current of the usb charging circuit is set to 300mA, and the standard charging current of the cradle charging circuit is set to 1000 mA. It should be understood that the foregoing is only an example of a specific application of the current correspondence relationship between the charging circuit and the standard charging current provided in the present embodiment, and is not limited thereto, and in other embodiments of the present invention, other types of charging circuits, such as wireless charging, may be provided.
Step S102: an actual charging circuit is obtained.
Specifically, in this embodiment, a node value correspondence relationship between the charging circuit and the charging node value is preset, and one charging circuit corresponds to one charging node value. When the actual charging circuit is obtained, the actual charging node value is obtained, and the actual charging circuit can be obtained according to the corresponding relation between the actual charging node value and the node value.
Further, in this embodiment, a charging node value of each charging circuit is set in a charging information storage file, for example, an mtk _ chg _ type _ det.c file, in advance, when the electronic device is connected to a charger to perform charging, the charging information storage file obtains charging information reported by the charging interface, and when an upper application function in the system calls a function in the charging information storage file, the charging information storage file returns the charging node value to the upper application function, so that the system can obtain an actual charging circuit according to a correspondence between the charging node value and the node value.
Step S103: and acquiring the actual charging current.
Specifically, in the present embodiment, after the actual charging circuit is obtained, at least one current node in the actual charging circuit is obtained, and the actual charging current is obtained through the current node.
Further, in this embodiment, when the charger is connected, that is, when the charger provides a voltage to the charging module, a charging interrupt signal is generated to the CPU to notify the CPU that the charging module has now entered a charging state, the CPU starts ADC sampling to mainly collect Vchag, Vbat and a voltage output from a current node in the actual charging circuit, and the charging current can be calculated by the collected voltage and a resistance value of a resistor connected between the three nodes.
Step S104: a standard charging current corresponding to the actual charging circuit is acquired as a reference charging current.
Specifically, in the present embodiment, a standard charging current corresponding to the actual charging circuit is acquired from a preset current correspondence relationship as a reference charging current.
Step S105: and judging whether the difference value between the actual charging current and the reference charging current is larger than a preset threshold value, if so, executing the step S106, and if not, ending the fault detection process.
Specifically, in this embodiment, the preset threshold is a preset current difference threshold, and in the actual use process, the preset threshold can be flexibly set according to actual needs, for example, when the accuracy of fault detection needs to be improved, the preset threshold can be set to be a smaller value, and when the efficiency of fault detection needs to be improved, the preset threshold can be set to be a larger value. It should be understood that the foregoing is only an example of a specific application of the setting of the preset threshold in this embodiment, and is not limited thereto, and in other embodiments of the present invention, the setting may also be performed according to other requirements, for example, when the standard charging current value is relatively large, the fluctuation of the current is relatively large, the preset threshold may be set to be a relatively large value, when the standard charging current value is relatively small, the fluctuation of the current is relatively small, and the preset threshold may be set to be a relatively small value.
Step S106: it is determined that there is a failure in the actual charging circuit.
Compared with the prior art, in the method for detecting the fault of the charging circuit provided by the first embodiment of the invention, presetting a current corresponding relation between the charging circuit and a standard charging current, wherein the standard charging current is the charging current when the charging circuit works normally, when the charging circuit is detected to be in fault, the actual charging circuit and the actual charging current are obtained, according to the preset current corresponding relation, the standard charging current corresponding to the actual charging circuit can be obtained as the reference charging current, the reference charging current is the charging current when the actual charging circuit normally works, the actual charging current is compared with the reference charging current to calculate the difference value, if the difference value is larger than the preset threshold value, namely, the difference between the current actual charging current and the charging current when the actual charging circuit works normally is large, which indicates that the current charging circuit has a fault. In the whole fault detection process, any external measuring equipment is not needed, and any measuring operation is not needed, so that the fault detection of the charging circuit can be automatically completed while the electronic equipment is charged, and the fault detection process is simplified.
A second embodiment of the present invention relates to a charging circuit failure detection method. The second embodiment is substantially the same as the first embodiment, and includes the following steps as shown in fig. 2:
step S201: and presetting a current corresponding relation between the charging circuit and the standard charging current.
Step S202: an actual charging circuit is obtained.
Step S203: and acquiring the actual charging current.
Step S204: a standard charging current corresponding to the actual charging circuit is acquired as a reference charging current.
Step S205: and judging whether the difference value between the actual charging current and the reference charging current is larger than a preset threshold value, if so, executing the step S206, and if not, ending the fault detection process.
Step S206: it is determined that there is a failure in the actual charging circuit.
It should be noted that steps S201 to S206 provided in the second embodiment of the present invention are substantially the same as steps S101 to S106 in the first embodiment, and are not repeated herein, and specific reference may be made to the detailed description of the first embodiment.
Step S207: and sending a charging circuit fault alarm.
Specifically, in the present embodiment, a failure alarm different from that preset for each charging circuit may be set, and when it is determined that the charging circuit has failed, a failure alarm corresponding to the failed charging circuit may be issued.
Compared with the prior art, the charging circuit fault detection method provided by the second embodiment of the invention keeps all technical effects of the first embodiment, and sends out a fault alarm after judging that the actual charging circuit has a fault, so as to remind a user that the current charging circuit has the fault, and avoid battery damage caused by long-time use of the fault circuit for charging.
A third embodiment of the present invention relates to a charging circuit failure detection method. The third embodiment is substantially the same as the first embodiment, and includes the following steps as shown in fig. 3:
step S301: and presetting a current corresponding relation between the charging circuit and the standard charging current.
Step S302: an actual charging circuit is obtained.
Step S303: and acquiring the actual charging current.
Step S304: a standard charging current corresponding to the actual charging circuit is acquired as a reference charging current.
Step S305: and judging whether the difference value between the actual charging current and the reference charging current is larger than a preset threshold value, if so, executing the step S306, and if not, ending the fault detection process.
Step S306: it is determined that there is a failure in the actual charging circuit.
It should be noted that steps S301 to S306 provided in the third embodiment of the present invention are substantially the same as steps S101 to S106 in the first embodiment, and are not repeated herein, and specific reference may be made to the detailed description of the first embodiment.
Step S307: the actual charging circuit is disabled.
Specifically, in the present embodiment, when it is determined that there is a failure in the actual charging circuit, the failed actual charging circuit is disabled.
Compared with the prior art, the charging circuit fault detection method provided by the third embodiment of the invention keeps all the technical effects of the first embodiment, and disables the charging circuit with the fault after the actual charging circuit is judged to have the fault, so that the damage of the battery caused by long-time use of the fault circuit for charging is avoided.
It should be understood that the steps of the above methods are divided for clarity, and the implementation may be combined into one step or split into multiple steps, and all the steps are within the scope of the present patent as long as they contain the same logical relationship; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A fourth embodiment of the present invention relates to an electronic apparatus, as shown in fig. 4, including: a lidar 401 and at least one processor 402 coupled to the lidar 401; and a memory 403 communicatively coupled to the at least one processor 402; the memory 403 stores instructions executable by the at least one processor 402, where the instructions are executable by the at least one processor 402 to enable the at least one processor 402 to perform the charging circuit fault detection method described above.
Where the memory 403 and the processor 402 are coupled in a bus, the bus may comprise any number of interconnected buses and bridges that couple one or more of the various circuits of the processor 402 and the memory 403 together. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 402 is transmitted over a wireless medium through an antenna, which further receives the data and transmits the data to the processor 402.
The processor 402 is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And memory 403 may be used to store data used by processor 402 in performing operations.
A fifth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The computer program realizes the above-described method embodiments when executed by a processor.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (8)

1. A charging circuit fault detection method, comprising:
presetting a current corresponding relation between a charging circuit and a standard charging current;
acquiring an actual charging circuit and acquiring an actual charging current;
acquiring the standard charging current corresponding to the actual charging circuit according to the current corresponding relation as a reference charging current;
and judging whether the difference value of the actual charging current and the reference charging current is greater than a preset threshold value, if so, judging that the actual charging circuit has a fault.
2. The charging circuit fault detection method of claim 1, wherein before obtaining the actual charging circuit, the method further comprises:
presetting a node value corresponding relation between the charging circuit and a charging node value;
the acquiring of the actual charging circuit specifically includes:
and acquiring an actual charging node value, and acquiring a charging circuit corresponding to the actual charging node value as the actual charging circuit according to the node value corresponding relation.
3. The charging circuit fault detection method according to claim 1, wherein the obtaining an actual charging current specifically includes:
and acquiring at least one current node of the actual charging circuit, and acquiring the actual charging current through the current node.
4. The charging circuit fault detection method of claim 1, wherein the charging circuit comprises at least a universal serial bus charging circuit and/or a base charging circuit and/or a wireless charging circuit.
5. The charging circuit fault detection method of claim 1, wherein after determining that the actual charging circuit has a fault, further comprising:
and sending a charging circuit fault alarm.
6. The charging circuit fault detection method of claim 1, wherein after determining that the actual charging circuit has a fault, further comprising:
disabling the actual charging circuit.
7. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the charging circuit fault detection method of any one of claims 1 to 6.
8. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the charging circuit fault detection method of any one of claims 1 to 6.
CN202010634481.7A 2020-07-02 2020-07-02 Charging circuit fault detection method, electronic device and computer readable storage medium Pending CN111830394A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010634481.7A CN111830394A (en) 2020-07-02 2020-07-02 Charging circuit fault detection method, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010634481.7A CN111830394A (en) 2020-07-02 2020-07-02 Charging circuit fault detection method, electronic device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111830394A true CN111830394A (en) 2020-10-27

Family

ID=72901031

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010634481.7A Pending CN111830394A (en) 2020-07-02 2020-07-02 Charging circuit fault detection method, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111830394A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112557744A (en) * 2020-12-11 2021-03-26 上海新时达电气股份有限公司 Three-phase current detection method and circuit
CN114325306A (en) * 2021-12-03 2022-04-12 广东友电新能源科技有限公司 Method and device for detecting connectivity of inverter system, electronic equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101052888A (en) * 2004-09-29 2007-10-10 皇家飞利浦电子股份有限公司 Charging method and circuit using indirect current sensing
CN206211566U (en) * 2016-09-21 2017-05-31 比亚迪股份有限公司 A kind of charger detects protection circuit and charger
CN107831386A (en) * 2017-10-31 2018-03-23 奇酷互联网络科技(深圳)有限公司 Identification charging abnormal method, equipment, mobile terminal and computer-readable storage medium
CN108400621A (en) * 2017-02-07 2018-08-14 中兴通讯股份有限公司 The detection method and device of charge fault

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101052888A (en) * 2004-09-29 2007-10-10 皇家飞利浦电子股份有限公司 Charging method and circuit using indirect current sensing
CN206211566U (en) * 2016-09-21 2017-05-31 比亚迪股份有限公司 A kind of charger detects protection circuit and charger
CN108400621A (en) * 2017-02-07 2018-08-14 中兴通讯股份有限公司 The detection method and device of charge fault
CN107831386A (en) * 2017-10-31 2018-03-23 奇酷互联网络科技(深圳)有限公司 Identification charging abnormal method, equipment, mobile terminal and computer-readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112557744A (en) * 2020-12-11 2021-03-26 上海新时达电气股份有限公司 Three-phase current detection method and circuit
CN114325306A (en) * 2021-12-03 2022-04-12 广东友电新能源科技有限公司 Method and device for detecting connectivity of inverter system, electronic equipment and medium
CN114325306B (en) * 2021-12-03 2024-03-22 深圳科士达科技股份有限公司 Inversion system connectivity detection method and device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
US11368039B2 (en) Battery charging method and electronic device
US20220043067A1 (en) Charging method and device, charging system, electronic equipment and storage medium
US11056905B2 (en) Battery charging management method and terminal
CN111463842B (en) Electronic equipment and communication method thereof
CN111480152B (en) Interface configuration method, terminal equipment and interface
EP3255719B1 (en) Charging method and device
US8671291B2 (en) Method and device for charging energy storage devices
CN111830394A (en) Charging circuit fault detection method, electronic device and computer readable storage medium
WO2018120769A1 (en) Method and device for obtaining capacity difference between batteries
CN109254210B (en) Electronic equipment port type detection method and device, detection circuit and electronic equipment
CN110244233A (en) A kind of detection method of battery, electronic equipment and computer storage medium
US9780783B1 (en) Voltage tolerant termination presence detection
CN104617615A (en) Charging method and electronic equipment
US11411423B2 (en) Charging control method, related device, and computer storage medium
CN106972558B (en) Charging control method and electronic equipment
CN105354491A (en) Standby state detection method and device of intelligent terminal
CN115395621A (en) Emergency energy storage battery electric energy management method, device, equipment and medium
US20220404423A1 (en) Intelligent battery power discharge management
CN111157907B (en) Detection method and device, charging method and device, electronic device and storage medium
CN113013935A (en) Control method and system of power supply device, terminal equipment and storage medium
CN111552655A (en) Method and equipment compatible with PogoPin, Y-cable and USB
CN110442539B (en) Mobile phone OTG switching method and device
CN113507154B (en) Charging method and device, charger and electronic equipment
CN110970950B (en) Charging control method and device, storage medium and split type electronic equipment
CN107863808B (en) Charging control method and device for mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201027