Anti-corrosion circuit of Type-C interface and anti-corrosion method based on anti-corrosion circuit
By designing detection circuits in the Type-C interface, detecting the device access situation, and avoiding the CC pin being charged when there is no device access, the problem of Type-C interface corrosion is solved and the product reliability and service life is improved.
Patent Information
- Application Number
- CN202311034829.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-16
- Publication Date
- 2025-02-21
AI Technical Summary
The CC pin is often charged when the Type-C interface is not connected to the device, which leads to corrosion problems and affects the reliability and service life of electronic products.
An anti-corrosion circuit is designed to detect whether there is a device connected by providing at least one detection circuit consisting of a switch tube, a first resistor and a power management module. When the Type-C interface has no device access, the CC pin is not energized, thus avoiding corrosion.
It effectively avoids the corrosion problems caused by the often live CC pins of the Type-C interface, and improves the reliability and service life of electronic products.
Smart Images

Figure CN119496232A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of Type-C interface, and in particular to an anti-corrosion circuit of a Type-C interface and an anti-corrosion method based thereon. Background Art
[0002] The Type-C interface is a new universal interface standard used to connect electronic products such as mobile devices, laptops, external hard drives, and digital cameras. The Type-C interface features a more compact design, a rear port that allows for bidirectional insertion, and supports multiple protocols and functions. Compared to traditional interface types, the Type-C interface's advantages lie in its versatility and superior performance. The Type-C interface supports high-speed transmission, high reliability, and supports video, audio, and power functions. Its bandwidth speeds reach up to 10Gbps.
[0003] The Type-C interface is a crucial component of electronic products and is closely linked to their reliability. Many electronic product charging issues are attributed to corrosion in the Type-C interface. Therefore, addressing this corrosion is a pressing issue. Summary of the Invention
[0004] The present disclosure provides an anti-corrosion circuit for a Type-C interface and an anti-corrosion method based thereon. By providing at least one detection circuit consisting of a switch tube, a first resistor, and a power management module to detect whether a device is connected, the CC pin is de-energized when no device is connected to the Type-C interface, thereby effectively preventing corrosion caused by the CC pin of the Type-C interface being constantly energized. The technical solution of the present disclosure is as follows:
[0005] The first embodiment of the present disclosure provides an anti-corrosion circuit for a Type-C interface, including:
[0006] At least one detection circuit consisting of a switch, a first resistor, and a power management module; wherein the first end of the switch in each detection circuit is respectively connected to the ground pin of the Type-C interface and the first end of the first resistor, the second end of the switch is grounded, and the second end of the first resistor is connected to the first end of the power management module;
[0007] A controller is connected to the control end of the switch tube in each detection circuit, the second end of the power management module, and the third end of the power management module. The controller is used to input a pulse signal to the third end of the power management module in any detection circuit to control the corresponding power management module to start the detection function, and obtain the voltage signal output by the second end of the corresponding power management module, and detect whether there is a device connected to the Type-C interface based on the voltage signal.
[0008] In one embodiment of the present disclosure, the controller is configured to detect whether a device is connected to the Type-C interface based on the voltage signal, including:
[0009] When the voltage signal changes, it is determined that a device is connected to the Type-C interface.
[0010] In one embodiment of the present disclosure, the controller is configured to, after determining that a device is connected to the Type-C interface, further:
[0011] The CC pin of the Type-C interface is controlled to enable an identification function to identify the type of the connected device, and the switch tube is controlled according to the identification result.
[0012] In one embodiment of the present disclosure, the controller is configured to control the switch tube according to the recognition result, including:
[0013] When the identification result is a charging device, the switch tubes in all the detection branches are controlled to be closed; or,
[0014] When the identification result is not the charging device, the switch tubes in all the detection branches are controlled to remain in an off state.
[0015] In one embodiment of the present disclosure, the controller is further used to: during the charging process, determine whether the charging device is unplugged from the Type-C interface, and when the charging device is unplugged from the Type-C interface, control the switching tubes in all the detection branches to disconnect.
[0016] In one embodiment of the present disclosure, the power management module includes: a controllable switch, second to fourth resistors, and a comparator; wherein,
[0017] The first end of the controllable switch is connected to the voltage source, and the control end of the controllable switch serves as the second end of the power management module;
[0018] The first end of the second resistor is connected to the second end of the controllable switch and the first end of the third resistor respectively, and the second end of the second resistor is connected to the non-inverting input end of the comparator and serves as the first end of the power management module;
[0019] The inverting input terminal of the comparator is connected to the second terminal of the third resistor and the first terminal of the fourth resistor respectively, the second terminal of the fourth resistor is grounded, and the output terminal of the comparator serves as the third terminal of the power management module.
[0020] In one embodiment of the present disclosure, the voltage value of the voltage source is 0.3V to 0.5V.
[0021] A second embodiment of the present disclosure provides an anti-corrosion method for an anti-corrosion circuit based on a Type-C interface, comprising:
[0022] Inputting a pulse signal to the third terminal of the power management module in any one of the detection circuits to control the corresponding power management module to start a detection function;
[0023] Acquire a voltage signal outputted by the second terminal of the corresponding power management module;
[0024] According to the voltage signal, it is detected whether a device is connected to the Type-C interface.
[0025] In one embodiment of the present disclosure, detecting whether a device is connected to the Type-C interface based on the voltage signal includes:
[0026] When the voltage signal changes, it is determined that a device is connected to the Type-C interface.
[0027] In one embodiment of the present disclosure, after determining that a device is connected to the Type-C interface, the method further includes:
[0028] Control the CC pin of the Type-C interface to enable an identification function to identify the type of the connected device;
[0029] The switch tube is controlled according to the recognition result.
[0030] In one embodiment of the present disclosure, controlling the switch tube according to the recognition result includes:
[0031] When the identification result is a charging device, the switch tubes in all the detection branches are controlled to be closed; or,
[0032] When the identification result is not the charging device, the switch tubes in all the detection branches are controlled to remain in an off state.
[0033] In one embodiment of the present disclosure, after controlling the switch tubes in all the detection branches to be closed, the method further includes:
[0034] During the charging process, determining whether the charging device is unplugged from the Type-C interface;
[0035] When the charging device is unplugged from the Type-C interface, the switch tubes in all the detection branches are controlled to be disconnected.
[0036] A third embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0037] The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the method described in the embodiment of the second aspect.
[0038] A fourth aspect of the present disclosure provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method described in the second aspect of the present disclosure is implemented.
[0039] The fifth embodiment of the present disclosure provides a computer program product, which, when an instruction processor in the computer program product executes, executes the method described in the second embodiment.
[0040] The technical solutions provided by the embodiments of the present disclosure bring at least the following beneficial effects:
[0041] According to an embodiment of the present disclosure, a corrosion protection circuit for a Type-C interface includes: at least one detection circuit consisting of a switch, a first resistor, and a power management module; and a controller. The first end of the switch in each detection circuit is connected to a ground pin of the Type-C interface and the first end of the first resistor, respectively; the second end of the switch is grounded; and the second end of the first resistor is connected to the first end of the power management module. The controller is connected to the control end of the switch in each detection circuit, the second end of the power management module, and the third end of the power management module. The controller is configured to input a pulse signal to the third end of the power management module in any detection circuit to control the corresponding power management module to enable a detection function, obtain a voltage signal output by the second end of the corresponding power management module, and detect whether a device is connected to the Type-C interface based on the voltage signal. Thus, by providing at least one detection circuit consisting of a switch, a first resistor, and a power management module to detect whether a device is connected, the CC pin is de-energized when no device is connected to the Type-C interface, thereby effectively preventing corrosion that may occur when the CC pin of the Type-C interface is constantly energized.
[0042] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.
[0044] Figure 1 Schematic diagram of an anti-corrosion circuit of a Type-C interface according to an embodiment of the present disclosure;
[0045] Figure 2 It is a flowchart of an anti-corrosion method for an anti-corrosion circuit based on a Type-C interface according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0046] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0047] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.
[0048] The following describes the anti-corrosion circuit of the Type-C interface and the anti-corrosion method based thereon according to the embodiment of the present disclosure with reference to the accompanying drawings.
[0049] Before introducing the anti-corrosion circuit of the Type-C interface of the embodiment of the present disclosure, it is first explained that if you want to solve the corrosion problem, you must understand why the Type-C interface corrodes.
[0050] When no device is connected to the Type-C port, even in the off-screen standby mode, the CC pin of the Type-C port will pulse. For example, this may have a duty cycle of approximately 33% and an amplitude of approximately 2V. This pulse wave is known in the industry as a "toggle," meaning handshake. Electronic products rely on the toggle of the CC pin to detect connected devices and identify their type.
[0051] However, the disadvantage of this is that the CC pin needs to be charged even when no device is connected. If liquid enters the Type-C interface, electrolytic corrosion (a type of electrochemical reaction) will occur. At this time, the contacts of the Type-C interface are likely to corrode over time, thus affecting our daily charging.
[0052] This is because electrochemical reactions are related to whether the device is charged, the voltage amplitude, and the duty cycle. The voltage and duty cycle of the CC signal have reached a bottleneck. Further reduction will affect the stability of the CC pin of the Type-C interface in identifying the type of connected device. Since the voltage and duty cycle of the CC signal cannot be reduced, it is necessary to consider other aspects to prevent corrosion of the Type-C interface.
[0053] Current Type-C interface anti-corrosion solutions include:
[0054] The first approach involves optimizing the structure or electroplating a chemically resistant metal. Specifically, the traditional electroplating process is upgraded from gold plating to rhodium-ruthenium plating, resulting in a silver-colored gold finger. The direct benefit of rhodium-ruthenium plating is that it provides better contact protection than electroplating, more effectively preventing corrosion from sweat and liquids, and increasing durability. However, this approach has the disadvantage of high cost.
[0055] The second type is to reduce the probability of corrosion by reducing the time the interface is charged. For example, using a motion sensor to detect the movement of the phone to control the voltage level of the CC pin in the Type-C interface, preventing the CC pin from being in a high-level state for a long time, can reduce the probability of electrochemical corrosion between the CC contact and other adjacent contacts, increase the stability of the Type-C interface, and thus extend the service life. However, the disadvantage of this solution is that it is complex to implement, cannot solve the problem of liquid infiltration, and is prone to false triggering of the CC pin to be charged (for example, as soon as the user picks up the phone), increasing the probability of corrosion.
[0056] To this end, the present disclosure proposes an anti-corrosion circuit for the Type-C interface. By setting at least one detection circuit consisting of a switch tube, a first resistor and a power management module, it detects whether a device is connected. In this way, when no device is connected to the Type-C interface, the CC pin is not energized, thereby effectively avoiding corrosion that occurs when the CC pin of the Type-C interface is often energized.
[0057] Figure 1 Schematic diagram of the anti-corrosion circuit of the Type-C interface according to an embodiment of the present disclosure.
[0058] like Figure 1As shown, the anti-corrosion circuit of the Type-C interface of the embodiment of the present disclosure includes: at least one detection circuit ( Figure 1 110 and 120 are detection circuits. Figure 1 Only two detection circuits are marked) and the controller 200.
[0059] The first end of the switch 10 in each detection circuit is connected to the ground pin GND of the Type-C interface and the first end of the first resistor R1, respectively. The second end of the switch 10 is grounded, and the second end of the first resistor R1 is connected to the first end of the power management module 20. The controller 200 is connected to the control end of the switch 10 in each detection circuit, the second end of the power management module 20, and the third end of the power management module 20. The controller 200 is configured to input a pulse signal to the third end of the power management module 20 in any detection circuit to control the corresponding power management module 20 to enable a detection function, obtain a voltage signal output by the second end of the corresponding power management module 20, and detect whether a device is connected to the Type-C interface based on the voltage signal.
[0060] When the switch tube 10 is a MOS tube, the first end of the switch tube 10 is a drain, the second end of the switch tube 10 is a source, and the control end of the switch tube 10 is a gate.
[0061] In an embodiment of the present disclosure, by changing the ground pin GND of the Type-C interface on the mobile phone end to a floating ground pin GND, and adding a first resistor R1 on the mobile phone end, such as a 10KΩ pull-down resistor, the floating ground pin GND of the present disclosure will be pulled to GND after the data line is connected (because the ground pins GND of the Type-C interface on the data line are all connected together), thereby realizing insertion detection. If no data line is connected, then this floating ground pin GND is pulled up to below the voltage value of the voltage source VCC.
[0062] In other words, to reduce corrosion on the Type-C interface, the present disclosure adds a switch 10 to the ground pin GND, replacing the original ground pin GND with a floating ground pin GND. A first resistor R1 and a power management module 20 are connected to the ground pin GND. The controller 200 inputs a pulse signal to the third terminal of the power management module 20 in the detection circuit to control the corresponding power management module 20 to enable a detection function, obtain a voltage signal output from the second terminal of the corresponding power management module 20, and detect whether a device is connected to the Type-C interface based on the voltage signal. This allows the CC pin to be de-energized by default, fundamentally preventing electrochemical corrosion on the CC pin. This solution can effectively prevent corrosion on the Type-C interface, reduce charging failures, and improve the user charging experience.
[0063] It should be noted that the present disclosure sets at least one detection circuit. Figure 1 The two detection circuits 110 and 120 are shown in FIG. 1 . In actual application, another detection circuit may be added. The configuration is as follows: Figure 1 As shown, in this way, the detection circuits can be used in turn to detect whether a device is connected, which can further reduce the possibility of corrosion. When one of the detection circuits is damaged, other detection circuits can be used to detect whether a device is connected, giving the Type-C interface more options.
[0064] In one embodiment of the present disclosure, the controller 200 is configured to detect whether a device is connected to the Type-C interface based on a voltage signal, including: determining that a device is connected to the Type-C interface when the voltage signal changes. For example, when the voltage signal changes from a high-level signal to a low-level signal, it is determined that a device is connected to the Type-C interface.
[0065] In one embodiment of the present disclosure, the controller 200 is used to, after determining that a device is connected to the Type-C interface, control the CC pin of the Type-C interface to enable an identification function to identify the type of the connected device, and control the switch tube 10 based on the identification result.
[0066] Among them, when the recognition result is a charging device, the switch tubes 10 in all detection branches are controlled to be closed, so that the Type-C interface can use all switch tubes 10 for return path management to balance impedance, solving the problem of affecting the charging power flow due to the missing ground pin GND; or, when the recognition result is not a charging device, such as a connected headset, USB flash drive, etc., the switch tubes 10 in all detection branches are controlled to remain in the disconnected state.
[0067] In one embodiment of the present disclosure, the controller 200 is further used to: during the charging process, determine whether the charging device is unplugged from the Type-C interface through the Vbus or CC signal, and when the charging device is unplugged from the Type-C interface, control the switch tube 10 in all detection branches to disconnect, so as to continue to detect whether there is a device connected through the detection circuit.
[0068] In one embodiment of the present disclosure, Figure 1As shown, the power management module 20 includes: a controllable switch K, second to fourth resistors R2 to R4, and a comparator COMP; wherein the first end of the controllable switch K is connected to the voltage source VCC, and the control end of the controllable switch K serves as the second end of the power management module 20; the first end of the second resistor R2 is respectively connected to the second end of the controllable switch K and the first end of the third resistor R3, and the second end of the second resistor R2 is connected to the non-inverting input end of the comparator COMP and serves as the first end of the power management module 20; the inverting input end of the comparator COMP is respectively connected to the second end of the third resistor R3 and the first end of the fourth resistor R4, the second end of the fourth resistor R4 is grounded, and the output end of the comparator COMP serves as the third end of the power management module 20.
[0069] The voltage value of the voltage source VCC is 0.3V-0.5V, the resistance value of the second resistor R2 is 30kΩ±10kΩ, the resistance value of the third resistor R3 is 100kΩ, and the resistance value of the fourth resistor R4 is 100kΩ.
[0070] In the disclosed embodiments, when no device is connected to the Type-C port on a mobile phone, the CC pin of the Type-C port is at a low level, indicating no voltage and no corrosion. When a device is connected to the Type-C port, the ground pin GND triggers the signal output by the power management module 20 to change from a high-level signal to a low-level signal. The controller 200 then activates the Type-C CC pin identification function to identify the type of connected device. This effectively prevents corrosion problems that can occur when the Type-C CC pin is constantly charged.
[0071] It should be noted that even if the ground pin GND is charged, it will not corrode. This is because the detection function uses pulse detection below 0.5V, and the ground pin GND is relatively large. The Type-C interface adopts a suspended design, so corrosion will not occur.
[0072] It should also be noted that although the floating GND pin will also be charged, the amplitude and duty cycle are very small. For example, in experimental data, the high level is 0.393V and the duty cycle is 2.4%. In addition, because the floating GND pin is located at the edge of the Type-C interface, it has little impact on other pins, so the risk of electrochemical corrosion and the resulting impact are very small.
[0073] In summary, according to the embodiments of the present disclosure, the corrosion protection circuit of the Type-C interface includes: at least one detection circuit consisting of a switch, a first resistor, and a power management module, and a controller; wherein the first end of the switch in each detection circuit is respectively connected to the ground pin of the Type-C interface and the first end of the first resistor, the second end of the switch is grounded, and the second end of the first resistor is connected to the first end of the power management module; the controller is connected to the control end of the switch in each detection circuit, the second end of the power management module, and the third end of the power management module. The controller is configured to input a pulse signal to the third end of the power management module in any detection circuit to control the corresponding power management module to enable a detection function, obtain a voltage signal output by the second end of the corresponding power management module, and detect whether a device is connected to the Type-C interface based on the voltage signal. Thus, by providing at least one detection circuit consisting of a switch, a first resistor, and a power management module to detect whether a device is connected, the CC pin is de-energized when no device is connected to the Type-C interface, thereby effectively preventing corrosion that occurs when the CC pin of the Type-C interface is always energized.
[0074] Figure 2 It is a flowchart of an anti-corrosion method for an anti-corrosion circuit based on a Type-C interface according to an embodiment of the present disclosure.
[0075] like Figure 2 As shown, the anti-corrosion method of the anti-corrosion circuit based on the Type-C interface of the embodiment of the present disclosure includes:
[0076] S201 , inputting a pulse signal to the third terminal of the power management module in any detection circuit to control the corresponding power management module to start a detection function.
[0077] S202: Acquire a voltage signal outputted by a second terminal of a corresponding power management module.
[0078] S203: Detect whether a device is connected to the Type-C interface based on the voltage signal.
[0079] In one embodiment of the present disclosure, detecting whether a device is connected to the Type-C interface based on a voltage signal includes:
[0080] When the voltage signal changes, it is confirmed that a device is connected to the Type-C port.
[0081] In one embodiment of the present disclosure, after determining that a device is connected to the Type-C interface, the method further includes:
[0082] Control the CC pin of the Type-C interface to enable the identification function to identify the type of connected device;
[0083] According to the recognition result, the switch tube is controlled.
[0084] In one embodiment of the present disclosure, controlling the switch tube according to the recognition result includes:
[0085] When the identification result is a charging device, the switch tubes in all detection branches are controlled to be closed; or,
[0086] When the identification result is not a charging device, the switch tubes in all detection branches are controlled to remain in the disconnected state.
[0087] In one embodiment of the present disclosure, after controlling the switch tubes in all detection branches to be closed, the method further includes:
[0088] During charging, determine whether the charging device is unplugged from the Type-C port;
[0089] When the charging device is unplugged from the Type-C interface, the switch tubes in all detection branches are controlled to be disconnected.
[0090] It should be noted that for details not disclosed in the anti-corrosion method of the anti-corrosion circuit based on the Type-C interface in the embodiment of the present disclosure, please refer to the details disclosed in the anti-corrosion circuit of the Type-C interface in the embodiment of the present disclosure, and the details will not be repeated here.
[0091] According to the anti-corrosion method for a Type-C interface based on an anti-corrosion circuit according to an embodiment of the present disclosure, a controller inputs a pulse signal to the third terminal of the power management module in any detection circuit to control the corresponding power management module to enable a detection function, obtain a voltage signal output by the second terminal of the corresponding power management module, and detect whether a device is connected to the Type-C interface based on the voltage signal. Thus, the controller detects whether a device is connected by setting at least one detection circuit consisting of a switch tube, a first resistor, and a power management module. In this way, when no device is connected to the Type-C interface, the CC pin is de-energized, thereby effectively preventing corrosion that occurs when the CC pin of the Type-C interface is constantly energized.
[0092] Based on the above embodiments, the present disclosure also provides an electronic device.
[0093] The electronic device according to an embodiment of the present disclosure includes: a processor and a memory;
[0094] Among them, the processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory, so as to be used for the above-mentioned anti-corrosion method of the anti-corrosion circuit based on the Type-C interface.
[0095] The electronic device of the disclosed embodiment adopts the above-mentioned anti-corrosion method based on the anti-corrosion circuit of the Type-C interface and provides at least one detection circuit consisting of a switch tube, a first resistor, and a power management module to detect whether a device is connected. In this way, when no device is connected to the Type-C interface, the CC pin is not energized, thereby effectively avoiding corrosion that occurs when the CC pin of the Type-C interface is always energized.
[0096] Based on the above embodiments, the present disclosure also proposes a computer-readable storage medium.
[0097] A computer program is stored on a computer-readable storage medium in an embodiment of the present disclosure. When the computer program is executed by a processor, the anti-corrosion method of the anti-corrosion circuit based on the Type-C interface is implemented.
[0098] The computer-readable storage medium of the disclosed embodiment adopts the above-mentioned anti-corrosion method based on the anti-corrosion circuit of the Type-C interface, and detects whether a device is connected by providing at least one detection circuit consisting of a switch tube, a first resistor, and a power management module. In this way, when no device is connected to the Type-C interface, the CC pin is not energized, thereby effectively avoiding corrosion that occurs when the CC pin of the Type-C interface is always energized.
[0099] Based on the above embodiments, the present disclosure also proposes a computer program product.
[0100] When the instruction processor in the computer program product of the embodiment of the present disclosure is executed, the above-mentioned anti-corrosion method of the anti-corrosion circuit based on the Type-C interface is executed.
[0101] The computer program product of the disclosed embodiments adopts the aforementioned anti-corrosion method based on the anti-corrosion circuit of the Type-C interface and provides at least one detection circuit consisting of a switch tube, a first resistor, and a power management module to detect whether a device is connected. In this way, when no device is connected to the Type-C interface, the CC pin is not energized, thereby effectively avoiding corrosion that occurs when the CC pin of the Type-C interface is always energized.
[0102] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and features of different embodiments or examples, unless they are mutually inconsistent.
[0103] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. Throughout the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.
[0104] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present disclosure belong.
[0105] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and a portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing it in another suitable manner if necessary, and then storing it in a computer memory.
[0106] It should be understood that various parts of the present disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0107] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.
[0108] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing module, or each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.
[0109] The storage medium mentioned above may be a read-only memory, a magnetic disk, or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. A person of ordinary skill in the art may make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present disclosure.
Claims
1. An anti-corrosion circuit for a Type-C interface, characterized in that: include: At least one detection circuit consisting of a switch tube 10, a first resistor and a power management module; wherein the first end of the switch tube in each of the detection circuits is respectively connected to the ground pin of the Type-C interface and the first end of the first resistor, the second end of the switch tube is grounded, and the second end of the first resistor is connected to the first end of the power management module; A controller, the controller is connected to the control end of the switch tube in each of the detection circuits, the second end of the power management module and the third end of the power management module, the controller is used to input a pulse signal to the third end of the power management module in any of the detection circuits to control the corresponding power management module to start the detection function, and obtain the voltage signal output by the second end of the corresponding power management module, and detect whether there is a device connected to the Type-C interface based on the voltage signal.
2. The anti-corrosion circuit of the Type-C interface according to claim 1, characterized in that: The controller is used to detect whether a device is connected to the Type-C interface according to the voltage signal, including: When the voltage signal changes, it is determined that a device is connected to the Type-C interface.
3. The anti-corrosion circuit of the Type-C interface according to claim 2, characterized in that: The controller is used to, after determining that a device is connected to the Type-C interface, further: The CC pin of the Type-C interface is controlled to enable an identification function to identify the type of the device connected, and the switch tube is controlled according to the identification result.
4. The anti-corrosion circuit of the Type-C interface according to claim 3, characterized in that: When the controller is used to control the switch tube according to the recognition result, it includes: When the identification result is a charging device, the switch tubes in all the detection branches are controlled to be closed; or, When the identification result is not the charging device, the switch tubes in all the detection branches are controlled to remain in an off state.
5. The anti-corrosion circuit of the Type-C interface according to claim 4, characterized in that: The controller is also used to: during the charging process, determine whether the charging device is unplugged from the Type-C interface, and when the charging device is unplugged from the Type-C interface, control the switch tubes in all the detection branches to disconnect.
6. The anti-corrosion circuit of the Type-C interface according to claim 1, characterized in that: The power management module includes: a controllable switch, second to fourth resistors and a comparator; wherein, The first end of the controllable switch is connected to a voltage source, and the control end of the controllable switch serves as the second end of the power management module; The first end of the second resistor is connected to the second end of the controllable switch and the first end of the third resistor respectively, and the second end of the second resistor is connected to the non-inverting input end of the comparator as the first end of the power management module; The inverting input terminal of the comparator is respectively connected to the second terminal of the third resistor and the first terminal of the fourth resistor, the second terminal of the fourth resistor is grounded, and the output terminal of the comparator serves as the third terminal of the power management module.
7. The anti-corrosion circuit of the Type-C interface according to claim 6, characterized in that: The voltage value of the voltage source is 0.3V to 0.5V.
8. An anti-corrosion method for an anti-corrosion circuit of a Type-C interface according to any one of claims 1 to 7, characterized in that: include: Inputting a pulse signal to the third terminal of the power management module in any one of the detection circuits to control the corresponding power management module to start a detection function; Acquire a voltage signal outputted by the second end of the corresponding power management module; According to the voltage signal, it is detected whether a device is connected to the Type-C interface.
9. The method according to claim 8, characterized in that The detecting, according to the voltage signal, whether a device is connected to the Type-C interface includes: When the voltage signal changes, it is determined that a device is connected to the Type-C interface.
10. The method according to claim 9, characterized in that After determining that a device is connected to the Type-C interface, the method further includes: Control the CC pin of the Type-C interface to enable an identification function to identify the type of the connected device; The switch tube is controlled according to the recognition result.
11. The method according to claim 10, characterized in that The controlling the switch tube according to the recognition result includes: When the identification result is a charging device, the switch tubes in all the detection branches are controlled to be closed; or, When the identification result is not the charging device, the switch tubes in all the detection branches are controlled to remain in an off state.
12. The method according to claim 11, characterized in that After controlling the switch tubes in all the detection branches to close, the method further includes: During the charging process, determining whether the charging device is unplugged from the Type-C interface; When the charging device is unplugged from the Type-C interface, the switch tubes in all the detection branches are controlled to be disconnected.
13. An electronic device, characterized in that: include: Processor and memory; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the method as claimed in any one of claims 8 to 12.
14. A computer-readable storage medium, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 8 to 12 is implemented.