Method for preventing voltage of peripheral port from flowing backward, mainboard and electronic equipment
By installing a control and computing unit and voltage-dividing sampling circuit on the motherboard, the input voltage is detected in real time and the current limit switch is controlled, the problem of the peripheral port voltage flowing back to the motherboard after the power adapter is stopped, ensuring the normal operation of the motherboard.
Patent Information
- Application Number
- CN202311090591.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2025-02-28
AI Technical Summary
When an electronic device is connected to an external device with external power supply capability, after the power adapter stops supplying power, the voltage at the peripheral port may flow back to the motherboard, causing the CPU and other devices to be in an abnormal power supply state, which may cause a startup abnormality.
Install the control and operation unit and voltage-dividing sampling circuit on the motherboard to collect the input voltage in real time and compare it with the preset voltage. If the input voltage is less than the preset low voltage threshold, a shutdown signal is sent to the current limit switch to avoid voltage backflow.
By detecting the input voltage in real time, we can determine whether the power supply has been stopped by the power adapter, turn off the current limit switch in time, avoid the voltage of the peripheral port backflow to the motherboard, and ensure that the motherboard operates normally when the next power is turned on.
Smart Images

Figure CN119543038A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of pressure-sensitive active pens, and in particular to a method, a mainboard and an electronic device for preventing voltage backflow from a peripheral port. Background Art
[0002] At present, with the development of technology, electronic devices such as computers can be connected to a variety of external devices to apply to a wide range of application scenarios. These external devices often need to be connected to electronic devices through various interfaces, among which the USB interface is the most commonly used.
[0003] In addition to data transmission, the USB interface can also provide power. For external devices such as USB flash drives, mice, keyboards, etc. connected through the USB interface, these external devices can be powered by the motherboard of the electronic device. However, for some independent external devices using the USB interface, such as screen transmission boxes, these devices have the ability to provide external power.
[0004] After an electronic device is connected to such an external device with the ability to supply power to an external device, when the power adapter stops supplying power to the mainboard, if the external device is still connected to the electronic device, the voltage will be recharged from the external device to the mainboard of the electronic device through the USB interface, causing the CPU and other devices on the mainboard to be in an abnormal power supply state. The electronic device may experience a startup abnormality the next time it is turned on. Summary of the invention
[0005] In order to solve the problems of the prior art, the embodiments of the present application provide a method, a mainboard and an electronic device for preventing voltage backflow from a peripheral port. The technical solution is as follows:
[0006] In a first aspect, a method for preventing voltage backflow from a peripheral port is provided, the method being used to prevent voltage backflow from flowing to a mainboard, the mainboard being provided with a control and operation unit and a voltage division sampling circuit, the method comprising the following steps:
[0007] The voltage-dividing sampling circuit collects the input voltage of the mainboard in real time and sends it to the control and computing unit;
[0008] The control and calculation unit compares the input voltage with the preset voltage, wherein the preset voltage includes a preset low voltage threshold and a preset high voltage threshold;
[0009] If the input voltage is less than the preset low-voltage threshold, the control and calculation unit sends a shutdown signal to the current limiting switch to prevent the peripheral port voltage from flowing back to the mainboard.
[0010] Optionally, the method further includes:
[0011] If the input voltage is greater than the preset high voltage threshold, the control and calculation unit sends an opening signal to the current limiting switch.
[0012] Optionally, before the control and operation unit sends an opening signal to the current limiting switch, the method further includes:
[0013] The control and calculation unit obtains the operating voltage of each IC of the mainboard, and if the operating voltage of all ICs is obtained, an opening signal is sent to the current limiting switch.
[0014] Optionally, the control and computing unit includes: CPLD, MCU or FPGA.
[0015] In a second aspect, a mainboard for preventing voltage backflow from a peripheral port is provided, wherein a control and operation unit and a voltage division sampling circuit are installed on the mainboard:
[0016] The voltage-dividing sampling circuit is used to collect the input voltage of the mainboard in real time and send it to the control and computing unit;
[0017] The control and calculation unit is used to compare the input voltage with the preset voltage, wherein the preset voltage includes a preset low voltage threshold and a preset high voltage threshold; if the input voltage is less than the preset low voltage threshold, a shutdown signal is sent to the current limiting switch to prevent the peripheral port voltage from flowing back to the mainboard.
[0018] Optionally, the control and computing unit is further used for:
[0019] If the input voltage is greater than the preset high voltage threshold, an on signal is sent to the current limiting switch.
[0020] Optionally, the control and computing unit is further used for:
[0021] Before the control and operation unit sends an on signal to the current limiting switch, the operating voltage of each IC of the mainboard is obtained. If the operating voltage of all ICs is obtained, an on signal is sent to the current limiting switch.
[0022] Optionally, the control and computing unit includes: CPLD, MCU or FPGA.
[0023] In a third aspect, a motherboard for preventing voltage backflow from a peripheral port is provided, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the network port automatic detection device implements the method described in the first aspect above.
[0024] In a fourth aspect, an electronic device is provided, wherein the electronic device comprises the mainboard described in the second aspect.
[0025] The beneficial effects of the technical solution provided by the embodiment of the present application are as follows: In the embodiment of the present application, a control and operation unit and a voltage-dividing sampling circuit are installed on the mainboard, and the voltage-dividing sampling circuit collects the input voltage of the mainboard in real time and sends it to the control and operation unit; the control and operation unit compares the input voltage with the preset voltage, wherein the preset voltage includes a preset low-voltage threshold and a preset high-voltage threshold; if the input voltage is less than the preset low-voltage threshold, the control and operation unit sends a closing signal to the current limiting switch. In this way, the input voltage is detected in real time through the voltage-dividing sampling circuit and the control and operation unit to determine whether the power adapter has stopped providing DC power to the mainboard, so that when the power adapter stops providing DC power to the mainboard, even if the current limiting switch is turned on, the voltage of the peripheral port is prevented from flowing back to the mainboard. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0027] Figure 1 It is a flow chart of a method for preventing voltage backflow at a peripheral port provided by an embodiment of the present application;
[0028] Figure 2 It is a structural schematic diagram of a mainboard for preventing voltage backflow from a peripheral port provided by an embodiment of the present application;
[0029] Figure 3 It is a structural schematic diagram of a mainboard for preventing voltage backflow from a peripheral port provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0031] Computer-type electronic devices are limited by factors such as size, power consumption, and price, and sometimes cannot meet the needs of users in terms of performance and functions. Therefore, electronic devices can often be provided with a variety of ports, such as USB (Universal Serial Bus) interface, PS / 2 interface, VGA (Video Graphics Array) interface, DVI interface (Digital Visual Interface), HDMI interface (High Definition Multimedia Interface), etc., through which various external devices are connected to optimize and improve their own performance defects, make up for functional deficiencies, and thus expand usage scenarios. For example, a laptop can be connected to an external display screen through an HDMI interface to provide a better display effect, and a tablet can be connected to an external mouse and keyboard through a USB interface to achieve a more convenient input method, etc.
[0032] Among various interfaces of electronic devices, the USB interface is the most commonly used, so the USB interface is used as an example in the following description. It is understandable that other interfaces with similar functions to the USB interface, such as the HDMI interface, may also cause similar problems as the USB interface when used, and this application will not list them one by one.
[0033] The latest USB Type-C interface has the characteristics of thin interface, unified standard, hot plug, symmetrical plug, simultaneous connection of multiple external devices, fast transmission speed, bidirectional power transmission, and power transmission and reception. For external devices such as USB flash drives, mice or keyboards that do not carry electricity themselves, electronic devices can power them through the motherboard and the USB interface. However, some independent external devices, such as screen transmission boxes, have the ability to supply power to the outside. When electronic devices are connected to such independent external devices through the USB interface, the independent external devices will also reverse the voltage to the inside of the motherboard through the USB interface.
[0034] In normal use, since the output voltage of the USB interface of the electronic device is the same as the voltage of the independent external device (normally 5V), it will not affect the electronic device. However, if the power adapter of the motherboard is disconnected at this time, the power adapter stops providing DC power to the motherboard, and the independent external device is still in operation, the voltage of the independent external device will flow back to the motherboard through the USB interface, causing the CPU and other ICs installed on the motherboard to be in an abnormal power supply state. The next time the electronic device is connected to the power adapter, it is easy to cause the motherboard of the electronic device to start abnormally.
[0035] Based on this, the embodiment of the present application provides a method, a mainboard and an electronic device to prevent the voltage from flowing back from a peripheral port. A control and operation unit and a voltage-dividing sampling circuit are installed on the mainboard of the electronic device. During operation, the electronic device collects the input voltage of the mainboard in real time through the voltage-dividing sampling circuit, and sends it to the control and operation unit for comparison with the preset voltage. According to the comparison result, it is determined whether the power adapter of the current electronic device has been disconnected and has stopped providing DC power to the mainboard, and then the current-limiting switch on the mainboard is controlled to be turned off, thereby preventing independent external devices from flowing the voltage back to the mainboard through the USB interface.
[0036] The following will be combined with specific implementation methods. Figure 1 A processing flow for preventing voltage backflow at a peripheral port is described in detail, and the content may be as follows:
[0037] Step 101: The voltage-dividing sampling circuit collects the input voltage of the mainboard in real time and sends it to the control and computing unit.
[0038] In implementation, as mentioned above, the control and operation unit and the voltage-dividing sampling circuit can be pre-installed on the mainboard of the electronic product, the voltage-dividing sampling circuit is connected to the voltage input terminal of the mainboard, and the control and operation unit is respectively connected to the current limiting switch and the voltage-dividing sampling circuit. The control and operation unit is mainly used to compare the input voltage with the preset voltage, thereby sending an opening or closing signal to the current limiting switch. In practical applications, CPLD (Complex Programmable logic device), MCU (Microcontroller Unit) or FPGA (Field Programmable Gate Array) can be used as the control and operation unit. The voltage-dividing sampling circuit can be composed of a voltage-dividing circuit and a sampling circuit. The voltage-dividing circuit can adjust the input voltage provided by the power adapter to the mainboard to a voltage range suitable for use by the control and operation unit; the sampling circuit can sample the voltage adjusted by the voltage-dividing circuit and send it to the control and operation unit.
[0039] It should be noted that, since the control and computing units such as CPLD have built-in ADC (analog to digital converter) functions, it is also possible to only add a voltage divider circuit on the mainboard, and use the built-in ADC function of the CPLD to sample the voltage processed by the voltage divider circuit. When using MCU or FPGA, a similar processing method can also be used, and this application will not explain them one by one.
[0040] When the user starts to use the electronic device, the power adapter is connected, and the power adapter starts to provide DC power to the mainboard. The voltage divider sampling circuit on the mainboard first divides the input voltage of the mainboard, and then collects it, and sends the collected results to the control and operation unit for subsequent processing by the control and operation unit.
[0041] Step 102: The control and calculation unit compares the input voltage with the preset voltage.
[0042] The preset voltage includes a preset low voltage threshold and a preset high voltage threshold.
[0043] In implementation, a high voltage threshold and a low voltage threshold may be pre-set in the control and operation unit. After receiving the input voltage sent by the voltage-dividing sampling circuit, the input voltage is compared with the preset high voltage threshold and the preset low voltage threshold respectively, so as to determine whether the current power adapter is in a disconnected state (whether it has stopped providing DC power to the mainboard).
[0044] It should be noted that the preset low-voltage threshold and the preset high-voltage threshold can be set according to the backflow voltage of the peripheral port and the input voltage of the DC power supply provided by the power adapter (i.e., the input voltage of the mainboard). Since the backflow voltage of peripheral ports such as USB interfaces is generally only 5V at most, the preset low-voltage threshold can usually be set to 6V. When the input voltage collected by the voltage-dividing sampling circuit is lower than the preset low-voltage threshold, the backflow voltage of the peripheral port is higher than the input voltage, so that the voltage of the peripheral port may be backflowed to the mainboard; and the voltage of the power adapter input to the mainboard is usually 12V-19V, so the preset high-voltage threshold can be set to 12V. When the input voltage collected by the voltage-dividing sampling circuit is higher than the preset high-voltage threshold, the input voltage of the DC power supply provided by the power adapter is higher than the backflow voltage of the peripheral port, and the voltage of the peripheral port will not be backflowed to the mainboard at this time.
[0045] Step 103: If the input voltage is less than the preset low voltage threshold, the control and calculation unit sends a closing signal to the current limiting switch.
[0046] If the input voltage is greater than the preset high voltage threshold, the control and calculation unit sends an opening signal to the current limiting switch.
[0047] In implementation, after comparing the input voltage with the preset high voltage threshold and the preset low voltage threshold, the control and operation unit can send a corresponding start signal to the current limiting switch to turn on the current limiting switch or send a close signal to turn off the current limiting switch according to the comparison result. Specifically, if the input voltage is less than the preset low voltage threshold, it means that the current power adapter may have been disconnected and the power adapter has stopped providing DC power to the mainboard. At this time, in order to prevent the peripheral port from backflowing voltage to the mainboard, the control and operation unit can send a close signal to the current limiting switch to turn off the current limiting switch, thereby disconnecting the connection between the peripheral port and the mainboard, stopping the peripheral port from backflowing voltage to the mainboard, and the voltage on the mainboard will be able to be reduced to 0. If the input voltage is greater than the preset high voltage threshold, it means that the current power adapter is still in a connected state, and the power adapter can continue to provide DC power to the mainboard. At this time, the peripheral port cannot backflow voltage to the mainboard, so the control and operation unit can send an open signal to the current limiting switch to turn on the current limiting switch, so that the mainboard can be normally connected to the peripheral port and output power to the external device through the peripheral port. In practical applications, the control and operation unit may use a high level signal as an on signal sent to the current limiting switch, and correspondingly, the control and operation unit may use a low level signal as an off signal sent to the current limiting switch.
[0048] Taking the previous text as an example, when the input voltage is less than 6V, the control and operation unit sends a low level signal to the current limiting switch to turn off the current limiting switch; when the input voltage is higher than 12V, the control and operation unit sends a high level signal to the current limiting switch to turn on the current limiting switch. It should be noted that the high level and the low level can be set according to the voltage required for the normal operation of the chip installed on the motherboard. Usually, 0.3 times the voltage required for the normal operation of the chip (i.e., the normal operating voltage of the chip × 0.3) can be used as the low level, and 0.7 times the voltage required for the normal operation of the chip (i.e., the normal operating voltage of the chip × 0.7) can be used as the high level. Usually, the low level can be 0-3.3V.
[0049] Optionally, before turning on the current limiting switch, the control and computing unit may also first detect whether each IC (integrated circuit) on the mainboard is working normally. When each IC on the mainboard is working normally, turn on the current limiting switch. The corresponding processing can be as follows: the control and computing unit obtains the operating voltage of each IC on the mainboard. If the operating voltage of all ICs is obtained, a turn-on signal is sent to the current limiting switch.
[0050] In implementation, since the voltages required by the various IC devices on the mainboard are different, the input voltage provided by the power adapter to the mainboard needs to be reduced accordingly before it can be provided to each IC device. Therefore, when the electronic device starts, the power adapter begins to provide DC power to the mainboard, and the CPU and other IC devices on the mainboard may not have obtained the corresponding voltage to work normally. At this time, the control and operation unit may have determined that the input voltage provided by the power adapter to the mainboard is greater than the preset high-voltage threshold. If the control and operation unit immediately sends an open signal to the current limiting switch at this time to turn on the current limiting switch, the reverse voltage from the peripheral port enters the mainboard and may affect the startup of the IC on the mainboard that has not yet worked normally. Therefore, when the control and operation unit determines that the input voltage is greater than the preset high-voltage threshold, it can temporarily not send an open signal to the current limiting switch, but continue to collect the working voltage of each IC on the mainboard. If the operating voltage of all ICs on the mainboard can be obtained, it means that each IC on the mainboard is already in normal working condition. At this time, the control and computing unit sends an enable signal to the current limiting switch to turn on the current limiting switch. If the operating voltage of all ICs on the mainboard cannot be obtained, it means that some ICs on the mainboard are not yet able to work normally. At this time, the control and computing unit may not send an enable signal to the current limiting switch first, and wait until the operating voltage of all ICs is obtained before sending an enable signal to turn on the current limiting switch.
[0051] In the embodiment of the present application, a control and operation unit and a voltage-dividing sampling circuit are installed on the mainboard, and the voltage-dividing sampling circuit collects the input voltage of the mainboard in real time and sends it to the control and operation unit; the control and operation unit compares the input voltage with the preset voltage, wherein the preset voltage includes a preset low-voltage threshold and a preset high-voltage threshold; if the input voltage is less than the preset low-voltage threshold, the control and operation unit sends a closing signal to the current limiting switch. In this way, the input voltage is detected in real time through the voltage-dividing sampling circuit and the control and operation unit to determine whether the power adapter has stopped providing DC power to the mainboard, so that when the power adapter stops providing DC power to the mainboard, even if the current limiting switch is turned on, the voltage of the peripheral port is prevented from flowing back to the mainboard.
[0052] Based on the same technical concept, the embodiment of the present application also provides a motherboard for preventing voltage backflow from peripheral ports, such as Figure 2 As shown, the main board is equipped with a control and computing unit 201 and a voltage-dividing sampling circuit 202:
[0053] The voltage-dividing sampling circuit 202 is used to collect the input voltage of the mainboard in real time and send it to the control and computing unit 201;
[0054] The control and calculation unit 201 is used to compare the input voltage with the preset voltage, wherein the preset voltage includes a preset low voltage threshold and a preset high voltage threshold; if the input voltage is less than the preset low voltage threshold, a shutdown signal is sent to the current limiting switch 203 to prevent the voltage of the peripheral port 204 from flowing back to the mainboard.
[0055] Optionally, the control and computing unit 201 is further used for:
[0056] If the input voltage is greater than the preset high voltage threshold, an on signal is sent 203 to the current limiting switch.
[0057] Optionally, the control and computing unit 201 is further used for:
[0058] Before the control and computing unit 201 sends an on signal to the current limiting switch 203 , the motherboard voltage is acquired. If the motherboard voltage is acquired, an on signal is sent to the current limiting switch 203 .
[0059] Optionally, the control and computing unit 201 includes: CPLD, MCU or FPGA.
[0060] Based on the same technical concept, the embodiment of the present application also provides a motherboard for preventing voltage backflow from peripheral ports, such as Figure 3 As shown, the mainboard 300 for preventing voltage backflow from a peripheral port includes a processor 301 and a memory 302 .
[0061] The memory 302 stores computer instructions;
[0062] The processor 301 executes the computer instructions stored in the memory 302, so that the processor executes the above-mentioned processing method for preventing the voltage backflow of the peripheral port.
[0063] The specific implementation process of the processor 301 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0064] Optionally, the mainboard 300 for preventing voltage backflow from a peripheral port further includes a communication component 303 . The processor 301 , the memory 302 and the communication component 303 may be connected via a bus 304 .
[0065] Based on the same technical concept, an embodiment of the present application also provides an electronic device, which includes the above-mentioned mainboard for preventing voltage backflow from the peripheral port, and also includes a CPU, a hard disk, a memory, etc.
[0066] It should be noted that the motherboard for preventing the voltage backflow of the peripheral port and the processing method for preventing the voltage backflow of the peripheral port provided in the above embodiments belong to the same concept. The processing method for preventing the voltage backflow of the peripheral port can be based on the above implementation of preventing the voltage backflow of the peripheral port, which will not be repeated here.
[0067] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for preventing voltage backflow at a peripheral port, characterized in that: The method is used to prevent voltage from flowing back to a mainboard, on which a control and operation unit and a voltage division sampling circuit are installed, and the method comprises the following steps: The voltage-dividing sampling circuit collects the input voltage of the mainboard in real time and sends it to the control and computing unit; The control and calculation unit compares the input voltage with the preset voltage, wherein the preset voltage includes a preset low voltage threshold and a preset high voltage threshold; If the input voltage is less than the preset low-voltage threshold, the control and calculation unit sends a shutdown signal to the current limiting switch to prevent the peripheral port voltage from flowing back to the mainboard.
2. The method according to claim 1, characterized in that The method further comprises: If the input voltage is greater than the preset high voltage threshold, the control and calculation unit sends an opening signal to the current limiting switch.
3. The method according to claim 2, characterized in that Before the control and calculation unit sends an opening signal to the current limiting switch, the method further includes: The control and calculation unit obtains the operating voltage of each IC of the mainboard, and if the operating voltage of all ICs is obtained, an opening signal is sent to the current limiting switch.
4. The method according to claim 1, characterized in that: The control and operation unit includes: CPLD, MCU or FPGA.
5. A motherboard for preventing voltage backflow from a peripheral port, characterized in that: The main board is equipped with a control and calculation unit and a voltage division sampling circuit: The voltage-dividing sampling circuit is used to collect the input voltage of the mainboard in real time and send it to the control and computing unit; The control and calculation unit is used to compare the input voltage with the preset voltage, wherein the preset voltage includes a preset low voltage threshold and a preset high voltage threshold; if the input voltage is less than the preset low voltage threshold, a shutdown signal is sent to the current limiting switch to prevent the peripheral port voltage from flowing back to the mainboard.
6. The mainboard according to claim 5, characterized in that: The control and computing unit is also used for: If the input voltage is greater than the preset high voltage threshold, an on signal is sent to the current limiting switch.
7. The mainboard according to claim 6, characterized in that: The control and computing unit is also used for: Before the control and operation unit sends an on signal to the current limiting switch, the operating voltage of each IC of the mainboard is obtained. If the operating voltage of all ICs is obtained, an on signal is sent to the current limiting switch.
8. The mainboard according to claim 5, characterized in that: The control and operation unit includes: CPLD, MCU or FPGA.
9. A motherboard for preventing voltage backflow from a peripheral port, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the network port automatic detection device implements the method according to any one of claims 1 to 4.
10. An electronic device, characterized in that: The electronic device comprises the mainboard as described in any one of claims 5-8.