Charging method, circuit and electronic device for avoiding abnormal display
By discharging the charging device with residual voltage and detecting the port type after the electronic device is connected to the charging device, the charging misunderstanding caused by the residual voltage of the charging device after the plug-in and discharge is solved, and the user experience is improved.
Patent Information
- Application Number
- CN202411259256.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-09-10
AI Technical Summary
After the plug-in and discharge power is cut off, the residual voltage of the capacitor in the charging device causes the electronic device to briefly detect the voltage, start the charging process, causing charging misunderstandings to the user and the user experience is low.
After the electronic device is connected to the charging device, the charging device is first discharged by residual voltage, then the port type of the charging device is detected, and the electronic device is charged according to the corresponding charging process.
It effectively avoids the problem of abnormal display of electronic devices when connecting charging devices after plugging and disconnecting, prevents users from misunderstanding the charging status and improves user experience.
Smart Images

Figure CN118889628B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of charging technology, and in particular, to a charging method, circuit and electronic device for avoiding display abnormality. Background Art
[0002] With the continuous advancement of science and technology, a variety of portable electronic devices have been widely used in people's daily lives. For example, mobile phones, tablet computers or laptops, etc. Portable electronic devices are generally equipped with batteries for easy carrying, so they need to be intermittently charged by chargers.
[0003] In real life, for the convenience of charging, users often keep the charger plugged into the power strip. When the power strip suddenly loses power, when the charger is connected to the electronic device, although the power strip can no longer charge the electronic device through the charger, the residual voltage in the capacitor inside the charger causes the electronic device to still detect the voltage briefly and start the charging process, which causes the charging icon of the electronic device to show that it is charging, causing users to misunderstand the charging and poor user experience.
[0004] Therefore, a new solution is urgently needed to solve the above problems. Summary of the invention
[0005] The present application provides a charging method, circuit and electronic device for avoiding display abnormality. After the electronic device is connected to the charging device, the residual pressure inside the charging device can be discharged first, and then the electronic device can be charged according to the charging process corresponding to the port type of the charging device. This can effectively avoid the problem of abnormal display of the electronic device when the charging device is connected after the power strip is turned off, will not cause charging misunderstandings to users, and the user experience is high.
[0006] In order to achieve the above objectives, this application adopts the following technical solutions:
[0007] In a first aspect, a charging method for avoiding display abnormality is provided. After an electronic device is connected to a charging device, the charging method for avoiding display abnormality includes: firstly, releasing residual pressure of the charging device. Then, detecting the port type of the charging device, and finally charging the electronic device according to the charging process corresponding to the port type of the charging device.
[0008] In the embodiment of the present application, the charging device remains inserted into the socket, and after the electronic device is connected to the charging device, the residual pressure of the charging device is first discharged, so as to avoid the residual pressure of the charging device affecting the charging process of the electronic device. Then, the port type of the charging device is detected, and the electronic device is charged according to the charging process corresponding to the port type of the charging device.
[0009] Optionally, the port type of the charging device includes a standard downstream port, a dedicated charging port, a non-standard charging port and a charging downstream port. When the port type of the charging device is a standard downstream port, the electronic device is charged according to the charging process corresponding to the standard downstream port. When the port type of the charging device is a dedicated charging port, the electronic device is charged according to the charging process corresponding to the dedicated charging port. When the port type of the charging device is a non-standard charging port, the electronic device is charged according to the charging process corresponding to the non-standard charging port. When the port type of the charging device is a charging downstream port, the electronic device is charged according to the charging process corresponding to the charging downstream port.
[0010] In combination with the first aspect, in some implementations of the first aspect, discharging residual pressure on the charging device includes: controlling a discharge current flowing through the charging device to be less than a rated current of the charging device. Discharging residual pressure on the charging device according to the discharge current.
[0011] In this implementation, in order to prevent the discharge current from affecting the charging device, such as burning or damaging the charging device, the discharge current flowing through the charging device is controlled to be less than the rated current of the charging device, thereby protecting the charging device. Then, the residual pressure inside the charging device is discharged through the discharge current to prevent the residual pressure inside the charging device from affecting the charging display of the electronic device.
[0012] In combination with the first aspect, in some implementations of the first aspect, discharging residual pressure on the charging device further includes: when the port type of the charging device is a standard downstream port, charging the electronic device according to a charging process corresponding to the standard downstream port. When the port type of the charging device is a non-standard downstream port, discharging residual pressure on the charging device.
[0013] In this implementation, when the port type of the charging device is a standard downstream port, it means that the charging device is a USB port of a computer or other electronic device. If the charging device is discharged directly, it may cause excessive surge problems in the USB port, causing the USB port to be unusable. Therefore, when the port type of the charging device is a standard downstream port, the electronic device is charged directly according to the charging process corresponding to the standard downstream port. When the port type of the charging device is a non-standard downstream port, there is no need to worry about the impact of surge problems on computers or other electronic devices, and the residual pressure of the charging device can be discharged directly.
[0014] In combination with the first aspect, in certain implementations of the first aspect, an overcurrent protection circuit is provided in the charging device having the non-standard downstream port.
[0015] In this implementation, when the port type of the charging device is a non-standard downstream port, it means that the charger is generally a dedicated power adapter, and the power adapter is generally equipped with a protection mechanism, such as an overcurrent protection circuit. Therefore, when the port type of the charging device is a non-standard downstream port, even if the discharge current is too large, it will not affect the charging device.
[0016] In combination with the first aspect, in some implementations of the first aspect, before discharging the residual pressure of the charging device, the method further includes: connecting a discharge path of the electronic device.
[0017] In this implementation, the charging device has a discharge path, and after the electronic device is connected to the charging device, the discharge path of the electronic device is firstly turned on.
[0018] Optionally, opening the discharge path of the electronic device may include: grounding the discharge path of the electronic device, thereby discharging the residual pressure in the charging device to the ground.
[0019] In combination with the first aspect, in some implementations of the first aspect, before detecting the port type of the charging device, the method further includes: disconnecting a discharge path of the electronic device.
[0020] In this implementation, the discharge path of the electronic device is to discharge the residual pressure in the charging device. When the residual pressure in the charging device is discharged, before the charging process of the electronic device begins, the discharge path of the electronic device should be disconnected to avoid the discharge path of the electronic device affecting the charging process of the electronic device.
[0021] In a second aspect, a charging circuit for avoiding display abnormality is provided. Based on the charging method for avoiding display abnormality, the charging circuit for avoiding display abnormality includes a switch device, a first end of the switch device is connected to the charging device, and a second end of the switch device is grounded. When the control end of the switch device receives a conduction signal, the first end of the switch device and the second end of the switch device are connected to discharge the residual pressure of the charging device. When the control end of the switch device receives a disconnection signal, the first end of the switch device and the second end of the switch device are disconnected, so that the charging device charges the electronic device.
[0022] In the embodiment of the present application, a charging circuit for avoiding display abnormality is implemented by a switching device. After the electronic device is connected to the charging device, the first end and the second end of the switching device are first connected, so that the residual voltage of the capacitor inside the charging device can be discharged. Then, the first end and the second end of the switching device are disconnected, so that the discharge circuit (i.e., the charging circuit for avoiding display abnormality) will not affect the charging process of the electronic device, and the charging device can charge the electronic device normally.
[0023] In conjunction with the second aspect, in some implementations of the second aspect, the charging circuit for avoiding display abnormality further includes a first resistor. A first end of the first resistor is connected to the control end of the switch device, and a second end of the first resistor is grounded.
[0024] In the embodiment of the present application, the first resistor plays a stabilizing role to prevent excessive current at the control end of the switching device from damaging the switching device, and can also play a role in regulating the voltage at the control end of the switching device.
[0025] In combination with the second aspect, in some implementations of the second aspect, the switching device includes a MOSFET.
[0026] In the embodiment of the present application, MOSFET is a switching device that can be turned on or off according to a received control signal, thereby discharging the residual voltage of the capacitor in the charging device.
[0027] According to a third aspect, an electronic device is provided, comprising a charging circuit for avoiding display abnormalities and a control module; the control module is connected to the charging circuit for avoiding display abnormalities to control the charging circuit for avoiding display abnormalities to be turned on or off.
[0028] In an embodiment of the present application, a control module is used to control the on and off of the charging circuit to avoid display abnormalities, so that after the electronic device is connected to the charging device, the residual pressure of the charging device is discharged to avoid the residual pressure of the charging device affecting the charging process of the electronic device.
[0029] In a fourth aspect, an electronic device is provided, the electronic device comprising: one or more processors, and a memory. The memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method.
[0030] In a fifth aspect, a chip system is provided. The chip system is applied to an electronic device, and the chip system includes one or more processors. The one or more processors are used to call computer instructions so that the electronic device executes the described method.
[0031] In a sixth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes instructions, and when the instructions are executed on an electronic device, the electronic device executes the described method. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A schematic diagram of a charging scenario of an electronic device applicable to an embodiment of the present application;
[0033] Figure 2 A schematic diagram of a charging scenario of another electronic device applicable to an embodiment of the present application;
[0034] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0035] Figure 4 A flowchart of a charging circuit for avoiding display abnormality provided by an embodiment of the present application;
[0036] Figure 5 A flowchart of a charging circuit for avoiding display abnormality provided by another embodiment of the present application;
[0037] Figure 6 A flowchart of a charging method for avoiding display abnormality provided by another embodiment of the present application;
[0038] Figure 7 A flowchart of a charging method for avoiding display abnormality provided by another embodiment of the present application;
[0039] Figure 8 A charging device port type detection waveform diagram provided in an embodiment of the present application;
[0040] Fig. 9 A circuit diagram of a charging method for avoiding display abnormality provided in an embodiment of the present application;
[0041] Fig.10 A circuit diagram of a charging method for avoiding display abnormality provided by another embodiment of the present application;
[0042] Fig.11 A circuit diagram of a charging method for avoiding display abnormality provided by another embodiment of the present application;
[0043] Fig.12 A schematic diagram of the structure of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0044] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0045] The terms "first", "second", etc. are only used for descriptive purposes and should not be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, features defined with "first", "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality" is two or more.
[0046] To facilitate the understanding of the embodiments of the present application, the relevant concepts involved in the embodiments of the present application are briefly described first.
[0047] 1. Metal - Oxide - Semiconductor Field - Effect Transistor (MOSFET), hereinafter simply referred to as "MOS transistor".
[0048] In the communication field, a MOS transistor refers to a voltage - driven semiconductor device. A MOS transistor generally has three electrodes, namely: gate G, source S, and drain D. MOS transistors can be divided into PMOS transistors and NMOS transistors according to their semiconductor structures. In general electronic circuits, MOS transistors are usually used in amplifier circuits or switching circuits. As a voltage - controlled element, when the voltage applied to the gate of the MOS transistor exceeds a preset value, the source and drain of the MOS transistor can conduct current. For example, when the voltage received by the gate of an NMOS transistor is greater than the preset value, the source and drain of the NMOS transistor are conducting; when the voltage received by the gate of the NMOS transistor is not greater than the preset value, the source and drain of the NMOS transistor are cut off. When the voltage received by the gate of a PMOS transistor is less than the preset value, the source and drain of the PMOS transistor are conducting; when the voltage received by the gate of the PMOS transistor is not less than the preset value, the source and drain of the PMOS transistor are cut off.
[0049] 2. Multiple working states of MOS transistors.
[0050] In the communication field, taking the NMOS transistor as an example, according to the magnitude of the gate - source voltage VGS of the MOS transistor and the threshold voltage VGS(TH), and the magnitude of the drain - source voltage VDS of the MOS transistor and the difference between the gate - source voltage VGS and the threshold voltage VGS(TH), the MOS transistor can be divided into the following working states:
[0051] The first working state: When VGS < VGS(TH), the MOS transistor is in the cut - off state. At this time, the MOS transistor does not conduct electricity, and the drain current (ID) is very small and can be regarded as non - conducting. The MOS transistor is equivalent to an open - circuit.
[0052] The second operating state: When VGS > VGS(TH) and VDS < VGS - VGS(TH), the MOS transistor is turned on and in the linear region. In this region, the MOS transistor can be equivalent to a linear resistor, and the drain current ID increases linearly with the increase of VDS. It should be noted that the linear region here does not mean that the MOS transistor operates in the amplification state, but describes its conduction characteristics under specific voltage conditions.
[0053] The third operating state: When VGS > VGS(TH) and VDS > VGS - VGS(TH), the MOS transistor is turned on and in the saturation region. At this time, the MOS transistor is still turned on, but the drain current ID hardly changes with the change of VDS and reaches a maximum value. At this time, the MOS transistor can be equivalent to a voltage-controlled current source. In addition, as long as the MOS transistor is turned on and VGS > VDS, the MOS transistor must be in the saturation region.
[0054] The above is a simple introduction to the terms involved in the embodiments of the present application, which will not be elaborated below.
[0055] Next, in conjunction with Figures 1 to 3 , the application scenarios of the embodiments of the present application and the structure of the electronic devices to which they are applied will be introduced first.
[0056] Figure 1 FIG. is a schematic diagram of a scenario for charging an electronic device applicable to an embodiment of the present application.
[0057] Exemplarily, as Figure 1 shown, when the battery level of the electronic device 10 is low and charging is required, the user can charge the electronic device 10 through the power strip 30 and the charging device 20. Specifically, the power strip 30 can be connected to a power source. For example, the plug of the power strip 30 can be inserted into a wall socket to obtain the power energy in the socket. The plug of the charging device 20 is inserted into the socket of the power strip 30 to obtain the electrical energy in the power strip 30. When the electronic device 10 needs to be charged, the power output terminal of the charging device 20 is connected to the power input terminal of the electronic device 10, so that the electronic device 10 can be charged through the charging device 20. When the electronic device 10 does not need to be charged, the power output terminal of the charging device 20 is disconnected from the power input terminal of the electronic device 10, so that the charging device 20 stops charging the electronic device 10.
[0058] In addition, it should be noted that in real life, for the convenience of use, users often keep the charging device 20 plugged into the power strip 30 all the time. When charging the electronic device 10 is required, the electronic device 10 is connected to the charging device 20. When charging the electronic device 10 is not required, the electronic device 10 is disconnected from the charging device 20.
[0059] It should be understood that the user can also directly connect the charging device 20 to the power supply. For example, the plug of the charging device 20 is directly inserted into the wall socket, so that the power supply energy in the socket is directly charged to the electronic device 10 through the charging device 20. The embodiment of the present application does not specifically limit the type of the electronic device 10. In some embodiments, the electronic device 10 can be a mobile phone, a wearable device (such as a smart bracelet, a smart watch, a headset, etc.), a tablet computer, a laptop computer (laptop), a handheld computer, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a cellular phone, a personal digital assistant (personal digital assistant, PDA), an augmented reality (Augmented reality, AR)\virtual reality (virtual reality, VR) device and other IOT (internet of things, Internet of Things) devices, and can also be a television, a large screen, a printer, a projector and other devices. For ease of understanding, the following embodiments are exemplified by taking the electronic device 10 as a tablet computer as an example.
[0060] Figure 2 A schematic diagram of a charging scenario for yet another electronic device applicable to an embodiment of the present application.
[0061] For example, Figure 2 As shown, the charging device 20 is plugged into the socket 30, and the electronic device 10 is connected to the charging device 20, so that the power of the socket 30 is used to charge the electronic device 10 through the charging device 20. However, if the electronic device 10 is connected to the charging device 20 after the socket 30 is powered off, the residual voltage of the capacitor in the charging device 20 will cause the electronic device 10 to detect the voltage, and then start the charging process to display the charging icon, causing the electronic device 10 to display abnormally, thereby causing confusion or misunderstanding to the user, and being uncertain whether the electronic device 10 is normally in the charging state, affecting the user experience.
[0062] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0063] For example, Figure 3As shown, the electronic device 10 may include a central processing unit 101 (CPU), a charging module 102, and a battery 103, etc. The charging device 20 includes a power conversion module 201, and these devices may be coupled through various interconnection buses or other electrical connection methods. Exemplarily, the charging module 102 is electrically connected to the central processing module 101 and the battery 103, respectively, and the power conversion module 201 is connected to the charging module 102 and the socket 30, respectively. It should be understood that the socket 30 is also connected to an AC power source.
[0064] The central processing module 101 is one of the main devices of a personal computer and is a core component in a personal computer. Its main function is to interpret computer instructions and process data in computer software. The CPU is responsible for reading instructions for all operations in a personal computer and is the core component that decodes and executes instructions. A program is a sequence of instructions, and executing a program is to execute instructions one by one according to the instruction sequence. Once the program is loaded into the main memory, the CPU can automatically complete the task of reading instructions from the main memory and executing instructions. At the same time, the function of an instruction is often realized by a series of operations performed by components in a personal computer. The CPU will generate corresponding operation control signals according to the function of the instruction and send them to the corresponding components, thereby controlling these components to act according to the requirements of the instruction.
[0065] Exemplarily, the central processing module 101 may include an arithmetic logic unit, a register unit, an operator, and a control unit. The arithmetic logic unit may perform fixed-point or floating-point arithmetic operations, shift operations, and logic operations, and may also perform address operations and conversions. The register unit includes a general register, a special register, and a control register. The control unit is mainly responsible for decoding instructions and issuing control signals for each operation to be performed to complete each instruction.
[0066] The charging module 102 is a charging module provided inside the electronic device 10, and the charging module 102 is used to send the electric energy of the power conversion module 201 to the battery 103. The battery 103 can store the obtained electric energy for use by other electronic devices of the electronic device 10. Exemplarily, when it is necessary to charge the electronic device 10, the central processing module 101 controls the charging module 102 to establish a connection with the power conversion module 201, and the power conversion module 201 to establish a connection with the socket 30. The power conversion module 201 converts the power voltage provided by the socket 30 into the rated voltage required by the electronic device 10, and sends it to the charging module 102. The charging module 102 sends the obtained electric energy to the battery 103 for storage.
[0067] It should be understood that the charging device 20 is also called a power adapter, also called an external power supply, and is a power supply conversion device for small portable electronic devices and electronic appliances. The power adapter is generally composed of components such as a housing, a transformer, an inductor, a capacitor, a control IC, and a PCB board. The working principle of the power adapter is to convert AC input into DC output. The power adapter converts the AC power from the power socket or other power source into the DC power required by the electronic device 10, thereby providing power for the electronic device 10, but not necessarily charging the electronic device 10. Its output voltage is usually the DC power required by the electronic device 10. From the appearance, the power adapter is relatively small and light, and sometimes has a detachable plug, which is convenient to carry and replace. It is suitable for various electronic devices 10, such as security cameras, set-top boxes, routers, light bars, massagers and other electronic devices 10, and is also commonly used in small electronic devices 10 such as mobile phones, LCD monitors and laptops.
[0068] It should be understood that the above is only an example of the structure of the electronic device 10, and the electronic device 10 may also include other subsystems or devices, which can be configured and modified as needed, and the embodiments of the present application do not impose any limitations on this.
[0069] The technical problems existing in the relevant technologies are introduced in detail below.
[0070] For example, in real life, for the convenience of charging, users often keep the charging device 20 plugged into the socket strip 30. When the socket strip 30 is suddenly powered off, when the charging device 20 plugged into the socket strip is connected to the electronic device 10, the socket strip 30 can no longer charge the electronic device 10 through the charging device 20. However, due to the residual voltage in the capacitor inside the charging device 20, the electronic device 10 can still detect the voltage briefly and perform the charging process, so that the charging icon of the electronic device 10 shows that it is charging, which causes misunderstanding of charging to the user and a low user experience.
[0071] In view of this, the embodiment of the present application provides a charging method to avoid display abnormality, where the charging device remains plugged into the socket, and after the electronic device is connected to the charging device, the residual pressure of the charging device is first discharged, thereby preventing the residual pressure of the charging device from affecting the charging process of the electronic device. Then, the port type of the charging device is detected, and the electronic device is charged according to the charging process corresponding to the port type of the charging device.
[0072] Combine the following Figures 4 to 8 , and then the charging method for avoiding display abnormality provided in the embodiment of the present application is introduced in detail.
[0073] Figure 4The present invention is a flowchart of a charging method for avoiding display abnormality provided in an embodiment of the present application.
[0074] like Figure 4 As shown, in one embodiment provided in the present application, after the electronic device is connected to the charging device, a charging method for avoiding display abnormality includes the following steps:
[0075] S401. The electronic device discharges the residual pressure of the charging device.
[0076] In order to prevent the residual voltage of the capacitor inside the charging device from affecting the charging process of the electronic device, the residual voltage of the capacitor inside the charging device may be discharged first after the electronic device is connected to the charging device.
[0077] For example, for ease of use, the user keeps the charging device plugged into the socket and not connected to the electronic device. When the socket is powered off, the capacitor in the charging device has no way to discharge, resulting in residual capacitor pressure in the charging device. At this time, if the electronic device is directly connected to the charging device, the electronic device in the electronic device will detect the residual pressure of the charging device, thereby starting the charging process and displaying an icon indicating that the electronic device is in a charging state on the display screen of the electronic device. However, since the socket is not powered, the charging icon disappears quickly, causing confusion to the user, who is not sure whether the socket has power or if there is a problem with the electronic device. Therefore, in an embodiment of the present application, after the electronic device is connected to the charging device, the residual pressure of the charging device is directly discharged first, thereby effectively avoiding the problem of abnormal display of the electronic device when the charging device is connected after the socket is powered off, and will not cause charging misunderstandings to the user, and the user experience is high.
[0078] It should be noted that the process of the electronic device discharging the residual pressure of the charging device may include three states:
[0079] The first state: the discharge path of the electronic device is turned on, and the discharge current flowing through the charging device is greater than the rated current of the charging device. This state can be applied to charging devices with overcurrent protection circuits, such as dedicated charging ports DCP, non-standard charging ports, and charging downstream ports CDP.
[0080] The second state: the discharge path of the electronic device is turned on, and the discharge current flowing through the charging device is less than the rated current of the charging device. This state can be applied to charging devices without overcurrent protection circuits, such as standard downstream ports SDP.
[0081] The third state: the discharge path of the electronic device is disconnected, which is the state when the electronic device completes the residual pressure discharge. The discharge path is disconnected so that the charging device can normally charge the electronic device.
[0082] It should be understood that when a charging device is directly plugged into a socket and the socket suddenly loses power, resulting in residual pressure in the capacitor of the charging device, in order to avoid the problem of abnormal display of the charging icon of the electronic device when the charging device is connected to the electronic device, the solution provided in the embodiment of the present application can also be adopted.
[0083] S402: The electronic device detects the port type of the charging device.
[0084] After the residual pressure of the charging device is released, the electronic device can proceed with the normal charging process, that is, firstly detecting the port type of the charging device.
[0085] Exemplarily, in an embodiment of the present application, the port types of the charging device may include a standard downstream port (SDP), a dedicated charging port (DCP), a non-standard charging port, and a charging downstream port (CDP). Among them, the D+ line and D- line of the standard downstream port are differential data lines, and the D+ line and the D- line have a 15kΩ pull-down resistor. The current limit value of the standard downstream port is 2.5mA when suspended, 100mA when connected, and 500mA when connected and configured for higher power. The dedicated charging port does not support any data transmission, but can provide a current of more than 1.5A. The D+ line and D- line of the port are short-circuited. This type of port supports wall chargers and car chargers with higher charging capabilities. For example, the dedicated charging port can be a power adapter equipped with the electronic device during production. The non-standard charging port is a charger without a D+ line and a D- data line. For example, a power adapter produced by a non-brand manufacturer. The charging downstream port supports both high-current charging and data transmission that is fully compatible with USB2.0. The port has the necessary 15kΩ pull-down resistors for D+ and D- line communication, and also has internal circuitry to switch during the charger detection phase. The internal circuitry allows the portable device to distinguish a charging downstream port from other types of ports.
[0086] S403: The electronic device charges the electronic device according to the charging process corresponding to the port type of the charging device.
[0087] After the electronic device detects the port type of the charging device, the electronic device can be charged according to the charging process corresponding to the port type of the charging device.
[0088] Exemplarily, in an embodiment of the present application, when the port type of the charging device is a standard downstream port, the electronic device is charged according to the charging process corresponding to the standard downstream port. Alternatively, when the port type of the charging device is a dedicated charging port, the electronic device is charged according to the charging process corresponding to the dedicated charging port. Alternatively, when the port type of the charging device is a non-standard charging port, the electronic device is charged according to the charging process corresponding to the non-standard charging port. Alternatively, when the port type of the charging device is a charging downstream port, the electronic device is charged according to the charging process corresponding to the charging downstream port.
[0089] Figure 5 This is a flowchart of a charging method for avoiding display abnormality provided in yet another embodiment of the present application.
[0090] like Figure 5 As shown, in one embodiment provided in the present application, after the electronic device is connected to the charging device, a charging method for avoiding display abnormality includes the following steps:
[0091] S5011. The electronic device controls the discharge current flowing through the charging device to be smaller than the rated current of the charging device.
[0092] For example, when the residual pressure of the charging device is discharged, the discharge current flowing through the charging device may be greater than, less than, or equal to the rated current of the charging device. When the discharge current flowing through the charging device is greater than the rated current of the charging device, it may affect the charging device, such as damaging or burning the charging device. Therefore, the discharge current flowing through the charging device can be controlled not to be greater than the rated current of the charging device, thereby protecting the charging device and the electronic device.
[0093] S5012. The electronic device discharges the residual pressure of the charging device according to the discharge current.
[0094] In order to prevent the residual voltage of the capacitor inside the charging device from affecting the charging process of the electronic device, the residual voltage of the capacitor inside the charging device can be discharged according to the discharge current after the electronic device is connected to the charging device.
[0095] For example, for ease of use, the user keeps the charging device plugged into the power strip and does not connect it to the electronic device. When the power strip is powered off, the capacitor in the charging device has no way to discharge, resulting in residual capacitor pressure in the charging device. At this time, if the electronic device is directly connected to the charging device, the electronic device in the electronic device will detect the residual pressure of the charging device, thereby starting the charging process and displaying an icon indicating that the electronic device is in a charging state on the display screen of the electronic device. However, since the power strip is not connected to electricity, the charging icon disappears quickly, causing confusion to the user, who is not sure whether the power strip has electricity or if there is something wrong with the electronic device. Therefore, in an embodiment of the present application, the residual pressure of the capacitor of the charging device is discharged directly according to the discharge current, thereby effectively avoiding the problem of abnormal display of the electronic device when the charging device is connected after the power strip is powered off, and will not cause charging misunderstandings to the user, and the user experience is high.
[0096] It should be understood that when a charging device is directly plugged into a socket and the socket suddenly loses power, resulting in residual pressure in the capacitor of the charging device, in order to avoid the problem of abnormal display of the charging icon of the electronic device when the charging device is connected to the electronic device, the solution provided in the embodiment of the present application can also be adopted.
[0097] S402: The electronic device detects the port type of the charging device.
[0098] After the residual pressure of the charging device is released, the electronic device can proceed with the normal charging process, that is, firstly detecting the port type of the charging device.
[0099] Exemplarily, in an embodiment of the present application, the port types of the charging device may include a standard downstream port (SDP), a dedicated charging port (DCP), a non-standard charging port, and a charging downstream port (CDP). Among them, the D+ line and D- line of the standard downstream port are differential data lines, and the D+ line and the D- line have a 15kΩ pull-down resistor. The current limit value of the standard downstream port is 2.5mA when suspended, 100mA when connected, and 500mA when connected and configured for higher power. The dedicated charging port does not support any data transmission, but can provide a current of more than 1.5A. The D+ line and D- line of the port are short-circuited. This type of port supports wall chargers and car chargers with higher charging capabilities. For example, the dedicated charging port can be a power adapter equipped with the electronic device during production. The non-standard charging port is a charger without a D+ line and a D- data line. For example, a power adapter produced by a non-brand manufacturer. The charging downstream port supports both high-current charging and data transmission that is fully compatible with USB2.0. The port has the necessary 15kΩ pull-down resistors for D+ and D- line communication, and also has internal circuitry to switch during the charger detection phase. The internal circuitry allows the portable device to distinguish a charging downstream port from other types of ports.
[0100] S403: The electronic device charges the electronic device according to the charging process corresponding to the port type of the charging device.
[0101] After the electronic device detects the port type of the charging device, the electronic device can be charged according to the charging process corresponding to the port type of the charging device.
[0102] Exemplarily, in an embodiment of the present application, when the port type of the charging device is a standard downstream port, the electronic device is charged according to the charging process corresponding to the standard downstream port. Alternatively, when the port type of the charging device is a dedicated charging port, the electronic device is charged according to the charging process corresponding to the dedicated charging port. Alternatively, when the port type of the charging device is a non-standard charging port, the electronic device is charged according to the charging process corresponding to the non-standard charging port. Alternatively, when the port type of the charging device is a charging downstream port, the electronic device is charged according to the charging process corresponding to the charging downstream port.
[0103] Figure 6 This is a flowchart of a charging method for avoiding display abnormality provided in yet another embodiment of the present application.
[0104] like Figure 6As shown, in one embodiment provided in the present application, after the electronic device is connected to the charging device, a charging method for avoiding display abnormality includes the following steps:
[0105] S6011. The electronic device determines whether the port type of the charging device is a standard downstream port.
[0106] Due to the different types of charging device ports, the corresponding rated currents may also be different. A standard downstream port is a special charging device port, namely, a USB port of an electronic device. In other words, a standard downstream port is generally a port provided by an electronic device that can be used for charging or data transmission. For example, a USB port of an electronic device such as a personal computer or a laptop.
[0107] It should be understood that the rated current of the standard downstream port is generally less than the rated current of other charging device ports. At the same time, the standard downstream port is generally not provided with a power adapter. For example, the rated current of the standard downstream port is generally 100mA at lower power. The rated current of the standard downstream port is generally 500mA at higher power. However, the charging devices corresponding to other non-standard downstream ports have power adapters, so that the rated current of the non-standard downstream ports is higher. For example, the rated current of the dedicated charging port and the charging downstream port can reach 1.5A. At the same time, the power adapter of the charging device is generally provided with a protection circuit, even if the discharge current is large, even exceeding the rated current, it will not burn the charging device or electronic equipment. Therefore, in the embodiment of the present application, it is first necessary to determine whether the port type of the charging device is a standard downstream port, and then perform corresponding processing according to the port type of the charging device. At the same time, the judgment time of the standard downstream port is generally short, less than 500ms, which will not have much impact on the user's normal charging detection process.
[0108] S6012: When the port type of the charging device is a standard downstream port, the electronic device is charged according to a charging process corresponding to the standard downstream port.
[0109] When the port type of the charging device is a standard downstream port, it means that the port type of the charging device is a USB port. In other words, the charging device is an electronic device with a USB port, such as a personal computer or a tablet computer. These electronic devices do not have a power adapter or an overcurrent protection circuit for external charging. Therefore, in order to protect the electronic device, when the port type of the charging device is a standard downstream port, the electronic device is directly charged according to the charging process corresponding to the standard downstream port, and the electronic device is not discharged to prevent damage to the electronic device.
[0110] S6013: When the port type of the charging device is a non-standard downstream port, the electronic device discharges the residual pressure of the charging device.
[0111] When the port type of the charging device is a non-standard downstream port, it means that the port type of the charging device is not a USB port, but a charger with an overcurrent protection circuit. For example, an ordinary power adapter, a fast charging power adapter, or a power adapter without D+ and D- lines. Therefore, when the port type of the charging device is a non-standard downstream port, the residual pressure of the capacitor inside the charging device can be directly discharged, thereby effectively avoiding the problem of abnormal display of the electronic device when the charging device is connected after the power strip is turned off, and will not cause charging misunderstandings to users, and the user experience is high.
[0112] It should be understood that when a charging device is directly plugged into a socket and the socket suddenly loses power, resulting in residual pressure in the capacitor of the charging device, in order to avoid the problem of abnormal display of the charging icon of the electronic device when the charging device is connected to the electronic device, the solution provided in the embodiment of the present application can also be adopted.
[0113] S402: The electronic device detects the port type of the charging device.
[0114] After the residual pressure of the charging device is released, the electronic device can carry out the normal charging process and detect the port type of the charging device again.
[0115] Exemplarily, in an embodiment of the present application, the port types of the charging device may include a dedicated charging port (DCP), a non-standard charging port, and a charging downstream port (CDP). Among them, the dedicated charging port does not support any data transmission, but can provide a current of more than 1.5A. The D+ line and the D- line of the port are short-circuited. This type of port supports wall chargers and car chargers with higher charging capabilities. For example, the dedicated charging port can be a power adapter equipped with the electronic device during production. The non-standard charging port is a charger without D+ line and D- data line. For example, a power adapter produced by a non-brand manufacturer. The charging downstream port supports both high-current charging and data transmission that is fully compatible with USB2.0. The port has a 15kΩ pull-down resistor required for communication between the D+ line and the D- line, and also has an internal circuit for switching during the charger detection phase. The internal circuit allows the portable device to distinguish the charging downstream port from other types of ports.
[0116] S403: The electronic device charges the electronic device according to the charging process corresponding to the port type of the charging device.
[0117] After the electronic device detects the port type of the charging device, the electronic device can be charged according to the charging process corresponding to the port type of the charging device.
[0118] For example, in the embodiment of the present application, when the port type of the charging device is a dedicated charging port, the electronic device is charged according to the charging process corresponding to the dedicated charging port. Alternatively, when the port type of the charging device is a non-standard charging port, the electronic device is charged according to the charging process corresponding to the non-standard charging port. Alternatively, when the port type of the charging device is a charging downstream port, the electronic device is charged according to the charging process corresponding to the charging downstream port.
[0119] Figure 7 This is a flowchart of a charging method for avoiding display abnormality provided in yet another embodiment of the present application.
[0120] like Figure 7 As shown, in one embodiment provided in the present application, after the electronic device is connected to the charging device, a charging method for avoiding display abnormality includes the following steps:
[0121] S7011. The electronic device turns on the discharge path of the electronic device.
[0122] For example, in the embodiment of the present application, a discharge path may be provided inside the electronic device, so as to control the capacitor residual pressure discharge process of the charging device by controlling the conduction and disconnection of the discharge path. For example, before the residual pressure of the charging device needs to be discharged, the discharge path is first turned on.
[0123] It should be noted that, in another embodiment of the present application, the electronic device turning on the discharge path may specifically be that the electronic device grounds the discharge path, thereby discharging the residual voltage of the capacitor of the charging device.
[0124] S401. The electronic device discharges the residual pressure of the charging device.
[0125] In order to prevent the residual voltage of the capacitor inside the charging device from affecting the charging process of the electronic device, the residual voltage of the capacitor inside the charging device may be discharged first after the electronic device is connected to the charging device.
[0126] For example, for ease of use, the user keeps the charging device plugged into the socket and not connected to the electronic device. When the socket is powered off, the capacitor in the charging device has no way to discharge, resulting in residual capacitor pressure in the charging device. At this time, if the electronic device is directly connected to the charging device, the electronic device in the electronic device will detect the residual pressure of the charging device, thereby starting the charging process and displaying an icon indicating that the electronic device is in a charging state on the display screen of the electronic device. However, since the socket is not powered, the charging icon disappears quickly, causing confusion to the user, who is not sure whether the socket has power or if there is a problem with the electronic device. Therefore, in an embodiment of the present application, after the electronic device is connected to the charging device, the residual pressure of the charging device is directly discharged first, thereby effectively avoiding the problem of abnormal display of the electronic device when the charging device is connected after the socket is powered off, and will not cause charging misunderstandings to the user, and the user experience is high.
[0127] It should be noted that the process of the electronic device discharging the residual pressure of the charging device may include three states:
[0128] The first state: the discharge path of the electronic device is turned on, and the discharge current flowing through the charging device is greater than the rated current of the charging device. This state can be applied to charging devices with overcurrent protection circuits, such as dedicated charging ports DCP, non-standard charging ports, and charging downstream ports CDP.
[0129] The second state: the discharge path of the electronic device is turned on, and the discharge current flowing through the charging device is less than the rated current of the charging device. This state can be applied to charging devices without overcurrent protection circuits, such as standard downstream ports SDP.
[0130] The third state: the discharge path of the electronic device is disconnected, which is the state when the electronic device completes the residual pressure discharge. The discharge path is disconnected so that the charging device can normally charge the electronic device.
[0131] It should be understood that when a charging device is directly plugged into a socket and the socket suddenly loses power, resulting in residual pressure in the capacitor of the charging device, in order to avoid the problem of abnormal display of the charging icon of the electronic device when the charging device is connected to the electronic device, the solution provided in the embodiment of the present application can also be adopted.
[0132] S7012, the electronic device disconnects the discharge path of the electronic device.
[0133] After the electronic device completes the residual pressure discharge process for the charging device, the discharge path of the electronic device can be disconnected, thereby preventing the discharge path of the electronic device from being in a conducting state all the time, thereby affecting the normal charging process of the electronic device and the charging device.
[0134] S402: The electronic device detects the port type of the charging device.
[0135] After the residual pressure of the charging device is released, the electronic device can proceed with the normal charging process, that is, firstly detecting the port type of the charging device.
[0136] Exemplarily, in an embodiment of the present application, the port types of the charging device may include a standard downstream port (SDP), a dedicated charging port (DCP), a non-standard charging port, and a charging downstream port (CDP). Among them, the D+ line and D- line of the standard downstream port are differential data lines, and the D+ line and the D- line have a 15kΩ pull-down resistor. The current limit value of the standard downstream port is 2.5mA when suspended, 100mA when connected, and 500mA when connected and configured for higher power. The dedicated charging port does not support any data transmission, but can provide a current of more than 1.5A. The D+ line and D- line of the port are short-circuited. This type of port supports wall chargers and car chargers with higher charging capabilities. For example, the dedicated charging port can be a power adapter equipped with the electronic device during production. The non-standard charging port is a charger without a D+ line and a D- data line. For example, a power adapter produced by a non-brand manufacturer. The charging downstream port supports both high-current charging and data transmission that is fully compatible with USB2.0. The port has the necessary 15kΩ pull-down resistors for D+ and D- line communication, and also has internal circuitry to switch during the charger detection phase. The internal circuitry allows the portable device to distinguish a charging downstream port from other types of ports.
[0137] S403: The electronic device charges the electronic device according to the charging process corresponding to the port type of the charging device.
[0138] After the electronic device detects the port type of the charging device, the electronic device can be charged according to the charging process corresponding to the port type of the charging device.
[0139] Exemplarily, in an embodiment of the present application, when the port type of the charging device is a standard downstream port, the electronic device is charged according to the charging process corresponding to the standard downstream port. Alternatively, when the port type of the charging device is a dedicated charging port, the electronic device is charged according to the charging process corresponding to the dedicated charging port. Alternatively, when the port type of the charging device is a non-standard charging port, the electronic device is charged according to the charging process corresponding to the non-standard charging port. Alternatively, when the port type of the charging device is a charging downstream port, the electronic device is charged according to the charging process corresponding to the charging downstream port.
[0140] Figure 8 This is a waveform diagram of charging device port type detection provided in an embodiment of the present application.
[0141] like Figure 8 As shown, exemplarily, the port type of the charging device can be detected by the D+ signal waveform, the D- signal waveform and the VBUS voltage signal waveform. For example, when the D+ signal first presents a first high potential waveform, it indicates that the VBUS voltage exists. Then, when the D+ signal presents a second high potential waveform and the D- signal presents a low potential waveform, it indicates that the port type of the charging device is a standard downstream port SDP, so that it can be determined by the waveform whether the charging device connected to the electronic device is a standard downstream port.
[0142] It should be understood that different charging device ports may correspond to different waveform diagrams, so that other charging device ports, such as the charging downstream port DCP, may also be judged by the waveform diagrams corresponding to other charging device ports. The judgment waveform of the charging downstream port DCP is longer than the judgment waveform of the standard downstream port SDP, so that the judgment time of the charging downstream port DCP is longer than the judgment time of the standard downstream port SDP.
[0143] Combine the following Figures 9 to 11 , and then the charging circuit solution for avoiding display abnormality provided in the embodiment of the present application is introduced in detail.
[0144] Fig. 9 A circuit diagram of a charging circuit for avoiding display abnormality provided in an embodiment of the present application.
[0145] like Fig. 9 As shown, in one embodiment provided in the present application, a charging circuit for avoiding display abnormality includes a switch device 901, and the switch device 901 includes three terminals. The first terminal a of the switch device 901 is connected to the charging device 20, and the second terminal b of the switch device 901 is grounded. When the control terminal c of the switch device 901 receives a conduction signal, the first terminal a of the switch device 901 and the second terminal b of the switch device 901 are connected to discharge the residual pressure of the charging device 20. When the control terminal c of the switch device 901 receives a disconnection signal, the first terminal a of the switch device 901 and the second terminal b of the switch device 901 are disconnected, so that the charging device 20 can charge the electronic device 10.
[0146] When the residual pressure of the capacitor in the charging device 20 needs to be discharged through the switch device 901, the discharge path (i.e., the switch device 901) of the electronic device 10 is turned on. Thus, the residual pressure of the capacitor inside the charging device 20 can be discharged through the switch device 901, so that the electronic device 10 can normally display the charging state and the uncharged state. The problem of abnormal display of the electronic device 10 when the charging device 20 is connected after the power strip 30 is powered off is effectively avoided, and the charging misunderstanding will not be caused to the user, and the user experience is high.
[0147] After the switch device 901 completes the process of discharging the residual voltage of the capacitor inside the charging device 20, the discharge path (i.e., the switch device 901) of the electronic device 10 can be disconnected. At this time, if the charging device 20 does not provide power, the electronic device 10 cannot obtain power, and thus cannot start the charging process, and the charging display state will not appear briefly, which will not cause charging misunderstandings to the user. If the charging device 20 provides power, the electronic device 10 can be powered normally through the charging device 20, and the electronic device will normally display the charging display state.
[0148] It should be noted that the process of the switch device 901 discharging the residual pressure of the charging device may include three states:
[0149] The first state: the switch device 901 is turned on, and the discharge current flowing through the charging device 20 is greater than the rated current of the charging device 20. This state can be applied to the charging device 20 with an overcurrent protection circuit, such as a dedicated charging port DCP, a non-standard charging port, and a charging downstream port CDP.
[0150] The second state: the switch device 901 is turned on, and the discharge current flowing through the charging device 20 is less than the rated current of the charging device 20. This state may be applicable to the charging device 20 without an overcurrent protection circuit, for example, a standard downstream port SDP.
[0151] The third state: the switch device 901 is disconnected, which is the state when the electronic device 10 has completed the residual pressure discharge. The switch device 901 is disconnected so that the charging device 20 can normally perform the charging process for the electronic device 10.
[0152] Exemplarily, the switch device 901 may be an electronic device such as a MOS tube, a thyristor, a triode, or an insulated gate bipolar transistor (IGBT).
[0153] When the switch device 901 is an NMOS transistor, the NMOS transistor can have three states:
[0154] The first state: When the NMOS transistor receives a high-level signal (i.e., VGS > VGS(TH), VDS > VGS - VGS(TH)), the NMOS transistor is in the conducting state, and the conduction voltage is relatively high, and the discharge current is relatively large. For example, the conduction voltage is about 1.8V. At this time, if the NMOS transistor is used as the switching device 901 to discharge the residual voltage of the charging device 20, since the discharge current is relatively large, in order to avoid overcurrent damage to the charging device 20, it can be applied to charging devices 20 with overcurrent protection circuits such as dedicated charging ports DCP, non-standard charging ports, and charging downstream ports CDP.
[0155] The second state: When the NMOS transistor receives a medium-level signal (i.e., VGS > VGS(TH), VDS < VGS - VGS(TH)), the NMOS transistor is in the high-impedance state, and the conduction voltage is relatively low, and the discharge current is relatively small. For example, the conduction voltage is about 1.1V. At this time, if the NMOS transistor is used as the switching device 901 to discharge the residual voltage of the charging device 20, since the discharge current is relatively small and will not cause overcurrent damage to the charging device 20, it can be applied to various charging devices 20 such as standard downstream ports SDP, dedicated charging ports DCP, non-standard charging ports, and charging downstream ports CDP.
[0156] The third state: When the NMOS transistor receives a low-level signal (i.e., VGS < VGS(TH)), the NMOS transistor is in the cut-off state, so that the charging device 20 can normally charge the electronic device 10. For example, when the NMOS transistor completes the residual voltage discharge action. At the same time, the on and off times of the NMOS transistor are relatively short, less than 500 ms, and will not have too much impact on the normal charging detection process of the user.
[0157] Fig.10 It is a circuit diagram of another charging method provided by an embodiment of the present application to avoid display anomalies.
[0158] Such as Fig.10As shown, in one embodiment provided in the present application, a charging circuit for avoiding display abnormality includes a switch device 901 and a first resistor R1, the switch device 901 includes three terminals, and the first resistor R1 includes two terminals. The first terminal a of the switch device 901 is connected to the charging device 20, the second terminal b of the switch device 901 is grounded, the control terminal c of the switch device 901 is connected to the first terminal of the first resistor R1, and the second terminal of the first resistor R1 is grounded. When the control terminal c of the switch device 901 receives a conduction signal, the first terminal a of the switch device 901 and the second terminal b of the switch device 901 are connected to discharge the residual pressure of the charging device 20. When the control terminal c of the switch device 901 receives a disconnection signal, the first terminal a of the switch device 901 and the second terminal b of the switch device 901 are disconnected, so that the charging device 20 can charge the electronic device 10. The first resistor R1 is used to play a stabilizing role, preventing the control terminal current of the switch device 901 from being too large to damage the switch device 901, and can also play a role in regulating the voltage at the control terminal c of the switch device 901.
[0159] When the residual pressure of the capacitor in the charging device 20 needs to be discharged through the switch device 901, the discharge path (i.e., the switch device 901) of the electronic device 10 is turned on. Thus, the residual pressure of the capacitor inside the charging device 20 can be discharged through the switch device 901, and the voltage stabilization effect is achieved through the first resistor R1, so that the electronic device 10 can normally display the charging state and the uncharging state. The problem of abnormal display of the electronic device 10 when the charging device 20 is connected after the power strip 30 is turned off is effectively avoided, and the charging misunderstanding will not be caused to the user, and the user experience is high.
[0160] After the switch device 901 completes the process of discharging the residual voltage of the capacitor inside the charging device 20, the discharge path (i.e., the switch device 901) of the electronic device 10 can be disconnected. At this time, if the charging device 20 does not provide power, the electronic device 10 cannot obtain power, and thus cannot start the charging process, and the charging display state will not appear briefly, which will not cause charging misunderstandings to the user. If the charging device 20 provides power, the electronic device 10 can be powered normally through the charging device 20, and the electronic device will normally display the charging display state.
[0161] Exemplarily, the switch device 901 may be an electronic device such as a MOSFET, a thyristor, a triode, or an insulated gate bipolar transistor (IGBT).
[0162] When the switch device 901 is an NMOS transistor, the NMOS transistor can have three states:
[0163] The first state: When the NMOS transistor receives a high-level signal (i.e., VGS > VGS(TH), VDS > VGS - VGS(TH)), the NMOS transistor is in the on state, and the on voltage is relatively high, and the discharge current is relatively large. For example, the on voltage is about 1.8V. At this time, if the NMOS transistor is used as the switching device 901 to discharge the residual voltage of the charging device 20, since the discharge current is relatively large, in order to avoid overcurrent damage to the charging device 20, it can be applied to charging devices 20 with overcurrent protection circuits such as dedicated charging ports DCP, non-standard charging ports, and charging downstream ports CDP.
[0164] The second state: When the NMOS transistor receives a medium-level signal (i.e., VGS > VGS(TH), VDS < VGS - VGS(TH)), the NMOS transistor is in the high-impedance state, and the on voltage is relatively low, and the discharge current is relatively small. For example, the on voltage is about 1.1V. At this time, if the NMOS transistor is used as the switching device 901 to discharge the residual voltage of the charging device 20, since the discharge current is relatively small and will not cause overcurrent damage to the charging device 20, it can be applied to various charging devices 20 such as standard downstream ports SDP, dedicated charging ports DCP, non-standard charging ports, and charging downstream ports CDP.
[0165] The third state: When the NMOS transistor receives a low-level signal (i.e., VGS < VGS(TH)), the NMOS transistor is in the off state, so that the charging device 20 can normally charge the electronic device 10. For example, when the NMOS transistor completes the residual voltage discharge action.
[0166] Fig.11 It is a circuit diagram of another charging method provided by the embodiment of the present application to avoid display anomalies.
[0167] Such as Fig.11As shown, in an embodiment provided by the present application, a charging circuit for avoiding display anomalies includes a first MOS transistor Q1 and a first resistor R1. The first MOS transistor Q1 includes three terminals, and the first resistor R1 includes two terminals. The first terminal a of the first MOS transistor Q1 is connected to the charging device 20, the second terminal b of the first MOS transistor Q1 is grounded, the control terminal c of the first MOS transistor Q1 is connected to the first terminal of the first resistor R1, and the second terminal of the first resistor R1 is grounded. When the control terminal c of the first MOS transistor Q1 receives a conduction signal, conduction occurs between the first terminal a and the second terminal b of the first MOS transistor Q1 to discharge the residual voltage of the charging device 20. When the control terminal c of the first MOS transistor Q1 receives a disconnection signal, the connection between the first terminal a and the second terminal b of the first MOS transistor Q1 is disconnected, enabling the charging device 20 to charge the electronic device 10. The first resistor R1 is used to provide a stabilizing effect, preventing excessive current at the control terminal of the first MOS transistor Q1 from damaging the first MOS transistor Q1, and at the same time, it can also regulate the voltage at the control terminal c of the first MOS transistor Q1.
[0168] Exemplarily, the first MOS transistor Q1 can have three states:
[0169] The first state: When the first MOS transistor Q1 receives a high-level signal (i.e., VGS > VGS(TH), VDS > VGS - VGS(TH)), the first MOS transistor Q1 is in the conducting state, and the conduction voltage is relatively high, and the discharge current is relatively large. For example, a conduction voltage of about 1.8V. At this time, the first MOS transistor Q1 is used to discharge the residual current of the charging device 20. Since the discharge current is relatively large, in order to avoid overcurrent damage to the charging device 20, it can be applied to charging devices 20 with overcurrent protection circuits such as dedicated charging ports DCP, non-standard charging ports, and charging downstream ports CDP.
[0170] The second state: When the first MOS transistor Q1 receives a medium-level signal (i.e., VGS > VGS(TH), VDS < VGS - VGS(TH)), the first MOS transistor Q1 is in the high-impedance state, and the conduction voltage is relatively low, and the discharge current is relatively small. For example, a conduction voltage of about 1.1V. At this time, the first MOS transistor Q1 is used to discharge the residual current of the charging device 20. Since the discharge current is relatively small and will not cause overcurrent damage to the charging device 20, it can be applied to various charging devices 20 such as standard downstream ports SDP, dedicated charging ports DCP, non-standard charging ports, and charging downstream ports CDP.
[0171] The third state: When the first MOS transistor Q1 receives a low-level signal (i.e., VGS < VGS(TH)), the first MOS transistor Q1 is in the cut-off state, so that the charging device 20 can normally charge the electronic device 10. For example, when the first MOS transistor Q1 completes the residual voltage discharge operation.
[0172] Exemplarily, the charging circuit for avoiding display anomalies can implement the conduction and disconnection of the discharge path through the general-purpose input / output (GPIO) interface inside the electronic device 10. For example, the electronic device 10 can provide the control signal for the first MOS transistor Q1, namely, high-level signal, medium-level signal, and low-level signal, through the GPIO interface.
[0173] The GPIO interface includes an input driver, an output driver, a first diode D1, and a second diode D2. The positive electrodes of the first diode D1 and the second diode D2 are both connected to the control terminal of the first MOS transistor Q1 through the I / O pin. The negative electrode of the first diode D1 is connected to the power supply voltage VDD, and the negative electrode of the second diode D2 is grounded to VSS. The first diode D1 and the second diode D2 are used to prevent the input of excessive or too low voltage outside the I / O pin. For example, when the voltage of the I / O pin is higher than VDD, the first diode D1 conducts; when the voltage of the I / O pin is lower than VSS, the second diode D2 conducts, preventing the chip from being burned due to the introduction of abnormal voltage.
[0174] The input driver includes a first switch S1, a second switch S2, a second resistor R2, a third resistor R3, and a transistor-transistor logic (TTL) Schottky trigger. The first end of the first switch S1 is connected to the power supply voltage VDD, and the second end of the first switch S1 is connected to the first end of the second resistor R2. The second end of the second resistor R2 is respectively connected to the common end of the first diode D1 and the second diode D2, the first end of the third resistor R3, and the first end of the TTL Schottky trigger. The second end of the third resistor R3 is connected to the first end of the second switch S2. The second end of the second switch S2 is grounded to VSS. The second end of the TTL Schottky trigger is connected to the input data register.
[0175] It should be noted that after the signal passes through the TTL Schottky trigger, the analog signal is converted into a digital signal of 0 and 1. However, when the GPIO interface is used as the input channel for the ADC to collect voltage, that is, when using its "analog input" function, the signal no longer passes through the TTL Schottky trigger for TTL level conversion at this time. Because the ADC peripheral device needs to collect the original analog signal.
[0176] The output driver includes a second MOS transistor Q2, a third MOS transistor Q3 and an output controller. The first end of the second MOS transistor Q2 is connected to the power supply voltage VDD, the second end of the second MOS transistor Q2 is connected to the first end of the third MOS transistor, and the second end of the third MOS transistor is grounded VSS. The control end of the second MOS transistor Q2 and the control end of the third MOS transistor Q3 are both connected to the first end of the output controller. The second end of the output controller is connected to the output data register and the bit setting / clearing register in sequence.
[0177] For example, in the embodiment of the present application, GPIO can support 4 input modes (floating input, pull-up input, pull-down input, analog input) and 4 output modes (open drain output, open drain multiplexed output, push-pull output, push-pull multiplexed output). At the same time, GPIO also supports three maximum flip speeds (2MHz, 10MHz, 50MHz).
[0178] In floating input mode, the level signal of the I / O pin directly enters the input data register. In other words, the level state of the I / O pin is uncertain and is completely determined by the external input; if the I / O pin is floating (with no signal input), the level of the port is uncertain.
[0179] In the pull-up input mode, the level signal of the I / O pin directly enters the input data register. However, when the I / O pin is suspended (no signal input), the level of the input end can be maintained at a high level; and when the I / O pin input is a low level, the level of the input end is still a low level.
[0180] In the pull-down input mode, the level signal of the I / O pin directly enters the input data register. However, when the I / O pin is suspended (no signal input), the level of the input end can be kept at a low level; and when the I / O pin input is a high level, the level of the input end is still a high level.
[0181] In analog input mode, the analog signal (voltage signal, not level signal) of the I / O pin is directly analog input to the on-chip peripheral module, such as the ADC module, etc.
[0182] In open-drain output mode, the value of the register or output data register is set / cleared by setting the bit, and finally output to the I / O pin through the N-MOS tube. When the output value is set to a high level, the N-MOS tube is in a closed state. At this time, the level of the I / O pin is not determined by the high or low level of the output, but by the pull-up or pull-down outside the I / O pin; when the output value is set to a low level, the N-MOS tube is in an open state, and the level of the I / O pin is a low level. At the same time, the level of the I / O pin can also be read through the input circuit; the level of the I / O pin is not necessarily the output level.
[0183] The open-drain multiplexed output mode is very similar to the open-drain output mode. In the open-drain multiplexed output mode, the source of the high and low levels of the output is not determined by the CPU directly writing the output data register, but instead by the multiplexing function output of the on-chip peripheral module.
[0184] In one embodiment provided in the present application, an electronic device 10 is provided, comprising the above-mentioned charging circuit for avoiding display abnormalities and a control module. The control module is connected to the charging circuit for avoiding display abnormalities to control the charging circuit for avoiding display abnormalities to be turned on or off. After the electronic device 10 is connected to the charging device 20, the residual pressure inside the charging device 20 can be discharged first, and then the electronic device 10 can be charged according to the charging process corresponding to the port type of the charging device 20, thereby effectively avoiding the problem of abnormal display of the electronic device 10 when the charging device 20 is connected after the power strip 30 is powered off, and will not cause charging misunderstandings to users, and the user experience is high.
[0185] It should be understood that the above is only an example of the structure of the electronic device 10, and the electronic device 10 may also include other subsystems or devices, which can be configured and modified as needed, and the embodiments of the present application do not impose any limitations on this.
[0186] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.12 The dotted line in the figure indicates that the unit or the module is optional; the electronic device 10 can be used to implement the function test method of the anti-flicker sensor described in the above method embodiment. For example, the electronic device 10 can be an electronic device with a camera and video recording function integrated with an anti-flicker sensor. For example, a smart phone, a smart tablet, a smart computer, a smart security device, etc.
[0187] The electronic device 10 includes one or more processors 110, which can support the electronic device 10 to implement the control method in the method embodiment. The processor 110 can be a general-purpose processor or a special-purpose processor. For example, the processor 110 can be a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.
[0188] Optionally, the processor 110 may be used to control the electronic device 10, execute software programs, and process data of the software programs. The electronic device 10 may also include a communication unit 905 to implement input (reception) and output (transmission) of signals.
[0189] For example, the electronic device 10 may be a chip, the communication unit 905 may be an input and / or output circuit of the chip, or the communication unit 905 may be a communication interface of the chip, and the chip may be a component of the electronic device or other electronic devices.
[0190] For another example, the electronic device 10 may be an electronic device, and the communication unit 905 may be a transceiver of the electronic device 10, or the communication unit 905 may include one or more memories 902 on which a program 904 is stored, and the program 904 may be executed by the processor 110 to generate instructions 903, so that the processor 110 executes the functional testing method of the anti-flicker sensor described in the above method embodiment according to the instructions 903.
[0191] Optionally, data may also be stored in the memory 902 .
[0192] Optionally, the processor 110 may also read data stored in the memory 902 . The data may be stored at the same storage address as the program 904 , or may be stored at a different storage address from the program 904 .
[0193] Optionally, the processor 110 and the memory 902 may be provided separately or integrated together, for example, integrated on a system on chip (SOC) of the electronic device.
[0194] Exemplarily, the memory 902 can be used to store the related program 904 of the functional testing method of the anti-flicker sensor provided in the embodiment of the present application, and the processor 110 can be used to call the related program 904 of the functional testing method of the anti-flicker sensor stored in the memory 902 when executing the functional testing method of the anti-flicker sensor, so as to execute the functional testing method of the anti-flicker sensor in the embodiment of the present application.
[0195] Optionally, the present application further provides a computer program product, which, when executed by the processor 110, implements the functional testing method of the anti-flicker sensor in any method embodiment of the present application.
[0196] For example, the computer program product may be stored in the memory 902 , such as a program 904 , which is converted into an executable target file that can be executed by the processor 110 after preprocessing, compiling, assembling, and linking.
[0197] Optionally, the present application also provides a chip system, which is applied to the electronic device 10, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions to enable the electronic device 10 to execute the functional testing method of the anti-flicker sensor.
[0198] Optionally, the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the function test method of the anti-flicker sensor described in any method embodiment of the present application is implemented. The computer program can be a high-level language program or an executable target program.
[0199] For example, the computer-readable storage medium is, for example, a memory 902. The memory 902 may be a volatile memory or a non-volatile memory, or the memory 902 may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0200] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0201] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0202] The beneficial effects that can be achieved by the electronic device provided in the above-mentioned embodiment of the present application can refer to the beneficial effects corresponding to the modules provided above, which will not be repeated here.
[0203] It should be understood that the above is only to help those skilled in the art to better understand the embodiments of the present application, rather than to limit the scope of the embodiments of the present application. According to the above examples given, those skilled in the art can obviously make various equivalent modifications or changes. For example, some steps in each embodiment of the above detection method may be unnecessary, or some steps may be newly added. Or a combination of any two or any multiple embodiments of the above. Such modifications, changes or combined solutions also fall within the scope of the embodiments of the present application. In addition, the coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0204] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0205] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0206] It should also be understood that the above description of the embodiments of the present application focuses on emphasizing the differences between the various embodiments. The same or similar points that are not mentioned can be referenced to each other. For the sake of brevity, they will not be repeated here.
[0207] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0208] It should also be understood that in the embodiments of the present application, "pre-setting" and "pre-definition" can be achieved by pre-saving corresponding codes, tables or other methods that can be used to indicate relevant information in a device (for example, including an electronic device), and the present application does not limit its specific implementation method.
[0209] It should also be understood that the division of the methods, situations, categories and embodiments in the embodiments of the present application is only for the convenience of description and should not constitute a special limitation. The features of various methods, categories, situations and embodiments can be combined without contradiction.
[0210] It should also be understood that in the various embodiments of the present application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships.
[0211] Finally, it should be noted that the above is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims. In short, the above is only a preferred embodiment of the technical solution of the present application, and is not used to limit the protection scope of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A charging method for avoiding display abnormality, characterized in that: After the electronic device is connected to the charging device, the charging method for avoiding display abnormality includes: Discharging residual pressure of the charging device; Detecting a port type of the charging device; Charging the electronic device according to a charging process corresponding to the port type of the charging device; The discharging of residual pressure of the charging device further comprises: When the port type of the charging device is a standard downstream port, charging the electronic device according to a charging process corresponding to the standard downstream port; When the port type of the charging device is a non-standard downstream port, residual pressure of the charging device is discharged.
2. The charging method for avoiding display abnormality according to claim 1, characterized in that: The residual pressure release of the charging device comprises: Controlling the discharge current flowing through the charging device to be less than the rated current of the charging device; The residual voltage of the charging device is discharged according to the discharge current.
3. The charging method for avoiding display abnormality according to claim 1, characterized in that: The charging device having the non-standard downstream port is provided with an overcurrent protection circuit.
4. The charging method for avoiding display abnormality according to any one of claims 1 to 3, characterized in that: Before the residual pressure of the charging device is released, the method further includes: The discharge path of the electronic device is turned on.
5. The charging method for avoiding display abnormality according to claim 4, characterized in that: The step of conducting the discharge path of the electronic device comprises: The discharge path of the electronic device is grounded.
6. The charging method for avoiding display abnormality according to any one of claims 1 to 3, characterized in that: Before detecting the port type of the charging device, the method further includes: The discharge path of the electronic device is disconnected.
7. The charging method for avoiding display abnormality according to any one of claims 1 to 3, characterized in that: The port types of the charging device include a standard downstream port, a dedicated charging port, a non-standard charging port and a charging downstream port.
8. A charging circuit for avoiding display abnormality, characterized in that: Based on the charging method for avoiding display abnormality according to any one of claims 1 to 7, the charging circuit for avoiding display abnormality comprises a switch device, a first end of the switch device is connected to the charging device, and a second end of the switch device is grounded; When the control end of the switch device receives a conduction signal, the first end of the switch device and the second end of the switch device are connected to discharge the residual pressure of the charging device; When the control end of the switch device receives a disconnection signal, the first end of the switch device and the second end of the switch device are disconnected, so that the charging device charges the electronic device.
9. The charging circuit for avoiding display abnormality as claimed in claim 8, characterized in that: The charging circuit for avoiding display abnormality further includes a first resistor; A first end of the first resistor is connected to the control end of the switch device, and a second end of the first resistor is grounded.
10. The charging circuit for avoiding display abnormality according to claim 8, characterized in that: The switching device includes a MOSFET.
11. An electronic device, characterized in that: It comprises a charging circuit for avoiding display abnormality and a control module as described in any one of claims 8 to 10; the control module is connected to the charging circuit for avoiding display abnormality to control the charging circuit for avoiding display abnormality to be turned on or off.
12. An electronic device, characterized in that: The electronic device includes: one or more processors, and a memory; The memory is coupled to the one or more processors, and the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method according to any one of claims 1 to 7.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes instructions, and when the instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Laser emission circuit, laser emission control method and laser radar
CN114594453A
Charging method and device of electronic equipment, electronic equipment and keyboard
CN115549232A
Direct current charging pile metering remote monitoring method
CN118169486A