Switching value acquisition device
Patent Information
- Application Number
- CN202411523447.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-03-11
AI Technical Summary
Traditional switching input boards cannot have the switching quantity acquisition capabilities of dry contact switches and wet contact switches at the same time, and cannot realize the self-diagnosis function of the acquisition circuit, resulting in a low acquisition capability of the switching quantity signal.
A switching quantity acquisition device is designed, including a microcontroller unit and at least one signal acquisition circuit. The signal acquisition circuit includes a connector and an abnormality detection circuit, which can adapt to the switching quantity signal acquisition of dry contact switches and wet contact switches, and perform state diagnosis through the abnormality detection circuit.
The switching signal acquisition capability of dry contact switches and wet contact switches is realized, and circuit abnormalities are discovered in a timely manner, which improves the switching signal acquisition capability and system reliability.
Smart Images

Figure CN119596757A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of digital control, and in particular to a switch quantity acquisition device. Background Art
[0002] At present, in industrial control equipment, it is often necessary to use switch input cards to collect and convert switch signals of contact switches. Switch input cards should have the ability to collect dry contact switch signals and wet contact switch signals, and integrate fault self-diagnosis functions in the circuit, so that the switch input card has high reliability.
[0003] However, traditional switch quantity input boards cannot simultaneously have the switch quantity acquisition capabilities of dry contact switches and wet contact switches, and cannot realize the self-diagnosis function of the acquisition circuit, and cannot confirm whether the switch quantity input board has an abnormal state, resulting in a low ability to acquire switch quantity signals. Summary of the invention
[0004] In view of this, the present application provides a switch quantity acquisition device, the main purpose of which is to solve the technical problem of low acquisition capability of switch quantity signals.
[0005] According to a first aspect of the present invention, there is provided a switch quantity acquisition device for acquiring a switch quantity signal of a contact switch, the switch quantity acquisition device comprising a micro control unit and at least one signal acquisition circuit;
[0006] The signal acquisition circuit includes a connector and an abnormality detection circuit;
[0007] The first access terminal and the second access terminal of the connector are connected to the positive terminal of the contact switch, the third access terminal and the fourth access terminal of the connector are connected to the negative terminal of the contact switch, and are used to collect the switch signal of the contact switch, and the first output terminal of the connector is connected to a first external power supply;
[0008] The second output terminal and the third output terminal of the connector are connected to form a signal output terminal, and the input terminal of the micro control unit is connected to the signal output terminal for receiving the switch signal;
[0009] The controlled end of the abnormality detection circuit is connected to the control end of the micro control unit, and the output end of the abnormality detection circuit is connected between the signal output end and the input end of the micro control unit;
[0010] The micro control unit is used to perform status diagnosis on the switch quantity acquisition device through the abnormality detection circuit to obtain a status diagnosis result.
[0011] Optionally, the microcontroller unit includes a microcontroller and at least one optocoupler, wherein the optocoupler includes multiple optocoupler units; the signal output end is connected to the anode end of an optocoupler unit of the optocoupler, the collector end of the optocoupler unit is connected to the input end of the microcontroller, and the optocoupler unit is used to send the switching signal output by the signal output end to the microcontroller.
[0012] Optionally, the micro control unit further includes at least one pull-up resistor; a first end of each pull-up resistor is connected to a second external power supply, and a second end of each pull-up resistor is connected to a collector end of an optocoupler unit corresponding to the pull-up resistor.
[0013] Optionally, the microcontroller unit is used to perform status diagnosis on the switch quantity acquisition device through the abnormality detection circuit, and a method for obtaining a status diagnosis result includes: when the microcontroller unit obtains the switch quantity signal, the microcontroller unit controls the abnormality detection circuit to reverse the switch quantity signal sent from the connector to the microcontroller unit; after controlling the abnormality detection circuit to reverse the switch quantity signal sent from the connector to the microcontroller unit, it is determined whether the switch quantity signal obtained by the microcontroller unit undergoes signal reversal; if the switch quantity signal obtained by the microcontroller unit does not undergo signal reversal, the status diagnosis result is determined to be an abnormal state.
[0014] Optionally, the abnormality detection circuit includes a first switching device, a second switching device and a first resistor; the first connection end of the first switching device is connected to the first external power supply, and the connection end after the second connection end of the first switching device is connected to the first connection end of the second switching device serves as the output end of the abnormality detection circuit; the second connection end of the second switching device is connected to the first end of the first resistor, and the second end of the first resistor is grounded; the control output end of the micro control unit is respectively connected to the controlled end of the first switching device and the controlled end of the second switching device, for controlling the first connection end and the second connection end of the first switching device to be in an on or off state, and controlling the first connection end and the second connection end of the second switching device to be in an on or off state.
[0015] Optionally, the first switching device is a first solid-state relay, and the second switching device is a second solid-state relay; the first output end of the first solid-state relay serves as the first connection end of the first switching device, the second output end of the first solid-state relay serves as the second connection end of the first switching device, the first output end of the second solid-state relay serves as the first connection end of the second switching device, and the second output end of the second solid-state relay serves as the second connection end of the second switching device; the micro control unit is used to control the first output end and the second output end of the first solid-state relay to be in an on or off state, and control the first output end and the second output end of the second solid-state relay to be in an on or off state.
[0016] Optionally, the control output end of the micro control unit includes a first control output sub-end and a second control output sub-end; the abnormality detection circuit also includes a first capacitor, a second capacitor, a second resistor, a third resistor, a first transistor and a second transistor; the connection end after the first end of the first capacitor and the first end of the second capacitor are connected is connected to a third external power supply, and the second end of the first capacitor and the second end of the second capacitor are grounded; the base of the first transistor is connected to the first control output sub-end of the micro control unit, the emitter of the first transistor is grounded, the collector of the first transistor is connected to the first end of the second resistor, the second end of the second resistor is connected to the first input end of the first solid-state relay, and the first end of the first solid-state relay is connected to the first input end of the first solid-state relay. The second input terminal is connected to the third external power supply, so that when the first control output sub-terminal of the micro control unit outputs a high level signal, the first output terminal and the second output terminal of the first solid-state relay are in a conductive state; the base of the second transistor is connected to the second control output sub-terminal of the micro control unit, the emitter of the second transistor is grounded, the collector of the second transistor is connected to the first end of the third resistor, the second end of the third resistor is connected to the first input terminal of the second solid-state relay, and the second input terminal of the second solid-state relay is connected to the third external power supply, so that when the second control output sub-terminal of the micro control unit outputs a high level signal, the first output terminal and the second output terminal of the second solid-state relay are in a conductive state.
[0017] Optionally, the signal acquisition circuit also includes a signal conditioning circuit; the signal conditioning circuit is connected between the signal output end and the input end of the micro control unit, and is used to perform signal optimization processing on the switch signal sent from the signal output end to the input end of the micro control unit.
[0018] Optionally, the signal conditioning circuit includes a first unidirectional transient suppression diode, a second unidirectional transient suppression diode, a third capacitor, a fourth capacitor, a fourth resistor and a bidirectional transient suppression diode; the first end of the fourth resistor is connected to the signal output end, the second end of the fourth resistor is connected to the anode end of the first unidirectional transient suppression diode, and the cathode end of the first unidirectional transient suppression diode is connected to the input end of the micro control unit; the cathode end of the second unidirectional transient suppression diode, the first end of the third capacitor, the first end of the fourth capacitor and the first end of the bidirectional transient suppression diode are respectively connected between the cathode end of the first unidirectional transient suppression diode and the input end of the micro control unit; the anode end of the second unidirectional transient suppression diode, the second end of the third capacitor, the second end of the fourth capacitor and the second end of the bidirectional transient suppression diode are respectively grounded.
[0019] Optionally, the first external power supplies corresponding to each of the signal acquisition circuits are circuit-isolated from each other; the grounding end after the cathode end of each of the optocoupler units in the optocoupler is connected is grounded, and the grounding ends corresponding to each of the optocouplers are circuit-isolated from each other.
[0020] The present invention provides a switch quantity acquisition device. When a contact switch needs to be connected, the first access terminal and the second access terminal of the connector are connected to the positive terminal of the contact switch, and the third access terminal and the fourth access terminal of the connector are connected to the negative terminal of the contact switch. Here, the contact switch can be a dry contact switch or a wet contact switch. Further, when the contact switch is a dry contact switch, the first access terminal of the connector and the first output terminal can be in a conductive state, and the third access terminal of the connector and the third output terminal can be in a conductive state. At this time, the first external power supply provides a voltage to the positive terminal of the dry contact switch. When the dry contact switch is turned on, there is a voltage between the positive terminal and the negative terminal of the dry contact switch. When the dry contact switch is turned off, there is no voltage between the positive terminal and the negative terminal of the dry contact switch. The connector can collect the voltage as a switch quantity signal. Conversely, when the contact switch is a wet contact switch, the wet contact switch is an active switch, and its switch quantity signal includes two states: energized and de-energized. At this time, the second access terminal and the second output terminal of the connector can be in a conductive state, and the fourth access terminal and the fourth output terminal of the connector can be in a conductive state. When the wet contact switch is in a powered state, the connector collects a high-level switch signal from the wet contact switch; when the wet contact switch is in a de-powered state, the connector collects a low-level switch signal from the wet contact switch.
[0021] Furthermore, the connector sends the collected switch quantity signal to the microcontroller unit to complete the collection of the switch quantity signal. Furthermore, the microcontroller unit can perform state diagnosis on the circuit of the switch quantity collection device through the abnormality detection circuit to obtain a state diagnosis result, wherein the state diagnosis result includes a normal state and an abnormal state. The technical solution provided by the present application can enable the switch quantity collection device to adapt to the situation of collecting switch quantity signals for wet contact switches and dry contact switches, and can perform state diagnosis on the circuit of the switch quantity collection device, timely discover circuit abnormalities, and improve the ability to collect switch quantity signals.
[0022] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0024] Figure 1 One of the structural schematic diagrams of a switch quantity acquisition device provided by an embodiment of the present invention is shown;
[0025] Figure 2 A schematic diagram of the structure of a micro control unit provided by an embodiment of the present invention is shown;
[0026] Figure 3 A second structural schematic diagram of a switch quantity acquisition device provided by an embodiment of the present invention is shown;
[0027] Figure 4 A third structural schematic diagram of a switch quantity acquisition device provided by an embodiment of the present invention is shown;
[0028] Figure 5a A fourth structural schematic diagram of a switch quantity acquisition device provided by an embodiment of the present invention is shown;
[0029] Figure 5b A structural schematic diagram of a solid-state relay provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0030] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0031] In one embodiment, Figure 1As shown, a switch quantity acquisition device is provided. The switch quantity acquisition device is now described by taking the scenario in which the switch quantity acquisition device is applied to collect switch quantity signals of a contact switch as an example. The switch quantity acquisition device includes a microcontroller unit and at least one signal acquisition circuit. Here, each switch quantity acquisition device can be provided with multiple signal acquisition circuits, and each signal acquisition circuit is connected to a contact switch, so that the switch quantity acquisition device can collect switch quantity signals of multiple contact switches at the same time.
[0032] Specifically, the signal acquisition circuit includes a connector and an abnormality detection circuit; wherein the first access terminal IN1 and the second access terminal IN2 of the connector are connected to the positive terminal of the contact switch, and the third access terminal IN3 and the fourth access terminal IN4 of the connector are connected to the negative terminal of the contact switch, for collecting the switch signal of the contact switch. Furthermore, the first output terminal OUT1 of the connector is connected to the first external power supply E1.
[0033] Specifically, when a contact switch needs to be connected, the first access terminal IN1 and the second access terminal IN2 of the connector can be connected to the positive terminal of the contact switch, and the third access terminal IN3 and the fourth access terminal IN4 of the connector can be connected to the negative terminal of the contact switch. Here, the contact switch can be a dry contact switch or a wet contact switch. Further, when the contact switch is a dry contact switch, the connector can be adjusted to connect the first access terminal IN1 of the connector to the first output terminal OUT1, and connect the third access terminal IN3 of the connector to the third output terminal OUT3. At this time, the first external power supply E1 provides a voltage to the positive terminal of the dry contact switch. When the dry contact switch is turned on, there is a voltage between the positive terminal and the negative terminal of the dry contact switch. When the dry contact switch is turned off, there is no voltage between the positive terminal and the negative terminal of the dry contact switch. The connector can collect the voltage as a switch signal.
[0034] In contrast, when the contact switch is a wet contact switch, the wet contact switch is an active switch, and its switch quantity signal includes two states: energized and de-energized. At this time, the second access terminal IN2 of the connector can be connected to the second output terminal OUT2, and the fourth access terminal IN4 of the connector can be connected to the fourth output terminal OUT4. When the wet contact switch is in the energized state, the connector collects a high-level switch quantity signal from the wet contact switch, and when the wet contact switch is in the de-energized state, the connector collects a low-level switch quantity signal from the wet contact switch. Further, the fourth output terminal OUT4 can be grounded.
[0035] Furthermore, the second output terminal OUT2 and the third output terminal OUT3 of the connector are connected to form a signal output terminal, and the input terminal of the micro control unit is connected to the signal output terminal for receiving the switch signal. Specifically, the connector can send the acquired switch signal to the micro control unit via the signal output terminal to realize the micro control unit's acquisition of the switch signal.
[0036] Further, the controlled end of the abnormality detection circuit is connected to the control end of the microcontroller unit, and the output end of the abnormality detection circuit is connected between the signal output end and the input end of the microcontroller unit. Here, the microcontroller unit is used to perform state diagnosis on the switch quantity acquisition device through the abnormality detection circuit to obtain a state diagnosis result. Specifically, when it is necessary to diagnose the circuit state of the switch quantity acquisition device, the microcontroller unit can control the abnormality detection circuit to output a false signal through the output end of the abnormality detection circuit, and the microcontroller unit determines whether the false signal affects the switch quantity signal. If the false signal affects the switch quantity signal, the state diagnosis result of the state diagnosis of the switch quantity acquisition device is determined to be a normal result. If the false signal does not affect the switch quantity signal, the state diagnosis result of the state diagnosis of the switch quantity acquisition device is determined to be an abnormal result, so as to realize the fault self-diagnosis function of the acquisition circuit.
[0037] The switch quantity acquisition device provided in this embodiment can adapt to the situation of acquiring switch quantity signals from wet contact switches and dry contact switches, and can perform status diagnosis on the circuit of the switch quantity acquisition device to timely discover circuit abnormalities, thereby improving the ability to acquire switch quantity signals.
[0038] In an optional embodiment, if Figure 2 As shown, the microcontroller unit includes a microcontroller and at least one optical coupler, wherein the optical coupler includes a plurality of optical coupling units OC; it should be noted that, for the convenience of description, Figure 2 The microcontroller includes an optical coupler and a microcontroller, the optical coupler includes two optical coupling units OC, each optical coupling unit OC is connected to a different signal acquisition circuit, namely a first signal acquisition circuit and a second signal acquisition circuit. In an actual working environment, a specific number of optical couplers can be set based on the number of contact switches to be connected to the microcontroller, and a specific number of optical coupling units OC can be set in the optical coupler. This embodiment is not limited and is also applicable to this embodiment.
[0039] Furthermore, the signal output end is connected to the anode end of an optocoupler unit OC of the optocoupler, the collector end of the optocoupler unit OC is connected to the input end of the microcontroller, and each optocoupler unit OC is used to send the switching signal output by the signal output end to the microcontroller.
[0040] Here, the optical coupling unit OC is composed of a light emitting diode and a phototransistor. The anode end of the light emitting diode is connected to the signal output end of a signal acquisition circuit as the anode end of the optical coupling unit OC, and the cathode end of the light emitting diode is grounded as the cathode end of the optical coupling unit OC. Furthermore, the collector end of the phototransistor is connected to the input end of the microcontroller as the collector end of the optical coupling unit OC, and the emitter end of the phototransistor is grounded as the emitter end of the optical coupling unit OC, so as to receive the switching signal sent by the signal acquisition circuit and send the switching signal to the microcontroller, thereby completing the acquisition of the switching signal of a contact switch.
[0041] The embodiments provided in the present application can electrically isolate the microcontroller from the signal acquisition circuit through an optical coupler, and then realize isolated acquisition of switch quantity signals at the ports in the microcontroller, thereby ensuring that the microcontroller will not be impacted by the current or voltage in the signal acquisition circuit, thereby improving the operating stability of the switch quantity acquisition device.
[0042] In an optional embodiment, if Figure 2 As shown, the microcontroller unit also includes at least one pull-up resistor; specifically, the first end of each pull-up resistor is connected to the second external power supply E2, and the second end of each pull-up resistor is connected to the collector end of the optocoupler unit OC corresponding to the pull-up resistor. Here, the collector end of each optocoupler unit OC is connected to a corresponding pull-up resistor, and the pull-up resistors connected to the collector end of each optocoupler unit OC are different. Further, the second external power supply E2 can output a voltage of 5V or other voltage levels. When the anode end of the optocoupler unit OC receives a high-level switching signal, the voltage output by the collector end of the optocoupler unit OC is pulled up, and when the anode end of the optocoupler unit OC receives a low-level switching signal, the voltage output by the collector end of the optocoupler unit OC is reset to zero.
[0043] In the embodiment provided by the present application, a plurality of pull-up resistors are arranged in the microcontroller unit, so that the microcontroller unit has an analog-to-digital conversion function, realizes the conversion of the switch quantity signal into the digital quantity signal, and improves the reliability of the switch quantity acquisition device.
[0044] In an optional embodiment, the microcontroller unit is used to perform status diagnosis on the switch quantity acquisition device through the abnormality detection circuit, and a method for obtaining the status diagnosis result includes:
[0045] When the microcontroller obtains the switch signal, it controls the abnormality detection circuit to reverse the switch signal sent from the connector to the microcontroller; specifically, the microcontroller can monitor the switch signal collected from the contact switch in real time, where the state of the switch signal can be a high-level signal or a low-level signal. When the switch signal is a high-level signal or a low-level signal and remains unchanged, the microcontroller controls the abnormality detection circuit to reverse the switch signal sent from the connector to the microcontroller, that is, when the switch signal output by the connector is at a high level, the abnormality detection circuit converts the switch signal into a low-level signal, and when the switch signal output by the connector is at a low level, the abnormality detection circuit converts the switch signal into a high-level signal.
[0046] Further, after controlling the abnormality detection circuit to reverse the switch signal sent from the connector to the microcontroller unit, it is determined whether the switch signal obtained by the microcontroller unit undergoes signal reverse; specifically, after the microcontroller unit controls the abnormality detection circuit to reverse the switch signal output by the connector, it is determined whether the switch signal obtained by the microcontroller unit from the signal acquisition circuit corresponding to the abnormality detection circuit undergoes signal reverse.
[0047] Furthermore, if the switch signal obtained by the microcontroller unit does not reverse, the state diagnosis result is confirmed to be an abnormal state. Conversely, if the switch signal obtained by the microcontroller unit reverses, the state diagnosis result is confirmed to be a normal state. Here, when the switch signal output by the connector changes, if the switch acquisition device cannot change the state of the switch signal output to the microcontroller unit according to the change of the switch signal, it means that the circuit of the switch acquisition device is abnormal and troubleshooting is required. Furthermore, when it is determined that the circuit of the switch acquisition device is abnormal, the microcontroller unit can issue an alarm message so that relevant staff can be informed of the abnormal situation in time and perform further processing.
[0048] The embodiments provided in the present application can perform status diagnosis on the switch quantity acquisition device based on the abnormality detection circuit, determine whether the circuit of the switch quantity acquisition device has an abnormality, and promptly notify relevant personnel when the circuit of the switch quantity acquisition device has an abnormality, thereby improving the effectiveness of the switch quantity signal collected by the switch quantity acquisition device.
[0049] In an optional embodiment, if Figure 3 As shown, the abnormality detection circuit includes a first switch device, a second switch device and a first resistor R1.
[0050] Specifically, the first connection end of the first switching device is connected to the first external power source E1, and the connection end after the second connection end of the first switching device is connected to the first connection end of the second switching device serves as the output end of the abnormality detection circuit.
[0051] Furthermore, the second connection end of the second switch device is connected to the first end of the first resistor R1, and the second end of the first resistor R1 is grounded.
[0052] Further, the control output end of the microcontroller unit is respectively connected to the controlled end of the first switch device and the controlled end of the second switch device, and is used to control the first connection end and the second connection end of the first switch device to be in an on or off state, and control the first connection end and the second connection end of the second switch device to be in an on or off state. Further, the switch quantity acquisition device may also include a first diode D1, a second diode D2 and a fifth resistor R5, the anode end of the first diode D1 is connected to the first external power supply E1, and the cathode end of the first diode D1 is connected to the first output end OUT1 of the connector; the anode end of the second diode D2 is connected to the second output end OUT2 of the connector, the cathode end of the second diode D2 is connected to the first end of the fifth resistor R5, and the second end of the fifth resistor R5 is connected to the output end of the abnormality detection circuit. Here, when the channels between multiple signal acquisition circuits are redundantly connected in parallel, when one of the redundant signal acquisition circuits is powered off, the potential path introduced by the powered-off DCDC power supply may cause mutual influence between the channels, and the second diode D2 can prevent the potential path between the multiple signal acquisition circuits when they are used in parallel, thereby preventing the above-mentioned problem from occurring. In the actual working process, if the switch signal received from the contact switch is a high-level signal, the microcontroller unit can control the first connection end and the second connection end of the second switch device to be in a conducting state, so that the high-level switch signal is grounded through the fifth resistor R5, and the high-level switch signal output by the connector is converted into a low-level switch signal; conversely, if the switch signal received from the contact switch is a low-level signal, the microcontroller unit can control the first connection end and the second connection end of the first switch device to be in a conducting state, so that the high voltage provided by the first external power supply E1 is sent to the signal output end of the signal acquisition circuit through the output end of the abnormality detection circuit, and the high voltage voltage signal is used as the high-level switch signal output by the connector.
[0053] The embodiments provided in the present application can change the level state of the switch quantity signal at the signal output end of the signal acquisition circuit to implement subsequent state diagnosis work of the switch quantity acquisition device, thereby improving the reliability of the switch quantity acquisition device.
[0054] In an optional embodiment, if Figure 4As shown, the first switching device is a first solid-state relay UF1, and the second switching device is a second solid-state relay UF2; wherein the solid-state relay is a switching device with electrical isolation capability, which can achieve electrical isolation between the microcontroller unit and the signal acquisition circuit.
[0055] Specifically, the first output end of the first solid-state relay UF1 is connected to the first external power supply E1 as the first connection end of the first switching device, the second output end of the first solid-state relay is connected to the second output end of the first solid-state relay as the first connection end of the second switching device, and the second output end of the second solid-state relay is connected to the first end of the first resistor R1 as the second connection end of the second switching device.
[0056] Furthermore, the micro control unit is used to control the first output terminal and the second output terminal of the first solid-state relay to be in an on or off state, and to control the first output terminal and the second output terminal of the second solid-state relay to be in an on or off state.
[0057] Furthermore, a solid-state relay can also be used to realize the functions of the first solid-state relay and the second solid-state relay, and the first output end of the solid-state relay is connected to the first external power supply E1, and the second output end of the solid-state relay is connected to the third output end and then connected as the output end of the abnormality detection circuit to the signal output end of the connector, and the fourth output end of the solid-state relay is connected to the first end of the first resistor R1; further, the micro control unit controls the first output end and the second output end of the solid-state relay to be in an on or off state, and controls the third output end and the fourth output end of the solid-state relay to be in an on or off state.
[0058] The embodiments provided in the present application can use solid-state relays as switching elements to achieve electrical isolation between the microcontroller unit and the signal acquisition circuit, realize isolated output of diagnostic signals, and ensure the operational stability of the microcontroller unit.
[0059] In an optional embodiment, if Figure 5a As shown, the control output end of the micro control unit includes a first control output sub-end and a second control output sub-end; the abnormality detection circuit also includes a first capacitor C1, a second capacitor C2, a second resistor R2, a third resistor R3, a first transistor QF1 and a second transistor QF2.
[0060] Specifically, a connection end of the first end of the first capacitor C1 and the first end of the second capacitor C2 is connected to the third external power source E3, and a second end of the first capacitor C1 and a second end of the second capacitor C2 are grounded.
[0061] Furthermore, the base of the first transistor QF1 is connected to the first control output sub-terminal of the micro control unit, the emitter of the first transistor QF1 is grounded, the collector of the first transistor QF1 is connected to the first end of the second resistor R2, the second end of the second resistor R2 is connected to the first input end of the first solid-state relay UF1, and the second input end of the first solid-state relay UF1 is connected to the third external power supply E3, so that when the first control output sub-terminal of the micro control unit outputs a high level signal, the first output end and the second output end of the first solid-state relay UF1 are in a conducting state.
[0062] Specifically, when the base of the first transistor QF1 receives a level from the first control output terminal of the micro control unit, the first transistor QF1 is turned on, the first solid-state relay UF1 is energized, and the first output terminal and the second output terminal of the first solid-state relay UF1 are in a conducting state.
[0063] Furthermore, the base of the second transistor QF2 is connected to the second control output sub-terminal of the micro control unit, the emitter of the second transistor QF2 is grounded, the collector of the second transistor QF2 is connected to the first end of the third resistor R3, the second end of the third resistor R3 is connected to the first input end of the second solid-state relay UF2, and the second input end of the second solid-state relay UF2 is connected to the third external power supply E3, so that when the second control output sub-terminal of the micro control unit outputs a high level signal, the first output end and the second output end of the second solid-state relay are in a conducting state.
[0064] Specifically, when the base of the second transistor QF2 receives a level from the second control output sub-terminal of the micro control unit, the second transistor QF2 is turned on, and the second solid-state relay UF2 is energized, so that the first output terminal and the second output terminal of the second solid-state relay UF2 are in a conducting state.
[0065] Further, such as Figure 5bAs shown, the first solid-state relay and the second solid-state relay can be respectively one solid-state relay, and the solid-state relay can respectively include a light-emitting diode and a photosensitive tube, the cathode end of the light-emitting diode can be used as the first input end of the first solid-state relay or the first input end of the second solid-state relay, and the anode end of the light-emitting diode can be used as the second input end of the first solid-state relay or the second input end of the second solid-state relay. When current exists between the anode end and the cathode end of the light-emitting diode, the light-emitting diode emits light, thereby turning on the photosensitive tube, and the first end of the photosensitive tube can be used as the first output end of the first solid-state relay or the second solid-state relay, and the second end of the photosensitive tube can be used as the second output end of the first solid-state relay or the second solid-state relay. When the diode emits light, the first end and the second end of the photosensitive tube are turned on, thereby turning on the first output end and the second output end of the first solid-state relay or the second solid-state relay.
[0066] In the embodiment provided by the present application, a switch circuit is formed by a first capacitor, a second capacitor, a second resistor, a third resistor, a first transistor and a second transistor to control the on or off of a first solid-state relay and a second solid-state relay, thereby improving the on or off control capability of a microcontroller unit to control the on or off of the first solid-state relay and the second solid-state relay, and preventing the microcontroller unit from being directly connected to the solid-state relay, thereby protecting the microcontroller unit and improving the operating stability of the switch quantity acquisition device.
[0067] In an optional embodiment, if Figure 5a As shown, the signal acquisition circuit also includes a signal conditioning circuit. Here, the signal conditioning circuit is connected between the signal output terminal and the input terminal of the micro control unit, and is used to perform signal optimization processing on the switch signal sent from the signal output terminal to the input terminal of the micro control unit. Specifically, the signal conditioning circuit (Signal Conditioning Circuit, SCC) is a series of electronic circuits used to adjust and process signals so that the signals can be measured, processed and analyzed more accurately. The signal conditioning circuit can amplify weak signals to a level that can be measured or processed, and can also retain useful signals by filtering out noise and unnecessary frequency components in the signal.
[0068] The embodiments provided in the present application can perform signal optimization processing such as amplification and filtering on the switch quantity signal sent to the micro control unit by the signal conditioning circuit docking plug-in, thereby improving the signal quality of the switch quantity signal received by the micro control unit and improving the switch quantity signal acquisition capability of the switch quantity acquisition device.
[0069] In an optional embodiment, if Figure 5aAs shown, the signal conditioning circuit includes a first unidirectional transient suppression diode D3, a second unidirectional transient suppression diode TVS2, a third capacitor C3, a fourth capacitor C4, a fourth resistor R4 and a bidirectional transient suppression diode TVS3.
[0070] Specifically, the first end of the fourth resistor R4 is connected to the signal output end, the second end of the fourth resistor R4 is connected to the anode end of the first unidirectional transient suppression diode D3, and the cathode end of the first unidirectional transient suppression diode D3 is connected to the input end of the micro control unit.
[0071] Further, the cathode end of the second unidirectional transient suppression diode TVS2, the first end of the third capacitor C3, the first end of the fourth capacitor C4, and the first end of the bidirectional transient suppression diode TVS3 are respectively connected between the cathode end of the first unidirectional transient suppression diode D3 and the input end of the micro control unit. Here, when the channels between multiple signal acquisition circuits are redundantly applied in parallel, during the self-diagnosis of the redundant signal acquisition circuits, due to the mutual influence between the channels caused by the existing potential paths, the self-test signal of the signal acquisition circuit in the self-test state will be collected by the normal collection channel and cause errors, and the provision of the first unidirectional transient suppression diode D3 can prevent the potential paths between multiple signal acquisition circuits when they are applied in parallel, thereby preventing the above-mentioned problems from occurring.
[0072] Furthermore, an anode terminal of the second unidirectional transient suppression diode TVS2, a second terminal of the third capacitor C3, a second terminal of the fourth capacitor C4, and a second terminal of the bidirectional transient suppression diode TVS3 are grounded respectively.
[0073] In the embodiments provided by the present application, a unidirectional transient suppression diode and a bidirectional unidirectional transient suppression diode are arranged in the signal conditioning circuit, which can protect sensitive electronic equipment in the switch quantity acquisition device from the impact of transient high-voltage spike pulses such as electrostatic discharge and lightning surge, thereby improving the stability of the switch quantity acquisition device; capacitors and resistors are arranged in the signal conditioning circuit, which can filter and amplify the switch quantity signal, thereby improving the signal quality of the switch quantity signal collected by the switch quantity acquisition device and improving the switch quantity signal acquisition capability of the switch quantity acquisition device.
[0074] In an optional embodiment, the first external power supplies corresponding to each of the signal acquisition circuits are circuit-isolated from each other; specifically, the first external power supplies in the multiple signal acquisition circuits of the switch quantity acquisition device are different external power supplies.
[0075] Furthermore, the cathode end of each of the optical coupling units in the optical coupler is connected to the ground end, and the ground ends corresponding to each of the optical couplers are isolated from each other in circuit. Specifically, the anode end of each of the optical coupling units in the optical coupler is used as the input end of the micro control unit to receive the switch quantity signals of different contact switches, and the cathode end of each of the optical coupling units in the optical coupler is connected to form a ground end, which is grounded. Furthermore, if the micro control unit in the switch quantity acquisition device includes multiple optical couplers, the ground ends of each optical coupler are isolated from each other and grounded separately.
[0076] In the embodiments provided by the present application, the first output terminals of the connectors of different signal acquisition circuits in the switch quantity acquisition device are respectively connected to different first external power supplies, and the ground terminals of different optocouplers in the switch quantity acquisition device are isolated from each other, thereby achieving electrical isolation between different switch quantity acquisition circuit channels and ensuring the operational stability of the switch quantity acquisition device.
[0077] The switch quantity acquisition device provided in this embodiment can adapt to the situation of acquiring switch quantity signals from wet contact switches and dry contact switches, and can perform status diagnosis on the circuit of the switch quantity acquisition device, timely discover circuit abnormalities, and optimize the switch quantity signal through the signal conditioning circuit, and can realize the acquisition and diagnosis of the switch quantity signal through electrical isolation, thereby improving the acquisition capability of the switch quantity signal and the operational stability.
[0078] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.
[0079] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.
Claims
1. A switch quantity acquisition device for acquiring switch quantity signals of contact switches, characterized in that: The switch quantity acquisition device comprises a micro control unit and at least one signal acquisition circuit; The signal acquisition circuit includes a connector and an abnormality detection circuit; The first access terminal and the second access terminal of the connector are connected to the positive terminal of the contact switch, the third access terminal and the fourth access terminal of the connector are connected to the negative terminal of the contact switch, and are used to collect the switch signal of the contact switch, and the first output terminal of the connector is connected to a first external power supply; The second output terminal and the third output terminal of the connector are connected to form a signal output terminal, and the input terminal of the micro control unit is connected to the signal output terminal for receiving the switch signal; The controlled end of the abnormality detection circuit is connected to the control end of the micro control unit, and the output end of the abnormality detection circuit is connected between the signal output end and the input end of the micro control unit; The micro control unit is used to perform status diagnosis on the switch quantity acquisition device through the abnormality detection circuit to obtain a status diagnosis result.
2. The switch quantity acquisition device according to claim 1, characterized in that: The micro control unit includes a microcontroller and at least one optical coupler, wherein the optical coupler includes a plurality of optical coupling units; The signal output end is connected to the anode end of an optocoupler unit of the optocoupler, the collector end of the optocoupler unit is connected to the input end of the microcontroller, and the optocoupler unit is used to send the switching signal output by the signal output end to the microcontroller.
3. The switch quantity acquisition device according to claim 2, characterized in that: The microcontroller unit further comprises at least one pull-up resistor; The first end of each pull-up resistor is connected to the second external power supply, and the second end of each pull-up resistor is connected to the collector end of the optocoupler unit corresponding to the pull-up resistor.
4. The switch quantity acquisition device according to claim 1, characterized in that: The microcontroller unit is used to perform status diagnosis on the switch quantity acquisition device through the abnormality detection circuit, and the method for obtaining the status diagnosis result includes: When the microcontroller obtains the switch signal, the microcontroller controls the abnormality detection circuit to reverse the switch signal sent from the connector to the microcontroller; After controlling the abnormality detection circuit to reverse the switch signal sent from the connector to the micro control unit, determining whether the switch signal obtained by the micro control unit is reversed; If the switch signal obtained by the micro control unit does not undergo signal reversal, the state diagnosis result is determined to be an abnormal state.
5. The switch quantity acquisition device according to claim 4, characterized in that: The abnormality detection circuit includes a first switch device, a second switch device and a first resistor; The first connection end of the first switching device is connected to the first external power supply, and the connection end after the second connection end of the first switching device is connected to the first connection end of the second switching device serves as the output end of the abnormality detection circuit; The second connection end of the second switch device is connected to the first end of the first resistor, and the second end of the first resistor is grounded; The control output end of the micro control unit is respectively connected to the controlled end of the first switching device and the controlled end of the second switching device, and is used to control the first connection end and the second connection end of the first switching device to be in an on or off state, and to control the first connection end and the second connection end of the second switching device to be in an on or off state.
6. The switch quantity acquisition device according to claim 5, characterized in that: The first switching device is a first solid-state relay, and the second switching device is a second solid-state relay; The first output end of the first solid-state relay serves as the first connection end of the first switch device, the second output end of the first solid-state relay serves as the second connection end of the first switch device, the first output end of the second solid-state relay serves as the first connection end of the second switch device, and the second output end of the second solid-state relay serves as the second connection end of the second switch device; The micro control unit is used to control the first output end and the second output end of the first solid-state relay to be in an on or off state, and to control the first output end and the second output end of the second solid-state relay to be in an on or off state.
7. The switch quantity acquisition device according to claim 6, characterized in that: The control output terminal of the micro control unit includes a first control output sub-terminal and a second control output sub-terminal; the abnormality detection circuit also includes a first capacitor, a second capacitor, a second resistor, a third resistor, a first transistor and a second transistor; A connection end where the first end of the first capacitor and the first end of the second capacitor are connected is connected to a third external power source, and a second end of the first capacitor and a second end of the second capacitor are grounded; The base of the first transistor is connected to the first control output sub-terminal of the micro control unit, the emitter of the first transistor is grounded, the collector of the first transistor is connected to the first end of the second resistor, the second end of the second resistor is connected to the first input end of the first solid-state relay, and the second input end of the first solid-state relay is connected to the third external power supply, so that when the first control output sub-terminal of the micro control unit outputs a high level signal, the first output end and the second output end of the first solid-state relay are in a conducting state; The base of the second transistor is connected to the second control output sub-terminal of the micro control unit, the emitter of the second transistor is grounded, the collector of the second transistor is connected to the first end of the third resistor, the second end of the third resistor is connected to the first input end of the second solid-state relay, and the second input end of the second solid-state relay is connected to the third external power supply, so that when the second control output sub-terminal of the micro control unit outputs a high level signal, the first output end and the second output end of the second solid-state relay are in a conducting state.
8. The switch quantity acquisition device according to claim 1, characterized in that: The signal acquisition circuit also includes a signal conditioning circuit; The signal conditioning circuit is connected between the signal output end and the input end of the micro control unit, and is used for performing signal optimization processing on the switch signal sent from the signal output end to the input end of the micro control unit.
9. The switch quantity acquisition device according to claim 8, characterized in that: The signal conditioning circuit includes a first unidirectional transient suppression diode, a second unidirectional transient suppression diode, a third capacitor, a fourth capacitor, a fourth resistor and a bidirectional transient suppression diode; The first end of the fourth resistor is connected to the signal output end, the second end of the fourth resistor is connected to the anode end of the first unidirectional transient suppression diode, and the cathode end of the first unidirectional transient suppression diode is connected to the input end of the micro control unit; The cathode end of the second unidirectional transient suppression diode, the first end of the third capacitor, the first end of the fourth capacitor and the first end of the bidirectional transient suppression diode are respectively connected between the cathode end of the first unidirectional transient suppression diode and the input end of the micro control unit; An anode terminal of the second unidirectional transient suppression diode, a second terminal of the third capacitor, a second terminal of the fourth capacitor, and a second terminal of the bidirectional transient suppression diode are grounded respectively.
10. The switch quantity acquisition device according to claim 2, characterized in that: The first external power supplies corresponding to each of the signal acquisition circuits are circuit-isolated from each other; The grounding end after the cathode ends of each of the optical coupling units in the optical coupler are connected is grounded, and the grounding ends corresponding to each of the optical couplers are circuit-isolated from each other.
Citation Information
Cited By
Dry contact acquisition module and channel self-checking system
CN120447431A
A dry contact collection module and channel self-checking system
CN120447431B