Input high-low level compatible circuit
By designing an input high-low level compatible circuit including rectifier bridge, resistor and optocoupler, the problem that existing circuits are difficult to compatible with high-low level signals is solved, and the circuit is simplified and cost reduction is achieved, while improving applicability and stability.
Patent Information
- Application Number
- CN202411688281.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-02-28
AI Technical Summary
Existing circuits are difficult to compatible with high and low level signals, resulting in the need to add complex level conversion circuits when processing signals output by different sensors, increasing the complexity and cost of the circuit.
A high and low level compatible circuit is designed. Through the combination of the rectifier bridge, resistor R1, resistor R2 and optocoupler, the corresponding resistor is automatically selected to work according to the sensor output level, thereby achieving high and low level compatible processing.
Compatible processing of high and low-level signals is realized, circuit design is simplified, cost is reduced, and circuit applicability and stability are improved.
Smart Images

Figure CN119543912A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of sensor circuits, and in particular, relates to an input high and low level compatible circuit. Background Art
[0002] In the signal transmission and processing process of electronic devices, it is often necessary to process signals from different sensors, and the output levels of these sensors may be different, including high and low levels. Traditional circuits can often only process a single type of level signal, which requires adding additional level conversion circuits in the circuit design, which not only increases the complexity of the circuit, but also increases the cost. Especially in the fields of industrial automation, smart home, medical equipment, etc., there are many types of sensors and large differences in level signals, which puts higher requirements on the compatibility and flexibility of the circuit. Summary of the invention
[0003] The purpose of the present application is to overcome the defects in the above-mentioned prior art and provide an input high and low level compatible circuit.
[0004] The present application provides an input high and low level compatible circuit, comprising: a rectifier bridge, a resistor R1, a resistor R2, and a sensor interface;
[0005] The whole bridge comprises pin 1, pin 2, pin 3 and pin 4;
[0006] The sensor interface includes a power pin, a signal output pin and a ground pin;
[0007] Pin 1 and pin 2 are connected to an optocoupler;
[0008] The pin 4 is connected to the resistor R1 and the resistor R2, the resistor R1 is connected to the power supply, the power supply is connected to the power supply pin of the sensor interface, the signal output pin of the sensor is connected to the pin 3, and the sensor ground pin is connected to the resistor R2;
[0009] When the resistor R1 is closed and the resistor R2 is open, a high level is input;
[0010] When the resistor R1 is on and the resistor R2 is off, a low level is input.
[0011] Optionally, the resistor R1 and the resistor R2 are chip resistors.
[0012] Optionally, the rectifier bridge is a small current rectifier bridge, and is a surface-mount rectifier bridge.
[0013] Optionally, the pin 1 is connected to the input end of the optocoupler, and the pin 2 is connected to one of the output ends of the optocoupler to form a current loop to achieve signal transmission and isolation.
[0014] Optionally, the circuit further includes a single-chip microcomputer, and a power pin of the single-chip microcomputer is connected to an optocoupler for receiving a signal after being isolated and inverted by the optocoupler.
[0015] The beneficial effects of this application are:
[0016] The present application provides an input high and low level compatible circuit, including: a rectifier bridge, a resistor R1, a resistor R2, and a sensor interface; the rectifier bridge includes pin 1, pin 2, pin 3 and pin 4; the sensor interface includes a power pin, a signal output pin and a ground pin; the pin 1 and pin 2 are connected to an optical coupler; the pin 4 is connected to resistor R1 and resistor R2, the resistor R1 is connected to a power supply, the power supply is connected to the power pin of the sensor interface, the signal output pin of the sensor is connected to the pin 3, and the sensor ground pin is connected to the resistor R2; when the resistor R1 is closed and the resistor R2 is open, a high level is input; when the resistor R1 is open and the resistor R2 is closed, a low level is input. The present application uses a specific connection method to enable the circuit to automatically select the corresponding resistor to work according to the level of the sensor output, thereby achieving compatible processing of high and low levels. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a schematic diagram of the input high and low level compatible circuit in this application. DETAILED DESCRIPTION
[0018] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that various forms of implementing the present disclosure should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0019] Please refer to Figure 1 As shown, the present invention provides an input high and low level compatible circuit, which aims to solve the problem of incompatibility of high and low level signals in the circuit in the prior art. Through a specific circuit design, compatible processing of high and low level signals is achieved, thereby improving the applicability and stability of the circuit.
[0020] 1. Circuit composition
[0021] The input high and low level compatible circuit of the present application mainly includes components such as a rectifier bridge DB1, a resistor R1, a resistor R2, a resistor R3, an optocoupler U1 and a sensor interface P1.
[0022] The rectifier bridge DB1 has four pins, namely pin 1 (positive output), pin 2 (negative input, forming an input terminal with pin 4), pin 3 (negative output, forming an input terminal with pin 2), and pin 4 (positive input, forming an input terminal with pin 2).
[0023] The function of the rectifier bridge is to rectify the input AC signal into a DC signal, and to achieve signal isolation and reversal. In this circuit, the rectifier bridge DB1 uses a small current SMD rectifier bridge to adapt to the application scenario of small current and low power consumption.
[0024] Resistors R1 and R2 are chip resistors, and one of the positions is selected for mounting according to actual needs. The function of these two resistors is to divide the input signal to adjust the signal amplitude input to the rectifier bridge. By adjusting the resistance values of R1 and R2, compatible processing of signals of different levels can be achieved. In this circuit, the resistance values of resistors R1 and R2 need to be determined according to the actual application scenario and the characteristics of the input signal.
[0025] Resistor R3 is connected between the output end (pin 1) of the rectifier bridge DB1 and the input end (pin 1) of the optocoupler U1 to limit the current and protect the optocoupler U1 from damage caused by excessive current. At the same time, the resistance value of resistor R3 also affects the flip threshold of the optocoupler U1, thereby affecting the sensitivity of the circuit. In this circuit, the resistance value of resistor R3 needs to be determined according to the characteristics of the optocoupler U1 and the circuit design requirements.
[0026] Optocoupler U1 is used as the isolation and inversion element of the circuit. Its input end (pin 1 and pin 2) is connected to the output end of the rectifier bridge DB1, and the output end (pin 3 and pin 4) is connected to the IO input pin of the microcontroller and the power supply. The function of optocoupler U1 is to isolate and invert the input signal to achieve compatibility with high and low level signals. When the input signal is high level, the light emitting diode of optocoupler U1 emits light, turning on the phototransistor, thereby outputting a low level signal; conversely, when the input signal is low level, the light emitting diode of optocoupler U1 does not emit light, the phototransistor is turned off, thereby outputting a high level signal. In this way, optocoupler U1 achieves isolation and inversion of the input signal.
[0027] The sensor interface P1 includes a power pin, a signal output pin, and a ground pin. The power pin is used to connect an external power supply to provide a working voltage for the sensor; the signal output pin is used to connect the signal output end of the sensor to input the sensor signal into the circuit; the ground pin is used to connect the ground end of the circuit to ensure the stable operation of the circuit. In this circuit, the pin of the sensor interface P1 is connected to pin 3 of the rectifier bridge DB1 to form the input end of the signal.
[0028] 2. Circuit connection relationship
[0029] The connection relationship of the input high and low level compatible circuit of this application is as follows:
[0030] Pin 4 of the rectifier bridge DB1 is connected to one end of the resistor R1 and the resistor R2 to form one end of the input signal; the other ends of the resistor R1 and the resistor R2 are respectively connected to different circuit nodes (one of the resistors is selected for connection according to actual needs) to achieve voltage division processing of the input signal.
[0031] Pin 3 of the rectifier bridge DB1 is connected to the signal output pin of the sensor interface P1, forming the other end of the input signal. In this way, the signal output by the sensor is input into the rectifier bridge DB1 through the sensor interface P1.
[0032] Pin 1 (positive output) of the rectifier bridge DB1 is connected to the input end (pin 1) of the optocoupler U1 through resistor R3; pin 2 (negative input) is connected to the input end (pin 2) of the optocoupler U1; and pin 3 (negative output) is connected to the ground end of the circuit. In this way, the rectifier bridge DB1 rectifies the input AC signal into a DC signal, and inputs it into the optocoupler U1 after current limiting through resistor R3.
[0033] The output end (pin 3) of the optocoupler U1 is connected to the IO input pin of the microcontroller; the output end (pin 4) is connected to the power supply of the microcontroller. When the light-emitting diode of the optocoupler U1 is lit, the phototransistor is turned on, so that the IO input pin of the microcontroller receives a low-level signal; conversely, when the light-emitting diode of the optocoupler U1 is not lit, the phototransistor is turned off, so that the IO input pin of the microcontroller receives a high-level signal. In this way, the optocoupler U1 realizes the isolation and inversion of the input signal, and outputs the processed signal.
[0034] The above are only specific embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An input high and low level compatible circuit, characterized in that: include: Rectifier bridge, resistor R1, resistor R2, sensor interface; The whole bridge comprises pin 1, pin 2, pin 3 and pin 4; The sensor interface includes a power pin, a signal output pin and a ground pin; Pin 1 and pin 2 are connected to an optocoupler; The pin 4 is connected to the resistor R1 and the resistor R2, the resistor R1 is connected to the power supply, the power supply is connected to the power supply pin of the sensor interface, the signal output pin of the sensor is connected to the pin 3, and the sensor ground pin is connected to the resistor R2; When the resistor R1 is closed and the resistor R2 is open, a high level is input; When the resistor R1 is on and the resistor R2 is off, a low level is input.
2. The input high and low level compatible circuit according to claim 1, characterized in that: The resistor R1 and the resistor R2 are chip resistors.
3. The input high and low level compatible circuit according to claim 1, characterized in that: The rectifier bridge is a small current rectifier bridge and a surface mount rectifier bridge.
4. The input high and low level compatible circuit according to claim 1, characterized in that: The pin 1 is connected to the input end of the optocoupler, and the pin 2 is connected to one of the output ends of the optocoupler, forming a current loop to achieve signal transmission and isolation.
5. The input high and low level compatible circuit according to claim 1, characterized in that: The circuit also includes a single-chip microcomputer, a power pin of the single-chip microcomputer is connected to an optical coupler for receiving a signal after being isolated and inverted by the optical coupler.