Control line and communication port connection detection circuit
Through the coordination of signal stabilization circuit and capacitor charging and discharging circuit, the microcontroller is used to monitor potential changes, and the complexity and cost problems of the connection detection of control lines and communication ports are solved, achieving rapid and accurate detection and troubleshooting.
Patent Information
- Application Number
- CN202510725894.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-06-03
AI Technical Summary
In the prior art, the connection detection between the control line and the communication port is complex and costly, making it difficult to quickly and accurately determine whether the control line is correctly connected to the corresponding port of the controller.
The signal stabilization circuit and the capacitor charging and discharging circuit are used to monitor the potential change through the microcontroller to determine whether the control line is connected to the corresponding communication port of the controller. The voltage-dividing resistor is used to prevent the photocoupler from conducting, avoid malfunctioning, and control the current circuit through the relay to ensure accurate detection.
It realizes a quick and accurate judgment of whether the control line is correctly connected to the communication port, avoids malfunctions, simplifies the detection process, reduces costs, and promptly detects circuit failures.
Smart Images

Figure CN120254709A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of circuit detection, and particularly to a detection circuit for the connection between a control line and a communication port. Background Art
[0002] The controller of a temperature control system needs to control the turning on and off of external devices. Before turning on and off the external devices, it is necessary to ensure that the controller is connected to the drive circuit of the external devices. After the installation by engineering personnel, it is necessary to detect whether all the control lines led out from the host including the drive circuit of the external devices are connected to the corresponding ports of the controller, and it is necessary to determine whether the control lines are connected to the corresponding controller ports. Currently, most of the detection methods adopted are realized through detection chips or sensors. However, this traditional method is complex in detection and high in cost. Summary of the Invention
[0003] The purpose of the present invention is to improve and innovate in view of the disadvantages and problems in the background art, and provide a detection circuit for the connection between a control line and a communication port.
[0004] A detection circuit for the connection between a control line and a communication port includes a host and a controller. The host includes an optocoupler circuit, and the controller includes a control and detection circuit, a capacitor charge and discharge circuit, and a signal stabilization circuit. The optocoupler circuit includes an optocoupler. The light-emitting diode of the optocoupler is connected in parallel with a first resistor. The anode of the light-emitting diode is connected to the cathode of a first diode. The anode of the first diode is connected to a detection switch. The cathode of the light-emitting diode is connected to the control line. The capacitor charge and discharge circuit includes a voltage-dividing resistor, a fourth resistor, and a second capacitor. One end of the voltage-dividing resistor is used to be connected to the control line. The other end of the voltage-dividing resistor is connected to the first end of the fourth resistor and is also connected to the first end of the second capacitor. The second end of the fourth resistor is connected to the second end of the second capacitor and is grounded. The signal stabilization circuit includes a fifth resistor, a sixth resistor, a third capacitor, and a first switching tube. The control end of the first switching tube is connected to the first end of the second capacitor. The first end of the first switching tube is grounded. The second end of the first switching tube is connected to the first ends of the fifth resistor and the sixth resistor. The second end of the fifth resistor is connected to the supply voltage. The second end of the sixth resistor is connected to the first end of the third capacitor and is connected to the input end of the control and detection circuit. The second end of the third capacitor is grounded. The control and detection circuit is used to detect the potential change at the first end of the third capacitor. Wherein, the resistance values of the voltage-dividing resistor and the fourth resistor are used to prevent the light-emitting diode inside the optocoupler from meeting the conduction requirement when the first diode is in the conducting state and there is current passing through the voltage-dividing resistor.
[0005] A further solution is that the control and detection circuit includes a single-chip microcomputer. The first input end of the single-chip microcomputer is connected to the first end of the third capacitor, and the first output end of the single-chip microcomputer is connected to a display device, which can be an LCD display screen or an LED lamp.
[0006] A further solution is that a transformer is further included. The transformer is used to convert the mains power into a low-voltage AC power supply. The two ends of the low-voltage AC power supply are respectively connected to the cathodes of the fourth diode and the fifth diode. The anodes of the fourth diode and the fifth diode are grounded, and one end of the low-voltage AC power supply is connected to a detection switch.
[0007] A further solution is that the second input end of the single-chip microcomputer is connected to a temperature detection circuit, the second output end of the single-chip microcomputer is connected to the control end of the second switching tube, the first end of the second switching tube is grounded, and the second end of the second switching tube is connected to the control end of a signal switching circuit; the first end of the signal switching circuit is connected to the input of a capacitor charge and discharge circuit; the second end of the signal switching circuit is connected to the anodic end of the sixth diode, and the cathodic end of the sixth diode is connected to one end of the low-voltage AC power supply; and the detection switch and the sixth diode are respectively connected to different ends of the low-voltage AC power supply; When the second switching tube is turned on, the signal switching circuit is used to conduct between the low-voltage AC power supply and the capacitor charge and discharge circuit; When the second switching tube is turned off, the signal switching circuit is used to disconnect between the low-voltage AC power supply and the capacitor charge and discharge circuit.
[0008] A further solution is that the signal switching circuit is a relay. The two ends of the normally open switch of the relay are respectively connected to the sixth diode and the capacitor charge and discharge circuit, and the two ends of the coil of the relay are respectively connected to the supply voltage and the second end of the second switching tube.
[0009] A further solution is that the temperature detection circuit includes a seventh resistor, a thermistor and a fourth capacitor. The first end of the seventh resistor is connected to the supply voltage, the second end of the seventh resistor is connected to the second input end of the single-chip microcomputer, the first end of the thermistor and the first end of the fourth capacitor, and the second ends of the thermistor and the fourth capacitor are grounded.
[0010] A further solution is that both the first switching tube and the second switching tube are N-type MOS tubes.
[0011] A further solution is that the fourth resistor is an adjustable resistor.
[0012] A further solution is that the low-voltage AC power supply is also used to supply power to the device circuit. The collector and emitter of the photosensitive triode of the optocoupler are both connected to the device circuit, and the collector of the photosensitive triode is grounded, and the emitter of the photosensitive triode is connected to the first end of the ninth resistor, and the second end of the ninth resistor is connected to the supply voltage.
[0013] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention discloses a detection circuit for the connection between a control line and a communication port. Through the mutual cooperation of a signal stabilization circuit and a capacitor charge and discharge circuit, it can be determined whether the control line led out by the host is accurately connected to the corresponding communication port of the controller according to whether the potential monitored by the single-chip microcomputer can be converted from a high level to a low level, which is convenient and fast to judge whether there is a wrong connection or omission in the control line led out by the host; moreover, during the detection process, by setting a voltage-dividing resistor, the light-emitting diode inside the optocoupler cannot reach the conduction requirement, so that the optocoupler is always in the cut-off state during the process of detecting whether the control line is accurately connected, and the drive circuits corresponding to the fan, heating device, and refrigeration device will not be mis-conducted, and the fan, heating device, and refrigeration device will not malfunction. After completing the detection of whether the control line is accurately connected, when the temperature value monitored by the temperature detection circuit is not sufficient to trigger the single-chip microcomputer to output a high-level control signal, the second capacitor can continuously charge and discharge, so that the voltage on the second capacitor remains fluctuating within a certain range to ensure the conduction of the first switching tube, so that the potential monitored by the single-chip microcomputer remains low, and then it can continue to judge whether the host is normally electrically connected to the controller through the potential monitored by the single-chip microcomputer; among them, normal electrical connection means that during the operation of the circuit, the connection of the control line is in good condition and no abnormal conditions such as loosening or damage occur. When the temperature value monitored by the temperature detection circuit is sufficient to trigger the single-chip microcomputer to output a high-level control signal, if the device circuit works at this time, it indicates that the host maintains a normal electrical connection with the controller; if the device circuit does not work at this time, it can be judged through the potential monitored by the single-chip microcomputer whether there is no normal electrical connection between the host and the controller or whether the normally open switch of the coil is not normally closed, so as to facilitate the troubleshooting of circuit faults. Finally, by setting a sixth diode between the normally open switch of the coil and the low-voltage AC power supply, the present invention can avoid a current loop formed by components such as both ends of the secondary winding, the relay, the voltage-dividing resistor, the fourth resistor, and the fifth diode of the rectifier bridge, so as to avoid the potential monitored by the single-chip microcomputer still remaining low when there is no normal electrical connection between the host and the controller, and further avoid misjudging the cause of circuit faults. Description of the Drawings
[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0015] Figure 1 It is a schematic block diagram of a control line and communication port connection detection circuit provided by an embodiment of the present invention; Figure 2 It is a schematic structural diagram of a control line and communication port connection detection circuit provided by an embodiment of the present invention; Figure 3 It is a circuit of a control line and communication port connection detection circuit provided by an embodiment of the present invention Figure 1 ; Figure 4 It is a circuit of a control line and communication port connection detection circuit provided by an embodiment of the present invention Figure 2 ; Figure 5 It is a current loop diagram of a control line and communication port connection detection circuit provided by an embodiment of the present invention during the detection process; Figure 6 It is a current loop diagram of a control line and communication port connection detection circuit provided by an embodiment of the present invention when the voltage at both ends of the secondary winding is in the half-cycle lower chord wave during the operation of the device circuit; Figure 7 It is a voltage change diagram of points B and C of a control line and communication port connection detection circuit provided by an embodiment of the present invention during the detection process; Figure 8 It is a voltage change diagram of point D of a control line and communication port connection detection circuit provided by an embodiment of the present invention in the isolation and coupling state of the optocoupler.
[0016] Reference numerals: 10, host; 11, optocoupler circuit; 12, device circuit; 21, power management module; 22, control and detection circuit; 23, signal stabilization circuit; 24, capacitor charge and discharge circuit; 25, signal switch circuit; R1, first resistor; R2, second resistor; RC, voltage-dividing resistor; R4, fourth resistor; R5, fifth resistor; R6, sixth resistor; R7, seventh resistor; RT, thermistor; R9, ninth resistor; C1, first capacitor; C2, second capacitor; C3, third capacitor; C4, fourth capacitor; Q1, first switching transistor; Q2, second switching transistor; U1, optocoupler; U2, single-chip microcomputer; K1, relay; K2, detection switch; D1, first diode; D2, second diode; D3, third diode; D4, fourth diode; D5, fifth diode; D6, sixth diode. Detailed implementation manners
[0017] In order to make the objectives, features, and advantages of the present invention more obvious and understandable, the following provides a detailed description of the specific implementation manners of the present invention with reference to the accompanying drawings.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this invention belongs. The terms used in the description of the present invention in this specification are only for the purpose of describing specific implementation manners and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0019] As Figure 1 shown, the present invention discloses a detection circuit for the connection between a control line and a communication port. The primary winding of the transformer is connected to the mains power supply, and both ends AC01 and AC02 of the secondary winding are connected to the controller 20 and the host 10 to supply power to the controller 20 and the host 10. Multiple control lines A are led out from the communication port of the host 10, and different control lines A have different control functions; for example, for a temperature control system, the control lines A include a fan control line, a heating control line, and a refrigeration control line. The heating control line is used to turn on the heating function, and the refrigeration control line is used to turn on the refrigeration function. The other end of the control line A needs to be connected to the corresponding communication port of the controller 20 without any wrong connection or missed connection. The detection circuit for the connection between a control line and a communication port provided by the present invention exactly describes the detection circuit for whether the control line A is accurately connected when the control line A is connected to the communication port of the controller 20.
[0020] See Figure 2, for a further embodiment, the controller 20 includes a rectifier bridge, a power management module 21, a signal switching circuit 25, a control and detection circuit 22, a capacitor charge and discharge circuit 24, and a signal stabilization circuit 23. The first end of the signal switching circuit 25 is connected to the input of the capacitor charge and discharge circuit 24 and is also connected to the corresponding control line A through the communication port of the controller 20; the second end of the signal switching circuit 25 is connected to the secondary winding AC01 end; the output end of the capacitor charge and discharge circuit 24 is connected to the input end of the signal stabilization circuit 23; the output end of the signal stabilization circuit 23 is connected to the input end of the control and detection circuit 22; the output end of the control and detection circuit 22 is connected to the control end of the signal switching circuit 25. In addition, both ends of the secondary winding, AC01 and AC02, are rectified by the rectifier bridge to output a DC power supply. The two ends of the DC power supply are DC+ and DC- respectively. The two ends of the DC power supply are connected to the first capacitor C1. The first capacitor C1 is a voltage stabilizing capacitor. The output end of the first capacitor C1 is connected to the power management module 21. The power management module 21 is used to output a stable DC power supply to the controller 20. Since the power management module 21 is a common existing circuit, the implementation process of the prior art can be referred to and it is not related to the inventive point of the present invention, so it will not be elaborated here.
[0021] Refer to Figure 3 , as a further embodiment, the host 10 includes an opto-coupler circuit 11. The opto-coupler circuit 11 includes a detection switch K2, a first diode D1, a first resistor R1, an opto-coupler U1, and a second resistor R2. Among them, the anode end of the first diode D1 is connected to the AC02 end of the secondary winding through the detection switch K2. The cathode end of the first diode D1 is connected to the anode end of the light-emitting diode of the opto-coupler U1 and one end of the first resistor R1; the other end of the first resistor R1 is connected to the cathode end of the light-emitting diode of the opto-coupler U1 and is also connected to one end of the second resistor R2; the other end of the second resistor R2 is connected to the control line A. The collector and emitter of the photo-sensitive triode of the opto-coupler U1 are connected to the device circuit 12; the device circuit 12 can be the drive circuits corresponding to a fan, a heating device, and a refrigeration device. When the light-emitting diode of the opto-coupler U1 is turned on, the light emitted by the light-emitting diode of the opto-coupler U1 irradiates the photo-sensitive triode, causing the photo-sensitive triode to conduct, so that the fan or the heating device or the refrigeration device works. There is optical signal coupling between the input and output ends of the opto-coupler U1 and there is no direct electrical connection, so it can effectively isolate the interference between high voltages, strong currents, or different power supply systems, and prevent electrical noise or high-voltage signals from damaging the low-voltage circuit.
[0022] Further, the capacitor charge and discharge circuit 24 includes a voltage dividing resistor RC, a fourth resistor R4, and a second capacitor C2. One end of the voltage dividing resistor RC is connected to the control line A through the corresponding communication port of the controller 20 and is connected to the first end of the signal switch circuit 25; the other end of the voltage dividing resistor RC is connected to the first end of the fourth resistor R4 and is also connected to the first end of the second capacitor C2; the second end of the fourth resistor R4 is connected to the second end of the second capacitor C2 and is grounded.
[0023] Further, the signal stabilization circuit 23 includes a fifth resistor R5, a sixth resistor R6, a third capacitor C3, and a first switching transistor Q1. The control end of the first switching transistor Q1 is connected to the first end of the second capacitor C2 and the first end of the fourth resistor R4. The first end of the first switching transistor Q1 is grounded. The second end of the first switching transistor Q1 is connected to the first ends of the fifth resistor R5 and the sixth resistor R6. The second end of the fifth resistor R5 is connected to the supply voltage. The second end of the sixth resistor R6 is connected to the first end of the third capacitor C3 and is connected to the input end of the control and detection circuit 22. The second end of the third capacitor C3 is grounded.
[0024] Further, the control and detection circuit 22 includes a single-chip microcomputer U2, a second switching transistor Q2, a display device, and a temperature detection circuit; the single-chip microcomputer U2 is connected to the display device and the temperature detection circuit at the same time. The first input terminal of the single-chip microcomputer U2 is connected to the second terminal of the sixth resistor R6, and is used to detect the potential signal of the second terminal of the sixth resistor R6 and display it through the display device. The display device can be an LCD display screen or an LED lamp, and the present application does not make specific limitations. The LCD display screen directly displays whether the second terminal of the sixth resistor R6 is at a high level or a low level; the on and off of the LED lamp are controlled by the level state (high level or low level) of the second terminal of the sixth resistor R6. The second input terminal of the single-chip microcomputer U2 is connected to the temperature detection circuit. The temperature detection circuit includes a seventh resistor R7, a thermistor RT, and a fourth capacitor C4. The first terminal of the seventh resistor R7 is connected to the supply voltage, and the second terminal of the seventh resistor is connected to the second input terminal of the single-chip microcomputer U2, the first terminal of the thermistor RT, and the first terminal of the fourth capacitor C4. The second terminal of the thermistor RT and the second terminal of the fourth capacitor C4 are grounded. Among them, the resistance value of the thermistor RT changes with the change of temperature. By obtaining the voltage division on the thermistor RT, the second input terminal of the single-chip microcomputer U2 can calculate the resistance value of the thermistor RT, so as to measure the ambient temperature value; the thermistor RT can be an NTC thermistor or a PTC thermistor, and the present application does not make specific limitations. After the single-chip microcomputer U2 measures the ambient temperature value, it outputs a corresponding control signal to the control terminal of the second switching transistor Q2 to control the on and off of the second switching transistor Q2. The first terminal of the second switching transistor Q2 is grounded, and the second terminal of the second switching transistor Q2 is connected to the control terminal of the signal switching circuit 25. It should be noted that it is a prior art that the single-chip microcomputer U2 measures the corresponding temperature value through the voltage division on the thermistor RT. The single-chip microcomputer U2 contains an ADC converter inside, which can realize the conversion between analog signals and digital signals.
[0025] It should be noted that the first switching transistor Q1 and the second switching transistor Q2 can be N-type MOS transistors. Correspondingly, the control terminals of the first switching transistor Q1 and the second switching transistor Q2 are both gates, the first terminals of the first switching transistor Q1 and the second switching transistor Q2 are both sources, and the second terminals of the first switching transistor Q1 and the second switching transistor Q2 are both drains. The conduction condition of the N-type MOS transistor is that the gate voltage (Vg) is higher than the source voltage (Vs), and the voltage difference (Vgs) between the two is greater than the threshold voltage (Vgs(th)).
[0026] Further, the signal switch circuit 25 includes a relay K1. The first end of the coil of the relay K1 is connected to the second end of the second switching transistor Q2 of the control and detection circuit 22; the second end of the coil is connected to the supply voltage; the second end of the normally open switch of the relay K1 is connected to AC01 of the AC power supply through a sixth diode D6, and the first end of the normally open switch of the relay K1 is connected to the communication port of the controller 20 and the input end of the capacitor charge and discharge circuit 24. When the coil of the relay K1 is powered on, the normally open switch of the relay K1 closes; when the coil of the relay K1 is powered off, the normally open switch of the relay K1 remains open.
[0027] See Figure 4 , as a further embodiment, the voltage dividing resistor RC may exist in the form of a series connection of multiple resistors, RC1, RC2, RC3......RCN; the fourth resistor R4 in the capacitor charge and discharge circuit 24 may be a variable resistor. By adjusting the resistance value of the fourth resistor R4, the charge and discharge speed of the second capacitor C2 can be adjusted; at the same time, the voltage dividing resistor RC and the fourth resistor R4 form a voltage dividing circuit, and the fourth resistor R4 can prevent the voltage charged on the second capacitor C2 from being too high and causing overvoltage damage to the first switching transistor Q1.
[0028] See Figure 5 , as a further embodiment, during the process of detecting whether the control line A led out is accurately connected to the corresponding communication port of the controller 20, manually close the detection switch K2 when the normally open switch of the relay K1 is open; if the control line A is accurately connected to the corresponding communication port of the controller 20; then when the voltage at the AC02 end of the secondary winding is positive and the voltage at the AC01 end of the secondary winding is negative, the first diode D1 conducts, and the devices such as AC01, AC02, the first diode D1, the first resistor R1, the second resistor R2, the voltage dividing resistor RC, the fourth resistor R4 of the secondary winding, and the fourth diode D4 of the rectifier bridge form a current loop of a detection circuit to charge the second capacitor C2. The voltage dividing resistor RC and the fourth resistor R4 are set with appropriate resistance values so that the voltage division on the fourth resistor R4 is greater than the turn-on voltage Vth of the first switching transistor Q1, that is, the voltage charged on the second capacitor C2 is greater than the turn-on voltage Vth of the first switching transistor Q1, so that the first switching transistor Q1 switches from the off state to the on state; and since the third capacitor C3 has been fully charged before the control line A is connected, after the first switching transistor Q1 switches from the off state to the on state, the third capacitor C3 will discharge through the sixth resistor R6 and the first switching transistor Q1, causing the voltage at point C to gradually decrease until it becomes 0, so that the potential at point C changes from a high level to a low level and stably remains at the low level. Furthermore, it is possible to determine whether the control line A led out by the host 10 is accurately connected to the corresponding communication port of the controller 20 based on the potential state of point C.
[0029] It should be noted that different control lines A respectively correspond to independent opto-coupler circuits 11, signal switch circuits 25, capacitor charge and discharge circuits 24, and signal stabilization circuits 23. During the detection process of connecting a certain control line A, the detection switch K2 corresponding to this control line A is closed, while the detection switches K2 corresponding to other control lines A remain open. The signal stabilization circuits 23 corresponding to different control lines A are connected to different ports of the single-chip microcomputer U2. When it is detected that the input of the corresponding port of the single-chip microcomputer U2 changes from high level to low level, it indicates that the control line A is accurately connected to the corresponding communication port. If it is detected that the input of other ports of the single-chip microcomputer U2 changes from high level to low level, it indicates that the control line A is not accurately connected to the corresponding communication port. If it is not detected that the input of any port of the single-chip microcomputer U2 changes from high level to low level, it indicates that the control line A is not connected.
[0030] By way of example rather than limitation, when the control line A corresponding to the heating device corresponds to the PA2 port of the single-chip microcomputer U2, and when the control line A corresponding to the refrigeration device corresponds to the PA3 port of the single-chip microcomputer U2, after closing the detection switch K2 corresponding to the control line A of the heating device, if the single-chip microcomputer U2 detects that the input of the PA2 port changes from high level to low level, it indicates that the control line A of the heating device is accurately connected to the corresponding communication port of the controller 20. If at this time the single-chip microcomputer U2 detects that the input of the PA3 port changes from high level to low level, it indicates that the connection of the control line A of the heating device to the corresponding communication port of the controller 20 is incorrect. Therefore, the present invention can conveniently detect whether the control line A led out from the host 10 is accurately connected to the corresponding communication port of the controller 20.
[0031] It should be further noted that on this loop, a relatively large resistance value should be selected for the voltage-dividing resistor RC and the fourth resistor R4, so that the light-emitting diode inside the opto-coupler U1 of the opto-coupler circuit 11 cannot reach the conduction requirement. Thus, during the process of detecting whether the control line A is accurately connected, the opto-coupler U1 is always in the cut-off state, and the drive circuits corresponding to the fan, heating device, and refrigeration device will not be mis-conducted, and the fan, heating device, and refrigeration device will not malfunction. In addition, during the detection process, the normally open switch of the relay K1 needs to be kept open, which can be achieved by modifying the temperature setting value in the single-chip microcomputer U2, so that the single-chip microcomputer U2 will not output a high-level signal to the second switching transistor Q2 due to the temperature value monitored by the temperature detection circuit.
[0032] Continue to refer to Figure 5It can be understood that when it is detected whether the control line A is accurately connected, the circuit starts to work normally at this time; when the temperature value monitored by the temperature detection circuit is not sufficient to trigger the single-chip microcomputer U2 to output a high-level signal to the second switching transistor Q2, the second switching transistor Q2 is in the off state at this time, and the normally open switch of the corresponding relay K1 remains open; in this case, when the voltage of the secondary winding AC02 is positive and the voltage of the secondary winding AC01 is negative, the circuit continues to charge the second capacitor C2; when the voltage of the secondary winding AC02 is negative and the voltage of the secondary winding AC01 is positive, the second capacitor C2 discharges through the fourth resistor R4, so that the second capacitor C2 is continuously charged and discharged, and the voltage at point B fluctuates within a certain range, ensuring that the first switching transistor Q1 is turned on, so that the potential at point C remains at a low level, so that it is possible to continue to judge whether the host 10 is normally electrically connected to the controller 20 through the potential at point C. Among them, the normal electrical connection means that during the operation of the circuit, the connection of the control line A is in good condition, and no abnormal conditions such as loosening or damage occur.
[0033] See Figure 6 As a further embodiment, when the temperature value monitored by the temperature detection circuit triggers the single-chip microcomputer U2 to output a high-level signal to the second switching transistor Q2, the second switching transistor Q2 will be in the on state at this time, so that the coil of the relay K1 is energized, and then the normally open switch is closed; in this way, when the voltage of the secondary winding AC02 is positive and the voltage of the secondary winding AC01 is negative, it will cause the voltage-dividing resistor RC and the fourth resistor R4 to be short-circuited. Since there is no large resistor such as the voltage-dividing resistor RC and the fourth resistor R4 in series in this loop; the AC01, AC02 of the secondary winding, the first diode D1, the first resistor R1, the light-emitting diode inside the optocoupler U1, the second resistor R2, the sixth diode D6, and the relay K1 these devices form a conduction loop of the optocoupler U1; so when the normally open switch of the relay K1 is closed, the optocoupler U1 is in the conduction state. In this way, the corresponding device circuit 12 can drive the external fan, refrigeration equipment or heating equipment to work according to the temperature value monitored by the temperature detection circuit.
[0034] It should be noted that when the single-chip microcomputer U2 should output a high-level signal to the control terminal of the corresponding second switching transistor Q2 according to the temperature value detected by the temperature detection circuit, if the device circuit 12 is working at this time, it indicates that the host 10 and the controller 20 are normally electrically connected, and at this time, it is not necessary to judge whether the host 10 and the controller 20 are normally electrically connected through the potential at point C; on the contrary, since the voltage-dividing resistor RC and the fourth resistor R4 are short-circuited by the normally open switch of the relay K1, the charge on the second capacitor C2 will still discharge through the fourth resistor R4 at this time, resulting in a decrease in the voltage across the second capacitor C2, and then the conduction voltage Vth of the first switching transistor Q1 cannot be reached, causing the potential at point C to change from low level to high level; if the device circuit 12 is not working at this time, it may be that the normally open switch of the relay K1 is not closed properly, or it may be that the host 10 and the controller 20 are not normally electrically connected; if the normally open switch of the relay K1 is not closed properly, the voltage-dividing resistor RC and the fourth resistor R4 will not be short-circuited by the normally open switch of the relay K1, and the potential at point C will remain at low level; if the host 10 and the controller 20 are not normally electrically connected, since the connection between the host 10 and the controller 20 is disconnected and the second capacitor C2 cannot be charged anymore, the potential at point C will change from low level to high level. Therefore, in the case where the device circuit 12 should work but does not work, it can be judged through the potential at point C whether there is no normal electrical connection between the host 10 and the controller 20 or the normally open switch of the relay K1 is not closed properly, thus facilitating the troubleshooting of circuit faults.
[0035] It should be further noted that in the present invention, a sixth diode D6 is provided between the normally open switch of the relay K1 and the AC01 terminal, and the anode terminal of the sixth diode D6 is connected to the relay K1, and the cathode terminal of the sixth diode D6 is connected to the AC01. On the one hand, in the case where AC02 is positive and AC01 is negative, it will not prevent the components such as AC01, AC02, the first diode D1, the first resistor R1, the light-emitting diode inside the optocoupler U1, the second resistor R2, the sixth diode D6, and the relay K1 in the secondary winding from forming a conduction loop of the optocoupler U1; on the other hand, in the case where AC01 is positive and AC02 is negative, the components such as the secondary winding AC02, AC01, the relay K1, the voltage-dividing resistor RC, the fourth resistor R4, and the fifth diode D5 of the rectifier bridge cannot form a current loop, so that the second capacitor C2 cannot be charged, and in the case where the normally open switch of the relay K1 is closed, the second capacitor C2 will not be charged, thus avoiding the potential at point C remaining at low level in the case where there is no normal electrical connection between the host 10 and the controller 20, and thus avoiding misjudgment of the cause of circuit faults.
[0036] See Figure 7, as a further embodiment, when the normally open switch of the relay K1 is disconnected, the control line A led out by the host 10 is not connected to the controller 20. At this time Figure 5 the voltage value at point B of the capacitor charge and discharge circuit 24 shown is in a low level state, Figure 5 the voltage value at point C of the signal stabilization circuit 23 shown is in a high level state; after the control line A led out by the host 10 is connected to the controller 20 and the detection switch K2 is closed; at this time, for Figure 5 point B of the capacitor charge and discharge circuit 24 shown, since the voltage division of the voltage division resistor RC and the fourth resistor R4 charges the second capacitor C2, the voltage value at point B gradually increases. When the voltage at point B is greater than the turn-on voltage Vth of the first switching transistor Q1; the first switching transistor Q1 conducts, and the voltage value at point C of the signal stabilization circuit 23 is pulled down to a low level; Figure 7 It well shows the level change of the voltage value at point B of the capacitor charge and discharge circuit 24 and the voltage value at point C of the signal stabilization circuit 23. The time point of the level change of the voltage value at point C of the signal stabilization circuit 23 is when the voltage value at the control terminal of the first switching transistor Q1 reaches above Vth.
[0037] See Figure 8 , as a further embodiment, when the switch of the relay K1 is disconnected, the optocoupler U1 is in a cut-off state. At this time, the voltage at point D of the host 10 is in a high level state due to the ninth resistor R9, and the voltage is Figure 6 VCC3 of; when the normally open switch of the relay K1 is closed, since the voltage between AC02 and AC01 comes from the mains electricity and belongs to an AC power supply, the optocoupler U1 is in a conducting state when it is in the half-cycle lower sine wave. At this time, the voltage signal at point D of the host 10 is in a low level state, and the device circuit 12 works; the optocoupler U1 is in a cut-off state when AC02 and AC01 are in the half-cycle upper sine wave. At this time, the voltage signal at point D of the host 10 is in a high level state. Since the frequency of the mains electricity in our country is 50HZ, when the normally open switch of the relay K1 is closed, the voltage signal at point D belongs to a 50HZ square wave signal, and the signal waveform is as Figure 8 shown. In this embodiment, the host 10 closes the fan, refrigeration or heating function corresponding to the corresponding communication line when receiving a high-level voltage signal; when the host 10 receives a 50HZ square wave signal, it turns on the fan, refrigeration or heating function corresponding to the corresponding communication line; among them, the half-cycle lower sine wave means that the voltage at the secondary winding AC01 end is negative and the voltage at the AC02 end is positive; and the half-cycle upper sine wave means that the voltage at the secondary winding AC01 end is positive and the voltage at the AC02 end is negative.
[0038] In summary, the present invention discloses a control line and communication port connection detection circuit. Through the mutual cooperation of the signal stabilization circuit 23 and the capacitor charge and discharge circuit 24, it can be determined whether the control line A led out by the host 10 is accurately connected to the corresponding communication port of the controller 20 according to whether the potential at point C can be converted from high level to low level, which facilitates and quickly determines whether there is a misconnection or omission of the control line A led out by the host 10. Moreover, during the detection process, by setting the voltage-dividing resistor RC, the light-emitting diode inside the optocoupler U1 cannot reach the conduction requirement. Therefore, during the process of detecting whether the control line A is accurately connected, the optocoupler U1 is always in the cut-off state, and the drive circuits corresponding to the fan, heating device, and refrigeration device will not be mis-conducted, and the fan, heating device, and refrigeration device will not malfunction. After completing the detection of whether the control line A is accurately connected, when the temperature value monitored by the temperature detection circuit is not sufficient to trigger the microcontroller U2 to output a high-level control signal, the second capacitor C2 can continuously charge and discharge, so that the voltage at point B fluctuates within a certain range to ensure the conduction of the first switching transistor Q1, thereby keeping the potential at point C at a low level, and further, the potential at point C can continue to be used to determine whether the host 10 is normally electrically connected to the controller 20. Herein, normal electrical connection means that during the operation of the circuit, the connection condition of the control line A is good, and no abnormal conditions such as loosening or damage occur. When the temperature value monitored by the temperature detection circuit is sufficient to trigger the microcontroller U2 to output a high-level control signal, if the device circuit 12 works at this time, it indicates that the host 10 maintains a normal electrical connection with the controller 20. If the device circuit 12 does not work at this time, it can be determined through the potential at point C whether there is no normal electrical connection between the host 10 and the controller 20 or whether the normally open switch of the relay K1 is not normally closed, which facilitates troubleshooting of the circuit fault. Finally, the present invention can avoid forming a current loop by components such as the secondary winding AC02, AC01, relay K1, voltage-dividing resistor RC, fourth resistor R4, and fifth diode D5 of the rectifier bridge when AC01 is positive and AC02 is negative by setting the sixth diode D6 between the normally open switch of the relay K1 and the AC01 terminal. Therefore, when there is no normal electrical connection between the host 10 and the controller 20, the potential at point C can still be prevented from remaining at a low level, and further, misjudgment of the cause of the circuit fault can be avoided.
[0039] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other, and the key point of each embodiment is to illustrate the differences from other embodiments. In particular, for a system or system embodiment, since it is basically similar to a method embodiment, the description is relatively simple, and reference can be made to the relevant part of the method embodiment for the related content. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative efforts.
[0040] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0041] For the above description of the disclosed embodiments, the features recorded in each embodiment in this specification can be replaced or combined with each other, enabling those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A control line and communication port connection detection circuit, characterized in that It includes a host and a controller. The host includes an optocoupler circuit, and the controller includes a control and detection circuit, a capacitor charge and discharge circuit, and a signal stabilization circuit; The optocoupler circuit includes an optocoupler. The light-emitting diode of the optocoupler is connected in parallel with a first resistor. The anode of the light-emitting diode is connected to the cathode of a first diode. The anode of the first diode is connected to a detection switch. The cathode of the light-emitting diode is connected to a control line; The capacitor charge and discharge circuit includes a voltage-dividing resistor, a fourth resistor, and a second capacitor. One end of the voltage-dividing resistor is used to be connected to the control line. The other end of the voltage-dividing resistor is connected to the first end of the fourth resistor and is also connected to the first end of the second capacitor. The second end of the fourth resistor is connected to the second end of the second capacitor and is grounded; The signal stabilization circuit includes a fifth resistor, a sixth resistor, a third capacitor, and a first switching tube. The control end of the first switching tube is connected to the first end of the second capacitor. The first end of the first switching tube is grounded. The second end of the first switching tube is connected to the first ends of the fifth resistor and the sixth resistor. The second end of the fifth resistor is connected to a supply voltage. The second end of the sixth resistor is connected to the first end of the third capacitor and is connected to the input end of the control and detection circuit. The second end of the third capacitor is grounded; The control and detection circuit is used to detect the potential change at the first end of the third capacitor; Among them, the resistance values of the voltage-dividing resistor and the fourth resistor are used to prevent the light-emitting diode inside the optocoupler from meeting the conduction requirement when the first diode is conducting and there is current passing through the voltage-dividing resistor.
2. The connection detection circuit for a control line and a communication port according to claim 1, wherein: The control and detection circuit includes a single-chip microcomputer. The first input end of the single-chip microcomputer is connected to the first end of the third capacitor. The first output end of the single-chip microcomputer is connected to a display device, and the display device can be an LCD display screen or an LED lamp.
3. The connection detection circuit for the control line and the communication port according to claim 2, wherein: It also includes a transformer. The transformer is used to convert the mains power into a low-voltage AC power supply. The two ends of the low-voltage AC power supply are respectively connected to the cathodes of a fourth diode and a fifth diode. The anodes of the fourth diode and the fifth diode are grounded. One end of the low-voltage AC power supply is connected to the detection switch.
4. The connection detection circuit for the control line and the communication port according to claim 3, wherein: The second input end of the single-chip microcomputer is connected to a temperature detection circuit. The second output end of the single-chip microcomputer is connected to the control end of a second switching tube. The first end of the second switching tube is grounded. The second end of the second switching tube is connected to the control end of a signal switching circuit. The first end of the signal switching circuit is connected to the input of the capacitor charge and discharge circuit. The second end of the signal switching circuit is connected to the anode end of a sixth diode. The cathode end of the sixth diode is connected to one end of the low-voltage AC power supply. And the detection switch and the sixth diode are respectively connected to different ends of the low-voltage AC power supply; When the second switching tube is conducting, the signal switching circuit is used to conduct between the low-voltage AC power supply and the capacitor charge and discharge circuit; When the second switching tube is off, the signal switching circuit is used to disconnect between the low-voltage AC power supply and the capacitor charge and discharge circuit.
5. The connection detection circuit for a control line and a communication port according to claim 4, characterized in that: The signal switching circuit is a relay. The two ends of the normally open switch of the relay are respectively connected to the sixth diode and the capacitor charge and discharge circuit. The two ends of the coil of the relay are respectively connected to the supply voltage and the second end of the second switching tube.
6. A control line and communication port connection detection circuit according to claim 4, characterized in that: The temperature detection circuit includes a seventh resistor, a thermistor, and a fourth capacitor. The first end of the seventh resistor is connected to the supply voltage. The second end of the seventh resistor is connected to the second input terminal of the single-chip microcomputer, the first end of the thermistor, and the first end of the fourth capacitor. The second end of the thermistor and the second end of the fourth capacitor are grounded.
7. The connection detection circuit for the control line and the communication port according to claim 4, characterized in that: Both the first switching transistor and the second switching transistor are N-type MOS transistors.
8. A control line and communication port connection detection circuit according to claim 1, characterized in that: The fourth resistor is a variable resistor.
9. The connection detection circuit for the control line and the communication port according to claim 3, wherein: The low-voltage AC power supply is also used to supply power to the device circuit. The collector and emitter of the photosensitive triode of the optocoupler are both connected to the device circuit. The collector of the photosensitive triode is grounded, and the emitter of the photosensitive triode is connected to the first end of a ninth resistor. The second end of the ninth resistor is connected to the supply voltage.
Citation Information
Patent Citations
Switching power supply detection circuit
CN110824377A
Active discharge circuit of motor controller
CN118157088A
Load access detection circuit
CN210775699U
Equipment access identification circuit, discharging circuit and electronic equipment
CN217824303U
Alternating current charging pile relay adhesion detection circuit
CN218524834U