A configurable safety input and output circuit and configuration method thereof

By designing a configurable safe input and output circuit, using software configuration and components such as MOS tubes and optocouplers to realize that the input and output circuits share the same interface, solving the problem of inflexible interface configuration in the existing technology, reducing the number of interfaces and Improve detection stability.

CN112073055BActive Publication Date: 2024-12-03TRAFFIC CONTROL TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202010838521.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-19
Publication Date
2024-12-03
Estimated Expiration
2040-08-19

AI Technical Summary

Technical Problem

In the prior art, the safety input circuit and the output circuit need to be configured with different interfaces respectively, which cannot meet the requirements of flexible configuration functions.

Method used

A configurable safe input and output circuit is designed, and the input and output functions of the circuit are configured through software to realize that the input and output circuit share the same interface, and adopt the first driving circuit, the first input circuit, the first output circuit, and the first control unit. With the first input and output interface, the operating state of the circuit is controlled by components such as MOS tubes and optocouplers to realize the configuration and switching of input and output functions.

Benefits of technology

The number of interfaces defined by the board for input and output is reduced, flexible interface configuration is realized, the security of input and output is ensured, and detection stability is improved through redundant design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112073055B_ABST
    Figure CN112073055B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a configurable safety input-output circuit and a configuration method thereof, comprising: a driving circuit, an input circuit, an output circuit, a control unit and an input-output interface; the output circuit at least comprises a MOS tube; the control unit is connected to the input end of the driving circuit, and is used to send a driving signal to the driving circuit in combination with a dry contact interface signal output by the input circuit, so as to control the working state of the driving circuit; the output end of the driving circuit is connected to the gate of the MOS tube, and is used to control the on-off of the MOS tube; the input-output interface is connected to the drain of the MOS tube, and is used to configure and switch the input-output function according to the on-off of the MOS tube. The configurable safety input-output circuit and the configuration method thereof provided by the embodiment of the present invention realize the use of a common interface for the input and output circuits through software configuration of the input and output functions of the circuit, and reduce the number of input and output definition interfaces of the board.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power electronics, and in particular to a configurable safety input and output circuit and a configuration method thereof. Background Art

[0002] For dry contact input and output circuits, existing solutions all use fixed input and output circuit methods, where the dry contact input circuit is generally composed of a processing unit, an input circuit, and an input interface. The input signal is output to the processing unit through the input circuit, and the input circuit is often implemented by optocoupler isolation. The dry contact output circuit is generally composed of a processing unit, a drive circuit, an output circuit, a diagnostic circuit, an isolation circuit, and an output interface. The processing unit controls the output high and low levels of the drive circuit, and then controls the output on and off state of the output circuit; the diagnostic circuit is used to complete the detection of the output state to ensure the correctness of the output; the output circuit is often implemented by relays.

[0003] Since existing solutions all adopt a method of fixed input circuits and output circuits, and since the input and output circuits need to be configured with different interfaces respectively, it is necessary to define interfaces for the input and output respectively, which cannot meet the flexible configuration function. Summary of the invention

[0004] The embodiments of the present invention provide a configurable safety input and output circuit and system, which are used to solve the defect in the prior art that the safety input circuit and the output circuit need to be configured with different interfaces respectively, and realize the input and output functions of the circuit can be configured by software, so as to meet the actual needs of the project and provide hardware support for the flexible configuration of the functions of each interface.

[0005] In a first aspect, an embodiment of the present invention provides a configurable safe input-output circuit, which mainly includes: a first drive circuit, a first input circuit, a first output circuit, a first control unit and a first input-output interface; the first output circuit includes at least a first MOS tube; the first control unit is connected to the input end of the first drive circuit, and is used to collect the dry contact interface signal output by the first input circuit, and send a drive signal to the first drive circuit to realize control of the working state of the first drive circuit; the output end of the first drive circuit is connected to the gate of the first MOS tube, and is used to control the on and off of the first MOS tube; the first input-output interface is connected to the drain of the first MOS tube, and is used to realize the configuration and switching of the input-output function according to the on and off of the first MOS tube.

[0006] Optionally, the first input circuit includes a first optocoupler, a first diode, a second diode, and a third diode; the light receiving anode of the first optocoupler is connected to the output end of the configuration power supply and the input end of the first input circuit, and the light receiving cathode of the first optocoupler is grounded; the light emitting anode of the first optocoupler is connected to the anode of the first diode, and the cathode of the first diode is connected to the cathode of the second diode; the anode of the second diode is connected to the output end of the isolation power supply and the anode of the third diode; the cathode of the third diode is connected to the first input-output interface and the drain of the first MOS tube; the light emitting cathode of the first optocoupler is connected to the ground end of the isolation power supply.

[0007] Optionally, each first output circuit includes two MOS tubes; the gates of the first MOS tube and the second MOS tube are connected in parallel to the first output end of the first drive circuit; the sources of the first MOS tube and the second MOS tube are connected in parallel to the second output end of the first drive circuit; and the drain of the second MOS tube is connected to the ground end of the isolated power supply.

[0008] Optionally, the configurable safety input-output circuit provided in an embodiment of the present invention further includes a first resistor; the first resistor is connected in series between the output end of the configuration power supply and the input circuit.

[0009] Optionally, the configurable safety input and output circuit provided in the embodiment of the present invention further includes a second resistor; the second resistor is connected in series between the cathode of the first diode and the second diode.

