Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a control circuit and a device compatible with voltage type and current type analog quantity input, wherein the type of an initial electric signal analog quantity is judged through a control module, and when the initial electric signal analog quantity is judged to be the voltage type analog quantity, a first control signal is output to control a first signal processing module to correspondingly process the initial electric signal analog quantity; when the initial electric signal analog quantity is judged to be the current type analog quantity, the second control signal is output to control the first signal processing module to carry out signal processing after the current type analog quantity is converted, so that the initial electric signal analog quantity of which the type is the voltage type analog quantity or the current type analog quantity can be output to the same second signal processing module to carry out operational amplifier processing after passing through the shared input port, the effect of saving the internal area of equipment and the area of a circuit board is realized, and the condition of misconnection is avoided. The control circuit and the device which are compatible with voltage type and current type analog quantity input can be applied to a robot system, an electro-hydraulic servo steering engine system and the like, and relate to the field of application of voltage type and current type analog quantity input signals.
Referring to fig. 1, a schematic structural diagram of a control circuit compatible with voltage-mode and current-mode analog inputs according to the present invention is shown, for convenience of description, only the relevant parts of the present embodiment are shown, and the following details are described:
a control circuit 10 compatible with voltage mode and current mode analog INPUT comprises an INPUT port INPUT, a control module 20, a first signal processing module 30 and a second signal processing module 40.
The INPUT port INPUT is used for inputting an initial electrical signal analog quantity. The initial electric signal analog quantity comprises a voltage mode analog quantity and a current mode analog quantity.
The control module 20 is configured to receive the initial electrical signal analog quantity and output a first control signal when the initial electrical signal analog quantity is a voltage-type analog quantity or output a second control signal when the initial electrical signal analog quantity is a current-type analog quantity. In an alternative embodiment, the first control signal is a low level signal and the second control signal is a high level signal.
The first signal processing module 30 is connected to the control module 20, and is configured to perform signal processing on the voltage type analog quantity according to the first control signal, or perform signal processing after converting the current type analog quantity into a preset voltage type analog quantity according to the second control signal. The signal processing specifically includes performing anti-transient interference processing on the input voltage type analog quantity or the preset voltage type analog quantity, that is, preventing the value of the voltage type analog quantity or the value of the preset voltage type analog quantity caused by static electricity or lightning stroke and the like from exceeding the tolerable range of the control circuit 10, thereby damaging the components in the circuit.
The second signal processing module 40 is connected to the first signal processing module 30, and is configured to perform operational amplifier processing on the initial electrical signal analog quantity after signal processing, and output an optimized electrical signal analog quantity.
Fig. 2 is a circuit diagram of an exemplary first signal processing module in the control circuit compatible with voltage-mode and current-mode analog inputs shown in fig. 1, which only shows the relevant parts of the present embodiment for convenience of description, and the following details are described below:
in an alternative embodiment, the first signal processing module 30 includes a switching unit 301, a voltage converting unit 302, and a protecting unit 303.
The switch unit 301 is configured to select a connection mode according to the first control signal or the second control signal. Different gating terminals exist in the switch unit 301, and when the switch unit receives different control signals, the connection mode of the gating terminals can be correspondingly changed according to the control signals, so that the working state of the voltage conversion unit 302 is affected.
In a specific application, the switching unit 301 includes a first relay KR1 and a second relay KR 2. Further, the switching unit 301 may employ another switching element such as a through analog switch.
A power supply end of the first relay KR1 is connected with a direct current power supply (represented by a port "1" of the first relay KR1 in FIG. 2), and a controlled end (represented by a port "2" of the first relay KR1 in FIG. 2) is connected with the control module 20; the fixed end of the first relay KR1 (indicated by port "5" of the first relay KR1 in fig. 2) is connected to the INPUT port INPUT. A first gating terminal (indicated by port "4" of the first relay KR1 in fig. 2) of the first relay KR1 is connected to the second relay KR2, and a second gating terminal (indicated by port "3" of the first relay KR1 in fig. 2) of the first relay KR1 is connected to the first terminal of the voltage converting unit 302.
A power supply end of the second relay KR2 is connected with a direct current power supply (indicated by port "1" of the second relay KR2 in fig. 2), and a controlled end (indicated by port "2" of the second relay KR2 in fig. 2) is connected with the control module 20; a fixed end of the second relay KR2 (indicated by port "5" of the second relay KR2 in fig. 2) is connected to the second signal processing module 40, a first gate end of the second relay KR2 (indicated by port "4" of the second relay KR2 in fig. 2) is connected to the first gate end of the first relay KR1, and a second gate end of the second relay KR2 (indicated by port "3" of the second relay KR2 in fig. 2) is connected to the first end of the voltage conversion unit 302.
The voltage conversion unit 302 is connected to the switch unit 301, and is configured to perform voltage conversion according to the communication mode of the first relay KR1 and the second relay KR 2.
In a specific application, the voltage converting unit 302 is implemented by using a first resistor R5. The first terminal of the first resistor R5 is used as the first terminal of the voltage converting unit 302, and the second terminal of the first resistor R5 is grounded. The designer can choose to design different voltage converting units 302 according to the signal conversion requirement, such as setting the resistance of the first resistor R5 according to the actual requirement.
The protection unit 303 is connected to the switching unit 301, and is configured to perform anti-glitch processing on a signal output from the switching unit 301.
In a specific application, the protection unit 303 includes: a first inductor L1, a sixth resistor R3, and a transient suppression diode D5.
A first end of the first inductor L1 is connected to the switch unit 301, and a second end of the first inductor L1 is connected to a first end of the sixth resistor R3 and a first end of the transient suppression diode D5 in common; a second end of the sixth resistor R3 is connected to the second signal processing module 40; the second terminal of the transient suppression diode D5 is grounded. Since the first relay KR1 and the second relay KR2 operate by switching on and off the first gate terminal and the second gate terminal, transient interference signals are easily generated during switching operations, which affects the normal operation of the control circuit 10, even damages components in the circuit, and therefore the protection unit 303 is introduced to perform anti-transient interference processing on the signals output from the switch unit 301, thereby playing a role of protecting the circuit.
Referring to fig. 3, a circuit diagram of an exemplary control module in the control circuit compatible with voltage-mode and current-mode analog inputs shown in fig. 1 is shown, and for convenience of description, only the relevant portions of the present embodiment are shown, and the following details are described:
in an alternative embodiment, the control module 20 includes a single-chip microcomputer U4, a switching tube Q1, a first control subunit 201, and a second control subunit 202.
The controlled end of the switch tube Q1 is connected with the single chip microcomputer U4, the input end of the switch tube Q1 is connected with the first control subunit 201 and the second control subunit 202, and the output end of the switch tube Q1 is grounded. The first terminal and the second terminal of the first control subunit 201 are connected to the power supply terminal and the controlled terminal of the first relay KR1, respectively. The first terminal and the second terminal of the second control subunit 202 are connected to the power supply terminal and the controlled terminal of the second relay KR2, respectively.
In a specific application, the first control subunit 201 includes a second resistor R6 and a first diode D1. A first terminal of the second resistor R6 serves as a first terminal of the first control subunit 201, and an anode of the first diode D1 serves as a second terminal of the first control subunit 201; the second end of the second resistor R6 is connected to the cathode of the first diode D1, and the anode of the first diode D1 is connected to the input terminal of the switching tube Q1.
In a specific application, the second control subunit 202 includes a third resistor R7 and a second diode D2. A first terminal of the third resistor R7 serves as a first terminal of the second control subunit 202, and an anode of the second diode D2 serves as a second terminal of the second control subunit 202; a second end of the third resistor R7 is connected to the cathode of the second diode D2, and an anode of the second diode D2 is connected to the input end of the switching tube Q1.
Optionally, the switching tube Q1 is implemented by an NPN transistor, and a base, a collector, and an emitter of the NPN transistor correspond to the controlled terminal, the input terminal, and the output terminal of the switching tube Q1, respectively. In another embodiment, a PNP triode or MOSFET power transistor can also be used.
In an alternative embodiment, in order to make the operation of the control module 20 more stable, an eighth resistor R8, a ninth resistor R9 and a second capacitor C2 are usually added between the single chip microcomputer U4 and the controlled end of the switching tube Q1, and they play a role of filtering in the circuit to protect the single chip microcomputer U4 from the interference of high frequency signals. The first end and the second end of the eighth resistor R8 are respectively connected with the first ends of the singlechip U4 and the ninth resistor, the first end of the ninth resistor R9, the first end of the second capacitor C2 and the controlled end of the switch tube Q1 are connected in common, and the second end of the ninth resistor R9, the second end of the second capacitor C2 and the output end of the switch tube Q1 are grounded.
Referring to fig. 4, an exemplary circuit diagram of a second signal processing module in the control circuit compatible with voltage-mode and current-mode analog input shown in fig. 1 is shown, for convenience of description, only the relevant parts of the present embodiment are shown, and the following details are described:
in an alternative embodiment, the second signal processing module 40 comprises: a first operational amplifier U1, a second operational amplifier U2, a fourth resistor R2, and a fifth resistor R4.
The positive phase input end of the first operational amplifier U1 is connected with the fixed end of the second relay KR2, the output end of the first operational amplifier U1 is connected with the first end of the fourth resistor R2, the second end of the fourth resistor R2 is connected with the first end of the fifth resistor R4 and the positive phase input end of the second operational amplifier U2 in a common mode, and the second end of the fifth resistor R4 is connected with the ground; the output of the second operational amplifier U2 outputs an optimized electrical signal analog. Optionally, the first operational amplifier U1 and the second operational amplifier U2 employ rail-to-rail operational amplifiers.
The following takes fig. 5 as an example to analyze in detail the specific working process of the control circuit compatible with voltage-mode and current-mode analog input provided by the present invention:
a large number of applications show that the input range specification of the voltage type analog quantity of a common system is as follows: 0-5V, 0-10V, -10V- +10V and the like, and the input range specification of the current mode analog quantity is as follows: 0 to 20mA, 4 to 20mA, etc. If the voltage type analog quantity of 0-10V (or the current type analog quantity of 0-20 mA) is inputted into the system, the outputted signal is the optimized electrical signal analog quantity of 0-3V or 0-5V after passing through the control circuit 10 shown in FIG. 5, and the range of the outputted optimized electrical signal analog quantity can be set by the circuit designer as required.
Taking the example of inputting 0-10V (or 0-20 mA) analog quantity and converting it into 0-3V optimized electrical signal analog quantity for analysis, the resistance of the first resistor R5 is set to be 500 Ω, the resistance of the fourth resistor R2 is set to be 7K Ω, and the resistance of the fifth resistor R4 is set to be 3K Ω. It should be noted that the resistances of the first resistor R5, the fourth resistor R2 and the fifth resistor R4 can be set according to practical requirements, and are not limited to 500 Ω, 7K Ω and 3K Ω.
When the input end of the control circuit 10 receives a voltage type analog quantity of 0-10V, the single chip microcomputer U4 outputs a low level signal, the switch tube Q1 is not conducted at the moment, the fixed end of the first relay KR1 is connected with the first gating end of the first relay KR1, the fixed end of the second relay KR2 is connected with the first gating end of the second relay KR2, the first gating end of the first relay KR1 is connected with the first gating end of the second relay KR2, and the voltage conversion unit 302 is not introduced in the connection mode. At this time, after the 0V voltage type analog quantity is inputted to the control circuit 10, the conversion relationship of the voltage signal is:
U=0V*R4/(R2+R4),
i.e. the output of the optimized electrical signal analog is 0V.
After the 10V voltage type analog quantity is inputted into the control circuit 10, the conversion relationship of the voltage signal is as follows:
U=10V*R4/(R2+R4),
i.e. the output of the optimized electric signal analog quantity is 3V.
And the relation between the input and the output of each voltage value of 0-10V is as follows:
U=Uin*R4/(R2+R4),
the Uin is the voltage value of the initial electric signal analog quantity (voltage type analog quantity) within the range of 0-10V of input, the obtained analog quantity input voltage of 0-10V is converted to obtain the optimized electric signal analog quantity of 0-3V, and the optimized electric signal analog quantity is the voltage type analog quantity.
When the input end of the control circuit 10 receives 0-20 mA current type analog quantity, the single-chip microcomputer U4 outputs a high level signal, the switch tube Q1 is conducted at the moment, the fixed end of the first relay KR1 is connected with the second gating end of the first relay KR1, the fixed end of the second relay KR2 is connected with the second gating end of the second relay KR2, and the second gating end of the first relay KR1 is connected with the second gating end of the second relay KR2, the voltage conversion unit 302 is introduced by the connection mode, namely, the first resistor R5 is introduced. At this time, after the 0mA voltage type analog quantity is inputted into the circuit, the conversion relationship of the current signal is as follows:
U=0mA*500Ω*R4/(R2+R4)=0V,
i.e. the output of the optimized electrical signal analog is 0V.
After the 20mA current type analog quantity is inputted into the control circuit 10, the conversion relationship of the current signal is as follows:
U=20mA*500Ω*R4/(R2+R4)=3V,
i.e. the output of the optimized electric signal analog quantity is 3V.
And the relationship of each voltage value of 0-20 mA is as follows: u ═ Iin R5R 4/(R2+ R4), wherein Iin is the current value of the input current mode analog quantity, and the obtained current mode analog quantity input of 0-20 mA is converted to obtain the optimized electric signal analog quantity of 0-3V, and the optimized electric signal analog quantity is the voltage mode analog quantity.
Referring to fig. 6 and 7, there are shown schematic structural diagrams and exemplary circuit diagrams of a control device compatible with voltage-mode and current-mode analog inputs according to another embodiment of the present invention. For convenience of explanation, only the parts related to the present embodiment are shown, and detailed as follows:
the control device comprises the control circuit 10 and an analog-to-digital conversion module 50 connected with the second signal processing module 40 and used for receiving the optimized electric signal analog quantity and performing analog-to-digital conversion on the optimized electric signal analog quantity.
The analog-to-digital conversion module 50 includes a seventh resistor R1, a first capacitor C1, and an analog-to-digital conversion subunit U3. The first end of the seventh resistor R1, the first end of the first capacitor C1 and the input end of the analog-to-digital conversion subunit U3 are connected in common, the second end of the seventh resistor R1 is connected to the output end of the second operational amplifier U2, and the second end of the first capacitor C1 is grounded. The seventh resistor R1 and the first capacitor C1 form a pull-down network, and the optimized electrical signal analog output from the second signal processing module 40 is processed by filtering high-frequency interference signals and then input to the analog-to-digital conversion subunit U3.
In specific application, the analog-to-digital conversion subunit U3 is an analog-to-digital conversion component such as a single chip microcomputer, a motion controller, a programmable logic controller, or a human-computer interface. The rated voltage specification of the analog-to-digital conversion subunit U3, such as 0-3V or 0-5V, can be selected according to actual requirements.
The invention provides a control device compatible with voltage-mode and current-mode analog quantity input, which controls whether a first signal processing module 30 is introduced into a voltage conversion unit 302 or not according to whether an input initial electric signal analog quantity belongs to a voltage-mode analog quantity or a current-mode analog quantity. In an alternative embodiment, the specific process of determining the type of the input initial electrical signal analog quantity is as follows: when the sensor is calibrated, the analog-to-digital conversion module receives an electric signal output by the sensor, analyzes the electric signal, judges whether the electric signal belongs to voltage type analog quantity or current type analog quantity, stores and outputs a judgment result to the control module, and the control module correspondingly sends out different control signals. Specifically, if the voltage-type analog quantity is input, the voltage conversion unit 302 is not introduced, and the voltage-type analog quantity is directly converted into a voltage value required by the analog-to-digital conversion module 50 through the protection unit 303 of the first signal processing circuit and the second signal processing unit 40; if the input initial electrical signal analog quantity is a current-mode analog quantity, the microswitch is controlled to be introduced into the voltage conversion unit 302, so that the current-mode analog quantity is converted into a voltage value, and the converted voltage value is finally converted into a voltage value required by the analog-to-digital conversion module 50 through the second signal processing module 40; therefore, the input voltage type analog quantity and the current type analog quantity can be compatible at the same input end, a voltage type analog quantity input circuit, a current type analog quantity input circuit and terminals respectively matched with the two circuits are not required to be arranged at the same time, the internal area of the equipment and the area of a circuit board are saved, the problem that the current type analog quantity input circuit is in misconnection with the voltage type analog quantity input terminal or the voltage type analog quantity input circuit is in misconnection with the current type analog quantity input terminal is avoided, the whole system space is saved on the other hand, and the integration level of the system is improved.
In summary, according to the control circuit and the control device compatible with voltage-type and current-type analog input provided by the present invention, the type of the initial electrical signal analog is determined by the control module, and when it is determined that the initial electrical signal analog is the voltage-type analog, a first control signal is output to control the first signal processing module to perform corresponding processing on the initial electrical signal analog; when the initial electric signal analog quantity is judged to be a current type analog quantity, a second control signal is output to control the first signal processing module to convert the current type analog quantity and then perform signal processing, so that the voltage type analog quantity or the current type analog quantity can pass through the shared input port and finally output to the second signal processing module for operational amplifier processing. Therefore, the effect of saving the internal area of equipment and the area of a circuit board is achieved, the condition of misconnection is avoided, the problems that a voltage type analog input circuit and a current type analog input circuit are designed simultaneously in the traditional electric signal analog input technology, the internal area of the equipment and the area of the circuit board are wasted due to the fact that terminals matched with the two circuits are arranged, and the current type analog input circuit and the voltage type analog input terminal are misconnected or the voltage type analog input circuit and the current type analog input terminal are misconnected are easily solved.
Various embodiments are described herein in terms of various devices, modules, and circuits. Numerous specific details are set forth in order to provide a thorough understanding of the overall structure, function, manufacture, and use of the embodiments as described in the specification and illustrated in the accompanying drawings. However, it will be understood by those skilled in the art that the embodiments may be practiced without such specific details. In other instances, well-known operations, components and elements have been described in detail so as not to obscure the embodiments in the description. It will be appreciated by those of ordinary skill in the art that the embodiments herein and shown are non-limiting examples, and thus, it can be appreciated that the specific structural and functional details disclosed herein may be representative and do not necessarily limit the scope of the embodiments.
The units and modules described as separate parts may or may not be physically separate, and parts displayed as modules and units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.