Optocoupler isolation signal transmission circuit for controlling input current based on dial switch
The optocoupler isolation signal transmission circuit with a dip switch addresses the inflexibility of existing circuits by allowing adjustable input current control, enhancing protection and reliability through a dip switch-based circuit design.
Patent Information
- Application Number
- CN202420472360.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-12
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2034-03-12
AI Technical Summary
Existing optocoupler isolation circuits lack flexibility in adjusting input current and often cause damage to subsequent circuits due to improper wiring, failing to meet diverse signal transmission requirements and providing inadequate protection.
An optocoupler isolation signal transmission circuit utilizing a dip switch to control input current, comprising a level selection circuit, front-stage protection circuit, optocoupler isolation circuit, and RC filter circuit, with components like dip switches, current limiting resistors, capacitors, and diodes to adjust current levels and protect against interference.
Enables flexible adjustment of input current to meet various application needs, enhances circuit protection, and improves signal transmission efficiency and reliability by maintaining electrical isolation and safeguarding against overcurrent, overvoltage, and reverse connections.
Smart Images

Figure CN222107926U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of circuit control, in particular to an optocoupler isolation signal transmission circuit based on a dial switch to control input current. Background Art
[0002] Generally, the signal transmission circuit of optocoupler isolation has a predetermined input voltage. The required current-limiting resistor is calculated based on the IF current of the photocoupler's front-stage light-emitting diode, so that the electrical signal input by the optocoupler can drive the light-emitting diode without damaging it. The light-emitting diode then emits light of a certain wavelength, which is received by the photodetector to generate photocurrent, which is further amplified and then outputs the signal.
[0003] Since the input and output of the optocoupler are isolated from each other and the electrical signal transmission is unidirectional, it has good electrical insulation and anti-interference capabilities.
[0004] However, in some special applications, due to different requirements for signal transmission strength and speed in different application scenarios, the existing optocoupler isolation circuits often cannot meet the requirements for flexible adjustment of input current. For example, the commonly used 24V or 5V input usually only selects one, which is incompatible with application scenarios that require multiple input methods and cannot meet the requirements for flexible adjustment of input current. In addition, the protection of the front stage of the input signal and the signal input to the MCU is not perfect, and when the wiring is wrong, it may cause damage to the subsequent circuit.
[0005] Therefore, a new technical solution is urgently needed to solve the above technical problems. Utility Model Content
[0006] The purpose of the utility model is to overcome the above-mentioned problems of the prior art and provide an optocoupler isolation signal transmission circuit based on a dip switch to control the input current, so as to solve the technical problems in the prior art that the optocoupler isolation circuit cannot adjust the input current and when the wiring is wrong, it is easy to cause damage to the subsequent circuit.
[0007] The above objectives are achieved through the following technical solutions:
[0008] An optocoupler isolation signal transmission circuit based on a dip switch to control input current, comprising an interconnected level selection circuit, a front-stage protection circuit, an optocoupler isolation circuit, an RC filter circuit and an MCU;
[0009] The level selection circuit includes a dip switch and a second current limiting resistor connected in series, and a first current limiting resistor connected in parallel with the dip switch and the second current limiting resistor. By closing the dip switch, the current inputs a high value current into the front-stage protection circuit through the first current limiting resistor; by opening the dip switch, the current inputs a low value current into the front-stage protection circuit through the first current limiting resistor and the second current limiting resistor;
[0010] The optocoupler isolation circuit includes an optocoupler, an input end of the optocoupler is connected to the pre-stage protection circuit, and an input and output end of the optocoupler is connected to the RC filter circuit.
[0011] The output end of the level selection circuit is connected to the input end of the pre-stage protection circuit, the output end of the pre-stage protection circuit is connected to the input end of the optocoupler isolation circuit, the output end of the optocoupler isolation circuit is connected to the input end of the RC filter circuit, and the output end of the RC filter circuit is connected to the MCU.
[0012] Furthermore, the front-stage protection circuit includes a fourth resistor, a first capacitor and a first diode connected in parallel.
[0013] Furthermore, the optocoupler is a common low-speed optocoupler, including a positive pin, a negative pin, an emitter pin and a collector pin, the positive pin is connected to the negative electrode of the first diode, and the negative pin is connected to the anode of the first diode.
[0014] Furthermore, a third resistor is connected to the collector pin of the optocoupler.
[0015] Furthermore, the RC filter circuit includes a second capacitor, a fifth resistor and a third capacitor connected in parallel.
[0016] Furthermore, the RC filter circuit also includes a diode clamping circuit composed of a second diode and a third diode.
[0017] The utility model provides an optocoupler isolation signal transmission circuit based on a dip switch to control the input current. The optocoupler isolation technology is adopted to effectively transmit signals and has the function of flexibly controlling the input current. By using a dip switch to control the input current, the transmission strength and speed of the signal can be adjusted according to actual needs, thereby improving the transmission efficiency. In addition, it also has the following advantages:
[0018] 1. The input current can be flexibly adjusted to meet the needs of different application scenarios. In traditional optocoupler isolation circuits, the input current is usually provided by a constant current source. However, due to the different requirements for signal transmission strength and speed in different application scenarios, existing optocoupler isolation circuits often cannot meet the requirements of flexible input current adjustment.
[0019] 2. The use of optocoupler isolation technology can maintain electrical isolation between circuits and increase the protection of the front-stage input and the back-stage output to the MCU. For relatively simple hardware circuits, high-speed optocouplers can also be selected according to actual needs to increase the transmission rate. Dual-channel or multi-channel optocouplers can also be selected to greatly improve the reliability and safety of the circuit for overvoltage and overcurrent protection, reverse connection protection, and back-stage clamping protection of the front stage, providing great convenience for MCU processing.
[0020] 3. The input current is controlled by a dip switch, which is easy to operate and implement. In the technical solution of the present application, the magnitude of the input current is controlled by a dip switch. Different states of the dip switch correspond to different current magnitudes, so the intensity of the input current can be adjusted by the dip switch. In this way, the transmission intensity and speed of the signal can be controlled according to actual needs, thereby improving the transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a structural diagram of an optocoupler isolation signal transmission circuit based on a dip switch to control input current according to the utility model;
[0022] Figure 2 The utility model discloses an optocoupler isolation signal transmission circuit based on a dip switch to control input current. DETAILED DESCRIPTION
[0023] The utility model is further described in detail below based on the accompanying drawings and embodiments. The described embodiments are only part of the embodiments of the utility model, not all of the embodiments. Based on the embodiments of the utility model, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the utility model.
[0024] like Figure 1 As shown, an optocoupler isolation signal transmission circuit based on a dip switch to control input current includes a level selection circuit, a pre-stage protection circuit, an optocoupler isolation circuit, an RC filter circuit and an MCU connected to each other;
[0025] like Figure 2 As shown, the level selection circuit in this embodiment includes a dip switch SW1 and a second current limiting resistor R2 connected in series, and a first current limiting resistor R1 connected in parallel with the dip switch SW1 and the second current limiting resistor R2. By closing the dip switch SW1, the current inputs a high value current into the front-stage protection circuit through the first current limiting resistor R1; by opening the dip switch SW1, the current inputs a low value current into the front-stage protection circuit through the first current limiting resistor R1 and the second current limiting resistor R2;
[0026] The optocoupler isolation circuit includes an optocoupler U1 , an input end of the optocoupler U1 is connected to the pre-stage protection circuit, and an input and output end of the optocoupler U1 is connected to the RC filter circuit.
[0027] The output end of the level selection circuit is connected to the input end of the pre-stage protection circuit, and is used to receive the signal to be transmitted and convert it into a current signal. The output end of the pre-stage protection circuit is connected to the input end of the optocoupler isolation circuit, and is used to receive the current signal of the input circuit and convert it into an optical signal. The output end of the optocoupler isolation circuit is connected to the input end of the RC filter circuit, and is used to output the signal to the target circuit. The output end of the RC filter circuit is connected to the MCU.
[0028] As a specific embodiment of this solution, it is used to provide two currents of 24V and 5V, and its working principle is as follows:
[0029] When the power supply is selected to be 24V, the dip switch SW1 is turned off. At this time, the second current limiting resistor R2 does not work, and the current flows through the first current limiting resistor R1 to the input end of the optocoupler;
[0030] When the power supply is connected and 5V is selected, the dip switch SW1 is turned on, and the current flows through the first current limiting resistor R1 and the second current limiting resistor R2 at the same time, limiting the current flowing into the optocoupler to prevent excessive current from damaging the subsequent optocoupler, while ensuring that the current flowing through the optocoupler is sufficient to turn on the light-emitting diode.
[0031] In addition, multiple dip switches and adapter resistors can be added according to actual applications to achieve adjustment and switching of more currents with different values.
[0032] like Figure 2 As shown, the front-stage protection circuit in this embodiment includes a fourth resistor R4, a first capacitor C1 and a first diode D1 connected in parallel to each other, and is used to protect and drive the front-stage input.
[0033] Specifically, in this embodiment, the first capacitor C1 is connected in parallel to the optocoupler input end to play a filtering role. In practical applications, the input signal is often interfered with, such as power supply noise, electromagnetic interference, etc. These interference signals will enter the circuit through the optocoupler input end and affect the normal operation of the circuit. By connecting the first capacitor C1 in parallel, the high-frequency interference signal can be short-circuited to the ground, playing a filtering role, ensuring the purity of the input signal, and improving the performance and stability of the circuit;
[0034] The fourth resistor R4 is connected in parallel to the input end of the optocoupler, which can, on the one hand, limit the current and prevent excessive current; on the other hand, it can improve the stability of the circuit, eliminate interference signals, and improve the response speed of the circuit.
[0035] The first diode D1 is connected in parallel to the input end of the optocoupler, mainly to prevent the optocoupler from being damaged by reverse power connection, thereby improving the safety of the circuit.
[0036] like Figure 2 As shown, the optocoupler U1 in this embodiment is a common low-speed optocoupler, including a positive pin, a negative pin, an emitter pin and a collector pin. The positive pin is connected to the negative electrode of the first diode D1, and the negative pin is connected to the anode of the first diode D1, which is used to maintain electrical isolation between circuits and can isolate high-voltage spikes and surge currents.
[0037] It should be noted that the optocoupler U1 described in this embodiment can adopt ordinary low-speed optocouplers commonly found on the market. In specific application scenarios, high-speed optocouplers can also be selected to increase the transmission rate. Dual-channel, multi-channel optocouplers and other types of optocouplers can also be used according to actual needs to achieve this function and reduce costs.
[0038] When it is a common low-speed optocoupler, the functions of each pin are as follows:
[0039] Pin 1: The positive pin indicates the positive pole of the emitter. It is usually connected to the source of the control signal. When in use, the level of the control signal must match the input level of the optocoupler to ensure correct signal isolation and transmission.
[0040] Pin 2: The negative pin represents the negative pole of the emitter, usually connected to the input signal ground.
[0041] Pin 3: The emitter pin represents the emitter of the receiving end and is usually connected to the signal ground on the output isolation side.
[0042] Pin 4: The collector pin represents the collector of the receiving end, usually connected to the target end of the control signal.
[0043] When using it, you must select the correct interface mode according to the requirements of the input circuit, press the dip switch, and flexibly adjust the input current to meet the needs of different application scenarios to ensure that the optocoupler can correctly control the target circuit.
[0044] In addition, a third resistor R3 is connected to the collector pin of the optocoupler U1. When there is voltage at the input, the optocoupler works, driving the light-emitting diode to turn on, and the right transistor also turns on, forming a complete closed loop, and the output voltage is pulled to the ground signal; when there is no voltage at the input, the optocoupler does not work, and the output voltage is the voltage of the pull-up resistor.
[0045] like Figure 2 As shown, the RC filter circuit in this embodiment includes a second capacitor C2, a fifth resistor R5 and a third capacitor C3 connected in parallel, which are used to filter the signal and send it to the MCU for processing to realize the recognition of high and low signal levels.
[0046] Specifically, when electromagnetic interference or other problems occur at the output port of the optocoupler U1, the power supply voltage may fluctuate or be damaged, and other parts of the circuit may also be damaged. At this time, by connecting a second capacitor C2 in parallel to the output port of the optocoupler U1, the impact of electromagnetic interference can be reduced, while protecting the power supply and circuit. Since the signal at the output port of the optocoupler U1 has high-frequency noise, this noise may affect the stability of the entire circuit. By connecting a capacitor in parallel to the output port of the optocoupler, these high-frequency noise signals can be effectively filtered out to improve the stability of the entire circuit.
[0047] By adding a fifth resistor R5 and a third capacitor C3 in the later stage, an RC low-pass filter can be formed, which can filter out high-frequency noise, improve the quality of the signal, protect the safe operation of other circuit components, and improve the quality of the signal.
[0048] In addition, the RC filter circuit also includes a diode clamping circuit composed of a second diode D2 and a third diode D3, which is used to clamp the voltage level between VCC2 and the signal ground to prevent the MCU from being damaged by excessive signal voltage, thereby improving the safety of the circuit.
[0049] The above description is only for illustrating the implementation mode of the present invention and is not intended to limit the present invention. For those skilled in the art, any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An optocoupler isolation signal transmission circuit based on a dip switch to control input current, characterized in that: It includes a level selection circuit, a pre-stage protection circuit, an optocoupler isolation circuit, an RC filter circuit and an MCU connected to each other; The level selection circuit comprises a dip switch (SW1) and a second current limiting resistor (R2) connected in series, and a first current limiting resistor (R1) connected in parallel with the dip switch (SW1) and the second current limiting resistor (R2); by closing the dip switch (SW1), a current inputs a high-value current into the front-stage protection circuit via the first current limiting resistor (R1); by opening the dip switch (SW1), a current inputs a low-value current into the front-stage protection circuit via the first current limiting resistor (R1) and the second current limiting resistor (R2); The optocoupler isolation circuit comprises an optocoupler (U1), the input end of the optocoupler (U1) is connected to the front-stage protection circuit, and the input and output ends of the optocoupler (U1) are connected to the RC filter circuit; The output end of the level selection circuit is connected to the input end of the pre-stage protection circuit, the output end of the pre-stage protection circuit is connected to the input end of the optocoupler isolation circuit, the output end of the optocoupler isolation circuit is connected to the input end of the RC filter circuit, and the output end of the RC filter circuit is connected to the MCU.
2. According to claim 1, a photocoupler isolation signal transmission circuit based on a dip switch to control input current is characterized in that: The front-stage protection circuit comprises a fourth resistor (R4), a first capacitor (C1) and a first diode (D1) which are connected in parallel.
3. The optocoupler isolation signal transmission circuit based on a dip switch to control input current according to claim 2, characterized in that: The optocoupler (U1) is a common low-speed optocoupler, comprising a positive pin, a negative pin, an emitter pin and a collector pin, the positive pin being connected to the negative electrode of the first diode (D1), and the negative pin being connected to the anode of the first diode (D1).
4. The optocoupler isolation signal transmission circuit based on a dip switch to control input current according to claim 3, characterized in that: A third resistor (R3) is connected to the collector pin of the optocoupler (U1).
5. The optocoupler isolation signal transmission circuit based on a dip switch to control input current according to claim 3, characterized in that: The RC filter circuit includes a second capacitor (C2), a fifth resistor (R5) and a third capacitor (C3) connected in parallel.
6. The optocoupler isolation signal transmission circuit based on a dip switch to control input current according to claim 5, characterized in that: The RC filter circuit also includes a diode clamp circuit consisting of a second diode (D2) and a third diode (D3).
