Device plug-in detection and error reporting device and method
Through the combination of the first switching module, the control center, the second switching module, the insertion and current detection module and the insertion latch module, the problem of high power consumption for equipment plug-in detection and insufficient abnormal state recognition in the prior art is solved, and the extremely low power consumption device plug-in detection and overcurrent protection are realized.
Patent Information
- Application Number
- CN202510773966.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-06-11
AI Technical Summary
The existing equipment plug-in and unplugging detection schemes consume too much power, and cannot effectively distinguish abnormal states such as normal operation and overcurrent, making it difficult to meet the actual application needs.
The combination of the first switching module, the control center, the second switching module, the insertion and current detection module and the insertion latch module is adopted to realize the device plug-in and unplugging detection of extremely low power consumption, and the power supply is cut off during overcurrent.
It realizes extremely low-power device plug-in and unplugging detection, can identify the overcurrent state of the equipment and cut off the power supply, ensures the safety of power consumption of the equipment, is suitable for a variety of device terminals, and is versatile.
Smart Images

Figure CN120275868B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electronic product accessories, and in particular relates to a device plug-in detection and error reporting device and method. Background Art
[0002] Many mattresses and related devices currently feature multiple external device connectors to expand functionality and provide a better sleep experience. Similar to other electronic products that connect via plug-and-unplug, users want to know whether the external device is plugged in and whether the device is functioning properly.
[0003] Among the existing solutions for detecting device plugging and unplugging, Chinese patent application CN201310103685.8 discloses a hot-swap control device, which detects whether peripheral components are in a short-circuit state by detecting the detection voltage of a detection module, and then controls whether power is supplied to the peripheral components; Chinese patent application CN201110425367.4 discloses a plug-in detection device, which detects whether a device is inserted by periodically detecting the voltage of the plug-in interface.
[0004] The existing technology for detecting device plugging and unplugging consumes too much power, has a simple detection and control process, and cannot distinguish between normal operation and abnormal conditions such as overcurrent, making it difficult to meet the needs of actual applications. Summary of the Invention
[0005] In order to solve the common problems in the prior art, the present application proposes a device plug-in detection and error reporting device and method, which can realize the detection of device plug-in and unplugging with extremely low power consumption, and at the same time can identify and report the error status of device overcurrent and device unplugging.
[0006] The technical solutions adopted in this application are:
[0007] According to a first aspect, the present application provides a device plug-in detection and error reporting apparatus, comprising: a first switch module, a control center, a second switch module, an insertion and current detection module, and an insertion latch module;
[0008] The system power supply supplies power to the control center through the first switch module and supplies power to the device interface through the second switch module, and the control center is connected to the switch control terminal of the first switch module and the switch control terminal of the second switch module respectively;
[0009] The negative pole of the device interface is connected to the negative pole of the system power supply through the insertion and current detection module. The insertion and current detection module can be configured to switch between an insertion detection state and a current detection state. When in the insertion detection state, when a device is inserted into the device interface, an insertion detection signal can be output through the insertion detection signal terminal. When in the current detection state, a current detection signal can be output through the current detection signal terminal to reflect the current level of the device inserted into the device interface. The state switching control terminal of the insertion and current detection module is used to control the state of the insertion and current detection module. The initial state of the insertion and current detection module is the insertion detection state. The control center is connected to the state switching control terminal of the insertion and current detection module.
[0010] The insertion detection signal terminal of the insertion and current detection module is connected to the switch control terminal of the first switch module and the state switching control terminal of the insertion and current detection module through the insertion latch module;
[0011] The current detection signal terminal of the insertion and current detection module is connected to the control center;
[0012] The system power supply directly supplies power to the insertion latch module.
[0013] Optionally, the insertion and current detection module includes an NMOS tube Q5, a resistor R7, a resistor R1, a resistor R19, a capacitor C2, a diode D4 and a diode D5; the negative electrode of the device interface is connected to the negative electrode of the system power supply via the resistor R19 and the resistor R1 connected in series, the drain of the NMOS tube Q5 is connected to the negative electrode of the device interface as the insertion detection signal end of the insertion and current detection module, the drain and source of the NMOS tube Q5 are connected in parallel to the two ends of the resistor R19, the gate of the NMOS tube Q5 is connected to the cathode of the diode D4 and the cathode of the diode D5 and serves as the state switching control end of the insertion and current detection module, the source of the NMOS tube Q5 serves as the current detection signal end of the insertion and current detection module, the anode of the diode D4 is connected to the insertion and current detection state switching control end of the control center, and the anode of the diode D5 is connected to the signal output end of the insertion latch module; the resistor R7 is connected in parallel between the gate and source of the NMOS tube Q5, and the capacitor C2 is connected in parallel to the two ends of the resistor R1.
[0014] Optionally, the control center includes an MCU control unit and a communication unit, the MCU control unit is used to send and receive control-related signals with the first switch module, the second switch module, the insertion and current detection module and the insertion latch module; the communication unit is used to communicate data with the user end.
[0015] Optionally, an amplification module is further included, and the current detection signal end of the insertion and current detection module is filtered and amplified by the amplification module and then connected to the current signal receiving end of the control center.
[0016] Optionally, the insertion latch module includes a D trigger U3, the power supply end of the D trigger U3 is connected to the system power supply, the clock end of the D trigger U3 serves as the signal input end of the insertion latch module and is connected to the insertion detection signal end of the insertion and current detection module, the D signal end of the D trigger U3 is connected to the negative pole of the system power supply, and the reverse output end of the D trigger U3 serves as the signal output end of the insertion latch module and is respectively connected to the switch control end of the first switch module and the state switching control end of the insertion and current detection module.
[0017] Optionally, the first switch module includes a PMOS tube Q3, an NPN tube Q2, a resistor R4, a resistor R5, a resistor R6, a diode D2 and a diode D3; the source of the PMOS tube Q3 is connected to the system power supply, the drain of the PMOS tube Q3 is connected to the positive power supply terminal of the control center, the gate of the PMOS tube Q3 is connected to the collector of the NPN tube Q2, the resistor R6 is connected in parallel between the gate and source of the PMOS tube Q3, the emitter of the NPN tube Q2 is connected to the negative pole of the system power supply, the base of the NPN tube Q2 is connected to one end of the resistor R4, and the other end of the resistor R4 serves as the switch control end of the first switch module, which is respectively connected to the cathode of the diode D2 and the cathode of the diode D3, and is connected to the negative pole of the system power supply through the resistor R5. The anode of the diode D2 is connected to the first switch module control end of the control center, and the anode of the diode D3 is connected to the signal output end of the insertion latch module.
[0018] Optionally, the second switch module includes a PMOS tube Q4, a PNP tube Q6, an NPN tube Q1, a resistor R2, a resistor R3, a resistor R8, a resistor R18, a resistor R20 and a capacitor C8; the source of the PMOS tube Q4 is connected to the system power supply and the emitter of the PNP tube Q6, the drain of the PMOS tube Q4 is connected to the positive power supply end of the device interface, the gate of the PMOS tube Q4 is connected to the collector of the PNP tube Q6 and connected to the negative pole of the system power supply through the resistor R20, the resistor R8 and the capacitor C8 are connected in parallel between the source and drain of the PMOS tube Q4, the base of the PNP tube Q6 is connected to the collector of the NPN tube Q1, the resistor R18 is connected in parallel between the base and emitter of the PNP tube Q6, the emitter of the NPN tube Q1 is connected to the negative pole of the system power supply, the base of the NPN tube Q1 is connected to one end of the resistor R2, and the other end of the resistor R2 serves as the switch control end of the second switch module, is connected to the second switch module control end of the control center, and is connected to the negative pole of the system power supply through the resistor R3.
[0019] According to a second aspect, the present application provides a device plug-in detection and error reporting method, which is implemented using the device plug-in detection and error reporting apparatus of the first aspect, including:
[0020] In the initial state, the insertion and current detection module is configured to be in the insertion detection state;
[0021] When the device is inserted, the insertion and current detection module outputs an insertion detection signal, and the insertion latch module latches and converts the received insertion detection signal into an insertion signal;
[0022] After receiving the insertion signal, the first switch module is turned on to enable the system power supply to supply power to the control center. After receiving the insertion signal, the insertion and current detection module switches to the current detection state and transmits the current detection signal to the control center.
[0023] The control center controls the first switch module to be continuously turned on;
[0024] The control center controls the insertion and current detection module to maintain a current detection state;
[0025] The control center controls the insertion latch module to clear the output insertion signal.
[0026] Optionally, also include:
[0027] When the current detection signal received by the control center exceeds the overcurrent protection value, the control center controls the second switch module to turn off and stop supplying power to the device interface;
[0028] The control center reports an over-flow error message to the user.
[0029] Optionally, also include:
[0030] When the current detection signal received by the control center is lower than the minimum current value, the control center reports an error message indicating that the device is disconnected or unplugged to the user;
[0031] After a set waiting time, the control center controls the second switch module to be turned off to stop supplying power to the device interface, and controls the first switch module to be turned off to stop supplying power to itself.
[0032] The beneficial effects of the present invention are:
[0033] This application can shut off the power supply to the control center when no device is connected, and can realize device plug-in detection with extremely low power consumption; moreover, it can monitor the current of the inserted device and cut off the power supply to the device interface when the current is too large, thereby ensuring the safety of the device's power use.
[0034] In addition, the insertion and current detection module of the present application is arranged between the negative pole of the device interface and the negative pole of the system power supply. It is not limited to the terminals of the device and is suitable for a variety of device terminals, such as USBA, TYPEC, DC head or 01 head, etc. It only requires the device interface and terminal to have a positive pole and a negative pole of the power supply for detection. It does not require additional communication protocol identification, nor does it require the use of the terminal shell for judgment. It is universal. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a schematic structural diagram of an embodiment of a device plug-in detection and error reporting apparatus of the present invention;
[0036] Figure 2 This is the schematic diagram of the insertion and current detection module circuit;
[0037] Figure 3 It is the circuit schematic diagram of the insertion latch module;
[0038] Figure 4 is the circuit schematic diagram of the first switch module;
[0039] Figure 5 This is the circuit schematic diagram of the second switch module;
[0040] Figure 6 This is the schematic diagram of the amplifier module circuit;
[0041] Figure 7 It is a schematic diagram of the control center structure;
[0042] Figure 8 This is a flow chart of an embodiment of a device plug-in detection and error reporting method of the present invention;
[0043] Figure 9 This is a flow chart of another embodiment of a device plug-in detection and error reporting method of the present invention;
[0044] Figure 10 This is a flow chart of another embodiment of a device plug-in detection and error reporting method of the present invention.
[0045] In the picture:
[0046] 100-Equipment plug-in detection and error reporting device, 110-First switch module, 120-Control center, 121-MCU control unit, 122-Communication unit, 130-Second switch module, 140-Insert and current detection module, 150-Insert latch module, 160-Amplification module, 200-System power supply, 300-Device interface. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0048] The terms "first", "second" and "third" in this application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number or order of the indicated technical features. All directional indications in the embodiments of this application (such as up, down, left, right, front, back...) are only used to explain the relative position relationship or movement of the components in a certain specific posture (as shown in the accompanying drawings); it should be noted that when a component is referred to as "fixed to", "set to" or "connected to" another component, it can be directly on the other component or there can be a central component. When a component is considered to be "connected" to another component, it can be directly connected to the other component, or there can be one or more central components in between. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only and do not represent the only implementation method.
[0049] like Figures 1 to 7 As shown, in order to solve the common problems in the prior art, the present application proposes an embodiment of a device plug-in detection and error reporting device, which can realize the detection of device plug-in and unplugging with extremely low power consumption, and at the same time can identify and report the error status of device overcurrent and device unplugging.
[0050] See also Figure 1This application provides an embodiment of a device plug-in / out detection and error reporting device. The device plug-in / out detection and error reporting device 100 includes: a first switch module 110, a control center 120, a second switch module 130, an insertion and current detection module 140, and an insertion latch module 150. A system power supply 200 supplies power to the control center 120 via the first switch module 110 and to the device interface 300 via the second switch module 130. The control center 120 is connected to the switch control terminals of the first switch module 110 and the second switch module 130, respectively. The negative terminal of the device interface 300 is connected to the negative terminal of the system power supply 200 via the insertion and current detection module 140. The insertion and current detection module 140 can be configured to switch between an insertion detection state and a current detection state. When in the insertion detection state, the insertion detection signal terminal can output an insertion detection signal when a device is inserted into the device interface 300. When in the current detection state, the current detection signal terminal can output a current detection signal to reflect the current level of the device inserted into the device interface 300. The state switching control terminal of the insertion and current detection module 140 is used to control the state of the insertion and current detection module. The initial state of the insertion and current detection module 140 is the insertion detection state. The control center 120 is connected to the state switching control terminal of the insertion and current detection module 140. The insertion detection signal terminal of the insertion and current detection module 140 is connected to the switch control terminal of the first switch module 110 and the state switching control terminal of the insertion and current detection module 140 via the insertion latch module 150. The current detection signal terminal of the insertion and current detection module 140 is connected to the control center 120. The system power supply 200 directly supplies power to the plug-in latch module 150 .
[0051] It should be noted that system power supply 200 can be a 5V DC power supply or a DC power supply of other voltage levels. System power supply 200 can be directly provided by an external power source or generated by boosting or stepping down the voltage of the device's internal battery. Device interface 300 is an external terminal for inserting accessory devices to achieve expanded functionality.
[0052] The operating principle of this embodiment is as follows: in the initial state, the first switch module 110 is off, the system power supply 200 does not supply power to the control center 120, the second switch module 130 is on, the system power supply 200 supplies power to the device interface 300, the insertion and current detection module 140 is configured to be in the insertion detection state, and the insertion latch module 150 is directly powered by the system power supply 200. Because the insertion and current detection module 140 is disposed between the negative terminal of the device interface 300 and the negative terminal of the system power supply and is configured to be in the insertion detection state, when a device is inserted, the insertion and current detection module 140 can sense the voltage change at the negative terminal of the device interface 300 and then output an insertion detection signal through the insertion detection signal terminal. The insertion latch module 150 latches the received insertion detection signal and converts it into an insertion signal, which is transmitted to the switch control terminal of the first switch module 110 and the state switching control terminal of the insertion and current detection module 140, respectively.
[0053] The first switch module 110 turns on after receiving the insertion signal, allowing the system power supply 200 to supply power to the control center 120. The insertion and current detection module 140 switches to the current detection state after receiving the insertion signal and transmits the current detection signal to the control center 120 via the current detection signal terminal. The control center 120 only supplies power when a device is inserted, and then receives and monitors the current detection signal of the device inserted into the device interface 300. When it detects excessive current, it can control the second switch module 130 to turn off, cutting off the system power supply 200 from supplying power to the device interface 300 to protect the device's power safety. It can also control the first switch module 110 to turn off after it detects that there is no current in the device interface 300 for a period of time, cutting off the system power supply 200 from supplying power to the control center 120 to reduce power consumption.
[0054] This application can shut off the power supply to the control center when no device is connected, and can realize device plug-in detection with extremely low power consumption; moreover, it can monitor the current of the inserted device and cut off the power supply to the device interface when the current is too large, thereby ensuring the safety of the device's power use. In addition, the insertion and current detection module of this application is set between the negative pole of the device interface and the negative pole of the system power supply. It is not limited to the terminal of the device and is applicable to a variety of device terminals, such as USBA, TYPEC, DC head or 01 head, etc. It only needs the device interface and terminal to have a positive power pole and a negative power pole for detection. It does not require additional communication protocol identification, nor does it need to use the terminal shell to make judgments, and is universal.
[0055] In some embodiments, see Figure 2The insertion and current detection module 140 includes an NMOS transistor Q5, a resistor R7, a resistor R1, a resistor R19, a capacitor C2, a diode D4, and a diode D5; the cathode of the device interface 300 is connected to the negative electrode GND of the system power supply 200 via the resistor R19 and the resistor R1 connected in series, the drain of the NMOS transistor Q5 is connected to the negative electrode of the device interface 300 as the insertion detection signal terminal ISEN1 of the insertion and current detection module 140, the drain and source of the NMOS transistor Q5 are connected in parallel to the two ends of the resistor R19, and the gate of the NMOS transistor Q5 is connected The cathodes of diode D4 and diode D5 serve as a state switching control terminal of the insertion and current detection module 140. The source of the NMOS transistor Q5 serves as a current detection signal terminal ISEN2 of the insertion and current detection module 140. The anode of diode D4 is connected to the insertion and current detection state switching control terminal MCU_EN2 of the control center. The anode of diode D5 is connected to the signal output terminal USB0EN of the insertion latch module. Resistor R7 is connected in parallel between the gate and source of the NMOS transistor Q5. Capacitor C2 is connected in parallel across resistor R1.
[0056] When the device is first powered on, the anodes of diodes D4 and D5 are not receiving a high-level signal. The gate of NMOS transistor Q5 is pulled down to a low level by resistor R7, turning off NMOS transistor Q5. The insertion and current detection module 140 is in the insertion detection state. Resistors R1 and R19 are connected in series to the negative terminal of the device interface 300. Since an inserted device can always be equivalent to a combination of impedance, capacitance, and inductance, the inserted device, resistors R1, and R19 form a series voltage divider circuit. As long as resistors R1 and R19 have appropriate resistance values, for example, 20mR for resistor R1 and 1M for resistor R19, a voltage greater than 3.5V can be generated at the insertion detection signal terminal ISEN1 of the insertion and current detection module 140. That is, the voltage at the insertion detection signal terminal ISEN1 will rise from 0V to above 3.5V, thereby generating an insertion detection signal.
[0057] When the anode of diode D4 or diode D5 receives a high-level signal, NMOS transistor Q5 is turned on, resistor R19 is short-circuited, and the cathode of device interface 300 is connected to the cathode of system power supply 200 through resistor R1. The voltage across resistor R1, i.e., the voltage at current detection signal terminal ISEN2, can reflect the current of the device plugged into device interface 300, thereby generating a current detection signal.
[0058] Capacitor C2 is connected in parallel across resistor R1 to reduce signal interference.
[0059] In some embodiments, the insertion and current detection module 140 further includes an electrostatic protection diode D1 connected in parallel across the resistor R1 to protect the circuit from overvoltage surges, particularly electrostatic discharge events.
[0060] In some embodiments, see Figure 3 The insertion latch module includes a D flip-flop U3, a power supply terminal VCC of the D flip-flop U3 is connected to the positive electrode VCC-5VIN of the system power supply 200, a clock terminal CLK of the D flip-flop U3 is connected to the insertion detection signal terminal ISEN1 of the insertion and current detection module 140 as a signal input terminal of the insertion latch module 150, a D signal terminal D of the D flip-flop U3 is connected to the negative electrode GND of the system power supply 200, and a reverse output terminal Q# of the D flip-flop U3 is connected to the signal output terminal USB0EN of the insertion latch module 150, respectively, to the switch control terminal of the first switch module and the state switching control terminal of the insertion and current detection module.
[0061] The preset terminal PRE# and the clear terminal CLR# of the D flip-flop U3 are high by default, and the D signal terminal D is low by default. When the insertion detection signal terminal ISEN1 of the insertion and current detection module 140 generates an insertion detection signal, that is, a rising edge is input at the clock terminal CLK of the D flip-flop U3, the reverse output terminal Q# of the D flip-flop U3 switches from a low level state to a high level, that is, the signal output terminal USB0EN of the insertion latch module 150 is high, which can turn on the first switch module 110 and switch the insertion and current detection module 140 to the current detection state.
[0062] By controlling the preset terminal PRE# and the clear terminal CLR# of the D flip-flop U3 through the control center, the signal at the inverting output terminal Q# of the D flip-flop U3 can be cleared, even if the signal output terminal USB0EN of the inserted latch module 150 is at a low level. In a specific implementation, the signal at the inverting output terminal Q# of the D flip-flop U3 can be cleared by controlling the preset terminal PRE# of the D flip-flop U3 to a low level and the clear terminal CLR# to a high level through the control center.
[0063] In some embodiments, see Figure 4The first switch module 110 includes a PMOS transistor Q3, an NPN transistor Q2, a resistor R4, a resistor R5, a resistor R6, a diode D2, and a diode D3; the source of the PMOS transistor Q3 is connected to the positive electrode VCC-5VIN of the system power supply 200, the drain of the PMOS transistor Q3 is connected to the positive power supply VCC-5V of the control center 120, the gate of the PMOS transistor Q3 is connected to the collector of the NPN transistor Q2, the resistor R6 is connected in parallel between the gate and source of the PMOS transistor Q3, and the emitter of the NPN transistor Q2 is connected to the positive electrode VCC-5V of the control center 120. The base of the NPN transistor Q2 is connected to the negative electrode GND of the system power supply 200, the base of the NPN transistor Q2 is connected to one end of the resistor R4, the other end of the resistor R4 serves as the switch control end of the first switch module 110, is respectively connected to the cathode of the diode D2 and the cathode of the diode D3, and is connected to the negative electrode GND of the system power supply 200 via the resistor R5, the anode of the diode D2 is connected to the first switch module control terminal MCU_EN of the control center 120, and the anode of the diode D3 is connected to the signal output terminal USB0EN of the insertion latch module 150.
[0064] When the switch control terminal of the first switch module 110 is at a high level, that is, the first switch module control terminal MCU_EN of the control center 120 is at a high level or the signal output terminal USB0EN of the inserted latch module 150 is at a high level, the NPN tube Q2 is turned on, the gate of the PMOS tube Q3 is connected to the negative electrode of the system power supply 200, the PMOS tube Q3 is turned on, and the system power supply 200 can supply power to the control center 120.
[0065] When the switch control terminal of the first switch module 110 is at a low level, that is, the first switch module control terminal MCU_EN of the control center 120 is at a low level or the signal output terminal USB0EN of the insertion latch module 150 is at a low level, the NPN tube Q2 is turned off, the PMOS tube Q3 is also turned off, and the system power supply 200 cannot power the control center 120.
[0066] In some embodiments, see Figure 5The second switch module 130 includes a PMOS transistor Q4, a PNP transistor Q6, an NPN transistor Q1, a resistor R2, a resistor R3, a resistor R8, a resistor R18, a resistor R20, and a capacitor C8; the source of the PMOS transistor Q4 is connected to the positive electrode VCC-5VIN of the system power supply 200 and the emitter of the PNP transistor Q6, the drain of the PMOS transistor Q4 is connected to the positive power supply terminal VBUS0_5V of the device interface 300, the gate of the PMOS transistor Q4 is connected to the collector of the PNP transistor Q6 and is connected to the negative electrode GND of the system power supply 200 through the resistor R20, and the PMOS transistor Q4 is connected to the positive electrode VCC-5VIN of the system power supply 200. Resistor R8 and capacitor C8 are connected in parallel between the source and drain of transistor Q4. The base of PNP transistor Q6 is connected to the collector of NPN transistor Q1. Resistor R18 is connected in parallel between the base and emitter of PNP transistor Q6. The emitter of NPN transistor Q1 is connected to the negative electrode GND of system power supply 200. The base of NPN transistor Q1 is connected to one end of resistor R2. The other end of resistor R2 serves as the switch control terminal of second switch module 130, is connected to the second switch module control terminal USB_PWREN of control center 120, and is connected to the negative electrode GND of system power supply 200 via resistor R3.
[0067] When the second switch module control terminal USB_PWREN of the control center 120 is in high impedance state or low level, the NPN transistor Q1 is turned off, the PNP transistor Q6 is also turned off, the PMOS transistor Q4 is turned on, and the system power supply 200 supplies power to the device interface 300.
[0068] When the second switch module control terminal USB_PWREN of the control center 120 is at a high level, the NPN transistor Q1 is turned on, the PNP transistor Q6 is also turned on, the PMOS transistor Q4 is turned off, and the system power supply 200 cannot supply power to the device interface 300 .
[0069] In some embodiments, see Figure 6 , further comprising an amplifying module 160 , the current detection signal terminal ISEN2 of the insertion and current detection module 140 is filtered and amplified by the amplifying module 160 and then connected to the current signal receiving terminal ADC_M2 of the control center.
[0070] In some embodiments, see Figure 7 The control center 120 includes an MCU control unit 121 and a communication unit 122. The MCU control unit 121 is used to send and receive control-related signals with the first switch module 110, the second switch module 130, the insertion and current detection module 140 and the insertion latch module 150; the communication unit 122 is used to communicate data with the user end.
[0071] The communication unit 122 may be a WIFI or Bluetooth module.
[0072] In some embodiments, the communication unit 122 may be integrated with the MCU control unit 121 into one chip unit.
[0073] This application also provides an embodiment of a device plug-in detection and error reporting method, which is implemented using the above-mentioned device plug-in detection and error reporting device embodiment, see Figure 8 , including the following steps:
[0074] S00, in the initial state, the insertion and current detection module is configured to be in the insertion detection state;
[0075] S10, when the device is inserted, the insertion and current detection module outputs an insertion detection signal, and the insertion latch module latches the received insertion detection signal and converts it into an insertion signal;
[0076] S20, after receiving the insertion signal, the first switch module is turned on to enable the system power supply to supply power to the control center, and after receiving the insertion signal, the insertion and current detection module switches to the current detection state and transmits the current detection signal to the control center;
[0077] S30, the control center controls the first switch module to be continuously turned on;
[0078] S40, the control center controls the insertion and current detection module to maintain the current detection state;
[0079] S50: The control center controls the insertion latch module to clear the output insertion signal.
[0080] It should be noted that the control center controls the insertion latch module to clear the output insertion signal to prepare for the next device insertion detection.
[0081] In some embodiments, see Figure 9 , the device plug-in detection and error reporting method embodiment also includes the steps of:
[0082] S60, when the current detection signal received by the control center exceeds the overcurrent protection value, the control center controls the second switch module to turn off and stop supplying power to the device interface;
[0083] S70: The control center reports an overcurrent error message to the user.
[0084] In some embodiments, see Figure 10 , the device plug-in detection and error reporting method embodiment also includes the steps of:
[0085] S80, when the current detection signal received by the control center is lower than the minimum current value, the control center reports an error message indicating that the device is disconnected or unplugged to the user;
[0086] S90: After the set waiting time, the control center controls the second switch module to turn off, stops supplying power to the device interface, and controls the first switch module to turn off, stops supplying power to itself.
[0087] The present invention is not limited to the above-mentioned optional implementation modes. Anyone can derive other forms of products under the inspiration of the present invention. However, no matter what changes are made in the shape or structure, any technical solution that falls within the scope defined by the claims of the present invention falls within the scope of protection of the present invention.
Claims
1. A device plug-in detection and error reporting device, characterized in that: include: a first switch module, a control center, a second switch module, an insertion and current detection module, and an insertion latch module; The system power supply supplies power to the control center through the first switch module and supplies power to the device interface through the second switch module, and the control center is connected to the switch control terminal of the first switch module and the switch control terminal of the second switch module respectively; The negative pole of the device interface is connected to the negative pole of the system power supply through the insertion and current detection module. The insertion and current detection module can be configured to switch between an insertion detection state and a current detection state. When in the insertion detection state, when a device is inserted into the device interface, an insertion detection signal can be output through the insertion detection signal terminal. When in the current detection state, a current detection signal can be output through the current detection signal terminal to reflect the current level of the device inserted into the device interface. The state switching control terminal of the insertion and current detection module is used to control the state of the insertion and current detection module. The initial state of the insertion and current detection module is the insertion detection state. The control center is connected to the state switching control terminal of the insertion and current detection module. The insertion detection signal terminal of the insertion and current detection module is connected to the switch control terminal of the first switch module and the state switching control terminal of the insertion and current detection module through the insertion latch module; The current detection signal terminal of the insertion and current detection module is connected to the control center; The system power supply directly supplies power to the insertion latch module.
2. The device according to claim 1, wherein: The insertion and current detection module includes an NMOS transistor Q5, a resistor R7, a resistor R1, a resistor R19, a capacitor C2, a diode D4, and a diode D5. The cathode of the device interface is connected to the negative electrode of the system power supply via resistors R19 and R1 connected in series. The drain of the NMOS transistor Q5 is connected to the negative electrode of the device interface as an insertion detection signal terminal of the insertion and current detection module. The drain and source of the NMOS transistor Q5 are connected in parallel to both ends of the resistor R19. The gate of the NMOS transistor Q5 is connected to the cathode of the diode D4 and the cathode of the diode D5 and serves as the state switching control terminal of the insertion and current detection module. The source of the NMOS transistor Q5 serves as the current detection signal terminal of the insertion and current detection module. The anode of the diode D4 is connected to the insertion and current detection state switching control terminal of the control center. The anode of the diode D5 is connected to the signal output terminal of the insertion latch module. The resistor R7 is connected in parallel between the gate and source of the NMOS transistor Q5. The capacitor C2 is connected in parallel to both ends of the resistor R1.
3. The device plug-in detection and error reporting device according to claim 2, characterized in that: The control center includes an MCU control unit and a communication unit. The MCU control unit is used to send and receive control-related signals with the first switch module, the second switch module, the insertion and current detection module, and the insertion latch module; the communication unit is used to communicate data with the user end.
4. The device plug-in detection and error reporting device according to claim 2, characterized in that: It also includes an amplification module, and the current detection signal end of the insertion and current detection module is filtered and amplified by the amplification module and then connected to the current signal receiving end of the control center.
5. The device plug-in detection and error reporting device according to claim 1, characterized in that: The insertion latch module includes a D flip-flop U3, the power supply end of the D flip-flop U3 is connected to the positive pole of the system power supply, the clock end of the D flip-flop U3 serves as the signal input end of the insertion latch module and is connected to the insertion detection signal end of the insertion and current detection module, the D signal end of the D flip-flop U3 is connected to the negative pole of the system power supply, and the reverse output end of the D flip-flop U3 serves as the signal output end of the insertion latch module and is respectively connected to the switch control end of the first switch module and the state switching control end of the insertion and current detection module.
6. The device according to claim 1, wherein: The first switch module includes a PMOS transistor Q3, an NPN transistor Q2, a resistor R4, a resistor R5, a resistor R6, a diode D2, and a diode D3; the source of the PMOS transistor Q3 is connected to the positive electrode of the system power supply, the drain of the PMOS transistor Q3 is connected to the positive power supply terminal of the control center, the gate of the PMOS transistor Q3 is connected to the collector of the NPN transistor Q2, the resistor R6 is connected in parallel between the gate and source of the PMOS transistor Q3, the emitter of the NPN transistor Q2 is connected to the negative electrode of the system power supply, the base of the NPN transistor Q2 is connected to one end of the resistor R4, and the other end of the resistor R4 serves as the switch control end of the first switch module, which is respectively connected to the cathode of the diode D2 and the cathode of the diode D3, and is connected to the negative electrode of the system power supply via the resistor R5. The anode of the diode D2 is connected to the first switch module control end of the control center, and the anode of the diode D3 is connected to the signal output end of the insertion latch module.
7. The device plug-in detection and error reporting apparatus according to claim 1, characterized in that: The second switch module includes a PMOS transistor Q4, a PNP transistor Q6, an NPN transistor Q1, a resistor R2, a resistor R3, a resistor R8, a resistor R18, a resistor R20 and a capacitor C8; the source of the PMOS transistor Q4 is connected to the positive terminal of the system power supply and the emitter of the PNP transistor Q6, the drain of the PMOS transistor Q4 is connected to the positive power supply terminal of the device interface, the gate of the PMOS transistor Q4 is connected to the collector of the PNP transistor Q6 and connected to the negative terminal of the system power supply via the resistor R20, the resistor R8 and the capacitor C8 are connected in parallel between the source and drain of the PMOS transistor Q4, the base of the PNP transistor Q6 is connected to the collector of the NPN transistor Q1, the resistor R18 is connected in parallel between the base and emitter of the PNP transistor Q6, the emitter of the NPN transistor Q1 is connected to the negative terminal of the system power supply, the base of the NPN transistor Q1 is connected to one end of the resistor R2, and the other end of the resistor R2 serves as the switch control end of the second switch module, is connected to the second switch module control end of the control center, and is connected to the negative terminal of the system power supply via the resistor R3.
8. A device plug-in detection and error reporting method, implemented using a device plug-in detection and error reporting apparatus according to any one of claims 1 to 7, characterized in that: include: In the initial state, the insertion and current detection module is configured to be in the insertion detection state; When the device is inserted, the insertion and current detection module outputs an insertion detection signal, and the insertion latch module latches and converts the received insertion detection signal into an insertion signal; After receiving the insertion signal, the first switch module is turned on to enable the system power supply to supply power to the control center. After receiving the insertion signal, the insertion and current detection module switches to the current detection state and transmits the current detection signal to the control center. The control center controls the first switch module to be continuously turned on; The control center controls the insertion and current detection module to maintain a current detection state; The control center controls the insertion latch module to clear the output insertion signal.
9. A device plug-in detection and error reporting method according to claim 8, characterized in that: Also includes: When the current detection signal received by the control center exceeds the overcurrent protection value, the control center controls the second switch module to turn off and stop supplying power to the device interface; The control center reports an over-flow error message to the user.
10. The device plug-in detection and error reporting method according to claim 8, characterized in that: Also includes: When the current detection signal received by the control center is lower than the minimum current value, the control center reports an error message indicating that the device is disconnected or unplugged to the user; After a set waiting time, the control center controls the second switch module to turn off and stop supplying power to the device interface, and controls the first switch module to turn off and stop supplying power to itself.
Citation Information
Patent Citations
Plug detection device
CN102445624A
Hot plug control device
CN104077259A
Electrical load monitoring system and monitoring method
CN119696166A
Plug status detection circuit, controller, and vehicle
US20220214408A1