[0010] Optionally, the configurable safety input-output circuit provided in an embodiment of the present invention further includes a third resistor; one end of the third resistor is connected to the output end of the isolated power supply; and the other end of the third resistor is connected to the anode of the second diode and the anode of the third diode.

[0011] Optionally, the first diode is a Zener diode.

[0012] In a second aspect, an embodiment of the present invention provides an integrated circuit, comprising two or more configurable safety input and output circuits as described in any one of the first aspects; the control unit in each configurable safety input and output circuit is integrated to form a controller; the controller is connected in parallel to the input end of the drive circuit in each configurable safety input and output circuit, and is used to respectively combine the dry contact interface signal output by each input circuit, and send a drive signal to the corresponding drive circuit to achieve control of the working state of the drive circuit.

[0013] Optionally, there are two configurable safety input and output circuits, wherein: the first configurable safety input and output circuit includes a first drive circuit, a first input circuit, a first output circuit, a first control unit and a first input and output interface; the second configurable safety input and output circuit includes a second drive circuit, a second input circuit, a second output circuit, a second control unit and a second input and output interface; the first control unit and the second control unit are integrated to form a controller; the second input circuit includes a second optical coupler, a fourth diode, a fifth diode and a sixth diode; the second output circuit includes a third MOS tube and a fourth MOS tube; the light receiving anode of the second optical coupler is connected to the output end of the configuration power supply and the second At the input end of the input circuit, the light receiving cathode of the second optical coupler is grounded; the light emitting anode of the second optical coupler is connected to the anode of the fifth diode, and the cathode of the fifth diode is connected to the cathode of the sixth diode; the anode of the sixth diode is connected to the output end of the isolation power supply and the anode of the fourth diode; the light emitting cathode of the controller is connected to the ground end of the isolation power supply; the gates of the third MOS tube and the fourth MOS tube are connected in parallel to the first output end of the second drive circuit; the sources of the third MOS tube and the fourth MOS tube are connected in parallel to the second output end of the second drive circuit; the drain of the third MOS tube is connected to the grounding electrode of the isolation power supply; the cathode of the fourth diode is connected to the second input-output interface and the drain of the fourth MOS tube.

[0014] In a third aspect, an embodiment of the present invention provides a configuration method of an integrated circuit as described in any one of the third aspects, including:

[0015] When the integrated circuit is configured to be in output mode by using the controller, the states of the first input-output interface and the second input-output interface are switched to the output node connection state; if the outputs of the first output end of the first drive circuit and the first output end of the second drive circuit are both high level by using the controller, the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are all in the on state, the first input-output interface and the second input-output interface are in the closed state, and the first optical coupler and the second optical coupler are in the on state; the output levels of the first output circuit and the second output circuit are detected, and when the output levels are both in the low level state, it is determined that the on states of the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are normal; if the outputs of the first output end of the first drive circuit and the first output end of the second drive circuit are both low level by using the controller, the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are all in the off state, and the first optical coupler and the second optical coupler are in the off state; the output levels of the first output circuit and the second output circuit are detected, and when the output levels are both in the high level state, it is determined that the on states of the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are normal;

[0016] When the integrated circuit is configured to be in input mode by using the controller, the states of the first input / output interface and the second input / output interface are switched to the input dry contact connection state; if the controller is used to control the first drive circuit to output a PWM signal and the second drive circuit to output a low-level signal, the first MOS tube and the second MOS tube are in a periodic conduction state; if the input dry contact corresponding to the second input / output interface is in a closed state, the PWM signal output by the second optical coupler is obtained; if the input dry contact corresponding to the second input / output interface is in a conducting state, the high-level signal output by the second optical coupler is obtained; if the controller is used to control the second drive circuit to output a PWM signal and the first drive circuit to output a low-level signal, the third MOS tube and the fourth MOS tube are in a periodic conduction state; if the input dry contact corresponding to the first input / output interface is in a closed state, the PWM signal output by the first optical coupler is obtained; if the input dry contact corresponding to the first input / output interface is in a conducting state, the high-level signal output by the first optical coupler is obtained.

[0017] In a fourth aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the configuration method of the integrated circuit as described above are implemented.

[0018] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described integrated circuit configuration methods.

[0019] The configurable safe input and output circuit and the configuration method thereof provided in the embodiment of the present invention configure the input and output functions of the circuit through software, thereby realizing that the input and output circuits share one interface, and reducing the number of input and output definition interfaces of the board. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 It is a structural schematic diagram of a digital input circuit in the prior art;

[0022] Figure 2 It is a structural schematic diagram of a digital output circuit in the prior art;

[0023] Figure 3It is a structural schematic diagram of a configurable safety input and output circuit provided by an embodiment of the present invention;

[0024] Figure 4 is a schematic structural diagram of another configurable safety input and output circuit provided by an embodiment of the present invention;

[0025] Figure 5 It is a structural schematic diagram of another configurable safety input and output circuit provided by an embodiment of the present invention;

[0026] Figure 6 A schematic diagram of the structure of an isolated power supply provided by an embodiment of the present invention;

[0027] Figure 7 A schematic diagram of a flow chart of a configuration method of an integrated circuit provided by an embodiment of the present invention;

[0028] Figure 8 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] Figure 1 FIG. 1 is a schematic diagram of a digital input circuit in the prior art. Figure 1 As shown, the existing dry contact digital input circuit mainly includes a processing unit, an input circuit and an input interface, wherein the input signal is output to the processing unit via the input circuit through the input interface.

