Bidirectional constant current digital quantity input circuit with threshold setting and isolation
By combining a rectifier bridge circuit, a constant current control circuit, and a threshold control circuit, the problem of temperature affecting the current limiting resistor and the transmission ratio of optocoupler isolation is solved, achieving constant current input and bidirectional isolation, reducing heat dissipation, and improving system reliability and the number of channels.
Patent Information
- Application Number
- CN202511117642.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2025-11-14
AI Technical Summary
In traditional digital input circuits, the transfer ratio of current-limiting resistors and optocouplers is affected by temperature, leading to inconsistent thresholds, resulting in high power consumption, increased cost, and reduced reliability, making it difficult to meet multi-channel requirements.
The system employs a rectifier bridge circuit, a constant current control circuit, a threshold control circuit, and an optocoupler isolation circuit. By adjusting the threshold voltage of the optocoupler isolation circuit through the threshold control circuit, the optocoupler operates in a saturated switching state, thereby achieving constant current input and bidirectional isolation.
It reduces thermal power consumption, improves the consistency of optocoupler isolation, lowers the cost per channel, supports more digital inputs, meets national standards, and improves system reliability.
Smart Images

Figure CN120956259A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation, and more specifically, to a bidirectional constant current digital input circuit with threshold setting and isolation. Background Technology
[0002] Digital input acquisition devices are a common and versatile type of equipment in modern industrial automation. Many PLC devices come with multiple digital input ports. These digital input ports are typically used to acquire signals output from sensor devices, such as optical grating sensors, limit switches, and status detectors.
[0003] Current digital input acquisition devices are generally integrated into the PLC itself, or the PLC is supplemented with digital input I / O expansion modules. This is because modern industrial automation has a huge demand for digital input acquisition, and a single module or device typically integrates multiple channels. These digital input acquisition circuits generally use current-limiting resistors and optocouplers for isolation and acquisition. While this solution meets functional requirements, it incurs significant power consumption, making it suitable only for devices with a limited number of digital input channels. When the number of channels exceeds 16, the overall heat dissipation of the circuit board requires additional cooling measures, reducing reliability and increasing cost. In such cases, the traditional resistor-optocoupler solution becomes unsuitable.
[0004] Therefore, to meet reliability requirements while reducing material costs, a digital input device is typically multi-channel and supports bidirectional input, i.e., source and sink digital input. The more channels integrated into a module or device, the lower the cost per channel. However, thermal power consumption per channel becomes a key consideration. Therefore, constant current input can significantly reduce the power consumption of a single channel.
[0005] According to GB / T 15969.2-2008, the standard for digital inputs stipulates that for a common DC 24V input, the effective high-level voltage has a certain range limit, and the current is also limited. Therefore, it is required to be able to set threshold values to meet national standards. Simultaneously, isolated digital inputs can electrically isolate field digital signals from the system's control section, preventing field interference from entering the control system.
[0006] like Figure 1The diagram shows a traditional digital input scheme, directly employing a current-limiting resistor and optocoupler isolation. The current-limiting resistor is responsible for current limiting and voltage division by the optocoupler. The optocoupler is used to transmit and isolate the digital input signal to the processor, and the pull-up output converts the optocoupler signal into a signal that matches the voltage level of the processor port. The digital input port receives a valid high-level input, with a voltage range between 11V and 30V, and a current range between 2mA and 15mA. Therefore, it is necessary to consider that the current is greater than 2mA when the input voltage is 11V, and less than 15mA when the input voltage is 30V. The current-limiting resistor needs to be calculated and a suitable value selected. Since the voltage drop at the optocoupler input is typically only about 1.2V, the input voltage is essentially applied across the current-limiting resistor. Figure 1 The drawback of the proposed solution is that the current-limiting resistor has significant heat dissipation. Since most digital signals in industrial environments are 24V, and based on a minimum input current of 2mA, the heat dissipation of the current-limiting resistor alone exceeds 0.1W. If a digital input device has multiple input channels, the heat dissipation will further accumulate. Digital input device modules are typically compact and rely solely on passive heat dissipation. If the heat cannot be dissipated in time, the resistor is prone to failure due to prolonged operation at high temperatures, resulting in ineffective input signal detection.
[0007] therefore, Figure 1 The threshold of the scheme shown is determined by the current limiting resistor and the transmission ratio of the optocoupler isolation. The transmission ratio of the optocoupler isolation has poor consistency and is greatly affected by temperature, which leads to large dispersion of the threshold and affects the consistency of the optocoupler isolation. Summary of the Invention
[0008] The purpose of this invention is to provide a bidirectional constant current digital input circuit with threshold setting and isolation, which solves the problem that in traditional technical solutions, the threshold is determined by the current limiting resistor and the transmission ratio of the optocoupler, and the consistency of optocoupler isolation is poor due to the temperature effect of the current limiting resistor.
[0009] The above-mentioned technical objective of the present invention is achieved through the following technical solution: This invention provides a bidirectional constant current digital input circuit with threshold setting and isolation. The circuit includes: a rectifier bridge circuit, a constant current control circuit, a threshold control circuit, and an optocoupler isolation circuit; wherein, the AC input terminal of the rectifier bridge circuit is connected to a DI port and a COM port. The output terminal of the rectifier bridge circuit is connected to the input terminal of the constant current control circuit and the threshold control circuit, respectively, and the output terminal of the constant current control circuit and the threshold control circuit is connected to the input terminal of the optocoupler isolation circuit.
[0010] The threshold control circuit is used to adjust the threshold voltage of the optocoupler isolation circuit.
[0011] In one implementation, the rectifier bridge circuit is a rectifier bridge composed of four Schottky diodes.
[0012] In one implementation, the optocoupler isolation circuit is a unidirectional optocoupler, which includes a diode at the input end and a phototransistor at the output end.
[0013] In one implementation, the threshold control circuit includes a first resistor, a second resistor, a seventh resistor, and a first transistor; The first resistor and the second resistor are connected in series to the positive and negative terminals of the rectifier bridge. The voltage divider point of the series connection between the first resistor and the second resistor is connected to the base of the first transistor. The positive terminal of the rectifier bridge is connected to one end of the first resistor, and the negative terminal of the rectifier bridge is connected to one end of the second resistor and the seventh resistor. The collector of the first transistor is connected to the other end of the seventh resistor and to the cathode of the input terminal of the unidirectional optocoupler.
[0014] In one implementation, the constant current control circuit includes a third resistor, a fourth resistor, a fifth resistor, a second transistor, a second diode, and a third diode; The positive terminal of the rectifier bridge is connected to one end of the fourth and fifth resistors, the other end of the fourth resistor is connected to the collector of the second transistor, and the other end of the fifth resistor is connected to the base of the second transistor. The emitter of the first transistor is connected to one end of the third resistor, the cathode of the second diode, and the anode of the input terminal of the unidirectional optocoupler; The emitter of the second transistor is connected to the other end of the third resistor, and the base of the second transistor is connected to the other end of the fifth resistor and the anode of the third diode; The cathode of the third diode is connected to the anode of the second diode.
[0015] In one implementation, the first transistor is a PNP transistor and the second transistor is an NPN transistor.
[0016] In one implementation, a sixth resistor is connected in parallel to the collector of the phototransistor of the unidirectional optocoupler, and the emitter of the phototransistor of the unidirectional optocoupler is grounded.
[0017] In one implementation, the inputs to the DI port and COM port are 0 or 24V.
[0018] In one implementation, the DI port is connected to 0V and the COM port is connected to 24V; or, the DI port is connected to 24V and the COM port is connected to 0V.
[0019] In one implementation, the digital signal input between the DI port and the COM port is either source-type or sink-type.
[0020] Compared with the prior art, the present invention has the following beneficial effects: This invention introduces a threshold control circuit to control the threshold of the optocoupler isolation circuit, allowing the optocoupler to operate in a saturated switching state. This reduces the poor consistency caused by the discrete nature of the optocoupler transmission ratio, thus solving the problem in traditional technical solutions where the threshold is determined by both the current-limiting resistor and the optocoupler transmission ratio, and the inconsistent optocoupler isolation caused by the temperature-dependent current-limiting resistor. Attached Figure Description
[0021] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings: Figure 1 A schematic diagram of the structure of a digital input circuit provided for the prior art; Figure 2 A schematic diagram of a bidirectional constant current digital input circuit with threshold setting and isolation provided in an embodiment of the present invention; Figure 3 The circuit diagram is provided for a bidirectional constant current digital input circuit with threshold setting and isolation, as provided in an embodiment of the present invention.
[0022] Figure labels and descriptions: 1. Rectifier bridge circuit; 2. Constant current control circuit; 3. Optocoupler isolation circuit; 4. Threshold control circuit; R1, first resistor; R2, second resistor; R3, third resistor; R4, fourth resistor; R5, fifth resistor; R6, sixth resistor; R7, seventh resistor; D1, rectifier bridge; D2, second diode; D3, third diode; Q1, first transistor; Q2, second transistor; U1, unidirectional optocoupler. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.
[0024] It should be noted that the terms "comprising" or "may include" used in the various embodiments of this application indicate the presence of the claimed function, operation, or element, and do not limit the addition of one or more functions, operations, or elements. Furthermore, as used in the various embodiments of this application, the terms "comprising," "having," and their cognates are intended only to indicate a specific feature, number, step, operation, element, component, or combination of the foregoing, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing, or adding one or more combinations of the foregoing.
[0025] It should be understood that terms such as "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0026] Please refer to Figure 2 , Figure 2 The schematic diagram of the bidirectional constant current digital input circuit with threshold setting and isolation provided in the embodiment of the present invention is as follows: Figure 2 As shown, the circuit includes: The circuit consists of a rectifier bridge D1 stack circuit 1, a constant current control circuit 2, a threshold control circuit 4, and an optocoupler isolation circuit 3; wherein, the AC input terminal of the rectifier bridge D1 stack circuit 1 is connected to a DI port and a COM port. The output terminal of the rectifier bridge D1 stack circuit 1 is connected to the input terminals of the constant current control circuit 2 and the threshold control circuit 4, respectively. The output terminals of the constant current control circuit 2 and the threshold control circuit 4 are connected to the input terminal of the optocoupler isolation circuit 3.
[0027] Among them, the threshold control circuit 4 is used to adjust the threshold voltage of the optocoupler isolation circuit 3.
[0028] The rectifier bridge D1 circuit 1 enables bidirectional digital input, supporting both source and sink inputs. A valid digital input can be detected when the COM port is connected to 0V and the DI port receives 24V, or vice versa.
[0029] The constant current control circuit 2 ensures that the current in the entire digital input current loop remains constant. This means that even when the voltage at the digital input port varies from 11V to 30V, the current input remains between 2mA and 3mA. This significantly reduces the circuit's heat dissipation, allowing for the integration of more digital inputs into a single module.
[0030] The threshold control circuit 4 is used to control the threshold of the optocoupler isolation circuit 3, so that the optocoupler isolation circuit 3 operates in a saturated switching state, thereby reducing the poor consistency caused by the discrete nature of the optocoupler transmission.
[0031] Optocoupler isolation circuit 3 is used to transmit and isolate digital input signals to the processor, and the subsequent pull-up output converts the signal output by optocoupler isolation circuit 3 into a signal that matches the voltage level of the processor port.
[0032] Please refer to Figure 3 , Figure 3 The circuit diagram of the bidirectional constant current digital input circuit with threshold setting and isolation provided in the embodiment of the present invention is as follows: The rectifier bridge D1 circuit 1 is a rectifier bridge D1 composed of four Schottky diodes.
[0033] The optocoupler isolation circuit 3 is a unidirectional optocoupler U1, which includes a diode at the input end and a phototransistor at the output end.
[0034] In some embodiments, the threshold control circuit 4 includes a first resistor R1, a second resistor R2, a seventh resistor R7, and a first transistor Q1; the first resistor R1 and the second resistor R2 are connected in series to the positive and negative terminals of the rectifier bridge D1, the voltage divider point of the series connection of the first resistor R1 and the second resistor R2 is connected to the base of the first transistor Q1, the positive terminal of the rectifier bridge D1 is connected to one end of the first resistor R1, and the negative terminal of the rectifier bridge D1 is connected to one end of the second resistor R2 and the seventh resistor R7; the collector of the first transistor Q1 is connected to the other end of the seventh resistor R7 and to the cathode of the input terminal of the unidirectional optocoupler U1.
[0035] In some embodiments, the constant current control circuit 2 includes a third resistor R3, a fourth resistor R4, a fifth resistor R5, a second transistor Q2, a second diode D2, and a third diode D3; the positive terminal of the rectifier bridge D1 is connected to one end of the fourth resistor R4 and the fifth resistor R5, the other end of the fourth resistor R4 is connected to the collector of the second transistor Q2, and the other end of the fifth resistor R5 is connected to the base of the second transistor Q2; the emitter of the first transistor Q1 is connected to one end of the third resistor R3, the cathode of the second diode D2, and the anode of the input terminal of the unidirectional optocoupler U1; the emitter of the second transistor Q2 is connected to the other end of the third resistor R3, the base of the second transistor Q2 is connected to the other end of the fifth resistor R5 and the anode of the third diode D3; the cathode of the third diode D3 is connected to the anode of the second diode D2.
[0036] In some embodiments, the first transistor Q1 is a PNP transistor and the second transistor Q2 is an NPN transistor.
[0037] In some embodiments, a sixth resistor R6 is connected in parallel to the collector of the phototransistor of the unidirectional optocoupler U1, and the emitter of the phototransistor of the unidirectional optocoupler U1 is grounded.
[0038] exist Figure 3 Based on the circuit structure diagram shown, the implementation principle of the constant current bidirectional digital input circuit for threshold setting and isolation provided in this embodiment of the invention is as follows: When a source-type or sink-type digital voltage signal is input between the DI port and the COM port, the signal is output as a voltage signal with fixed polarity after passing through the D1 rectifier bridge, thus achieving bidirectional input functionality. The signal output from the rectifier bridge circuit is then supplied to the constant current control unit circuit and the threshold control unit circuit.
[0039] The fourth resistor R4 primarily provides a bias voltage to the collector of the second transistor Q2 through a voltage divider. The fifth resistor R5 provides a bias current to the base of the second transistor Q2. The second diode D2 and the third diode D3 provide forward voltage. Diodes D2 and D3 are connected in series and forward-biased, forming a clamping voltage of approximately 1.4V between the third resistor R3 and the Vbe voltage of the second transistor Q2. Since the Vbe voltage is fixed at approximately 0.7V after the second transistor Q2 is turned on, the voltage across the third resistor R3, Vr3 = 1.4 - 0.7 = 0.7V, is also a fixed voltage. Therefore, the output current of the third resistor R3, Ir3 = 0.7V / R3, is also fixed due to the fixed resistance of R3, thus achieving a constant current function. Adjusting the third resistor R3 adjusts the constant current value. The constant current signal output from the constant current control circuit directly drives the output of the optocoupler isolation circuit.
[0040] A constant current of 2mA to 3mA flows through the input terminal of the optocoupler isolation circuit, which turns on the internal output transistor, pulling the voltage at one end of the sixth resistor R6 to about 0V. The sixth resistor R6 is a pull-up resistor, and the DI-INT terminal signal flips to a low level, indicating that there is a digital signal input.
[0041] The input signal to the threshold control circuit is the voltage signal output from the rectifier bridge circuit, and the output directly controls the input terminal of the unidirectional optocoupler. When the digital input voltage is normally between 11V and 30V, the voltage across the second resistor R2 is divided, and the base voltage Vb of the first transistor Q1 is greater than the emitter voltage Ve, so the first transistor Q1 is turned off. The unidirectional optocoupler U1 works normally, and the input terminal conduction voltage Vf is approximately 1.2V. When the digital input voltage drops below 11V, the voltage across the second resistor R2 decreases, and the base voltage Vb of the first transistor Q1 is less than the emitter voltage Ve. When Vbe is less than -0.7V, the first transistor Q1 turns on, and the input terminal voltage of the unidirectional optocoupler U1 is pulled down to approximately 0.3V, so the unidirectional optocoupler U1 is turned off and does not work. The seventh resistor R7 provides a base voltage for the first transistor Q1 and the unidirectional optocoupler U1, ensuring that the Vbe voltage of the second transistor is less than -0.7V when the first transistor Q1 is turned off. Therefore, the threshold voltage can be adjusted by adjusting the ratio of the first resistor R1 to the second resistor R2.
[0042] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A bidirectional constant current digital input circuit with threshold setting and isolation, characterized in that, The circuit includes: a rectifier bridge circuit, a constant current control circuit, a threshold control circuit, and an optocoupler isolation circuit; wherein, the AC input terminal of the rectifier bridge circuit is connected to a DI port and a COM port; The output terminal of the rectifier bridge circuit is connected to the input terminal of the constant current control circuit and the threshold control circuit, respectively, and the output terminal of the constant current control circuit and the threshold control circuit is connected to the input terminal of the optocoupler isolation circuit. The threshold control circuit is used to adjust the threshold voltage of the optocoupler isolation circuit.
2. The bidirectional constant current digital input circuit with threshold setting and isolation according to claim 1, characterized in that, The rectifier bridge circuit is a rectifier bridge composed of four Schottky diodes.
3. The bidirectional constant current digital input circuit with threshold setting and isolation according to claim 2, characterized in that, The optocoupler isolation circuit is a unidirectional optocoupler, which includes a diode at the input end and a phototransistor at the output end.
4. The bidirectional constant current digital input circuit with threshold setting and isolation according to claim 3, characterized in that, The threshold control circuit includes a first resistor, a second resistor, a seventh resistor, and a first transistor; The first resistor and the second resistor are connected in series to the positive and negative terminals of the rectifier bridge. The voltage divider point of the series connection between the first resistor and the second resistor is connected to the base of the first transistor. The positive terminal of the rectifier bridge is connected to one end of the first resistor, and the negative terminal of the rectifier bridge is connected to one end of the second resistor and the seventh resistor. The collector of the first transistor is connected to the other end of the seventh resistor and to the cathode of the input terminal of the unidirectional optocoupler.
5. A bidirectional constant current digital input circuit with threshold setting and isolation according to claim 4, characterized in that, The constant current control circuit includes a third resistor, a fourth resistor, a fifth resistor, a second transistor, a second diode, and a third diode; The positive terminal of the rectifier bridge is connected to one end of the fourth and fifth resistors, the other end of the fourth resistor is connected to the collector of the second transistor, and the other end of the fifth resistor is connected to the base of the second transistor. The emitter of the first transistor is connected to one end of the third resistor, the cathode of the second diode, and the anode of the input terminal of the unidirectional optocoupler; The emitter of the second transistor is connected to the other end of the third resistor, and the base of the second transistor is connected to the other end of the fifth resistor and the anode of the third diode; The cathode of the third diode is connected to the anode of the second diode.
6. The bidirectional constant current digital input circuit with threshold setting and isolation according to claim 5, characterized in that, The first transistor is a PNP transistor, and the second transistor is an NPN transistor.
7. A bidirectional constant current digital input circuit with threshold setting and isolation according to claim 3, characterized in that, A sixth resistor is connected in parallel to the collector of the phototransistor of the unidirectional optocoupler, and the emitter of the phototransistor of the unidirectional optocoupler is grounded.
8. The bidirectional constant current digital input circuit with threshold setting and isolation according to claim 1, characterized in that, The inputs to the DI and COM ports are 0 or 24V.
9. A bidirectional constant current digital input circuit with threshold setting and isolation according to claim 8, characterized in that, The DI port is connected to 0V and the COM port is connected to 24V; or, the DI port is connected to 24V and the COM port is connected to 0V.
10. A bidirectional constant current digital input circuit with threshold setting and isolation according to claim 1, characterized in that, The digital signal input between the DI port and the COM port is either source or sink type.