A control line and communication port connection detection circuit
By combining a photoelectric coupling circuit, a capacitor charging and discharging circuit, and a signal stabilization circuit, and using a single-chip microcomputer to monitor potential changes, the problem of complex and costly detection of the connection between the control line and the communication port is solved, achieving fast and accurate detection and troubleshooting.
Patent Information
- Application Number
- CN202510725894.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-06-03
AI Technical Summary
In the prior art, detection of the connection between the control line and the communication port is complex and costly, and it is difficult to quickly and accurately determine whether the control line is correctly connected to the corresponding port of the controller.
A combination of optocoupler circuit, capacitor charge and discharge circuit and signal stabilization circuit is adopted. The single chip microcomputer monitors the potential change to determine whether the control line is accurately connected to the communication port of the controller. The voltage divider resistor is used to prevent the optocoupler from misconnecting and avoid malfunction of the drive circuit. The current loop is controlled by a relay to ensure accurate detection and troubleshooting.
It can quickly and accurately determine whether the control line is correctly connected to the communication port, avoid malfunction of the drive circuit, simplify the detection process, reduce costs, and effectively troubleshoot circuit faults.
Smart Images

Figure CN120254709B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of line detection, and in particular to a control line and communication port connection detection circuit. Background Art
[0002] The controller of the temperature control system needs to control the opening and closing of external devices. Before controlling the opening and closing of external devices, it is necessary to ensure that the controller and the driving circuit of the external devices are connected. After the installation is completed by the engineers, it is necessary to check whether the control lines drawn from the host computer containing the driving circuit of the external devices are all 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, the detection method used is mostly achieved through detection chips or sensors. However, this traditional detection method is complex and costly. Summary of the Invention
[0003] The purpose of the present invention is to improve and innovate the shortcomings and problems existing in the background technology and provide a control line and communication port connection detection circuit.
[0004] A control line and communication port connection detection circuit includes a host and a controller, the host includes a photoelectric coupling circuit, and the controller includes a control and detection circuit, a capacitor charging and discharging circuit, and a signal stabilization circuit;
[0005] The photoelectric coupling circuit includes a photoelectric coupler, a light emitting diode of the photoelectric coupler is connected in parallel with a first resistor, an anode of the light emitting diode is connected to a cathode of the first diode, an anode of the first diode is connected to a detection switch, and a cathode of the light emitting diode is connected to a control line;
[0006] The capacitor charge and discharge circuit includes a voltage divider resistor, a fourth resistor, and a second capacitor; one end of the voltage divider resistor is used to be connected to the control line, and the other end of the voltage divider resistor is connected to the first end of the fourth resistor and 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;
[0007] The signal stabilization circuit includes a fifth resistor, a sixth resistor, a third capacitor, and a first switch tube, wherein the control end of the first switch tube is connected to the first end of the second capacitor, the first end of the first switch tube is grounded, and the second end of the first switch tube is connected to the first end of the fifth resistor and the first end of the sixth resistor; the second end of the fifth resistor is connected to the power supply voltage; the second end of the sixth resistor is connected to the first end of the third capacitor and to the input end of the control and detection circuit; and the second end of the third capacitor is grounded;
[0008] The control and detection circuit is used to detect the potential change of the first end of the third capacitor;
[0009] The resistance values of the voltage divider resistor and the fourth resistor are used to prevent the light emitting diode inside the photoelectric coupler from meeting the conduction requirement when the first diode is in conduction and current flows through the voltage divider resistor.
[0010] 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 the display device, which can be an LCD display or an LED lamp.
[0011] A further solution is to further include a transformer, which is used to convert the mains electricity 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 the detection switch.
[0012] A further solution is that the second input terminal of the single-chip microcomputer is connected to the temperature detection circuit, the second output terminal of the single-chip microcomputer is connected to the control terminal of the second switch tube, the first terminal of the second switch tube is grounded, and the second terminal of the second switch tube is connected to the control terminal of the signal switch circuit; the first terminal of the signal switch circuit is connected to the input of the capacitor charging and discharging circuit; the second terminal of the signal switch circuit is connected to the anode terminal of the sixth diode, and the cathode terminal 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;
[0013] When the second switch tube is turned on, the signal switch circuit is used to disconnect the low-voltage AC power supply from the capacitor charging and discharging circuit;
[0014] When the second switch tube is disconnected, the signal switch circuit is used to connect the low-voltage AC power supply and the capacitor charging and discharging circuit.
[0015] 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 charging and discharging circuit, and the two ends of the relay coil are respectively connected to the power supply voltage and the second end of the second switch tube.
[0016] 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 power supply voltage, the second end of the seventh resistor is connected to the second input end of the microcontroller and the first end of the thermistor and the first end of the fourth capacitor, and the second end of the thermistor and the second end of the fourth capacitor are grounded.
[0017] A further solution is that both the first switch tube and the second switch tube are N-type MOS tubes.
[0018] A further solution is that the fourth resistor is an adjustable resistor.
[0019] A further solution is that the low-voltage AC power supply is also used to power the device circuit, the collector and emitter of the phototransistor of the photocoupler are both connected to the device circuit, and the collector of the phototransistor is grounded, the emitter of the phototransistor is connected to the first end of the ninth resistor, and the second end of the ninth resistor is connected to the power supply voltage.
[0020] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention discloses a control line and communication port connection detection circuit, which can judge whether the control line led out of the host is accurately connected to the communication port corresponding to the controller according to whether the potential monitored by the single-chip microcomputer can be converted from a high level to a low level through the mutual cooperation of the signal stabilization circuit and the capacitor charging and discharging circuit, and conveniently and quickly judge whether the control line led out of the host is misconnected or missing; and in the detection process, by setting a voltage divider resistor, the light-emitting diode inside the photoelectric coupler does not meet the conduction requirement, so that in the process of detecting whether the control line is accurately connected, the photoelectric coupler is always in the cut-off state, the drive circuits corresponding to the fan, heating device and refrigeration device will not be misconnected, and the fan, heating device and refrigeration device will not malfunction. After completing the test to determine whether the control line is correctly connected, if 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 be continuously charged and discharged so that the voltage on the second capacitor fluctuates within a certain range to ensure the conduction of the first switch tube, thereby keeping the potential monitored by the single-chip microcomputer at a low level. Then, the potential monitored by the single-chip microcomputer can be used to determine whether the host is normally electrically connected to the controller. Normal electrical connection means that during the operation of the circuit, the control line is well connected and has not experienced any abnormal conditions such as loosening or damage. 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 is working, it indicates that the host maintains a normal electrical connection with the controller. If the device circuit is not working, the potential monitored by the single-chip microcomputer can be used to determine whether there is no normal electrical connection between the host and the controller, or whether the normally open switch of the coil is not closed normally, thereby facilitating the troubleshooting of circuit faults. Finally, the present invention can avoid the two ends of the secondary winding, the relay, the voltage-dividing resistor, the fourth resistor, and the fifth diode of the rectifier bridge from forming a current loop by setting a sixth diode between the normally-open switch of the coil and the low-voltage AC power supply, thereby avoiding the potential monitored by the microcontroller from remaining at a low level when there is no normal electrical connection between the host and the controller, thereby avoiding misjudgment of the cause of the circuit failure. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 A block diagram of a control line and communication port connection detection circuit provided by an embodiment of the present invention;
[0023] Figure 2 A schematic structural diagram of a control line and communication port connection detection circuit provided by an embodiment of the present invention;
[0024] Figure 3 A circuit for detecting a connection between a control line and a communication port provided by an embodiment of the present invention Figure 1 ;
[0025] Figure 4 A circuit for detecting a connection between a control line and a communication port provided by an embodiment of the present invention Figure 2 ;
[0026] Figure 5 A current loop diagram of a control line and communication port connection detection circuit during detection provided by an embodiment of the present invention;
[0027] Figure 6 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 across the secondary winding is in a half-cycle lower sine wave during the operation of the device circuit;
[0028] Figure 7 A diagram showing voltage changes at points B and C during a detection process of a control line and communication port connection detection circuit provided by an embodiment of the present invention;
[0029] Figure 8 This is a diagram of the voltage change at point D of a control line and communication port connection detection circuit provided by an embodiment of the present invention under the isolation and coupling states of the photoelectric coupler.
[0030] Figure numerals: 10, host; 11, optocoupler circuit; 12, device circuit; 21, power management module; 22, control and detection circuit; 23, signal stabilization circuit; 24, capacitor charging and discharging circuit; 25, signal switching circuit; R1, first resistor; R2, second resistor; RC, voltage divider 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 switch tube; Q2, second switch tube; 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 DESCRIPTION
[0031] In order to make the objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this invention pertains. The terms used in this specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0033] like Figure 1 As shown, the present invention discloses a control line and communication port connection detection circuit, the primary winding of the transformer is connected to the mains, and the two 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. The communication port of the host 10 has multiple control lines A leading out, and different control lines A have different control functions; for example, for a temperature control system, the control line A includes a fan control line, a heating control line and a cooling control line, the heating control line is used to turn on the heating function, and the cooling control line is used to turn on the cooling function. The other end of the control line A needs to be connected to the corresponding communication port of the controller 20, and there must be no wrong connection or missed connection. The control line and communication port connection detection circuit provided by the present invention describes a 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.
[0034] See also Figure 2As 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 charging and discharging 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 charging and discharging 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. The output end of the capacitor charging and discharging 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, after passing through the rectifier bridge, the two ends of the secondary winding AC01 and AC02 output DC power. The two ends of the DC power are DC+ and DC- respectively. The two ends of the DC power are connected to a first capacitor C1, which is a voltage stabilization 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 to the controller 20. Since the power management module 21 is an existing common circuit, the implementation process of the prior art can be referred to, and it is irrelevant to the inventive point of the present invention and will not be described here in detail.
[0035] See also Figure 3 As a further embodiment, the host 10 includes a photoelectric coupling circuit 11, which includes a detection switch K2, a first diode D1, a first resistor R1, a photoelectric coupler U1, and a second resistor R2. The anode terminal of the first diode D1 is connected to the AC02 terminal of the secondary winding via the detection switch K2, and the cathode terminal of the first diode D1 is connected to the anode terminal of the light-emitting diode of the photoelectric coupler U1 and one end of the first resistor R1. The other end of the first resistor R1 is connected to the cathode terminal of the light-emitting diode of the photoelectric coupler U1 and 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 phototransistor of the photocoupler U1 are connected to the device circuit 12. The device circuit 12 can be a drive circuit corresponding to a fan, heating device, or refrigeration device. When the light-emitting diode of the photocoupler U1 is turned on, light emitted by the light-emitting diode of the photocoupler U1 illuminates the phototransistor, turning it on, thereby operating the fan, heating device, or refrigeration device. The input and output ends of the optocoupler U1 are coupled through optical signals and there is no direct electrical connection. Therefore, it can effectively isolate high voltage, strong current or interference between different power supply systems, and prevent electrical noise or high-voltage signals from damaging low-voltage circuits.
[0036] Furthermore, the capacitor charge and discharge circuit 24 includes a voltage divider resistor RC, a fourth resistor R4, and a second capacitor C2. One end of the voltage divider resistor RC is connected to the control line A via a corresponding communication port of the controller 20 and is also connected to the first end of the signal switch circuit 25. The other end of the voltage divider 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 also grounded.
[0037] Furthermore, the signal stabilization circuit 23 includes a fifth resistor R5, a sixth resistor R6, a third capacitor C3, and a first switch transistor Q1. A control terminal of the first switch transistor Q1 is connected to a first terminal of the second capacitor C2 and a first terminal of the fourth resistor R4. The first terminal of the first switch transistor Q1 is grounded. A second terminal of the first switch transistor Q1 is connected to a first terminal of the fifth resistor R5 and a first terminal of the sixth resistor R6. The second terminal of the fifth resistor R5 is connected to a power supply voltage. The second terminal of the sixth resistor R6 is connected to a first terminal of the third capacitor C3 and to an input terminal of the control and detection circuit 22. The second terminal of the third capacitor C3 is grounded.
[0038] Furthermore, 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 both the display device and the temperature detection circuit. The first input terminal of the single-chip microcomputer U2 is connected to the second terminal of the sixth resistor R6 for detecting the potential signal at the second terminal of the sixth resistor R6 and displaying the signal on the display device. The display device can be an LCD display or an LED light, and this application does not impose specific limitations. The LCD display directly displays whether the second terminal of the sixth resistor R6 is at a high or low level. The on / off state of the LED light is controlled by the level state (high or low) at 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, which 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, the second terminal of the seventh resistor R7 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 of the thermistor RT changes with the change of temperature. The second input terminal of the single-chip microcomputer U2 can calculate the resistance of the thermistor RT by obtaining the voltage divider on the thermistor RT, thereby measuring the ambient temperature value; the thermistor RT can be an NTC thermistor or a PTC thermistor, and this application does not make specific restrictions. After the single-chip microcomputer U2 measures the ambient temperature value, it outputs a corresponding control signal to the control terminal of the second switch tube Q2 to control the on and off of the second switch tube Q2. The first end of the second switch tube Q2 is grounded, and the second end of the second switch tube Q2 is connected to the control terminal of the signal switch circuit 25. It should be noted that the single-chip microcomputer U2 measures the corresponding temperature value through the voltage divider on the thermistor RT, which is a prior art. The single-chip microcomputer U2 contains an ADC converter that can realize the conversion between analog signals and digital signals.
[0039] It should be noted that the first switch Q1 and the second switch Q2 can be N-type MOS transistors. Accordingly, the control terminals of the first switch Q1 and the second switch Q2 are both gates, the first terminals of the first switch Q1 and the second switch Q2 are both sources, and the second terminals of the first switch Q1 and the second switch Q2 are both drains. The conduction condition for an N-type MOS transistor is that the gate voltage (Vg) is higher than the source voltage (Vs), and the voltage difference between the gate voltage (Vgs) and the source voltage (Vs) is greater than the threshold voltage (Vgs(th)).
[0040] Furthermore, the signal switching circuit 25 includes a relay K1. A first end of the coil of relay K1 is connected to the second end of the second switch Q2 of the control and detection circuit 22; a second end of the coil is connected to the power supply voltage; a second end of the normally open switch of relay K1 is connected to the AC power supply AC01 via a sixth diode D6; and a first end of the normally open switch of relay K1 is connected to the communication port of the controller 20 and the input end of the capacitor charging and discharging circuit 24. When the coil of relay K1 is energized, the normally open switch of relay K1 is closed; when the coil of relay K1 is de-energized, the normally open switch of relay K1 remains open.
[0041] See also Figure 4 As a further embodiment, the voltage-dividing resistor RC may include multiple resistors connected in series, RC1, RC2, RC3...RCN; the fourth resistor R4 in the capacitor charge and discharge circuit 24 may be an adjustable resistor, and the charge and discharge speed of the second capacitor C2 may be adjusted by adjusting the resistance value of the fourth resistor R4; 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, thereby preventing overvoltage damage to the first switch tube Q1.
[0042] See also Figure 5 As a further embodiment, during the process of detecting whether the drawn control line A is accurately connected to the communication port corresponding to the controller 20, the detection switch K2 is manually closed when the normally open switch of the relay K1 is disconnected; if the control line A is accurately connected to the communication port corresponding to the controller 20, then when the voltage at the secondary winding AC02 end is positive and the voltage at the secondary winding AC01 end is negative, the first diode D1 is turned on, and the components AC01 and AC02 of the secondary winding, the first diode D1, the first resistor R1, the second resistor R2, the voltage divider resistor RC, the fourth resistor R4, and the fourth diode D4 of the rectifier bridge form a current loop of the detection circuit, charging the second capacitor C2. The voltage divider resistor RC and the fourth resistor R4 are set to appropriate values so that the divided voltage across the fourth resistor R4 is greater than the turn-on voltage Vth of the first switch Q1. That is, the voltage charged across the second capacitor C2 is greater than the turn-on voltage Vth of the first switch Q1, causing the first switch Q1 to switch from the off state to the on state. Since the third capacitor C3 is fully charged before the control line A is connected, after the first switch Q1 switches from the off state to the on state, the third capacitor C3 is discharged through the sixth resistor R6 and the first switch Q1, causing the voltage at point C to gradually decrease to zero. This causes the potential at point C to transition from a high level to a low level and remain stably at a low level. The potential at point C can then be used to determine whether the control line A derived from the host 10 is accurately connected to the corresponding communication port of the controller 20.
[0043] It should be noted that different control lines A correspond to independent optocoupler circuits 11, signal switch circuits 25, capacitor charge and discharge circuits 24, and signal stabilization circuits 23. During the detection process of accessing a certain control line A, the detection switch K2 corresponding to the control line A is closed, and 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 port corresponding to the single-chip microcomputer U2 is converted from a high level to a 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 is converted from a high level to a 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 a port of the single-chip microcomputer U2 is converted from a high level to a low level, it indicates that the control line A is missing.
[0044] By way of example and not limitation, when control line A corresponding to the heating device corresponds to port PA2 of microcontroller U2, and when control line A corresponding to the cooling device corresponds to port PA3 of microcontroller U2, after closing detection switch K2 corresponding to control line A corresponding to the heating device, if microcontroller U2 detects that the input of port PA2 switches from a high level to a low level, it indicates that control line A of the heating device is correctly connected to the communication port corresponding to controller 20. If microcontroller U2 detects that the input of port PA3 switches from a high level to a low level at this time, it indicates that control line A of the heating device is incorrectly connected to the communication port corresponding to controller 20. Therefore, the present invention can conveniently detect whether control line A drawn from host 10 is correctly connected to the communication port corresponding to controller 20.
[0045] It should be further explained that in this circuit, the voltage divider resistor RC and the fourth resistor R4 should be selected to have relatively large resistance values so that the light-emitting diode within the optocoupler U1 of the optocoupler circuit 11 does not meet the conduction requirement. Therefore, during the process of detecting whether the control line A is correctly connected, the optocoupler U1 is always in the off state, and the corresponding drive circuits of the fan, heating device, and cooling device will not be misconnected, and the fan, heating device, and cooling device will not malfunction. In addition, if the normally open switch of relay K1 needs to remain open during the detection process, this can be achieved by modifying the temperature setting value in the microcontroller U2, so that the microcontroller U2 does not output a high-level signal to the second switch Q2 due to the temperature value monitored by the temperature detection circuit.
[0046] Continue reading Figure 5It can be understood that after the control line A is properly connected, the circuit begins to operate normally. If the temperature detected by the temperature detection circuit is insufficient to trigger the microcontroller U2 to output a high-level signal to the second switch Q2, the second switch Q2 is in the off state, and the corresponding normally open switch of the 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, causing the second capacitor C2 to continuously charge and discharge. The voltage at point B fluctuates within a certain range, ensuring that the first switch Q1 is turned on, thereby keeping the potential at point C at a low level. Therefore, the potential at point C can continue to be used to determine whether the host 10 is properly electrically connected to the controller 20. Normal electrical connection means that during circuit operation, the control line A is well connected and has not experienced any abnormal conditions such as looseness or damage.
[0047] See also Figure 6 As a further embodiment, when the temperature value monitored by the temperature detection circuit triggers the microcontroller U2 to output a high-level signal to the second switch Q2, the second switch Q2 is in the on state, energizing the coil of the relay K1 and thereby closing the normally open switch. Thus, when the voltage of the secondary winding AC02 is positive and the voltage of the secondary winding AC01 is negative, the voltage divider resistor RC and the fourth resistor R4 are short-circuited. Because this circuit does not include large resistors such as the voltage divider resistor RC and the fourth resistor R4 connected in series, the secondary winding AC01, AC02, the first diode D1, the first resistor R1, the light-emitting diode within the optocoupler U1, the second resistor R2, the sixth diode D6, and the relay K1 form a conductive circuit for the optocoupler U1. Therefore, when the normally open switch of the relay K1 is closed, the optocoupler U1 is in the on state. Consequently, the corresponding device circuit 12 can drive an external fan, cooling device, or heating device to operate based on the temperature value monitored by the temperature detection circuit.
[0048] It should be noted that when the single-chip microcomputer U2 should output a high-level signal to the control end of the corresponding second switch tube Q2 according to the temperature value monitored 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. At this time, it is not necessary to use the potential of point C to determine whether the host 10 is normally electrically connected to the controller 20; on the contrary, since the voltage divider 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 be discharged through the fourth resistor R4, causing the voltage across the second capacitor C2 to decrease, and thus unable to reach the first switch tube Q1. The conduction voltage Vth causes the potential at point C to transition from a low level to a high level. If the device circuit 12 is not working at this time, it may be that the normally-open switch of relay K1 is not closed properly, or that the host 10 is not properly electrically connected to the controller 20. If the normally-open switch of relay K1 is not closed properly, the voltage divider resistor RC and the fourth resistor R4 will not be short-circuited by the normally-open switch of relay K1, and the potential at point C will remain low. If the host 10 is not properly electrically connected to the controller 20, the disconnection between the host 10 and the controller 20 prevents the second capacitor C2 from being charged, causing the potential at point C to transition from a low level to a high level. Therefore, if the device circuit 12 should be working but is not working, the potential at point C can be used to determine whether there is a normal electrical connection between the host 10 and the controller 20 or whether the normally-open switch of relay K1 is not closed properly, thereby facilitating circuit fault troubleshooting.
[0049] It should be further explained that the present invention provides a sixth diode D6 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 AC01. On the one hand, when AC02 is positive and AC01 is negative, the conduction circuit of the photocoupler U1 composed of AC01, AC02, the first diode D1, the first resistor R1, the light-emitting diode inside the photocoupler U1, the second resistor R2, the sixth diode D6 and the relay K1 will not be hindered. On the other hand, when AC01 is positive and AC02 is negative, the secondary winding AC02, AC01, relay K1, voltage-dividing resistor RC, fourth resistor R4, and fifth diode D5 of the rectifier bridge cannot form a current loop, thereby failing to charge the second capacitor C2. Therefore, when the normally-open switch of relay K1 is closed, the second capacitor C2 will not be charged, thereby preventing the potential at point C from remaining at a low level when there is no normal electrical connection between the host 10 and the controller 20, thereby avoiding misjudgment of the cause of the circuit failure.
[0050] See also Figure 7As a further embodiment, when the relay K1 is normally open and the control line A from the host 10 is not connected to the controller 20, Figure 5 The voltage value at point B of the capacitor charge and discharge circuit 24 is in a low level state. Figure 5 The voltage value of point C of the signal stabilization circuit 23 is in a high level state; when the control line A drawn from the host 10 is connected to the controller 20, and the detection switch K2 is closed; at this time, Figure 5 At point B of the capacitor charge and discharge circuit 24, the voltage divided by the voltage-dividing resistor RC and the fourth resistor R4 charges the second capacitor C2, causing the voltage at point B to gradually increase. When the voltage at point B exceeds the turn-on voltage Vth of the first switch Q1, the first switch Q1 is turned on, and the voltage at point C of the signal stabilization circuit 23 is pulled down to a low level. Figure 7 The level changes of the voltage value at point B of the capacitor charging and discharging circuit 24 and the voltage value at point C of the signal stabilization circuit 23 are well demonstrated. 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 switch tube Q1 reaches above Vth.
[0051] See also Figure 8 As a further embodiment, when the relay K1 is disconnected, the photoelectric coupler U1 is in the 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. The voltage is Figure 6 VCC3; when the normally open switch of relay K1 is closed, since the voltage between AC02 and AC01 comes from the mains, it is an AC power supply. When it is in the half-cycle lower sine wave, the optocoupler U1 is in the on state. At this time, the voltage signal at point D of the host 10 is low, and the device circuit 12 is working; when AC02 and AC01 are in the half-cycle upper sine wave, the optocoupler U1 is in the off state. At this time, the voltage signal at point D of the host 10 is high. Since the frequency of the mains electricity in my country is 50HZ, when the normally open switch of relay K1 is closed, the voltage signal at point D is a 50HZ square wave signal. The signal waveform is as follows: Figure 8 In this embodiment, the host 10 turns off the fan corresponding to the corresponding communication line, and the cooling or heating function, when it receives a high-level voltage signal. When the host 10 receives a 50 Hz square wave signal, it turns on the fan corresponding to the corresponding communication line, and the cooling or heating function. A half-cycle lower sine wave refers to a negative voltage at the secondary winding AC01 terminal and a positive voltage at the AC02 terminal; a half-cycle upper sine wave refers to a positive voltage at the secondary winding AC01 terminal and a negative voltage at the AC02 terminal.
[0052] 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 charging and discharging circuit 24, it can be judged whether the control line A led out of the host 10 is accurately connected to the communication port corresponding to the controller 20 according to whether the potential of point C can be converted from a high level to a low level, and it is convenient and quick to judge whether the control line A led out of the host 10 is misconnected or missed; and in the detection process, by setting the voltage divider resistor RC, the light-emitting diode inside the photoelectric coupler U1 does not meet the conduction requirement, so that in the process of detecting whether the control line A is accurately connected, the photoelectric coupler U1 is always in the cut-off state, the drive circuits corresponding to the fan, heating device and refrigeration device will not be misconnected, and the fan, heating device and refrigeration device will not malfunction. After completing the test to determine if control line A is properly connected, if the temperature detected by the temperature detection circuit is insufficient to trigger microcontroller U2 to output a high-level control signal, the second capacitor C2 can continuously charge and discharge, causing the voltage at point B to fluctuate within a certain range, thereby ensuring the conduction of the first switch Q1, thereby maintaining the potential at point C at a low level. The potential at point C can then be used to determine whether the host 10 is properly electrically connected to the controller 20. A normal electrical connection means that during circuit operation, the control line A is properly connected, free of any abnormalities such as looseness or damage. If the temperature detected by the temperature detection circuit is sufficient to trigger microcontroller U2 to output a high-level control signal, and the device circuit 12 is operating, this indicates that the host 10 maintains a normal electrical connection with the controller 20. If the device circuit 12 is not operating, the potential at point C can be used to determine whether the host 10 and controller 20 are not properly connected, or whether the normally open switch of relay K1 is not properly closed, thereby facilitating circuit fault troubleshooting. Finally, the present invention provides a sixth diode D6 between the normally open switch of the relay K1 and the AC01 terminal. This can prevent the secondary winding AC02, AC01, the relay K1, the voltage divider resistor RC, the fourth resistor R4, and the fifth diode D5 of the rectifier bridge from forming a current loop when AC01 is positive and AC02 is negative. This can prevent the potential at point C from remaining at a low level when there is no normal electrical connection between the host 10 and the controller 20, thereby avoiding misjudgment of the cause of the circuit fault.
[0053] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple. For relevant parts, refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on 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 expending creative work.
[0054] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0055] With respect to the above description of the disclosed embodiments, the features described in the various embodiments in this specification may be interchanged or combined to enable those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein, but is intended to 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, wherein the host includes a photoelectric coupling circuit, and the controller includes a control and detection circuit, a capacitor charging and discharging circuit, and a signal stabilization circuit; The photoelectric coupling circuit includes a photoelectric coupler, a light emitting diode of the photoelectric coupler is connected in parallel with a first resistor, an anode of the light emitting diode is connected to a cathode of the first diode, an anode of the first diode is connected to a detection switch, and a cathode of the light emitting diode is connected to a control line; The capacitor charge and discharge circuit includes a voltage divider resistor, a fourth resistor, and a second capacitor; one end of the voltage divider resistor is used to be connected to the control line, and the other end of the voltage divider resistor is connected to the first end of the fourth resistor and 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 switch tube, wherein the control end of the first switch tube is connected to the first end of the second capacitor, the first end of the first switch tube is grounded, and the second end of the first switch tube is connected to the first end of the fifth resistor and the first end of the sixth resistor; the second end of the fifth resistor is connected to the power supply voltage; the second end of the sixth resistor is connected to the first end of the third capacitor and to the input end of the control and detection circuit; and the second end of the third capacitor is grounded; The control and detection circuit is used to detect the potential change of the first end of the third capacitor; The resistance values of the voltage divider resistor and the fourth resistor are used to prevent the light-emitting diode inside the photoelectric coupler from meeting the conduction requirement when the first diode is in conduction and current flows through the voltage divider resistor; The control and detection circuit includes a single chip microcomputer, a first input terminal of the single chip microcomputer is connected to the first terminal of the third capacitor, and a first output terminal of the single chip microcomputer is connected to the display device; The device further includes a transformer for converting the mains electricity into a low-voltage AC power supply, wherein both ends of the low-voltage AC power supply are connected to the cathodes of the fourth diode and the fifth diode respectively, 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 the detection switch; The second input terminal of the single-chip microcomputer is connected to the temperature detection circuit, the second output terminal of the single-chip microcomputer is connected to the control terminal of the second switch tube, the first terminal of the second switch tube is grounded, and the second terminal of the second switch tube is connected to the control terminal of the signal switch circuit; the first terminal of the signal switch circuit is connected to the input of the capacitor charging and discharging circuit; the second terminal of the signal switch circuit is connected to the anode terminal of the sixth diode, and the cathode terminal 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 switch tube is turned on, the signal switch circuit is used to disconnect the low-voltage AC power supply from the capacitor charging and discharging circuit; When the second switch tube is disconnected, the signal switch circuit is used to connect the low-voltage AC power supply and the capacitor charging and discharging circuit.
2. A control line and communication port connection detection circuit according to claim 1, characterized in that: The display device is an LCD display screen or an LED lamp.
3. The control line and communication port connection detection circuit according to claim 1, characterized in that: The signal switch 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 charging and discharging circuit, and the two ends of the coil of the relay are respectively connected to the power supply voltage and the second end of the second switch tube.
4. The control line and communication port connection detection circuit according to claim 1, 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 power supply voltage, the second end of the seventh resistor is connected to the second input end of the single-chip microcomputer and the first end of the thermistor and the first end of the fourth capacitor, and the second end of the thermistor and the second end of the fourth capacitor are grounded.
5. The control line and communication port connection detection circuit according to claim 1, characterized in that: The first switch tube and the second switch tube are both N-type MOS tubes.
6. The control line and communication port connection detection circuit according to claim 1, characterized in that: The fourth resistor is an adjustable resistor.
7. The control line and communication port connection detection circuit according to claim 1, characterized in that: The low-voltage AC power supply is also used to power the device circuit. The collector and emitter of the phototransistor of the photocoupler are both connected to the device circuit, and the collector of the phototransistor is grounded. The emitter of the phototransistor is connected to the first end of the ninth resistor, and the second end of the ninth resistor is connected to the power supply voltage.
Citation Information
Patent Citations
Alternating current charging pile relay adhesion detection circuit
CN218524834U
Detection circuit, leakage protector and household appliance
CN221650583U