[0031] Figure 2 FIG. 1 is a schematic diagram of a digital output circuit in the prior art. Figure 2 As shown, the existing dry contact digital output circuit mainly includes a processing unit, a drive circuit, an output circuit, a diagnostic circuit, an isolation circuit and an output interface. Among them, the processing unit controls the drive circuit to output high and low levels to control the output on and off state of the output circuit. In order to ensure the correctness of the output, the output state is detected through an integrated diagnostic circuit.

[0032] comprehensive Figure 1 and Figure 2From the digital input circuit and digital output circuit shown in the figure, it can be seen that the existing solutions all adopt the method of fixing the input and output circuits, which cannot meet the flexible configuration function of the input and output interface. In view of this, an embodiment of the present invention provides a configurable secure input and output circuit, such as Figure 3 as well as Figure 4 As shown, it includes but is not limited to: a first drive circuit, a first input circuit, a first output circuit, a first control unit and a first input-output interface. Among them, the first output circuit at least includes a first MOS tube Q1; the first control unit is connected to the input end of the first drive circuit, and is used to send a drive signal to the first drive circuit in combination with the dry contact interface signal output by the first input circuit, so as to realize the control of the working state of the first drive circuit; the output end of the first drive circuit is connected to the gate of the first MOS tube Q1, and is used to control the on-off of the first MOS tube Q1; the first input-output interface is connected to the drain of the first MOS tube Q1, and is used to realize the configuration and switching of the input-output function according to the on-off of the first MOS tube Q1.

[0033] The configurable safety input-output circuit provided in the embodiment of the present invention is a method based on software configuration by the first control unit to adjust the operation mode of the first input-output interface according to the configuration signal. The input circuit collects the dry contact interface signal and sends the collected dry contact interface signal to the first control unit. The configuration function of the first control unit is configured by software and directly configured in the software of the control unit to control the on-off of the drive signal and finally control the configuration of the input-output function. Among them, the input-output interface is used as the dry contact to control the on-off, the input circuit is connected to the output interface, and the dry contact on-off signal is collected; the control unit is connected to the input circuit and analyzes the dry contact signal collected by the input circuit; the control unit can configure the input or output function by software.

[0034] For example: when the software is configured as the interface output mode, the output contact can be in the normally open state by default, which is used to implement the test of the configurable safety input and output circuit provided in the embodiment of the present invention. When the control unit controls the first drive circuit to be driven at a high level, the first MOS tube Q1 is in the on state, the output is in the closed state, and the input circuit should be at a low level. At this time, the output level of the input circuit can be detected by the control unit. If the level detected by the control unit is a low level, it is considered that the output of the configurable safety input and output circuit is normal, but when the level detected by the control unit is in other states, it can be considered that the configurable safety input and output circuit is in a fault state.

[0035] For another example: when the level input from the first control unit to the first driving circuit is low, the first MOS tube Q1 is in a disconnected state, and the input circuit should be high. At this time, the output level of the input circuit can be detected by the control unit. If the level detected by the control unit is high, it is considered that the output of the configurable safety input and output circuit is normal, but if the level detected by the control unit is other than this, it can be considered that the configurable safety input and output circuit is in a fault state.

[0036] Furthermore, if the software configures the first input / output interface to be in interface output mode, the input dry contacts are connected to the two ends of the corresponding interface. The control unit controls the first drive circuit to output a PWM signal with a certain frequency and duty cycle (e.g., 50%). At this time, since the first MOS tube Q1 is periodically turned on, U1 will also periodically output a PWM signal. At this time, a periodic PWM signal can be output at the first input / output interface.

[0037] Furthermore, the first input circuit in the embodiment of the present invention can be implemented by an optical coupler to complete the detection of the dry contact input state and the diagnosis of the input and output states. Among them, the device that uses light as a medium to transmit electrical signals usually encapsulates the light emitter (infrared light emitting diode LED) and the light receiver (photosensitive semiconductor tube, photoresistor) in the same tube shell. When an electrical signal is applied to the input end, the light emitter emits light, and the light receiver generates a photocurrent after receiving the light, which flows out from the output end, thereby realizing the "electric-light-electric" conversion.

[0038] The first driving circuit is connected to the gate of the first MOS transistor to control the on and off of the first MOS transistor Q1 according to the driving signal (high or low level signal) input by the input circuit.

[0039] The output circuit at least includes a first MOS tube, and the specific structure and model of the selected MOS tube are not specifically limited in the embodiment of the present invention.

[0040] The configurable safe input and output circuit provided in the embodiment of the present invention configures the input and output functions of the circuit through software, thereby realizing that the input and output circuits share one interface, thereby reducing the number of input and output definition interfaces of the board.

[0041] The configurable safe input and output circuit provided in the embodiment of the present invention configures the input and output functions of the circuit through software, thereby realizing that the input and output circuits share one interface, thereby reducing the number of input and output definition interfaces of the board.

[0042] Based on the contents of the above embodiments, as an optional embodiment, the first input circuit includes a first optocoupler, a first diode, a second diode, and a third diode; the light receiving anode of the first optocoupler is connected to the output end of the configuration power supply and the input end of the first input circuit, and the light receiving cathode of the first optocoupler is grounded; the light emitting anode of the first optocoupler is connected to the anode of the first diode, and the cathode of the first diode is connected to the cathode of the second diode; the anode of the second diode is connected to the output end of the isolation power supply and the anode of the third diode; the cathode of the third diode is connected to the first input-output interface and the drain of the first MOS tube; the light emitting cathode of the first optocoupler is connected to the ground end of the isolation power supply.

