CN109378877B - Charging circuit, charging processing method, electronic device, and storage medium - Google Patents

Charging circuit, charging processing method, electronic device, and storage medium Download PDF

Info

Publication number
CN109378877B
CN109378877B CN201811348643.XA CN201811348643A CN109378877B CN 109378877 B CN109378877 B CN 109378877B CN 201811348643 A CN201811348643 A CN 201811348643A CN 109378877 B CN109378877 B CN 109378877B
Authority
CN
China
Prior art keywords
charging
input
voltage
output
charging interface
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.)
Active
Application number
CN201811348643.XA
Other languages
Chinese (zh)
Other versions
CN109378877A (en
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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent 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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201811348643.XA priority Critical patent/CN109378877B/en
Publication of CN109378877A publication Critical patent/CN109378877A/en
Application granted granted Critical
Publication of CN109378877B publication Critical patent/CN109378877B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0029Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with safety or protection devices or circuits

Abstract

The embodiment of the application provides a charging circuit, a charging processing method, an electronic device and a storage medium. The charging interface is used for connecting an external charging device; the first switch element comprises a first input end, a first output end and a first control end, the first input end is connected with a power input pin of the charging interface, the first output end is grounded, and the first control end is used for controlling the first input end and the first output end to be connected or disconnected; the control module is connected with the charging interface, the control module is connected with the first control end, and when the difference value between the input voltage of the charging interface and the output voltage of the charging device is larger than a preset difference value threshold value, the control module connects the first input end with the first output end. When the charging interface is provided with foreign matters or liquid, the charging interface is slightly short-circuited, and at the moment, the power input pin of the charging interface is grounded to stop charging, so that the charging interface is protected.

Description

Charging circuit, charging processing method, electronic device, and storage medium
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a charging circuit, a charging processing method, an electronic device, and a storage medium.
Background
At present, a charging interface of an electronic device such as a mobile phone can integrate data transmission and charging functions. When the electronic equipment is connected with an external charging device through the charging interface for charging, because the distance between pins of the charging interface is small, when foreign matters or liquid enters the charging interface, a micro short circuit is easily caused, and then the charging interface is easily damaged.
Disclosure of Invention
The embodiment of the application provides a charging circuit, a charging processing method, an electronic device and a storage medium, which can effectively and accurately detect whether a charging interface is short-circuited or not and protect the charging interface.
The embodiment of the application provides a charging circuit, it includes:
the charging interface is used for connecting an external charging device;
the first switch element comprises a first input end, a first output end and a first control end, the first input end is connected with a power input pin of the charging interface, the first output end is grounded, and the first control end is used for controlling the first input end and the first output end to be connected or disconnected;
the control module is connected with the charging interface and the first control end, and when the difference value between the input voltage of the charging interface and the output voltage of the charging device is larger than a preset difference threshold value, the control module connects the first input end with the first output end.
The embodiment of the application provides a charging processing method, which is applied to equipment to be charged, wherein the equipment to be charged comprises a charging interface, the charging interface is used for connecting a charging device, and the method comprises the following steps:
acquiring the input voltage of the charging interface;
acquiring the output voltage of the charging device;
and when the difference value between the output voltage and the input voltage is greater than a preset difference value threshold value, grounding the power supply input of the charging interface to stop charging.
The embodiment of the application also provides an electronic device, which comprises a charging circuit and a battery, wherein the charging circuit is connected with the battery, and the charging circuit is as described above.
Embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the charging processing method as described above.
The charging circuit, the charging processing method, the electronic device and the storage medium provided by the embodiment of the application can detect the difference between the input voltage of the charging interface and the output voltage of the charging device. And when the difference value between the input voltage of the charging interface and the output voltage of the charging device is zero or smaller than a preset difference value threshold value, the charging interface is normal and the charging is normal. When the difference value between the input voltage of the charging interface and the output voltage of the charging device is detected to be larger than the preset difference value threshold value, foreign matters or liquid can enter the charging interface, so that micro short circuit in the charging interface is caused, at the moment, the power input pin of the charging interface is grounded, charging is stopped, and the charging interface is protected.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a schematic structural diagram of a first state of an electronic device according to an embodiment of the present application.
Fig. 2 is another schematic structural diagram of the first state of the electronic device according to the embodiment of the present application.
Fig. 3 is a schematic structural diagram of a second state of an electronic device according to an embodiment of the present application.
Fig. 4 is another schematic structural diagram of a second state of the electronic device according to the embodiment of the present application.
Fig. 5 is a schematic structural diagram of a device to be charged and a charging apparatus according to an embodiment of the present disclosure.
Fig. 6 is another schematic structural diagram of a device to be charged and a charging apparatus according to an embodiment of the present disclosure.
Fig. 7 is a schematic flowchart of a charging processing method according to an embodiment of the present application.
Fig. 8 is a block diagram schematically illustrating a module of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present application are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with respect to other embodiments that are not detailed herein.
The embodiment of the application provides a charging circuit, a charging processing method, an electronic device and a storage medium. The details will be described below separately. The electronic device may be a smart phone, a tablet computer, or other devices, and may also be a game device, an AR (Augmented Reality) device, an audio playing device, a video playing device, or other devices.
Referring to fig. 1 to 4, fig. 1 is a schematic structural diagram of a first state of an electronic device according to an embodiment of the present disclosure, fig. 2 is another schematic structural diagram of the first state of the electronic device according to the embodiment of the present disclosure, fig. 3 is a schematic structural diagram of a second state of the electronic device according to the embodiment of the present disclosure, and fig. 4 is another schematic structural diagram of the second state of the electronic device according to the embodiment of the present disclosure. The first state may be a state in which the electronic device 100 does not turn on the camera function, such as a standby state and a state in which the camera is not turned on when the screen is bright. The second state is a state when the electronic device 100 turns on the image capturing function.
In some embodiments, the electronic device 100 may include a display 12, an electronics board 13, a battery 14, a housing 15, a front-facing camera 161, and a rear-facing camera 162. Note that the electronic apparatus 100 is not limited to the above.
In some embodiments, electronic device 100 may further include a sliding mechanism 18, sliding mechanism 18 being coupled to housing 15, sliding mechanism 18 being slidable relative to the housing. The front camera 161 and the rear camera 162 are provided on the slide mechanism 18, and are located on opposite sides, respectively.
When the electronic device 100 is in the first state, the sliding mechanism 18 is in the initial state, i.e., the sliding mechanism 18 is located in the housing.
When the electronic device 100 is in the second state, i.e. when the camera function is turned on, the sliding mechanism 18 slides out of the housing 15, and the front camera 161 and the rear camera 162 are disposed on the sliding mechanism 18. When the sliding mechanism 18 does not slide out of the casing 15, the front camera 161 and the rear camera 162 are hidden in the casing, and when the electronic device 100 is in the second state, the sliding mechanism 18 slides out of the casing 15, so that photographing, shooting and the like can be performed by using the front camera 161 and the rear camera 162.
Wherein the display screen 12 is mounted in the housing 15. The display 12 is electrically connected to the electronic circuit board 13 to form a display surface of the electronic apparatus 100. The display 12 may be in a regular shape, such as a rectangular parallelepiped structure, and the display 12 may cover the entire display surface of the electronic device 100, that is, a full screen display of the electronic device 100 is realized.
In some embodiments, the Display 12 may be a Liquid Crystal Display (LCD) or an Organic Light-Emitting Diode (OLED) Display.
The electronic circuit board 13 is mounted in the housing 15, the electronic circuit board 13 may be a main board of the electronic device 100, and one, two or more functional components of a motor, a microphone, a speaker, an earphone interface, a universal serial bus interface, a front camera 161, a rear camera 162, a receiver 171, a distance sensor, an ambient light sensor, a processor, and the like may be integrated on the electronic circuit board 13. It is noted that, in the description of the present application, "a plurality" means two or more unless specifically defined otherwise.
In some embodiments, the electronic circuit board 13 may be screwed into the housing 15 by screws, or may be snap-fit into the housing 15. It should be noted that the way of specifically fixing the electronic circuit board 13 in the housing 15 according to the embodiment of the present application is not limited to this, and other ways, such as a way of fixing by a snap and a screw together, are also possible.
The electronic device 100 may further include a cover plate mounted to the display 12 to cover the display 12. The cover may be a clear glass cover so that the display 12 is transparent to the cover for display. In some embodiments, the cover plate may be a glass cover plate made of a material such as sapphire.
Wherein the housing 15 may form an outer contour of the electronic device 100. In some embodiments, the housing 15 may be a metal housing component, such as a metal such as magnesium alloy, stainless steel, and the like. It should be noted that the material of the housing 15 in the embodiment of the present application is not limited to this, for example: the housing 15 may be a plastic housing, a ceramic housing, a glass housing, or the like.
The electronic apparatus of the present application may have only the first state, that is, the electronic apparatus does not have the slide mechanism 18, and the electronic apparatus may have a non-display area, and the front camera 161, the receiver 171, the distance sensor, the ambient light sensor, and the like may be provided in the non-display area.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a device to be charged and a charging apparatus according to an embodiment of the present disclosure. The device to be charged 300 comprises a charging circuit comprising a charging interface 310, a first switching element 360 and a control module 380. The device to be charged 300 may be an electronic device in the above-described embodiment. The charging device 200 may be an adapter, a charging cradle, or the like.
Charging interface 310 is used for connecting external charging device 200. The charging interface 310 may be a Universal Serial Bus (USB) interface. Specifically, the charging interface 310 may be a Micro USB interface or a Type-C interface, and of course, the charging interface 310 may also be other interfaces. The charging interface 310 is connected to the external charging device 200 through a charging cable line, and obtains power from the external charging device 200. The external charging device 200 may be an adapter or the like.
The first switch element 360 includes a first input terminal 361, a first output terminal 362 and a first control terminal 363, the first input terminal 361 is connected to the power input pin VBUS of the charging interface 310, the first output terminal 362 is grounded, and the first control terminal 363 is configured to control the first input terminal 361 and the first output terminal 362 to be connected or disconnected, so as to achieve connection or disconnection between the power input pin VBUS of the charging interface 310 and the ground. The power input pin VBUS of the charging interface 310 is connected to the power pin of the external charging device 200, that is, the charging signal of the external charging device 200 is obtained through the power input pin VBUS. The first switch element 360 may be a triode, a field effect transistor, or a controllable switch.
The control module 380 is connected to the charging interface 310, a General Purpose Input/Output pin (GPIO) of the control module 380 is further connected to the first control terminal 363, and when a difference between an Input voltage of the charging interface 310 and an Output voltage of the charging device 200 is greater than a preset difference threshold, the control module 380 connects the first Input terminal 361 to the first Output terminal 362.
The input voltage of the charging interface 310 is acquired, the voltage of the charging interface 310 is detected inside the device 300 to be charged, the power input pin VBUS of the charging interface 310 is connected with the input end of the battery 330, and the input voltage of the charging interface 310 can be detected and acquired at any point between the power input pin of the charging interface 310 and the input end of the battery 330. The output voltage of charging device 200 may be acquired at an output port of charging device 200, or may be acquired on a cable between charging device 200 and charging interface 310. After the input voltage of charging interface 310 and the output voltage of charging device 200 are obtained, the difference between the two is calculated. If charging interface 310 is normal, the input voltage of charging interface 310 and the output voltage of charging device 200 are equal. If the difference between the two is large, for example, larger than the difference threshold (the difference threshold may be set to different values according to different charging interfaces 310, such as 0.1V, 0.3V, 0.5V, etc.), the charging interface 310 is considered to be abnormal, and the first input terminal 361 and the first output terminal 362 of the first switch element 360 are connected, that is, the power input pin of the charging interface 310 is short-circuited to ground, so that the device 300 to be charged or the external charging device 200 is overcurrent-protected, the charging of the device 300 to be charged is stopped, and the charging interface 310 is protected from being damaged.
For example, interface 310 charges is the Type-C interface, because the pin of Type-C interface is more, and the width of Type-C interface is limited, and consequently the interval between Type-C interface pin is less, when advancing liquid or dirty, causes little short circuit easily to lead to the temperature rise at Type-C interface, causes Type-C interface and treats that charging device 300 burns out. When the Type-C interface is slightly short-circuited, the input voltage of the Type-C interface may be caused to be lower than the output voltage of the charging device 200.
In some embodiments, the control module 380 obtains the input voltage of the charging interface 310 and the output voltage of the charging device 200, and calculates a difference between the input voltage of the charging interface 310 and the output voltage of the charging device 200.
After obtaining the output voltage of the charging device 200, the charging device 200 sends the output voltage to the control module 380 of the device 300 to be charged, and the control module 380 calculates a difference between the input voltage of the charging interface 310 and the output voltage of the charging device 200.
In some embodiments, the control module 380 includes a communication port for obtaining an input voltage of the charging device 200 through the charging interface 310.
The control module 380 includes a communication port through which to communicate with the charging device 200 and to acquire information transmitted by the charging device 200, including its output voltage detected by the charging device 200.
The charging interface 310 includes communication pins D +, D-, and the control module 380 has two corresponding communication ports, which are respectively connected to one of the communication pins.
In some embodiments, the control module 380 acquires the input voltage of the charging interface 310 and transmits the input voltage to the charging device 200;
the control module 380 is configured to obtain control information of the charging device 200, and connect the first input terminal 361 with the first output terminal 362 according to the control information, where the control information is generated according to a difference between an input voltage of the charging interface 310 and an output voltage of the charging device 200.
After the control module 380 obtains the input voltage of the charging interface 310, a value corresponding to the input voltage is sent to the charging device 200, the charging device 200 detects and obtains the output voltage of the charging device, then a voltage difference value between the input voltage and the output voltage is obtained, when the voltage difference value is greater than a difference threshold value, it is indicated that the charging interface 310 is abnormal, at this time, the charging device 200 generates control information and sends the control information to the device 300 to be charged, the device 300 to be charged receives the control information, and connects the first input terminal 361 with the first output terminal 362 according to the control information, so that the power input pin VBUS of the charging interface 310 is short-circuited with the ground, the device 300 to be charged or the charging device 200 is enabled to perform overcurrent protection, and charging is stopped.
Referring to fig. 6, fig. 6 is another schematic structural diagram of a device to be charged and a charging apparatus according to an embodiment of the present disclosure. The control module 380 includes a control chip, the control chip includes a voltage calculation pin 3822, the voltage calculation pin 3822 is connected to the power input pin VBUS of the charging interface 310, and calculates an input voltage of the charging interface 310.
The control chip of the control module 380 has a voltage calculation pin 3822, and the voltage calculation pin 3822 is directly connected to the power input pin VBUS of the charging interface 310, and calculates the input voltage of the charging interface 310. The voltage calculation pin 3822 may be an ADC pin, and obtains a corresponding voltage value through analog-to-digital conversion. In the drawings, the control chip is a battery management chip 382, and in other embodiments, the control chip may also be a fast charging management chip 381 or other chips.
In some embodiments, the charging circuit further includes a third switching element 260 and a second control module 230 located within the charging device 200.
The third switching element 260 includes a third input terminal 261, a third output terminal 262 and a third control terminal 263, the third input terminal 261 is used for connecting a power supply, the third output terminal 262 is connected to the power supply input pin VBUS of the charging interface 310, and the third control terminal 263 is used for controlling the connection or disconnection between the third input terminal 261 and the third output terminal 262;
the second control module 230 connects the third control terminal 263 and the power input pin VBUS, and disconnects the third input terminal 261 from the third output terminal 262 when the second control module 230 detects that the power input pin VBUS is grounded.
The charging apparatus 200 includes a third switching element 260 and a second control module 230, and when the second control module 230 detects that the power input pin VBUS is grounded, the third control module disconnects the third input terminal 261 and the third output terminal 262, so as to disconnect the power supply from the power input pin VBUS of the charging interface 310, thereby protecting the device 300 to be charged and the charging apparatus 200. The third switching element 260 may be a field effect transistor, a triode, a controllable switch, and the like.
In the description of the present application, it is to be understood that the terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more features.
An analog-to-digital conversion (AC-DC) module is disposed in the charging device 200, and is used for converting an alternating current (for example, 220V alternating current) of a commercial power into a direct current (for example, 5V direct current) for charging the device 300 to be charged. Also included within the device to be charged 300 is a battery 330. The control module 380 may have a DC-DC voltage conversion module therein, which may adjust the voltage and/or current output to the battery 330 according to the requirements of the battery 330. Wherein the third input 261 of the third switching element 260 is connected to the output of the AC-DC module.
In some embodiments, a resistor R1 may be connected in series with the charging cable 210 between the VBUS line and the CC line to indicate that an external charging device (e.g., a power adapter) is the source device. A resistor R1 may also be connected in series between the VOUT pin and the CC pin of the external charging device 200 to indicate that the external charging device (e.g., a power adapter) is a source device. A battery protection board may be disposed in the battery 330 of the device 300 to be charged, and the battery protection board may implement functions such as short circuit and overcurrent protection.
The device to be charged 300 supports both the normal charging mode and the fast charging mode, and the external charging apparatus 200 may also support both the normal charging mode and the fast charging mode. The external charging device 200 in the fast charging mode provides higher charging power, e.g., may provide higher voltage and/or current than normal charging. In the fast charging mode, the external charging device 200 provides the electric energy of the first charging power to the device 300 to be charged, and in the normal charging mode, the external charging device 200 provides the electric energy of the second charging power to the device 300 to be charged, and the second charging power is smaller than the first charging power. For example, in the normal charging mode, a charging current of 5V, 1A, and a charging power of 5W is supplied. In the fast charge mode, a charge current of 9V, 2A and 18W of charge power is supplied, or a charge current of 5V, 3A and 15W of charge power may be supplied. In the fast charging mode, the charging power can be increased only by increasing the voltage, only by increasing the current, by increasing the voltage and the current at the same time, and the increased charging power can reach 50W at most, or even higher.
The device 300 to be charged can be charged with the external charging apparatus 200 through the charging interface 310, and can also communicate through the communication pins (D +, D-) of the charging interface 310. The control module 380 may obtain the charging information of the external charging device 200 through the charging interface 310, and then obtain whether the external charging device 200 supports the fast charging according to the charging information, and if the external charging device 200 supports the fast charging, the first charging power may be selected as the target charging power from the first charging power and the second charging power. If the external charging device 200 does not support the fast charging, the second charging power may be selected as the target charging power from the first charging power and the second charging power. After determining the target charging power, the control module 380 generates control charging information according to the target charging power, and sends the control charging information to the external charging device 200, where the control charging information is used to control the external charging device 200 to perform charging according to the target charging power. That is, the control module 380 controls the external charging device 200 to select the fast charge mode or the normal charge mode according to the communication content with the external charging device 200.
It should be noted that, in the fast charging mode, the external charging device 200 may obtain parameters of the battery 330, such as remaining capacity, battery voltage, battery current, and the like, and the external charging device 200 adjusts its output voltage and/or output current according to the parameters of the battery 330. For example, the external charging device 200 outputs different output voltages and/or output currents in the trickle state, the constant current state, or the constant voltage state. In the normal charging mode, the control module 380 in the device 300 to be charged can change the voltage and current inputted by the external charging apparatus 200 to meet the requirement of the battery 330.
In some embodiments, the control module 380 may include a fast charge management chip 381 and a battery management chip 382. When the target charging power is the first charging power, the power input pin VBUS of the charging interface 310 is used for connecting the battery 330 directly or through the second switch element 371; when the target charging power is the second charging power, the power input pin VBUS of the charging interface 310 is connected to the battery 330 through the battery management chip 382.
When the external charging device 200 and the device 300 to be charged are in the normal charging mode, i.e. when the target charging power is the second charging power, the power input pin VBUS of the charging interface 310 is connected to the battery 330 through the battery management chip 382. The battery management chip 382 comprises a protection circuit, and can directly short-circuit the VBUS of the power supply pin of the Type-C interface to ground, stop charging and realize temperature reduction of the Type-C interface.
When the external charging device 200 and the device 300 to be charged are in the fast charging mode, i.e. when the target charging power is the first charging power, the power input pin VBUS of the charging interface 310 is connected to the external charging device 200 or to the battery 330 through the second switch element 371. The electric energy of the external charging device 200 directly charges the battery 330 of the device 300 to be charged, so that high-power quick charging can be realized. Meanwhile, the battery management chip 382 does not pass through between the external charging device 200 and the battery 330 of the device 300 to be charged, when the charging interface 310 has foreign matters or liquid entering at the Type-C interface, a short circuit can occur between pins at the Type-C interface, because under the direct charging mode, the pins of the charging interface 310 are directly electrically connected with the battery 330, the battery management chip 382 does not exist between the charging interface 310 and the battery 330 for protection, and the short circuit at the Type-C interface can cause overlarge current in a short time and easily burn the Type-C interface and the device 300 to be charged. If the Type-C interface is abnormal, if the temperature information of the Type-C interface exceeds a safe temperature threshold (such as 60 degrees centigrade), the Type-C interface and the battery 330 are disconnected and quit the quick charging, then the power supply pin VBUS of the Type-C interface is in short circuit with the ground, the charging is stopped, the temperature reduction of the Type-C interface is realized, and the Type-C interface is protected. Therefore, the power pin VBUS of the Type-C interface can be prevented from being grounded and shorted under the quick charging mode, so that the power pin of the battery 330 is also grounded and shorted, the voltage VBAT of the battery 330 is 0, and the problem of power failure of the whole system of the device 300 to be charged is solved.
In some embodiments, the second switching element 371 includes a second input 3711, a second output 3712, and a second control 3713. The second switching element 371 may include a first switching tube 372 and a second switching tube 374, an input terminal of the first switching tube 372 is used as a first input terminal 3711, an output terminal of the second switching tube 374 is used as a first output terminal 3712, an output terminal of the first switching tube 372 is connected to an input terminal of the second switching tube 374, and a control terminal of the first switching tube 372 is connected to a control terminal of the second switching tube 374 and is used as a first control terminal 3713.
The first switch tube 372 and the second switch tube 374 may be field effect transistors or triodes. Taking a field effect transistor as an example, the input terminal of the first switching tube 372 is a source, the output terminal of the first switching tube 372 is a drain, the control terminal of the first switching tube 372 is a gate, the input terminal of the second switching tube 374 is a drain, the output terminal of the second switching tube 374 is a source, and the control terminal of the second switching tube 374 is a gate. The two fet connections prevent the signal from the battery 330 from flowing backwards.
Referring to fig. 7, fig. 7 is a schematic flowchart illustrating a charging processing method according to an embodiment of the present disclosure. Referring to fig. 5 and fig. 6, the charging processing method is applied to a device 300 to be charged, where the device 300 to be charged includes a charging interface 310, and the charging interface 310 is used to connect to the charging apparatus 200. The charging processing method may specifically include:
101, acquiring the input voltage of the charging interface.
Charging interface 310 is used for connecting external charging device 200. The charging interface 310 may be a Universal Serial Bus (USB) interface. Specifically, the charging interface 310 may be a Micro USB interface or a Type-C interface, and of course, the charging interface 310 may also be other interfaces. The charging interface 310 is connected to the external charging device 200 through a charging cable line, and obtains power from the external charging device 200. The external charging device 200 may be an adapter or the like.
The charging interface 310 includes a plurality of pins, the plurality of pins at least includes a power input pin, the power input pin of the charging interface 310 is connected to the input end of the battery 330, and the input voltage of the charging interface 310 can be detected and acquired at any point between the power input pin of the charging interface 310 and the input end of the battery 330.
102, obtaining the output voltage of the charging device.
The output voltage of charging device 200 may be acquired at an output port of charging device 200, or may be acquired on a cable between charging device 200 and charging interface 310. The charging device 200 and the device 300 to be charged can communicate with each other, for example, the communication pin of the charging interface 310 communicates with each other, and the output voltage of the charging device 200 can also be obtained through wireless connection communication such as WIFI and bluetooth.
103, when the difference between the output voltage of the charging interface and the input voltage of the charging device is greater than the preset difference threshold, grounding the power input pin of the charging interface to stop charging.
After the input voltage of charging interface 310 and the output voltage of charging device 200 are obtained, the difference between the two is calculated. If charging interface 310 is normal, the input voltage of charging interface 310 and the output voltage of charging device 200 are equal. If the difference between the two is large, for example, larger than the difference threshold (the difference threshold may be set to different values, such as 0.1V, 0.3V, 0.5V, etc., according to different charging interfaces 310, different devices 300 to be charged, or different charging devices 200), it is determined that the charging interface 310 is abnormal, and then the power input pin of the charging interface 310 is grounded to stop charging.
Specifically, the device to be charged 300 further includes a first switch element 360, the first switch element 360 includes a first input end 361, a first output end 362 and a first control end 363, the first input end 361 is connected to a power input pin of the charging interface 310, the first output end 362 is grounded, and the first control end 363 is used for controlling the first input end 361 and the first output end 362 to be turned on or off. By controlling the first control terminal 363, the first input terminal 361 and the first output terminal 362 are connected, that is, the power input pin of the charging interface 310 is short-circuited to ground, so that the device 300 to be charged or the external charging device 200 is overcurrent-protected, the charging of the device 300 to be charged is stopped, and the charging interface 310 is protected from being damaged.
In some embodiments, when the difference between the output voltage and the input voltage is greater than the preset difference threshold, grounding the power input of the charging interface to stop charging, which may specifically include:
acquiring a plurality of groups of output voltages and input voltages at intervals, wherein each group of output voltages and input voltages are acquired at the same time;
acquiring a plurality of voltage difference values corresponding to a plurality of groups of output voltages and input voltages;
the plurality of voltage difference values are averaged, and when the average value is greater than a preset difference threshold value, the power input of the charging interface 310 is grounded to stop charging.
The sets of output voltages and input voltages are acquired at intervals, for example, every 1 second, 5 seconds, or 10 seconds. And then obtaining voltage difference values corresponding to each group of output voltages and input voltages, finally, calculating an average value, and grounding the power input of the charging interface 310 to stop charging when the average value is greater than a preset difference value threshold. The data acquired by a single time may have errors, and the average value of multiple measurements can be more accurate.
In some embodiments, when the difference between the output voltage and the input voltage is greater than the preset difference threshold, grounding the power input of the charging interface to stop charging, which may specifically include:
acquiring a plurality of groups of output voltages and input voltages at intervals, wherein each group of output voltages and input voltages are acquired at the same time;
acquiring a plurality of voltage difference values corresponding to a plurality of groups of output voltages and input voltages, and sequencing the voltage difference values according to time;
when the difference between at least two consecutive voltages is greater than the preset difference threshold, the power input of the charging interface 310 is grounded to stop charging.
The sets of output voltages and input voltages are acquired at intervals, for example, every 1 second, 5 seconds, or 10 seconds. And then obtaining voltage difference values corresponding to each group of output voltages and input voltages, finally sequencing the voltage difference values according to time, and grounding the power input of the charging interface 310 to stop charging when at least two continuous voltage difference values are greater than a preset difference threshold value. The data acquired at a single time may have errors, and at least two consecutive voltage difference values are greater than a preset difference threshold value, which indicates that a problem obviously occurs, and it is necessary to quickly ground the power input of the charging interface 310, and stop charging to protect the charging interface 310.
In some embodiments, the charging processing method may further include:
the power input of the charging interface 310 is grounded, and meanwhile, a disconnection command is sent to the charging device 200, so as to control the charging device 200 to disconnect the power from the power input pin of the charging interface 310.
When the power input of the charging interface 310 in the device 300 to be charged is grounded, a disconnection command is sent to the charging device 200 to control the charging device 200 to disconnect the power from the power input pin of the charging interface 310, and the power can be disconnected from the power directly from the charging device 200, so that the energy consumption can be reduced, and the safety is high.
The power supply may be mains supply, the mains supply may be 220V or 50Hz, and the mains supply is connected to the power input pin of the charging interface 310 through a controllable switch, a field effect transistor or a triode. Specifically, the charging device 200 has an AC-DC module therein for converting the AC power of the commercial power (e.g. 220V AC power) into the DC power (e.g. 5V DC power) for charging the device 300 to be charged. The controllable switch or the fet or the triode may be disposed between the mains and the AC-DC module, or may be disposed between the AC-DC module and the power input pin of the charging interface 310.
Referring to fig. 8, fig. 8 is a block diagram illustrating an electronic device according to an embodiment of the present disclosure. The electronic device 100 may be a device to be charged in the above-described embodiments, and the electronic device 100 may include a control circuit, which may include the storage and processing circuit 61. The storage and processing circuitry 61 may include memory, volatile memory, etc., and the processing circuitry in the storage and processing circuitry 61 may be used to control the operation of the electronic device 100. The storage and processing circuitry 61 may be used to run software in the electronic device 100.
The electronic device 100 may also include input-output circuitry 62. The input-output circuit 62 may be used to enable the electronic device 100 to input and output data, i.e., to allow the electronic device 100 to receive data from external devices and also to allow the electronic device 100 to output data from the electronic device 100 to external devices. The input-output circuitry 62 may further include a sensor 63, and one or more displays (e.g., display 64).
Electronic device 100 may also include audio component 65, and communication circuitry 66. The audio component 65 may be used to provide audio input and output functionality for the electronic device 100 and the communication circuit 66 may be used to provide the electronic device 100 with the capability to communicate with external devices.
The electronic device 100 may further include other input-output units 67. The input-output unit 67 may include buttons, joysticks, click wheels, scroll wheels, touch pads, keypads, keyboards, cameras, light emitting diodes and other status indicators, etc.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
An embodiment of the present application further provides a storage medium, where the storage medium stores a computer program, and when the computer program runs on a computer, the computer program causes the computer to execute the charging processing method in any one of the above embodiments, such as: acquiring the input voltage of the charging interface; acquiring the output voltage of the charging device; and when the difference value between the output voltage and the input voltage is greater than a preset difference value threshold value, grounding a power input pin of the charging interface to stop charging.
In the embodiment of the present application, the storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
It should be noted that, for the charging processing method of the embodiment of the present application, it can be understood by a person skilled in the art that all or part of the process of implementing the charging processing method of the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, where the computer program can be stored in a computer readable storage medium, such as a memory of an electronic device, and executed by at least one processor in the electronic device, and the process of executing the computer program can include the process of the embodiment of the charging processing method. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, etc.
The charging circuit, the charging processing method, the electronic device, and the storage medium provided in the embodiments of the present application are described in detail above, and specific examples are applied herein to illustrate the principles and implementations of the present application, and the description of the embodiments above is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A charging circuit, comprising:
the charging interface is used for connecting an external charging device;
the first switch element comprises a first input end, a first output end and a first control end, the first input end is connected with a power input pin of the charging interface, the first output end is grounded, and the first control end is used for controlling the first input end and the first output end to be connected or disconnected;
the control module is connected with the charging interface, the control module is connected with the first control end, and when the difference value between the input voltage of the charging interface and the output voltage of the charging device is larger than a preset difference threshold value, the control module connects the first input end with the first output end;
the third switching element is positioned in the charging device and comprises a third input end, a third output end and a third control end, the third input end is used for being connected with a power supply, the third output end is connected with a power supply input pin of the charging interface, and the third control end is used for controlling the connection or disconnection between the third input end and the third output end;
and the second control module is positioned in the charging device, is connected with the third control end and the power input pin, and disconnects the third input end and the third output end when detecting that the power input pin is grounded.
2. The charging circuit of claim 1, wherein the control module obtains an input voltage of the charging interface and an output voltage of the charging device, and calculates a difference between the input voltage of the charging interface and the output voltage of the charging device.
3. The charging circuit according to claim 2, wherein the control module comprises a control chip, the control chip comprises a voltage calculation pin, and the voltage calculation pin is connected to a power input pin of the charging interface and calculates the input voltage of the charging interface.
4. The charging circuit of claim 2, wherein the control module comprises a communication port for obtaining the output voltage of the charging device through the charging interface.
5. The charging circuit of claim 1, wherein the control module obtains an input voltage of the charging interface and sends the input voltage to the charging device;
the control module is used for acquiring control information of the charging device and connecting the first input end with the first output end according to the control information, wherein the control information is generated according to a difference value between the input voltage of the charging interface and the output voltage of the charging device.
6. A charging processing method is applied to equipment to be charged and is characterized in that the equipment to be charged comprises a charging interface, a first switch element and a control module, wherein the charging interface is used for being connected with a charging device, the first switch element comprises a first input end, a first output end and a first control end, the first input end is connected with a power input pin of the charging interface, the first output end is grounded, and the first control end is used for controlling the first input end and the first output end to be connected or disconnected; the control module is connected with the charging interface and the first control end;
the charging device comprises a third switching element and a second control module, the third switching element comprises a third input end, a third output end and a third control end, the third input end is used for being connected with a power supply, the third output end is connected with a power supply input pin of the charging interface, and the third control end is used for controlling the connection or disconnection between the third input end and the third output end; the second control module is connected with the third control end and the power supply input pin;
the method comprises the following steps:
acquiring the input voltage of the charging interface;
acquiring the output voltage of the charging device;
when the difference value between the output voltage and the input voltage is larger than a preset difference value threshold value, the control module connects the first input end and the first output end to enable a power input pin of the charging interface to be grounded and stop charging, and simultaneously sends a disconnection instruction to the charging device to control the second control module to disconnect the third input end and the third output end to disconnect the power from the power input pin of the charging interface.
7. The charging processing method according to claim 6, wherein the step of connecting the first input terminal and the first output terminal by the control module to ground the power input pin of the charging interface and stop charging when the difference between the output voltage and the input voltage is greater than a preset difference threshold comprises:
acquiring a plurality of groups of output voltages and input voltages at intervals, wherein the output voltages and the input voltages of each group are acquired at the same time;
obtaining a plurality of voltage difference values corresponding to a plurality of groups of output voltages and input voltages;
and averaging the voltage difference values, and grounding the power supply input of the charging interface to stop charging when the average value is larger than a preset difference threshold value.
8. The charging processing method according to claim 6, wherein the step of connecting the first input terminal and the first output terminal by the control module to ground the power input pin of the charging interface and stop charging when the difference between the output voltage and the input voltage is greater than a preset difference threshold comprises:
acquiring a plurality of groups of output voltages and input voltages at intervals, wherein the output voltages and the input voltages of each group are acquired at the same time;
obtaining a plurality of voltage difference values corresponding to a plurality of groups of output voltages and input voltages, and sequencing the voltage difference values according to time;
and when at least two continuous voltage difference values are larger than a preset difference value threshold value, grounding the power input of the charging interface to stop charging.
9. An electronic device, characterized in that the electronic device comprises a charging circuit and a battery, the charging circuit being connected to the battery, the charging circuit being as claimed in any one of claims 1-5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the charging processing method according to any one of claims 6 to 8.
CN201811348643.XA 2018-11-13 2018-11-13 Charging circuit, charging processing method, electronic device, and storage medium Active CN109378877B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811348643.XA CN109378877B (en) 2018-11-13 2018-11-13 Charging circuit, charging processing method, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811348643.XA CN109378877B (en) 2018-11-13 2018-11-13 Charging circuit, charging processing method, electronic device, and storage medium

Publications (2)

Publication Number Publication Date
CN109378877A CN109378877A (en) 2019-02-22
CN109378877B true CN109378877B (en) 2022-02-01

Family

ID=65384393

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811348643.XA Active CN109378877B (en) 2018-11-13 2018-11-13 Charging circuit, charging processing method, electronic device, and storage medium

Country Status (1)

Country Link
CN (1) CN109378877B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110888168B (en) * 2019-11-20 2022-05-13 歌尔科技有限公司 Interface detection circuitry charges, intelligent wearing equipment and charging system
CN112929485B (en) * 2019-12-06 2022-07-22 北京小米移动软件有限公司 Electronic device, interface module protection method, protection device and storage medium
CN113765165A (en) * 2020-06-03 2021-12-07 北京小米移动软件有限公司 Charging interface, protection method and protection device for charging interface and storage medium
WO2022068004A1 (en) * 2020-09-30 2022-04-07 深圳市联新移动医疗科技有限公司 Terminal humidity detection method and system
CN112440813B (en) * 2020-11-13 2022-05-24 深圳市比特安科技有限公司 Method for judging whether charging wire is successfully connected during battery replacement
CN112636409B (en) * 2020-12-09 2023-08-15 维沃移动通信有限公司 Battery charging circuit and electronic equipment
CN113552474B (en) * 2021-07-29 2023-04-07 上海壁仞智能科技有限公司 Compatible power interface detection circuit and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016101254A1 (en) * 2014-12-26 2016-06-30 华为技术有限公司 Connector and charging system
CN205610274U (en) * 2016-04-29 2016-09-28 维沃移动通信有限公司 Short -circuit protection circuit and electronic equipment charge
CN205901363U (en) * 2016-07-20 2017-01-18 昆达电脑科技(昆山)有限公司 Apparatus for controlling charge
CN106602513A (en) * 2017-01-13 2017-04-26 顺丰科技有限公司 Short circuit protection charging interface and control method thereof
CN107069843A (en) * 2017-01-13 2017-08-18 顺丰科技有限公司 Short-circuit protection charging inlet and its control method
CN108536055A (en) * 2018-03-21 2018-09-14 维沃移动通信有限公司 A kind of mobile terminal and detection method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2677252C1 (en) * 2014-12-31 2019-01-16 Хуавэй Текнолоджиз Ко., Лтд. Charging protection method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016101254A1 (en) * 2014-12-26 2016-06-30 华为技术有限公司 Connector and charging system
CN205610274U (en) * 2016-04-29 2016-09-28 维沃移动通信有限公司 Short -circuit protection circuit and electronic equipment charge
CN205901363U (en) * 2016-07-20 2017-01-18 昆达电脑科技(昆山)有限公司 Apparatus for controlling charge
CN106602513A (en) * 2017-01-13 2017-04-26 顺丰科技有限公司 Short circuit protection charging interface and control method thereof
CN107069843A (en) * 2017-01-13 2017-08-18 顺丰科技有限公司 Short-circuit protection charging inlet and its control method
CN108536055A (en) * 2018-03-21 2018-09-14 维沃移动通信有限公司 A kind of mobile terminal and detection method

Also Published As

Publication number Publication date
CN109378877A (en) 2019-02-22

Similar Documents

Publication Publication Date Title
CN109378877B (en) Charging circuit, charging processing method, electronic device, and storage medium
CN109245244B (en) Charging circuit, charging processing method, electronic device, and storage medium
CN109412234B (en) Charging circuit, charging processing method, electronic device, and storage medium
CN109378878B (en) Charging circuit, charging processing method, electronic device, and storage medium
US11288407B2 (en) Method and electronic device for controlling voltage output to external electronic device according to size of voltage detected at signal terminal connected to external electronic device
WO2018147703A1 (en) Device for supplying power to external device and method therefor
US10658860B2 (en) Electronic device, charger within the electronic device, and detecting method for detecting abnormal status of connector of electronic device
US9836085B2 (en) Portable docking device capable of projecting video content
EP3086433A1 (en) Charging method, alternating current adaptor, charging management device and terminal
US20130335010A1 (en) Connector and control chip
US20150256013A1 (en) Portable power supply
EP3780328B1 (en) Reverse charging device
CN109450023B (en) Charging circuit, charging processing method, electronic device, and storage medium
US11239684B2 (en) Electronic device and control method
CN109286219B (en) Charging circuit, charging processing method, electronic device, and storage medium
CN109286220B (en) Charging circuit, charging processing method, electronic device, and storage medium
WO2018034381A1 (en) Electronic device and electronic device control method
US20130049680A1 (en) Electronic device
WO2015048105A1 (en) Apparatus and method to change current limit
US20100301674A1 (en) Control circuit and electronic device including the same
KR20210014356A (en) Electronic device for preventing damage of usb device and operating method thereof
KR20140126491A (en) power supply circuit and method for controlling thereof
EP3614523B1 (en) Charging processing method and terminal device
EP4216030A1 (en) Power delivery device and control method of power supply path
CN109193878A (en) Charging circuit, charging method, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant