Abstract:
A connection detection circuit includes a first detection circuit and a second detection circuit. The first detection circuit includes a first comparator and a first detection pin connected to the first comparator. The first comparator is adapted to compare a first voltage level on the first detection pin with a first reference voltage. The second detection circuit includes a second detection pin. The second detection pin is adapted to connect to the first detection pin to vary the first voltage level on the first detection pin to switch an first transistor output when the connection of the first detection circuit and the second detection circuit is achieved.

Description:
BACKGROUND 
       [0001]    1. Technical Field 
         [0002]    The present disclosure relates to a connection detection circuit. 
         [0003]    2. Description of Related Art 
         [0004]    When an external device is joined with an electronic device, an communication protocol between the electronic device and the external device is usually used to notify whether the external device is plugged into the electronic device. However, not all devices have this function. Furthermore, when the system is turned off or enters into the power saving mode, the method that confirms whether the external device is connected to the electronic device via telecommunication transmission is not applicable. 
         [0005]    Therefore, there is room for improvement within the art. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0006]    Many aspects of the embodiments can be better understood with references to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the embodiments. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views. 
           [0007]      FIG. 1  is a circuit diagram of an embodiment of a connection detection circuit. 
           [0008]      FIG. 2  is a circuit diagram of another embodiment of a connection detection circuit. 
       
    
    
     DETAILED DESCRIPTION 
       [0009]    The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one. 
         [0010]    Referring to  FIG. 1 , a connection detection circuit in accordance with an embodiment of the present disclosure, is used to detect a connection of a first electronic device  30  and a second electronic device  40 . The connection detection circuit includes a first detection circuit  31 , a first monitoring unit  32 , a second detection circuit  41 , and a second monitoring unit  42 . The first detection circuit  31  and the first monitoring unit  32  are set in the first electronic device  30 . The second detection circuit  41  and the second monitoring unit  42  are set in the second electronic device  40 . 
         [0011]    The first detection circuit  31  includes a first detection pin  311 , a first comparator  312 , and a first resistor R 1 . The first comparator  312  includes a non-inverting input end, an inverting input end, an output end, a power end, and a ground end. The first detection pin  311  is connected to the first comparator non-inverting input end. A first reference voltage Vref 1  is supplied to the first comparator inverting input end. The first comparator output end is connected to the first monitoring unit  32 . The first comparator power end is connected to a first voltage V 1 . The first comparator ground end is connected to ground. The first resistor R 1  is connected between the first detection pin  311  and ground. 
         [0012]    The second detection circuit  41  includes a second detection pin  411 , a second resistor R 2 , a third resistor R 3 , and a switch Q 1 . The second resistor R 2  is connected between the second detection pin  411  and a direct current power Vcc. In one embodiment, the switch Q 1  is an npn type transistor, whose threshold voltage is 0.7 volts. The switch Q 1  includes a base b, a collector c, and an emitter e. The base b is connected to the second detection pin  411 . The collector c is connected to a second voltage V 2  via the third resistor R 3 . The emitter e is connected to ground. The collector c is further connected to the second monitoring unit  42 . 
         [0013]    In the above embodiment, the first reference voltage Vref 1  is 0.3 volts. The direct current power Vcc is 5 volts. A resistance of the first resistor R 1  is 10000 ohms. A resistance of the second resistor R 2  is 100000 ohms. 
         [0014]    When the second electronic device  40  is not connected to the first electronic device  30 , the first detection pin  311  is in low level. A voltage on the first comparator non-inverting input end is lower than that of the first comparator inverting input end. The first comparator output end outputs a low level first indication signal to the first monitoring unit  32 . The first monitoring unit  32  receives the low level first indication signal to recognize that the second electronic device  40  is not connected to the first electronic device  30 . Simultaneously, the second detection pin  411  is set to be high level because of the direct current power Vcc. The switch Q 1  is turned on. The switch collector c is connected to ground via the switch Q 1 . Therefore, the second monitoring unit  42  receives a low level second indication signal to recognize that the first electronic device  30  is not connected to the second electronic device  40 . 
         [0015]    When the second electronic device  40  is connected to the first electronic device  30 , the first detection pin  311  is connected to the second detection pin  411 . The direct current power Vcc is connected to ground via the second resistor R 2  and the first resistor R 1 . A voltage on the first detection pin  311  is equal to Vcc*R 1 /(R 1 +R 2 )=0.45 volts, which is higher than the first reference voltage Vref 1 . The first comparator output end outputs a high level first indication signal to the first monitoring unit  32 . The first monitoring unit  32  receives the high level first indication signal to recognize that the second electronic device  40  is connected to the first electronic device  30 . Simultaneously, a voltage on the switch base b is 0.45 volts, which is lower than the switch threshold voltage. The switch Q 1  is turned off. A voltage on the collector of the switch Q 1  is high. Therefore, the second monitoring unit  42  receives a high level second indication signal to recognize that the first electronic device  30  is connected to the second electronic device  40 . 
         [0016]    Referring to  FIG. 2 , a connection detection circuit in accordance with another embodiment of the present disclosure is shown. In this embodiment, a second comparator  45  replaces the switch Q 1  of the above embodiment. The second comparator  45  includes a non-inverting input end, an inverting input end, and an output end. The second comparator non-inverting input end is connected to a second reference voltage Vref 2 , which is 0.6 volts. The second comparator inverting input end is connected to the second detection pin  411 . The second comparator output end is connected to the second monitoring unit  42 . 
         [0017]    When the second electronic device  40  is not connected to the first electronic device  30 , a voltage on the second comparator inverting input end is higher than that of the second comparator non-inverting input end. The second comparator output end outputs a low level signal to the second monitoring unit  42  to indicate that the first electronic device  30  is not connected to the second electronic device  40 . 
         [0018]    When the second electronic device  40  is connected to the first electronic device  30 , the first detection pin  311  is connected to the second detection pin  411 . The direct current power Vcc is connected to ground via the second resistor R 2  and the first resistor R 1 . A voltage on the second detection pin  411  is equal to Vcc*R 1 /(R 1 +R 2 )=0.45 volts, which is lower than the second reference voltage Vref 2 . The second comparator output end outputs a high level signal to the second monitoring unit  42  to indicate that the first electronic device  30  is connected to the second electronic device  40 . 
         [0019]    It is to be understood, however, that even though numerous characteristics and advantages of the embodiments have been set forth in the foregoing description, together with details of the structure and function of the embodiments, the disclosure is illustrative only, and changes may be made in detail, especially in matters of shape, size, and arrangement of parts within the principles of the invention to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed. It is also to be understood that the above description and the claims drawn to a method may include some indication in reference to certain steps. However, the indication used is only to be viewed for identification purposes and not as a suggestion as to an order for the steps.