[0043] Specifically, Figure 4 The figure shows a configurable safety input-output circuit provided by an embodiment of the present invention, including a first optical coupler U1, a first diode D1, a second diode D2, and a third diode D3; the light receiving anode of the first optical coupler U1 is connected to the output end of the configuration power supply and the input end of the first input circuit, and the light receiving cathode of the first optical coupler U1 is grounded GND; the light emitting anode of the first optical coupler U1 is connected to the anode of the first diode D1, and the cathode of the first diode D1 is connected to the cathode of the second diode D2; the anode of the second diode D2 is connected to the output end of the isolation power supply and the anode of the third diode D3; the cathode of the third diode D3 is connected to the first input-output interface and the drain of the first MOS tube Q1; the light emitting cathode of the first optical coupler U1 is connected to the ground end of the isolation power supply.

[0044] As an optional embodiment, the configurable safety input-output circuit provided in the embodiment of the present invention is applied. When the software is configured as the interface output mode, when the configuration power supply and the isolated power supply input are at a high level, the first MOS tube Q1 corresponding to the first input-output interface is turned on, and the output of the first input-output interface is in a closed state. At this time, the first optical coupler U1 is in a conducting state, and the first input circuit is at a low level. At this time, if the levels detected by the control unit are all low levels, it is considered that the output of the configurable safety input-output circuit is normal, and other states are fault states.

[0045] Similarly, the configuration power input to the first input power supply can also be changed to control the input of the first drive circuit to be low level, and the input level of the control unit is detected to be high level. If so, it is considered that the output of the configurable safety input and output circuit is normal.

[0046] Furthermore, when applying the configurable safety input-output circuit provided in the embodiment of the present invention, when the software is configured as the interface input mode, the output signal of the first input-output interface can be determined by the configuration signal input by the control unit and the on-off state of the first optocoupler U1, which will not be elaborated here.

[0047] The configurable safe input-output circuit provided in the embodiment of the present invention uses an optocoupler to form an input circuit. After the software is configured as an input-output interface mode, the interface function can be flexibly configured according to the needs of the actual project, reducing the number of interfaces that need to be defined for input and output on traditional circuit boards.

[0048] Based on the content of the above embodiment, as an optional embodiment, each first output circuit may include two MOS transistors; the gates of the first MOS transistor Q1 and the second MOS transistor Q2 are connected in parallel to the first output end of the first drive circuit; the sources of the first MOS transistor Q1 and the second MOS transistor Q2 are connected in parallel to the second output end of the first drive circuit; and the drain of the second MOS transistor Q2 is connected to the ground end of the isolation power supply.

[0049] Specifically, Figure 4 As shown, in the embodiment of the present invention, two parallel MOS tubes are used in each output circuit for redundant design to ensure that the diagnosis of the entire input-output circuit system is not affected when a single point failure of a MOS tube occurs.

[0050] It should be noted that, according to actual needs, two or more MOS tubes may be added and connected in parallel to perform a redundant design, so as to further improve the detection stability of the input and output circuits. This invention does not specifically limit this.

[0051] Based on the content of the above embodiment, as an option, the configurable safety input-output circuit provided in the embodiment of the present invention may further include a first resistor R1, and the first resistor R1 is connected in series between the output end of the configuration power supply and the input circuit.

[0052] In order to limit the current of the configuration signal input into the configurable safety input and output circuit, a first resistor R1 is connected in series between the output end of the configuration power supply and the input circuit, so as to ensure the safety of the circuit.

[0053] Furthermore, in practical applications, the circuit voltage drop of the first MOS tube Q1 after it is turned on is close to 0.1V, and the voltage drop of the diode is about 0.6V. Therefore, the voltage drop of the circuit where the first MOS tube Q1 and the third diode are located is close to 0.7V, and the conduction voltage of the light emitter of the optical coupler is about 1V. Therefore, after the first MOS tube Q1 is turned on, the light emitter of the optical coupler may be turned on accordingly, so it is necessary to increase the difference between the conduction voltage drop of the optical coupler circuit and the voltage drop after the MOS tube circuit is turned on. Configuring a second diode D2 in the embodiment of the present invention can effectively solve this problem.

[0054] Based on the content of the above embodiment, as an option, the configurable safety input and output circuit provided in the embodiment of the present invention may further include a second resistor R2, and the second resistor R2 is connected in series between the cathode of the first diode D1 and the cathode of the second diode D2.

[0055] In the configurable safe input and output circuit provided in the embodiment of the present invention, by connecting a second resistor R2 in series between the cathode of the first diode D1 and the cathode of the second diode D2, the second resistor R2 can be used to divide the voltage and also to limit the current, thereby protecting the diode and preventing the diode from being broken down.

[0056] Based on the contents of the above embodiments, as an option, the configurable safety input and output circuit provided in the embodiments of the present invention may further include a third resistor R3, one end of the third resistor R3 is connected to the output end of the isolated power supply; the other end of the third resistor is connected to the anode of the second diode D2 and the anode of the third diode D3.

[0057] In order to limit the pulse current of the isolated power supply input to the configurable safety input and output circuit, the third resistor R3 is added to the configuration circuit to ensure the safety of the circuit.

[0058] Furthermore, the third resistor R1 , the second resistor R2 and the third resistor R3 may all be potentiometers to adjust the current limit according to actual needs.

[0059] Furthermore, the first diode D1 is a voltage-stabilizing diode, and the second diode D2 and the third diode D3 may also be voltage-stabilizing diodes.

[0060] An embodiment of the present invention provides an integrated circuit, comprising at least: two or more configurable safety input and output circuits as described in any one of the above embodiments; a control unit in each configurable safety input and output circuit is integrated to form a controller; the controller is connected in parallel to the input end of the drive circuit in each configurable safety input and output circuit, and is used to send a drive signal to the corresponding drive circuit according to the configuration signal output by each input circuit, so as to control the working state of the drive circuit.

[0061] Specifically, in Figure 5 The integrated circuit shown includes two configurable safety input and output circuits as described in the above embodiments, including a control unit, a first drive circuit, a second drive circuit, a first input circuit, a second input circuit, a MOS output circuit, an isolation circuit and an input and output interface. Different functions can be configured according to software to achieve different functions. Figure 4As shown, the controller mainly completes the functions of controlling the drive circuit and reading the input circuit state; the first drive circuit controls the conduction and disconnection of the first MOS tube Q1 and the second MOS tube Q2, and the second drive circuit Q2 is used to control the conduction and disconnection of the third MOS tube Q3 and the fourth MOS tube Q4. The output circuit adopts 4-way MOS tubes, which can effectively realize the safety redundancy design function. When a single MOS fails, the fault can be identified through the diagnostic circuit. The input circuit is implemented by optocoupler to complete the detection of dry contact input state and the diagnosis of input and output state. The isolated power supply circuit completes the power supply for the input circuit isolation signal injection.

[0062] like Figure 6 As shown, it is a structural schematic diagram of an isolated power supply circuit provided by an embodiment of the present invention, wherein pin 2 of the isolated power supply is connected to the output port of the P24V power supply, pin 1 of the isolated power supply is grounded, pin 5 of the isolated power supply serves as the output end of the isolated power supply, pin 4 of the isolated power supply is the ground end of the isolated power supply, and a capacitor is connected in parallel between pin 4 and pin 5 of the isolated power supply, and the signal of the capacitor can be 0.47μF / 10V.

[0063] As an optional embodiment, the embodiment of the present invention provides a set of Figure 4 Parameters of each component in the integrated circuit shown:

[0064] Among them, the models of the first resistor R1 and the fourth resistor R4 are 10K / 1Ω / 1OW / 5%, the models of the second resistor R2 and the fifth resistor R5 are 1K / 1Ω / 16W / 5%, and the models of the third resistor R3 and the sixth resistor R6 are 1.2K / 1Ω / 1OW / 5%; the optocoupler model of the first optocoupler U1 and the second optocoupler U3 can be TLP291; the first MOS tube Q1, the second MOS tube Q2, the third MOS tube Q3 and the fourth MOS tube Q4 selected in the figure can be NMOS tubes.

[0065] Based on the content of the above embodiment, as an optional embodiment, Figure 4As shown, when there are two configurable safety input and output circuits, the first configurable safety input and output circuit includes a first drive circuit, a first input circuit, a first output circuit, a first control unit and a first input and output interface; the second configurable safety input and output circuit includes a second drive circuit, a second input circuit, a second output circuit, a second control unit and a second input and output interface; the first control unit and the second control unit are integrated to form a controller; the second input circuit includes a second optical coupler U3, a fourth diode D4, a fifth diode D5 and a sixth diode D6; the second output circuit includes a third MOS transistor Q3 and a fourth MOS transistor Q4; the light receiving anode of the second optical coupler U3 is connected to the output end of the configuration power supply and the input end of the second input circuit The light receiving cathode of the second optical coupler U3 is grounded; the light emitting anode of the second optical coupler U3 is connected to the anode of the fifth diode D5, and the cathode of the fifth diode D5 is connected to the cathode of the sixth diode D6; the anode of the sixth diode D6 is connected to the output end of the isolation power supply and the anode of the fourth diode D4; the light emitting cathode of the controller is connected to the ground end of the isolation power supply; the gates of the third MOS tube Q3 and the fourth MOS tube Q4 are connected in parallel to the first output end of the second drive circuit; the sources of the third MOS tube Q3 and the fourth MOS tube Q4 are connected in parallel to the second output end of the second drive circuit; the drain of the third MOS tube Q3 is connected to the ground of the isolation power supply; the cathode of the fourth diode D4 is connected to the second input-output interface and the drain of the fourth MOS tube Q4.

[0066] The configurable safety input and output integrated circuit provided in the embodiment of the present invention adopts a 4-way MOS series redundancy solution, which ensures that a single point failure does not affect system diagnosis and improves the stability and detection accuracy of the circuit.

[0067] like Figure 7 As shown, an embodiment of the present invention provides a configuration method for the integrated circuit described in any of the above embodiments, including but not limited to the following steps:

[0068] When the integrated circuit is configured to be in output mode by using the controller, the states of the first input-output interface and the second input-output interface are switched to the output node connection state; if the outputs of the first output end of the first drive circuit and the first output end of the second drive circuit are controlled by the controller to be high level, the first MOS tube, the second MOS tube, the third MOS tube and the fourth MOS tube are all in the on state, the first input-output interface and the second input-output interface are in the closed state, and the first optical coupler and the second optical coupler are in the on state; the output levels of the first output circuit and the second output circuit are detected, and when the output levels are all in the low level state, it is determined that the on states of the first MOS tube, the second MOS tube, the third MOS tube and the fourth MOS tube are normal.

