Insertion detection device and terminal device
By using a switching unit in the SATA interface to achieve functional multiplexing of the detection pins, the problem of signal return path detour during insertion detection is solved, ensuring power integrity and the accuracy of insertion detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- MAXIO TECHNOLOGY (HANGZHOU) CO LTD
- Filing Date
- 2025-06-12
- Publication Date
- 2026-06-19
AI Technical Summary
In the hard drive insertion detection process of the SATA interface, the existing technology uses the GND pin for insertion detection, which causes the return path of the transmission signal to be detoured, affecting power integrity.
A switching unit is used to realize the function multiplexing of the detection pin. When the switching unit is in the first state, the detection pin is connected to the insertion detection unit for insertion detection. When the switching unit is in the second state, the detection pin is grounded to avoid the return path of the transmission signal being detoured.
By multiplexing the functions of the detection pins, the power integrity of the transmitted signal is ensured, the return path is avoided, and the accuracy of insertion detection and the stability of the power supply are improved.
Smart Images

Figure CN224383688U_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of circuits, specifically relating to an insertion detection device and terminal equipment. Background Technology
[0002] The SATA (Serial Advanced Technology Attachment) interface has advantages such as high transmission speed and hot-swappability. SATA interface hard drives are widely used as mainstream storage devices in terminal devices that use hard drives, such as computers and servers. In order to realize the hot-swappable function of the SATA interface, the terminal device needs to detect whether the SATA interface hard drive is plugged into the terminal device.
[0003] In related technologies, terminal devices can use a GND (Ground) pin on the SATA interface as a detection pin to detect whether a hard drive connected to the SATA interface is inserted into the terminal device. However, in scenarios where the GND pin of the terminal device is used for insertion detection, when a hard drive is connected to the terminal device, even if this GND pin is connected to the GND of the hard drive, the signal return path from the terminal device to this GND will go from the terminal device to the hard drive and then back to the terminal device. This causes the return path of the transmission signal referencing this GND in the terminal device to be detoured, increasing the loop area and affecting the power integrity of the transmission signal. Utility Model Content
[0004] This application provides an insertion detection device and a terminal device that can reuse the function of the detection pin by using a switching unit. When the switching unit is in a first state, the insertion detection function is realized by using the detection pin; when the switching unit is in a second state, the detection pin is used to realize its original grounding function, avoiding the detour of the return path of the transmission signal referencing the GND of this detection pin, and ensuring the power integrity of the transmission signal.
[0005] In a first aspect, embodiments of this application provide an insertion detection device, including: an interface module and a signal detection module;
[0006] The interface module includes a detection pin, and the signal detection module includes a switching unit and an insertion detection unit; the detection pin is connected to a first end of the switching unit, the second end of the switching unit is connected to the insertion detection unit, and the third end of the switching unit is grounded;
[0007] In the first state, the detection pin is connected to the insertion detection unit; in the second state, the detection pin is grounded.
[0008] Secondly, embodiments of this application provide a terminal device, including: the insertion detection device described in the first aspect.
[0009] In this embodiment, the insertion detection device includes an interface module and a signal detection module. The interface module includes a detection pin, and the signal detection module includes a switching unit and an insertion detection unit. The detection pin is connected to a first end of the switching unit, a second end of the switching unit is connected to the insertion detection unit, and a third end of the switching unit is grounded. In the first state, the detection pin is connected to the insertion detection unit; in the second state, the detection pin is grounded. This multiplexing of the detection pin's function is achieved using the switching unit. In the first state, the detection pin is connected to the insertion detection unit, thus enabling insertion detection. In the second state, the detection pin is grounded, fulfilling its original grounding function. This avoids detours in the return path of the transmission signal referencing the GND of this detection pin, ensuring the power integrity of the transmitted signal. Attached Figure Description
[0010] Figure 1 Schematic structural diagram of an insertion detection device provided for some embodiments of this application;
[0011] Figure 2 A schematic diagram illustrating the power supply GND connection relationship between the data cable of the hard drive end and the terminal device end, provided for related technologies;
[0012] Figure 3 A schematic diagram illustrating another power supply GND connection relationship between the hard disk end and the terminal device end data line, provided for some embodiments of this application;
[0013] Figure 4 Schematic structural diagram of an insertion detection device provided for some embodiments of this application;
[0014] Figure 5 Schematic structural diagram of an insertion detection device provided for some embodiments of this application;
[0015] Figure 6 Schematic structural diagram of an insertion detection device provided for some embodiments of this application;
[0016] Figure 7 Schematic structural diagram of an insertion detection device provided for some embodiments of this application;
[0017] Figure 8 A schematic structural diagram of a terminal device provided in some embodiments of this application.
[0018] Explanation of reference numerals in the attached figures:
[0019] 10 - Insertion detection device; 100 - Interface module; 110 - Detection pin; 111 - First detection pin; 112 - Second detection pin; 200 - Signal detection module; 210 - Switching unit; 211 - First switching switch; 212 - Second switching switch; SW1 - First relay; SW2 - Second relay; 220 - Insertion detection unit; Q1 - First transistor; Q2 - Second transistor; R1 - First resistor; R2 - Second resistor; R3 - Third resistor; M1 - First control switch; M2 - Second control switch; Vcc - First voltage terminal; Vdd - Second voltage terminal; D1 - First diode; D2 - Second diode; GPIO signal - Insertion detection signal; 300 - Controller module; 310 - Filter circuit; 400 - Power supply module; 800 - Terminal device. Detailed Implementation
[0020] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0021] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0022] In the description of this application, it should be understood that the terms "inner" and "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.
[0023] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "connection" and "coupled" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0024] The terminology used in the implementation section of this application is for the purpose of explaining specific embodiments of this application only, and is not intended to limit this application.
[0025] The terminology used in the embodiments of this application will be explained below.
[0026] Hot-swapping refers to the ability to directly insert or remove hardware components (such as hard drives, USB devices, power modules, etc.) from an electronic device or system while it is in normal (powered) operation, without shutting down the device or interrupting system operation. This technology is protected by specific circuit designs and protocols to ensure that insertion and removal operations do not lead to device damage, data loss, or system crashes.
[0027] A relay is an electronic switch that controls the on / off state of a circuit through electromagnetic effects. Its core structure includes a coil, armature, contacts, and a spring. When a control current passes through the coil, a magnetic field is generated. This magnetic field attracts the armature, causing the contacts to move. After the coil is de-energized, the spring pushes the armature back to its original position, and the contacts return to their initial state. As an "automatic switch" in a circuit, the relay uses electromagnetic principles to achieve flexible control of both strong and weak currents, and is used in safety isolation, signal amplification, and equipment protection.
[0028] Return Path: The return path, together with the signal transmission line, forms a complete current loop, ensuring signal integrity, power integrity, and electromagnetic compatibility. The transmission of any signal requires current to originate from the source, travel through the signal transmission line to the load, and then return to the source via the return path, forming a closed loop. Without a return path, current cannot flow. The return path is the closed path through which current returns from the load to the source, forming a complete current loop together with the signal transmission line. The return path is the necessary path for current to return to the source. For low-frequency signals (such as DC or low-speed signals), the current chooses the path of least resistance (such as the shortest path in the ground plane); for high-frequency signals (such as high-speed signals), the current chooses the path of least inductive reactance (i.e., the reference plane immediately below the signal line). High-frequency current flows on the surface of the conductor (skin effect), causing the return path to concentrate in the reference plane region directly below the signal line.
[0029] Loop area: The smaller the physical distance between the return path of a high-frequency signal and the signal transmission line, the smaller the current loop area and the lower the radiated noise (EMI). If the signal transmission line crosses a ground plane split, the return path is forced to detour, increasing the loop area, and the impedance abrupt change leads to reflection and ringing.
[0030] The insertion detection device and terminal equipment provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0031] Figure 1 This is a schematic structural diagram of an insertion detection device provided in an embodiment of this application.
[0032] like Figure 1 As shown, the insertion detection device 10 provided in this application embodiment is applied to a terminal device. The insertion detection device 10 may include: an interface module 100 and a signal detection module 200.
[0033] The interface module 100 includes a detection pin 110, and the signal detection module 200 includes a switching unit 210 and an insertion detection unit 220; the detection pin 110 is connected to the first end of the switching unit 210, the second end of the switching unit 210 is connected to the insertion detection unit 220, and the third end of the switching unit 210 is grounded.
[0034] Specifically, when the switching unit 210 is in the first state, the detection pin 110 is connected to the insertion detection unit 220; when the switching unit 210 is in the second state, the detection pin 110 is grounded.
[0035] The interface module 100 may include multiple pins, and the detection pin 110 may include at least one GND pin, which is a pin dedicated to grounding. In this embodiment, at least one GND pin in the interface module 100 may be used as the detection pin 110, and the insertion detection function may be implemented using the detection pin 110 and the insertion detection unit 220.
[0036] The switching unit 210 can be a unit with a switching function, which can connect the detection pin 110 to the insertion detection unit 220, or switch the detection pin 110 to ground. In this way, after implementing the insertion detection function using the detection pin 110 and the insertion detection unit 220, the switching unit 210 can also be used to ground the detection pin 110, so that the detection pin 110 can perform its original grounding function.
[0037] It should be noted that, in order to achieve the hot-swapping function of the SATA interface, existing solutions can use a GND pin on the SATA interface as a detection pin to detect whether the SATA hard drive is plugged into the terminal device. However, as... Figure 2As shown, in the related technology, a GND pin on the SATA interface of the terminal device is connected to the insertion detection circuit as a detection pin. The insertion detection is performed using the GND pin that should originally be used to connect to the GND plane. When a hard drive is connected to the terminal device, even if this GND pin is connected to the GND of the hard drive, the signal return path of the terminal device that references this GND will go from the terminal device to the hard drive and then back to the terminal device. This causes the return path of the transmission signal that references this GND in the terminal device to be detoured, affecting the power integrity of the transmission signal.
[0038] Based on this, the insertion detection device provided in this application embodiment is provided with a switching unit, which can be used to multiplex the function of the detection pin 110. When the switching unit is in the first state, the detection pin is connected to the insertion detection unit, and the insertion detection function of the interface module is realized by the detection pin. After the hard disk interface is detected to be inserted into the terminal device, the switching unit can be in the second state. When the switching unit is in the second state, the detection pin is grounded, and the detection pin realizes its original grounding function, avoiding the detour of the return path of the transmission signal referencing the GND of this detection pin, and ensuring the power integrity of the transmission signal.
[0039] For example, when the switching unit 210 is in the first state, the detection pin 110 is connected to the insertion detection unit 220, and the insertion detection function is realized using the detection pin 110 and the insertion detection unit 220. However, when it is detected that the hard disk interface has been inserted into the interface module 100, this embodiment can switch the switching unit 210 from the first state to the second state, so that the detection pin 110 is directly connected to the reference ground of the terminal device, thus realizing its original grounding function. In this case, such as Figure 3 As shown, in the scenario where the insertion detection device 10 is installed in the terminal device and the hard disk has been inserted into the interface module 100, the GND pin of the terminal device is connected to the GND reference level of the terminal device. Each GND pin serves to connect the hard disk end and the GND plane of the terminal device end. The detection pin 110 can realize the original grounding function. When the hard disk has been inserted into the interface module, the GND referenced by the data signal and the power signal is complete and the path is the shortest. To a certain extent, this ensures the integrity of the transmission signal and power of the interface module, avoids the return path of the transmission signal referencing the GND of this detection pin from being detoured, and ensures the power integrity of the transmission signal.
[0040] Thus, in the insertion detection device 10 provided in this application embodiment, the function of the detection pin is multiplexed by the switching unit. When the switching unit is in the first state, the detection pin is connected to the insertion detection unit, and the insertion detection function is realized by the detection pin. When the switching unit is in the second state, the detection pin is grounded, and its original grounding function is realized by the detection pin. This avoids the return path of the transmission signal referencing the GND of this detection pin from being detoured, and ensures the power integrity of the transmission signal.
[0041] In some embodiments of this application, such as Figure 4 As shown, in order to switch the detection pin 110 to ground in a timely manner when the interface is detected to be inserted, the insertion detection device 10 provided in this application embodiment may further include a controller module 300, the insertion detection unit 220 is connected to the controller module 300, and the controller module 300 is connected to the fourth terminal of the switching unit 210.
[0042] When initializing the insertion detection device 10, the switching unit 210 can be in the first state, and the detection pin 110 is connected to the insertion detection unit 220. The insertion detection unit 220 is used to identify the insertion detection signal using the detection pin 110 and transmit the insertion detection signal to the controller module 300.
[0043] The controller module 300 is used to generate a switching control signal when it receives an insertion detection signal, and transmit the switching control signal to the fourth terminal of the switching unit 210.
[0044] The switching unit 210 is used to switch from the first state to the second state when a switching control signal is received, so that the detection pin 110 is directly grounded. In this way, the detection pin realizes its original grounding function, avoids the return path of the transmission signal referencing the GND of this detection pin from being detoured, and ensures the power integrity of the transmission signal.
[0045] Thus, by setting a controller module 300 in the insertion detection device 10 provided in this application embodiment, when the hard disk interface is detected to be inserted into the interface module 100, the controller module 300 controls the switching unit 210 to switch from the first state to the second state, so that the detection pin 110 is directly grounded. In this way, when the interface is detected to be inserted, the detection pin 110 is grounded in time, so that the detection pin 110 realizes its original grounding function, avoiding the detour of the return path of the transmission signal referencing the GND of this detection pin, and ensuring the power integrity of the transmission signal.
[0046] In some embodiments of this application, the interface module 100 has a large number of pins, making the interface module 100 elongated. In order to avoid misjudgment caused by the hard drive being tilted during connection (the hard drive may not actually be fully connected), embodiments of this application can use two GND pins with a large distance between them in the interface module 100 as detection pins 110.
[0047] like Figure 5 As shown, the detection pin 110 may include a first detection pin 111 and a second detection pin 112; the switching unit 210 includes a first switching switch 211 and a second switching switch 212.
[0048] The first detection pin 111 is connected to the first end of the first switch 211, the second end of the first switch 211 is connected to the insertion detection unit 220, the third end of the first switch 211 is grounded, and the controller module 300 is connected to the fourth end of the first switch 211.
[0049] The second detection pin 112 is connected to the first end of the second switch 212, the second end of the second switch 212 is connected to the insertion detection unit 220, the third end of the second switch 212 is grounded, and the controller module 300 is connected to the fourth end of the second switch 212.
[0050] In the interface module 100, the distance between the first detection pin 111 and the second detection pin 112 is greater than a threshold.
[0051] The switching unit 210 includes a first switching switch 211 and a second switching switch 212. When the switching unit 210 is in a first state, the first switching switch 211 and the second switching switch 212 are in the first state; when the switching unit 210 is in a second state, the first switching switch 211 and the second switching switch 212 are in the second state.
[0052] Specifically, when the first switch 211 is in the first state, the first detection pin 111 is connected to the insertion detection unit 220; when the first switch 211 is in the second state, the first detection pin 111 is grounded.
[0053] Specifically, when the second switch 212 is in the first state, the second detection pin 112 is connected to the insertion detection unit 220; when the second switch 212 is in the second state, the second detection pin 112 is grounded.
[0054] When the first switch 211 and the second switch 212 are in the first state, the insertion detection unit 220 is used to generate an insertion detection signal when both the first detection pin 111 and the second detection pin 112 are inserted; wherein, the insertion detection signal is used to reflect that the hard disk has been inserted into the interface module.
[0055] The controller module 300 generates a switching control signal upon receiving an insertion detection signal, and controls the first switching switch 211 and the second switching switch 212 to switch to the second state via the switching control signal. When the first switching switch 211 and the second switching switch 212 are in the second state, both the first detection pin 111 and the second detection pin 112 are grounded, which avoids the return path of the transmission signal referencing the GND of the first detection pin 111 and the second detection pin 112 from being detoured, thus ensuring the power integrity of the transmission signal.
[0056] In this way, when the insertion detection function is implemented using the first detection pin 111 and the second detection pin 112, it is determined that the hard disk has been inserted into the interface module when both the first detection pin 111 and the second detection pin 112 are inserted. Since the distance between the first detection pin 111 and the second detection pin 112 is large, the misjudgment problem caused by the hard disk being inserted at an angle (the hard disk may not actually be fully inserted) can be avoided.
[0057] For example, refer to Figure 6 Taking interface module 100 as a SATA hard drive interface module as an example, the SATA hard drive interface module may include a data interface and a power interface. In this case, the SATA hard drive interface module includes 22 pins, of which the data interface includes 7 pins and the power interface includes 15 pins. Alternatively, in other embodiments, the SATA hard drive interface module may include a data interface, and the power signal is supplied separately by a separate power interface. In this case, the SATA hard drive interface module includes 7 pins, all of which belong to the data interface. The pin definitions of the 22-pin SATA hard drive interface module are shown in Table 1 below:
[0058]
[0059] Table 1
[0060] In the case where the SATA hard drive interface module includes a data interface and a power interface, the first detection pin 111 is the first reference ground pin within the data interface, and the second detection pin 112 is the second reference ground pin within the power interface. The distance L between the first reference ground pin and the second reference ground pin is greater than a first threshold value.
[0061] For example, there can be more than 15 pins between the first reference ground pin and the second reference ground pin. For example, the first reference ground pin is PIN1 and the second reference ground pin is PIN17; or the first reference ground pin is PIN1 and the second reference ground pin is PIN19; or the first reference ground pin is PIN4 and the second reference ground pin is PIN19.
[0062] Alternatively, there may be a gap of more than 10 pins between the first reference ground pin and the second reference ground pin. For example, the first reference ground pin may be PIN4 and the second reference ground pin may be PIN17; or the first reference ground pin may be PIN4 and the second reference ground pin may be PIN19; or the first reference ground pin may be PIN7 and the second reference ground pin may be PIN19; and so on. This application does not limit the specific pin numbers of the first detection pin 111 and the second detection pin 112.
[0063] In the case where the SATA hard drive interface module includes a data interface, the first detection pin 111 is the third reference ground pin within the data interface, and the second detection pin 112 is the fourth reference ground pin within the data interface. The distance between the third and fourth reference ground pins is greater than a second threshold.
[0064] For example, there can be a gap of more than three pins between the third reference ground pin and the fourth reference ground pin. For example, the third reference ground pin is PIN1 and the fourth reference ground pin is PIN4; or the third reference ground pin is PIN4 and the fourth reference ground pin is PIN7; or the third reference ground pin is PIN1 and the fourth reference ground pin is PIN7; and so on. This application does not limit the specific pin numbers of the first detection pin 111 and the second detection pin 112.
[0065] It should be noted that a larger distance between the first detection pin 111 and the second detection pin 112 can better avoid misjudgment problems caused by the hard drive being tilted during connection (the hard drive may not actually be fully connected). For example, when the SATA hard drive interface module includes both a data interface and a power interface, the first detection pin 111 is PIN1 and the second detection pin 112 is PIN19; when the SATA hard drive interface module includes only a data interface, the first detection pin 111 is PIN1 and the second detection pin 112 is PIN7.
[0066] In this way, when the insertion detection function is implemented using the first detection pin 111 and the second detection pin 112, it is determined that the SATA hard drive has been inserted into the interface module when both the first detection pin 111 and the second detection pin 112 are inserted. Since the distance between the first detection pin 111 and the second detection pin 112 is large, the misjudgment problem caused by the hard drive being inserted at an angle (the hard drive may not actually be fully inserted) can be avoided.
[0067] In some embodiments of this application, when the switching unit 210 includes a first switching switch 211 and a second switching switch 212, the first switching switch 211 may be a single switch or a combination of multiple switches, and the second switching switch 212 may be a single switch or a combination of multiple switches. The embodiments of this application do not impose specific restrictions on the switch types of the first switching switch 211 and the second switching switch 212.
[0068] For example, to ensure safe and reliable switching, the first switching switch 211 and the second switching switch 212 can be relays. The relay can include a moving contact, a first stationary contact, a second stationary contact, and a coil. The first stationary contact can be a normally closed contact, and when the coil is not energized, the moving contact is connected to the first stationary contact. The second stationary contact can be a normally open contact, and when the coil is energized, the moving contact is connected to the second stationary contact.
[0069] like Figure 6 As shown, the first switching switch 211 is the first relay SW1, the first detection pin 111 is connected to the moving contact of the first relay SW1, the first stationary contact of the first relay SW1 is connected to the insertion detection unit 220, the second stationary contact of the first relay SW1 is grounded, and the controller module 300 is coupled to the coil of the first relay SW1.
[0070] The second switch 212 is the second relay SW2. The second detection pin 112 is connected to the moving contact of the second relay SW2. The first stationary contact of the second relay SW2 is connected to the insertion detection unit 220. The second stationary contact of the second relay SW2 is grounded. The controller module 300 is coupled to the coil of the second relay SW2.
[0071] In the first state, when the first relay SW1 is in the first state, the coil of the first relay SW1 is not energized, the moving contact of the first relay SW1 is connected to the first stationary contact, and the first detection pin 111 is connected to the insertion detection unit 220. In the first state, when the second relay SW2 is in the second state, the coil of the second relay SW2 is not energized, the moving contact of the second relay SW2 is connected to the first stationary contact, and the second detection pin 112 is connected to the insertion detection unit 220. The insertion detection unit 220 is used to generate an insertion detection signal when both the first detection pin 111 and the second detection pin 112 are inserted. The insertion detection signal is used to reflect that the hard disk has been inserted into the interface module.
[0072] The controller module 300 generates a switching control signal upon receiving an insertion detection signal, and controls the coils of the first relay SW1 and the second relay SW2 to be energized via the switching control signal. When the coils of the first relay SW1 and the second relay SW2 are energized, the moving contact of the first relay SW1 is connected to the second stationary contact, and the moving contact of the second relay SW2 is connected to the second stationary contact. Both the first detection pin 111 and the second detection pin 112 are grounded, preventing the return path of the transmission signal referencing the GND of the first detection pin 111 and the second detection pin 112 from being bypassed, thus ensuring the power integrity of the transmission signal.
[0073] To control the energization of the coils of the first relay SW1 and the second relay SW2, such as Figure 6 As shown, the signal detection module 200 may also include a first control switch M1 and a second control switch M2;
[0074] The first terminal of the first control switch M1 is connected to the controller module 300, the second terminal of the first control switch M1 is connected to one end of the coil of the first relay SW1, the third terminal of the first control switch M1 is grounded, and the other end of the coil of the first relay SW1 is connected to the first voltage terminal Vcc.
[0075] The first terminal of the second control switch M2 is connected to the controller module 300, the second terminal of the second control switch M2 is connected to one end of the coil of the second relay SW2, the third terminal of the second control switch M2 is grounded, and the other end of the coil of the second relay SW2 is connected to the first voltage terminal Vcc.
[0076] In this embodiment, the first control switch M1 is used to energize the coil of the first relay SW1, and the second control switch M2 is used to energize the coil of the second relay SW2. The first control switch M1 and the second control switch M2 can be MOSFETs or other types of switches, and this application does not limit the specific types of the first control switch M1 and the second control switch M2.
[0077] The controller module 300 generates a switching control signal upon receiving an insertion detection signal, and controls the first control switch M1 and the second control switch M2 to turn on, thereby energizing the coils of the first relay SW1 and the second relay SW2. With the coils of the first relay SW1 and the second relay SW2 energized, the moving contact of the first relay SW1 is connected to the second stationary contact, and the moving contact of the second relay SW2 is connected to the second stationary contact. Both the first detection pin 111 and the second detection pin 112 are grounded.
[0078] In some embodiments of this application, such as Figure 6As shown, in the insertion detection device 10 provided in this application embodiment, the signal detection module 200 may further include a first diode D1 and a second diode D2; the first diode D1 is connected in parallel with the coil of the first relay SW1; and the second diode D2 is connected in parallel with the coil of the second relay SW2.
[0079] Since the coil of the first relay SW1 is an inductive load, when the drive current is disconnected, the coil may generate a reverse electromotive force. The diode has a discharge function. The first diode D1, which is connected in parallel with the coil of the first relay SW1, is used to suppress the reverse electromotive force generated when the coil of the first relay SW1 is de-energized, protect the first control switch M1, and prevent the first control switch M1 from being broken down by high voltage.
[0080] Similarly, the second diode D2, connected in parallel with the coil of the second relay SW2, is used to suppress the reverse electromotive force generated when the coil of the second relay SW2 is de-energized, protect the second control switch M2, and prevent the second control switch M2 from being broken down by high voltage.
[0081] In some embodiments of this application, the insertion detection signal can be the GPIO signal output by the insertion detection unit 220. When the GPIO signal changes, it can be determined that the hard drive has been inserted into the interface module. To further improve the accuracy of the insertion detection signal, a filtering process can be added inside the controller module 300. When the controller module 300 detects a change in the GPIO signal, it does not immediately determine that the hard drive has been connected. Instead, it continuously monitors the GPIO signal. When a certain time t is reached and the GPIO signal no longer changes, the controller module 300 determines that the hard drive has been connected.
[0082] like Figure 6 As shown, in the insertion detection device 10 provided in this application embodiment, the controller module 300 may include a filter circuit 310, and the insertion detection unit 220 is connected to the filter circuit 310.
[0083] The filter circuit 310 is used to determine that the hard disk has been inserted into the interface module when the level of the insertion detection signal is at the first level for a continuous period of time.
[0084] In this way, by delaying the insertion detection signal through the filter circuit 310, the accuracy of insertion detection can be guaranteed, and the problem of misjudgment caused by electromagnetic interference signals can be avoided.
[0085] In some embodiments of this application, such as Figure 6 As shown, in the insertion detection device 10 provided in this application embodiment, the insertion detection unit 220 may include a first transistor Q1, a second transistor Q2, a first resistor R1, a second resistor R2 and a third resistor R3;
[0086] The base of the first transistor Q1 is connected to the second terminal of the first switching switch 211, the collector of the first transistor Q1 is connected to the controller module 300, the emitter of the first transistor Q1 is connected to the collector of the second transistor Q2, the base of the second transistor Q2 is connected to the second terminal of the second switching switch 212, and the emitter of the second transistor Q2 is grounded.
[0087] One end of the first resistor R1 is connected to the second voltage terminal Vdd, and the other end of the first resistor R1 is connected to the base of the first transistor Q1; one end of the second resistor R2 is connected to the second voltage terminal Vdd, and the other end of the second resistor R2 is connected to the base of the second transistor Q2; one end of the third resistor R3 is connected to the second voltage terminal Vdd, and the other end of the third resistor R3 is connected to the collector of the first transistor Q1.
[0088] In this embodiment, the first transistor Q1 and the second transistor Q2 can be NPN transistors. Of course, in other embodiments, the first transistor Q1 and the second transistor Q2 can also be other types of transistors, and this application does not limit them.
[0089] The insertion detection unit 220 is used for insert detection of SATA hard drives. (See below.) Figure 6 As shown, the first detection pin 111 and the second detection pin 112 are not connected to the reference ground in the initial state. The first stationary contact (normally closed contact) of the first relay SW1 and the first stationary contact (normally closed contact) of the second relay SW2 are connected to the base (B) of the first transistor Q1 and the second transistor Q2, respectively. The emitter (E) of the first transistor Q1 and the collector (C) of the second transistor Q2 are directly connected. At the same time, the base of the first transistor Q1, the base of the second transistor Q2, and the collector of the first transistor Q1 are connected to the second voltage terminal Vdd through pull-up resistors R1, R2, and R3, respectively. The level of the second voltage terminal Vdd is consistent with the GPIO level of the controller module 300. The function of pull-up resistors R1, R2, and R3 is to limit current. The emitter of the second transistor Q2 is connected to the reference ground GND, and the collector of the second transistor Q2 is connected to R3. This circuit is designed as a NAND gate. When the base (B) of both the first transistor Q1 and the second transistor Q2 is 0V, the level of the insertion detection signal output by the collector of the first transistor Q1 to the controller module 300 changes.
[0090] When no SATA hard drive is connected, since the pull-up resistors at the base of Q1 and Q2 are connected to Vdd, Q1 and Q2 meet the turn-on condition. The collector and emitter of Q1 and Q2 are connected, and the collector level of the first transistor Q1 becomes GND. The GPIO signal connected to the controller module 300 (i.e., the insertion detection signal output from the collector of Q1 to the controller module 300) becomes 0V. The controller module 300 filters the GPIO signal and confirms that the change in the GPIO signal level is valid. At this time, the controller module 300 determines that no hard drive is connected, and the relays SW1 and SW2 remain in the default normally closed state.
[0091] When a SATA hard drive is connected, since the SATA connector used by the SATA plug of the SATA hard drive has its PINn_GND and PINm_GND pins connected to GND, the first detection pin 111 and the second detection pin 112 in the SATA socket on the terminal device side, which match the PINn_GND and PINm_GND pins, are connected to GND. The base level of Q1 and Q2 is 0V, Q1 and Q2 are disconnected, and the collector and emitter of Q1 and Q2 are disconnected. The level of the GPIO signal connected to the controller module 300 (i.e., the insertion detection signal output from the collector of Q1 to the controller module 300) becomes Vdd. After the controller module 300 filters the GPIO signal, it determines that a hard drive is connected. At the same time, the controller module 300 controls the coils of relays SW1 and SW2 to be energized, so that the first detection pin 111 and the second detection pin 112 in the SATA socket on the terminal device side are connected to GND.
[0092] It should be noted that after the coils of relays SW1 and SW2 are energized, connecting the first detection pin 111 and the second detection pin 112 to GND, the insertion detection device 10 provided in this embodiment can also control the power module to supply power to the hard disk through the interface module 100.
[0093] In some embodiments of this application, when the controller module 300 determines that a hard drive is connected, it does not directly supply power, but performs filtering processing. It first determines that the insertion detection signal level is pulled high and lasts for a certain period of time, and then controls the power module to supply power to the hard drive through the interface module 100.
[0094] like Figure 7 As shown, the insertion detection device 10 provided in this application embodiment may further include a power module 400; the power module 400 is connected to the interface module 100 and the controller module 300 respectively.
[0095] The signal detection module 200 detects the insertion of the SATA hard drive and transmits the detection results to the controller module 300, so that the controller module 300 can control the power module 400 to supply power to the hard drive through the interface module 100.
[0096] The controller module 300 is connected to the interface module 100, and the controller module 300 is used to implement the SATA data transmission and reception processing of the interface module 100.
[0097] The controller module 300 is also connected to the signal detection module 200 and the power supply module 400. The controller module 300 is used to control the power supply of the interface module 100 when the SATA hard drive is connected, based on the detection result of the signal detection module 200.
[0098] For example, when the controller module 300 determines that no SATA hard drive is connected based on the detection results, the controller module 300 controls the power module 400 to shut down the power output, and the power supply voltages of the power interface in the interface module 100, such as 3.3V, 5V and 12V, become 0V.
[0099] For example, when the controller module 300 determines that there is a SATA hard drive based on the detection results, the controller module 300 controls the power module 400 to supply power to the 3.3V, 5V and 12V of the power interface in the interface module 100.
[0100] The power module 400 can provide power to the power interface in the interface module 100. The power module 400 is controlled by the controller module 300. The controller module 300 determines whether the hard drive is connected based on the detection results and controls the power supply of the power module 400.
[0101] in, Figure 6 The illustrated embodiment describes a controller module 300 including a filter circuit 310. This filter circuit performs a delay judgment on the detection result (i.e., the insertion detection signal), ensuring the accuracy of the insertion detection and avoiding misjudgments caused by electromagnetic interference. In practical applications, the power supply module 400 can be specifically connected to the filter circuit in the controller module 300 (not shown in the figure). This filter circuit can be used to filter out interference and de-jitter, ensuring that the power supply module 400 only supplies power after the terminal device has been stably connected.
[0102] In practical applications, when the insertion detection device includes multiple interface modules, the number of signal detection modules is the same as the number of interface modules. One signal detection module is connected to one interface module, and multiple signal detection modules are connected to the controller module respectively. The power supply module is connected to multiple interface modules respectively. In this case, the power-on sequence of each hard drive is controlled by the controller module, preventing simultaneous power-on. This reduces the requirements of the power supply module, optimizes the system's power supply design, and lowers the overall design cost.
[0103] For example, in practical applications, the process of a terminal device performing SATA hard drive insertion detection and power control is as follows:
[0104] First, with the SATA connector of the SATA hard drive not inserted into the SATA socket of the terminal device, the first detection pin 111 and the second detection pin 112 of the SATA socket are connected to the base of transistors Q1 and Q2 through relays SW1 and SW2 respectively. Transistors Q1 and Q2 are turned on, and the insertion detection signal level connected to the controller module 300 is low (0V). Relays SW1 and SW2 are in the default closed state, and the SATA socket has no power supply voltage output.
[0105] In the second step, when the SATA connector of the SATA hard drive is inserted into the SATA socket of the terminal device, the first detection pin 111 and the second detection pin 112 of the SATA socket of the terminal device are connected to GND through the PINn_GND pin and PINm_GND pin of the SATA connector of the SATA hard drive, respectively. The base of transistors Q1 and Q2 is at a low level, transistors Q1 and Q2 are cut off, and the level of the insertion detection signal connected to the controller module 300 is high (Vdd).
[0106] Third, the controller module 300 filters the insertion detection signal to prevent false positives. If the insertion detection signal is high and the high level lasts for t ≥ 1s, then the SATA hard drive is confirmed to be inserted.
[0107] In the fourth step, the controller module 300 controls the first control switch M1 and the second control switch M2 to conduct, thereby energizing the coils of the first relay SW1 and the second relay SW2. The moving contacts of the first relay SW1 and the second relay SW2 switch from being connected to the base of the transistor to GND, grounding the first detection pin 111 and the second detection pin 112. The data signal and power signal referenced by the SATA socket of the terminal device are complete and have the shortest path, which to a certain extent ensures the integrity of the transmission signal and power of the interface module, avoids the return path of the transmission signal referencing the GND of this detection pin from being detoured, and ensures the integrity of the power of the transmission signal.
[0108] Fifth, when the terminal device includes multiple interface modules, and these modules contain multiple SATA ports, the controller module 300 controls the power supply module 400 to supply power to each of the multiple SATA ports one by one according to the priority of the SATA ports. The priority of the SATA ports can be determined based on the order in which the hard drives are inserted into the SATA ports. The earlier the hard drive is inserted into the SATA port, the higher the priority of the SATA port. SATA ports with higher priority are powered on first, and SATA ports with lower priority are powered on later.
[0109] After the SATA interface of the terminal device is powered on, the controller module and the SATA hard drive first initialize. If initialization is successful, normal data transmission proceeds. If initialization fails, the controller module can also control the power module to power on and off the SATA hard drive to attempt initialization again. The number of power-on / off cycles, n, can be set. If a certain number of cycles is exceeded, the controller module reports an initialization failure to the system and stops powering on and off. In addition, when a SATA hard drive suddenly becomes unrecognizable or unreadable, or when data transmission suddenly becomes abnormal, the controller module can use the power module to power on and off the SATA hard drive to attempt to recover from the abnormal situation.
[0110] Thus, the insertion detection device provided in this application selects two GND pins with a large gap on a standard SATA socket as detection pins, and connects them to the controller module 300 through relays SW1 and SW2 and transistors Q1 and Q2. When the SATA hard drive is connected, the controller module 300 realizes the insertion detection function of the SATA hard drive according to the level transition of transistors Q1 and Q2. At the same time, using two GND pins with a certain gap as detection pins can effectively avoid the problem of false detection and premature power supply when the hard drive is tilted and not actually fully connected.
[0111] Furthermore, when a SATA hard drive is detected to be connected, the controller module 300 controls the first control switch M1 and the second control switch M2 to conduct, thereby energizing the coils of the first relay SW1 and the second relay SW2. The moving contacts of the first relay SW1 and the second relay SW2 switch from being connected to the base of the transistor to GND, grounding the first detection pin 111 and the second detection pin 112. The data signal and power signal referenced by the SATA socket of the terminal device are complete and have the shortest path, which to a certain extent ensures the integrity of the transmission signal and power of the interface module, avoids the return path of the transmission signal referencing the GND of this detection pin from being detoured, and ensures the integrity of the power of the transmission signal.
[0112] Furthermore, the controller module determines whether a SATA hard drive is inserted into the SATA interface based on the detection results, and then supplies power to the SATA hard drives sequentially according to interface priority. This avoids the problem of large instantaneous starting current caused by multiple SATA hard drives being powered on simultaneously, which could lead to unstable system power supply voltage and system malfunctions. The implementation process is simple, easy to design and debug, and does not require an additional microprocessor for control. The controller module can precisely control the power-on time of multiple SATA interfaces, avoiding the debugging difficulties and inaccurate delay control issues caused by delays in switching devices such as MOSFETs and resistors / capacitors in related technologies. In addition, the power supply scheme is implemented by the controller module, which can solve the problems of poor contact, pin deformation, and increased impedance that affect signal stability caused by controlling the power-on sequence by varying the duration.
[0113] Based on the same technical concept as the insertion detection device provided in the above embodiments, this application also provides a terminal device, including the insertion detection device provided in any of the above embodiments.
[0114] Figure 8 This is a schematic diagram of a terminal device provided in an embodiment of this application.
[0115] like Figure 8 As shown, the terminal device 800 provided in this application embodiment includes the insertion detection device 10 provided in any of the above embodiments.
[0116] In this embodiment, the insertion detection device can be installed in a terminal device that uses a hard drive, such as a computer or server. This application does not limit the specific type of terminal device. The interface module in the insertion detection device can include, but is not limited to, a SATA interface. This application does not limit the specific type of interface module. For example, the interface module can be a SATA socket, which can be used to insert a hard drive with a SATA connector. In practical applications, at least one GND pin in the interface module can be selected as a detection pin. This detection pin can be used for hard drive insertion detection. When the hard drive is detected to be inserted, a switching unit can be used to ground the detection pin, thereby enabling the detection pin to perform its original grounding function. This avoids detours in the return path of the transmission signal referencing the GND of this detection pin, ensuring the power integrity of the transmission signal.
[0117] It should be noted that the terminal device provided in this application embodiment includes the insertion detection device provided in any of the above embodiments, and can realize all the functions of the insertion detection device provided in any of the above embodiments. To avoid repetition, it will not be described again here.
[0118] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0119] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. An insertion detection device, applied to a terminal device, characterized in that, include: Interface module (100) and signal detection module (200); The interface module (100) includes a detection pin (110), and the signal detection module (200) includes a switching unit (210) and an insertion detection unit (220); the detection pin (110) is connected to the first end of the switching unit (210), the second end of the switching unit (210) is connected to the insertion detection unit (220), and the third end of the switching unit (210) is grounded; In the first state, the detection pin (110) is connected to the insertion detection unit (220); in the second state, the detection pin (110) is grounded.
2. The insertion detection device according to claim 1, characterized in that, The insertion detection device further includes a controller module (300), the insertion detection unit (220) is connected to the controller module (300), and the controller module (300) is connected to the fourth end of the switching unit (210).
3. The insertion detection device according to claim 2, characterized in that, The detection pin (110) includes a first detection pin (111) and a second detection pin (112); the switching unit (210) includes a first switching switch (211) and a second switching switch (212). The first detection pin (111) is connected to the first end of the first switch (211), the second end of the first switch (211) is connected to the insertion detection unit (220), the third end of the first switch (211) is grounded, and the controller module (300) is connected to the fourth end of the first switch (211). The second detection pin (112) is connected to the first end of the second switch (212), the second end of the second switch (212) is connected to the insertion detection unit (220), the third end of the second switch (212) is grounded, and the controller module (300) is connected to the fourth end of the second switch (212). In the interface module (100), the distance between the first detection pin (111) and the second detection pin (112) is greater than a threshold.
4. The insertion detection device according to claim 3, characterized in that, The first switching switch (211) is the first relay (SW1), the first detection pin (111) is connected to the moving contact of the first relay (SW1), the first stationary contact of the first relay (SW1) is connected to the insertion detection unit (220), the second stationary contact of the first relay (SW1) is grounded, and the controller module (300) is coupled to the coil of the first relay (SW1). The second switching switch (212) is the second relay (SW2), the second detection pin (112) is connected to the moving contact of the second relay (SW2), the first stationary contact of the second relay (SW2) is connected to the insertion detection unit (220), the second stationary contact of the second relay (SW2) is grounded, and the controller module (300) is coupled to the coil of the second relay (SW2).
5. The insertion detection device according to claim 4, characterized in that, The signal detection module (200) also includes a first control switch (M1) and a second control switch (M2); The first terminal of the first control switch (M1) is connected to the controller module (300), the second terminal of the first control switch (M1) is connected to one end of the coil of the first relay (SW1), the third terminal of the first control switch (M1) is grounded, and the other end of the coil of the first relay (SW1) is connected to the first voltage terminal. The first end of the second control switch (M2) is connected to the controller module (300), the second end of the second control switch (M2) is connected to one end of the coil of the second relay (SW2), the third end of the second control switch (M2) is grounded, and the other end of the coil of the second relay (SW2) is connected to the first voltage terminal.
6. The insertion detection device according to claim 2, characterized in that, The controller module (300) includes a filter circuit (310), and the insertion detection unit (220) is connected to the filter circuit (310).
7. The insertion detection device according to any one of claims 3-6, characterized in that, The insertion detection unit (220) includes a first transistor (Q1), a second transistor (Q2), a first resistor (R1), a second resistor (R2), and a third resistor (R3). The base of the first transistor (Q1) is connected to the second terminal of the first switch (211), the collector of the first transistor (Q1) is connected to the controller module (300), the emitter of the first transistor (Q1) is connected to the collector of the second transistor (Q2), the base of the second transistor (Q2) is connected to the second terminal of the second switch (212), and the emitter of the second transistor (Q2) is grounded. One end of the first resistor (R1) is connected to the second voltage terminal, and the other end of the first resistor (R1) is connected to the base of the first transistor (Q1); one end of the second resistor (R2) is connected to the second voltage terminal, and the other end of the second resistor (R2) is connected to the base of the second transistor (Q2); one end of the third resistor (R3) is connected to the second voltage terminal, and the other end of the third resistor (R3) is connected to the collector of the first transistor (Q1).
8. The insertion detection device according to claim 2, characterized in that, The interface module (100) is a SATA hard drive interface module; When the SATA hard drive interface module includes a data interface and a power interface, the first detection pin (111) is the first reference ground pin in the data interface, and the second detection pin (112) is the second reference ground pin in the power interface. When the SATA hard drive interface module includes a data interface, the first detection pin (111) is the third reference ground pin in the data interface, and the second detection pin (112) is the fourth reference ground pin in the data interface.
9. The insertion detection device according to any one of claims 2-6, characterized in that, The insertion detection device also includes a power module (400), which is connected to the interface module (100) and the controller module (300) respectively.
10. A terminal device, characterized in that, include: The insertion detection device according to any one of claims 1-9.