[0069] If the controller is used to control the outputs of the first output end of the first drive circuit and the first output end of the second drive circuit to be low level, the first MOS transistor Q1, the second MOS transistor Q2, the third MOS transistor Q3 and the fourth MOS transistor Q4 are all in the disconnected state, and the first optical coupler U1 and the second optical coupler U3 are in the disconnected state. The output levels of the first output circuit and the second output circuit are detected, and when the output levels are both in the high level state, it is determined that the conduction states of the first MOS transistor Q1, the second MOS transistor Q2, the third MOS transistor Q3 and the fourth MOS transistor Q4 are normal.

[0070] When the integrated circuit is configured to be in input mode by using the controller, the states of the first input-output interface and the second input-output interface are switched to the input dry contact connection state; if the first drive circuit is controlled by the controller to output a PWM signal and the second drive circuit is controlled to output a low-level signal, the first MOS tube Q1 and the second MOS tube Q2 are in a periodic conduction state; if the input dry contact corresponding to the second input-output interface is in a closed state, the PWM signal output by the second optical coupler is obtained; if the input dry contact corresponding to the second input-output interface is in a conducting state, the high-level signal output by the second optical coupler is obtained.

[0071] If the controller is used to control the second drive circuit to output a PWM signal and the first drive circuit to output a low-level signal, the third MOS tube Q3 and the fourth MOS tube Q4 are in a periodic conduction state; if the input dry contact corresponding to the first input-output interface is in a closed state, the PWM signal output by the first optical coupler is obtained; if the input dry contact corresponding to the first input-output interface is in a conducting state, the high-level signal output by the first optical coupler is obtained.

[0072] As optional embodiments, several different combined control modes are listed as follows:

[0073] When the software is configured as output mode, the output contact is normally open by default. When the control unit controls the first drive circuit and the second drive circuit to be driven at a high level, the first MOS tube Q1, the second MOS tube Q2, the third MOS tube Q3, and the fourth MOS tube Q4 are all in a conducting state, and the output is in a closed state. The optical couplers of the first optical coupler U1 and the second optical coupler U3 are both turned on, and the first input circuit and the second input circuit are both at a low level. At this time, if the levels detected by the controller are all low levels, the output is considered normal, and if they are in other states, it proves that the integrated circuit is in a fault state. When the first drive circuit and the second drive circuit are controlled to be low levels, the first MOS tube Q1, the second MOS tube Q2, the third MOS tube Q3, and the fourth MOS tube Q4 are all in a disconnected state, the optical couplers of the first optical coupler U1 and the second optical coupler U3 are both disconnected, and the first input circuit and the second input circuit are both at a high level. At this time, if the levels detected by the control unit are all high levels, the output is considered normal, and other states are fault states.

[0074] When the software is configured as input mode, the input dry contacts are connected to both ends of the interface. The control unit controls the drive circuit 1 to output a PWM signal with a certain frequency and duty cycle, and controls the second drive circuit to output a low level. At this time, the first MOS tube Q1 and the second MOS tube Q2 output a PWM signal with a certain duty cycle, and the third MOS tube Q3 and the fourth MOS tube Q4 are in a disconnected state. Since the first MOS tube Q1 and the second MOS tube Q2 are periodically turned on, the first optical coupler U1 will also periodically output a PWM signal. Since the third MOS tube Q3 and the fourth MOS tube Q4 are in a disconnected state, the state of the second optical coupler U3 depends on whether the input contact is closed or turned on. If it is closed, the second optical coupler U3 will also output a periodic PWM signal. If it is in a disconnected state, the second optical coupler U3 will output a high level. When a state change is detected, the control unit periodically polls and controls the first drive circuit and the second drive circuit to output PWM and low level, ensuring the safety and accuracy of the input.

[0075] The configurable safety input and output circuit and the configuration method thereof provided in the embodiment of the present invention configure the input and output functions of the circuit through software, thereby realizing that the input and output circuits share one interface, thereby reducing the number of input and output definition interfaces of the board; and by sharing the circuit between the input circuit and the diagnostic circuit, the safety of the input and output is guaranteed without increasing the hardware cost; and by adopting a redundant solution of 4-channel MOS series connection, it is effectively guaranteed that a single point failure does not affect the system diagnosis.

[0076] Figure 8 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the configuration method of the integrated circuit, including:

[0077] When the integrated circuit is configured to be in output mode by using the controller, the states of the first input-output interface and the second input-output interface are switched to the output node connection state; if the outputs of the first output end of the first drive circuit and the first output end of the second drive circuit are both high level by using the controller, the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are all in the on state, the first input-output interface and the second input-output interface are in the closed state, and the first optical coupler and the second optical coupler are in the on state; the output levels of the first output circuit and the second output circuit are detected, and when the output levels are both in the low level state, it is determined that the on states of the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are normal; if the outputs of the first output end of the first drive circuit and the first output end of the second drive circuit are both low level by using the controller, the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are all in the off state, and the first optical coupler and the second optical coupler are in the off state; the output levels of the first output circuit and the second output circuit are detected, and when the output levels are both in the high level state, it is determined that the on states of the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are normal;

[0078] When the integrated circuit is configured to be in input mode by using the controller, the states of the first input / output interface and the second input / output interface are switched to the input dry contact connection state; if the controller is used to control the first drive circuit to output a PWM signal and the second drive circuit to output a low-level signal, the first MOS tube and the second MOS tube are in a periodic conduction state; if the input dry contact corresponding to the second input / output interface is in a closed state, the PWM signal output by the second optical coupler is obtained; if the input dry contact corresponding to the second input / output interface is in a conducting state, the high-level signal output by the second optical coupler is obtained; if the controller is used to control the second drive circuit to output a PWM signal and the first drive circuit to output a low-level signal, the third MOS tube and the fourth MOS tube are in a periodic conduction state; if the input dry contact corresponding to the first input / output interface is in a closed state, the PWM signal output by the first optical coupler is obtained; if the input dry contact corresponding to the first input / output interface is in a conducting state, the high-level signal output by the first optical coupler is obtained.

[0079] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.

[0080] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0081] On the other hand, an embodiment of the present invention further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the computer can execute the configuration method of the integrated circuit provided by the above-mentioned method embodiments, including:

[0082] When the integrated circuit is configured to be in output mode by using the controller, the states of the first input-output interface and the second input-output interface are switched to the output node connection state; if the outputs of the first output end of the first drive circuit and the first output end of the second drive circuit are both high level controlled by the controller, the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are all in the on state, the first input-output interface and the second input-output interface are in the closed state, and the first optical coupler and the second optical coupler are in the on state; the output levels of the first output circuit and the second output circuit are detected, and when the output levels are both in the low level state, it is determined that the on states of the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are normal; if the outputs of the first output end of the first drive circuit and the first output end of the second drive circuit are both low level controlled by the controller, the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are all in the off state, and the first optical coupler and the second optical coupler are in the off state; the output levels of the first output circuit and the second output circuit are detected, and when the output levels are both in the high level state, it is determined that the on states of the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are normal;

[0083] When the integrated circuit is configured to be in input mode by using the controller, the states of the first input / output interface and the second input / output interface are switched to the input dry contact connection state; if the controller is used to control the first drive circuit to output a PWM signal and the second drive circuit to output a low-level signal, the first MOS tube and the second MOS tube are in a periodic conduction state; if the input dry contact corresponding to the second input / output interface is in a closed state, the PWM signal output by the second optical coupler is obtained; if the input dry contact corresponding to the second input / output interface is in a conducting state, the high-level signal output by the second optical coupler is obtained; if the controller is used to control the second drive circuit to output a PWM signal and the first drive circuit to output a low-level signal, the third MOS tube and the fourth MOS tube are in a periodic conduction state; if the input dry contact corresponding to the first input / output interface is in a closed state, the PWM signal output by the first optical coupler is obtained; if the input dry contact corresponding to the first input / output interface is in a conducting state, the high-level signal output by the first optical coupler is obtained. In another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for configuring an executable integrated circuit provided in the above embodiments is implemented, including:

[0084] When the integrated circuit is configured to be in output mode by using the controller, the states of the first input-output interface and the second input-output interface are switched to the output node connection state; if the controller controls the outputs of the first output end of the first drive circuit and the first output end of the second drive circuit to be high level, the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are all in the on state, the first input-output interface and the second input-output interface are in the closed state, and the first optical coupler and the second optical coupler are in the on state; the output levels of the first output circuit and the second output circuit are detected, and when the output levels are both in the low level state, it is determined that the on states of the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are normal; if the controller controls the outputs of the first output end of the first drive circuit and the first output end of the second drive circuit to be low level, the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are all in the off state, and the first optical coupler and the second optical coupler are in the off state; the output levels of the first output circuit and the second output circuit are detected, and when the output levels are both in the high level state, it is determined that the on states of the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are normal;

[0085] When the integrated circuit is configured to be in input mode by using the controller, the states of the first input / output interface and the second input / output interface are switched to the input dry contact connection state; if the controller is used to control the first drive circuit to output a PWM signal and the second drive circuit to output a low-level signal, the first MOS tube and the second MOS tube are in a periodic conduction state; if the input dry contact corresponding to the second input / output interface is in a closed state, the PWM signal output by the second optical coupler is obtained; if the input dry contact corresponding to the second input / output interface is in a conducting state, the high-level signal output by the second optical coupler is obtained; if the controller is used to control the second drive circuit to output a PWM signal and the first drive circuit to output a low-level signal, the third MOS tube and the fourth MOS tube are in a periodic conduction state; if the input dry contact corresponding to the first input / output interface is in a closed state, the PWM signal output by the first optical coupler is obtained; if the input dry contact corresponding to the first input / output interface is in a conducting state, the high-level signal output by the first optical coupler is obtained.

[0086] The device embodiments described above are merely illustrative, 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 may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0087] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A configurable safety input and output circuit, characterized in that: include: A first driving circuit, a first input circuit, a first output circuit, a first control unit and a first input-output interface; the first input circuit includes a first optical coupler, a first diode, a second diode and a third diode; each of the first output circuits includes two MOS tubes; The first output circuit at least includes a first MOS transistor; The first control unit is connected to the input end of the first drive circuit, and is used to receive the configuration signal output by the first input circuit, and send a drive signal to the first drive circuit to control the working state of the first drive circuit; The output end of the first driving circuit is connected to the gate of the first MOS transistor, and is used to control the on and off of the first MOS transistor; The first input-output interface is connected to the drain of the first MOS tube, and is used to realize the configuration and switching of the input-output function according to the on-off of the first MOS tube and in combination with the configuration signal; The light receiving anode of the first optical coupler is connected to the output end of the configuration power supply and the input end of the first input circuit, and the light receiving cathode of the first optical coupler is grounded; The light emitting anode of the first optical coupler is connected to the anode of the first diode, and the cathode of the first diode is connected to the cathode of the second diode; The anode of the second diode is connected to the output end of the isolation power supply and the anode of the third diode; The cathode of the third diode is connected to the first input-output interface and the drain of the first MOS tube; The light emitting cathode of the first optical coupler is connected to the ground terminal of the isolated power supply; The gates of the first MOS transistor and the second MOS transistor are connected in parallel to the first output end of the first driving circuit; the sources of the first MOS transistor and the second MOS transistor are connected in parallel to the second output end of the first driving circuit; The drain of the second MOS tube is connected to the ground terminal of the isolated power supply.

2. The configurable safety input and output circuit according to claim 1, characterized in that: Also comprising a first resistor; The first resistor is connected in series between the output terminal of the configuration power supply and the input circuit.

3. The configurable safety input and output circuit according to claim 1, characterized in that: Also comprising a second resistor; The second resistor is connected in series between the cathode of the first diode and the cathode of the second diode.

4. The configurable safety input and output circuit according to claim 1, characterized in that: Also including a third resistor; One end of the third resistor is connected to the output end of the isolated power supply; The other end of the third resistor is connected to the anode of the second diode and the anode of the third diode.

5. The configurable safety input and output circuit according to claim 1, characterized in that: The first diode is a voltage regulator diode.

6. An integrated circuit, characterized in that: include: Two or more configurable safety input and output circuits as described in any one of claims 1 to 5; The control units in each of the configurable safety input and output circuits are integrated to form a controller; The controller is connected in parallel to the input end of the driving circuit in each of the configurable safety input and output circuits, and is used to send a driving signal to the corresponding driving circuit according to the configuration signal output by each input circuit, so as to control the working state of the driving circuit.

7. The integrated circuit according to claim 6, characterized in that There are two configurable safety input and output circuits, where: The first configurable safety input-output circuit includes a first drive circuit, a first input circuit, a first output circuit, a first control unit and a first input-output interface; The second configurable safety input-output circuit includes a second drive circuit, a second input circuit, a second output circuit, a second control unit, and a second input-output interface; The first control unit and the second control unit are integrated to form the controller; The second input circuit includes a second optical coupler, a fourth diode, a fifth diode and a sixth diode; the second output circuit includes a third MOS tube and a fourth MOS tube; The light receiving anode of the second optical coupler is connected to the output end of the configuration power supply and the input end of the second input circuit, and the light receiving cathode of the second optical coupler is grounded; The light emitting anode of the second optical coupler is connected to the anode of the fifth diode, and the cathode of the fifth diode is connected to the cathode of the sixth diode; The anode of the sixth diode is connected to the output end of the isolation power supply and the anode of the fourth diode; The light emitting cathode of the controller is connected to the ground terminal of the isolated power supply; The gate electrodes of the third MOS tube and the fourth MOS tube are connected in parallel to the first output end of the second driving circuit; the source electrodes of the third MOS tube and the fourth MOS tube are connected in parallel to the second output end of the second driving circuit; The drain of the third MOS tube is connected to the ground electrode of the isolated power supply; The cathode of the fourth diode is connected to the second input-output interface and the drain of the fourth MOS tube.

8. A method for configuring an integrated circuit as claimed in claim 7, characterized in that: include: When the integrated circuit is configured to be in output mode by using the controller, the states of the first input-output interface and the second input-output interface are switched to output node connection states; If the controller is used to control the outputs of the first output end of the first drive circuit and the first output end of the second drive circuit to be high level, the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are all in a conducting state, the first input-output interface and the second input-output interface are in a closed state, and the first optical coupler and the second optical coupler are in a conducting state; Detecting the output levels of the first output circuit and the second output circuit, and when the output levels are both in a low level state, determining that the conduction states of the first MOS transistor, the second MOS transistor, the third MOS transistor, and the fourth MOS transistor are normal; If the controller is used to control the outputs of the first output end of the first driving circuit and the first output end of the second driving circuit to be low level, the first MOS transistor, the second MOS transistor, the third MOS transistor and the fourth MOS transistor are all in the disconnected state, and the first optical coupler and the second optical coupler are in the disconnected state; Detecting the output levels of the first output circuit and the second output circuit, and when the output levels are all in a high level state, determining that the conduction states of the first MOS transistor, the second MOS transistor, the third MOS transistor, and the fourth MOS transistor are normal; When the integrated circuit is configured to be in input mode by using the controller, the states of the first input / output interface and the second input / output interface are switched to an input dry contact connection state; If the controller is used to control the first drive circuit to output a PWM signal and the second drive circuit to output a low-level signal, the first MOS tube and the second MOS tube are in a periodic conduction state; if the input dry contact corresponding to the second input / output interface is in a closed state, the PWM signal output by the second optical coupler is obtained; if the input dry contact corresponding to the second input / output interface is in a conducting state, the high-level signal output by the second optical coupler is obtained; If the controller is used to control the second drive circuit to output a PWM signal and the first drive circuit to output a low-level signal, the third MOS tube and the fourth MOS tube are in a periodic conduction state; if the input dry contact corresponding to the first input-output interface is in a closed state, the PWM signal output by the first optical coupler is obtained; if the input dry contact corresponding to the first input-output interface is in a conducting state, the high-level signal output by the first optical coupler is obtained.

Citation Information

Patent Citations

  • Data acquisition card with digital input / output function and data acquisition device employing data acquisition card

    CN104281720A

  • Signal output control circuit

    CN109004824A

  • MOS transistor driver circuit

    CN109149913A

  • Drive circuit , drive assembly and actuating system of solenoid valve

    CN206149240U

  • General digital input and output multiplex circuit and input -output control unit

    CN207352398U