Frequency measuring circuit
By setting up an amplification and shaping circuit and frequency division circuit in the frequency measurement circuit, the high-frequency signal is divided into frequency range suitable for PLC, which solves the problems of insufficient PLC frequency measurement capability and unstable transmission after microcontroller frequency measurement, and improves system performance and reliability.
Patent Information
- Application Number
- CN202420488998.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-13
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2034-03-13
AI Technical Summary
The frequency measurement capability of existing PLCs is limited, which makes it difficult to measure frequency in modern industrial control systems. The method of transmitting frequency to the PLC through a microcontroller requires the production of printed circuit board components by itself, resulting in unstable production process and low reliability.
A frequency measurement circuit is designed, including a first frequency measurement circuit and a second frequency measurement circuit. The second frequency measurement circuit amplifies and shapes the input signal by amplifying the shaping circuit, and divides the high-frequency signal to a suitable PLC using a frequency division circuit. Measured frequency range to improve system performance and reliability.
By amplifying and dividing the frequency signal, the signal quality and stability are ensured, and the measurement needs of different frequency ranges are adapted to improve the performance and reliability of the entire system, and the problems of PLC frequency measurement limitations and production instability are overcome.
Smart Images

Figure CN222014331U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of frequency measurement, in particular to a frequency measurement circuit. Background Art
[0002] In modern industrial control systems, frequency measurement of PLC speed regulator is a key technical link. At present, the frequency measurement method can be realized in two ways: one is to measure the frequency directly through PLC, and the other is to send the result to PLC through I / O port after measuring the frequency through single-chip microcomputer. However, if the former method is adopted, for many series of PLC, the general maximum counting frequency is usually between 20kHz and 60kHz, and even the maximum counting frequency of high-speed counting module can only reach 100kHz to 200kHz, which is significantly different from the mega-level clock inside the single-chip microcomputer. On the other hand, if the latter method is adopted, although the frequency measurement through single-chip microcomputer and then sending the result to PLC through I / O port can overcome the limitation of PLC frequency measurement itself, this method requires self-production of printed circuit board assemblies, but cannot form mass production, which leads to instability of the production process, thus affecting reliability. Based on this, we designed a frequency measurement circuit to address the above problems. Utility Model Content
[0003] The purpose of the utility model is to provide a frequency measurement circuit, which respectively sets a first frequency measurement circuit and a second frequency measurement circuit for a signal, wherein the second frequency measurement circuit is used to amplify and shape the input signal by setting an amplification and shaping circuit to ensure signal quality and stability; the frequency division circuit is used to divide the high-frequency signal into a frequency range suitable for PLC measurement, which can adapt to signal measurement requirements in different frequency ranges and can improve the performance and reliability of the entire system.
[0004] The embodiments of the present invention are implemented by the following technical solutions:
[0005] A frequency measurement circuit comprises: a first frequency measurement circuit, a second frequency measurement circuit, and a PLC; the first frequency measurement circuit and the second frequency measurement circuit are respectively connected to the PLC, wherein the second frequency measurement circuit comprises: an amplifying and shaping circuit and a frequency dividing circuit; the amplifying and shaping circuit, the frequency dividing circuit, and the PLC are connected in sequence.
[0006] Optionally, the amplification and shaping circuit includes: a resistor R5, a resistor R6, a transformer T1, a resistor R8, a diode D1, a diode D2, a diode D3, a diode D4, a resistor R11, a resistor R13, a capacitor C4, a first operational amplifier, a resistor R15, a capacitor C3, a resistor R16, a resistor R17, a capacitor C14, a second operational amplifier, a resistor R18, a resistor R19, and a diode D5; one end of the resistor R5 and one end of the resistor R6 are respectively connected to two ends of a power supply; the other end of the resistor R5 is connected to port 1 of the transformer T1, the other end of the resistor R6 is connected to port 3 of the transformer T1, and port 2 of the transformer T1 is respectively connected to one end of the resistor R8, the negative electrode of the diode D1, the positive electrode of the diode D3, the non-inverting input port of the first operational amplifier, one end of the resistor R13, and one end of the capacitor C4; the port 4 of the transformer T1 is respectively connected to the other end of the resistor R8, the positive electrode of the diode D2, the negative electrode of the diode D4, one end of the resistor R11, and the capacitor C3 and one end of a resistor R17, the anode of the diode D1 is connected to the cathode of the diode D2, the cathode of the diode D3 is connected to the anode of the diode D4, the other end of the resistor R11 is connected to the inverting input port of the first operational amplifier, the output port of the first operational amplifier is respectively connected to the other end of the capacitor C4, the other end of the resistor R13, and one end of the resistor R15, the resistor R15 is respectively connected to the other end of the capacitor C3 and one end of the resistor R16, the other end of the resistor R16 is respectively connected to the non-inverting input port of the second operational amplifier and one end of the capacitor C14, the other end of the resistor R17 is respectively connected to the inverting input port of the second operational amplifier, one end of the resistor R18, and one end of the resistor R19, the other end of the resistor R19 is connected to the anode of the diode D5, and the output port of the second operational amplifier is respectively connected to the other end of the capacitor C14, the other end of the resistor R18, the cathode of the diode D5, and the frequency dividing circuit.
[0007] Optionally, the frequency division circuit includes: a resistor R20, an optical coupler U8, a resistor R21, a chip U9A, a chip U9B, a resistor R24, an optical coupler U11, and a resistor R25; the output port of the second operational amplifier is respectively connected to the other end of the capacitor C14, the other end of the resistor R18, the negative electrode of the diode D5, and one end of the resistor R20; the other end of the resistor R20 is connected to one end of the optical coupler U8, the other end of the optical coupler U8 is connected to one end of the resistor R21 and port 3 of the chip U9A, the other end of the resistor R21 is connected to a power supply, and port 5 of the chip U9A is connected. It is connected to port 2 of the chip U9A, port 4 and port 6 of the chip U9A are grounded, port 1 of the chip U9A is connected to port 11 of the chip U9B, port 9 of the chip U9B is connected to port 12 of the chip U9B, ports 8 and port 10 of the chip U9B are grounded, port 13 of the chip U9B is connected to one end of the resistor R24, the other end of the resistor R24 is connected to one end of the optocoupler U11, the other end of the optocoupler U11 is respectively connected to one end of the resistor R25 and the PLC, and the other end of the resistor R25 is connected to a power supply.
[0008] Optionally, the first frequency measurement circuit includes: a first circuit, a resistor R10, a chip U1, a switch SW1, a chip U7, and a resistor R1; one end of the first circuit is grounded, and the other end of the first circuit is connected to the port CLK of the chip U1, one end of the resistor R10 is grounded, and the other end of the circuit R10 is connected to the RST port of the chip U1, the port Q2 of the chip U1 is connected to the port 8 of the switch SW1, the port Q3 of the chip U1 is connected to the port 7 of the switch SW1, and the port Q4 of the chip U1 is connected to the port 6 of the switch SW1 , port Q5 of the chip U1 is connected to port 5 of the switch SW1, port Q6 of the chip U1 is connected to port 4 of the switch SW1, port Q7 of the chip U1 is connected to port 3 of the switch SW1, port Q8 of the chip U1 is connected to port 2 of the switch SW1, port 1 of the switch SW1 is respectively connected to port 1 and port 2 of the chip U7, port 4 of the chip U7 is grounded, port 8 of the chip U7 is connected to the power supply, port 3 of the chip U7 is respectively connected to one end of the resistor R1 and the PLC, and the other end of the resistor R1 is connected to the power supply.
[0009] Optionally, the first circuit includes: capacitor C1, resistor R4, inverter U6A, inverter U6B, crystal oscillator Y1, capacitor C2, and resistor R9; one end of the capacitor C1 is grounded, and the other end of the capacitor C1 is respectively connected to one end of the resistor R4, port 1 of the inverter U6A, and one end of the crystal oscillator Y1, the other end of the resistor R4 is respectively connected to port 2 of the inverter U6A and one end of the capacitor C2, the other end of the crystal oscillator Y1 is respectively connected to port 4 of the inverter U6B, one end of the resistor R9, and port CLK of the chip U1, and the other end of the capacitor C2 is respectively connected to port 3 of the inverter U6B and the other end of the resistor R9.
[0010] The technical solution of the embodiment of the utility model has at least the following advantages and beneficial effects:
[0011] The utility model respectively sets a first frequency measurement circuit and a second frequency measurement circuit for the signal, wherein the second frequency measurement circuit is used to amplify and shape the input signal by setting an amplification and shaping circuit to ensure signal quality and stability; the frequency division circuit is used to divide the high-frequency signal into a frequency range suitable for PLC measurement, which can adapt to signal measurement requirements in different frequency ranges and improve the performance and reliability of the entire system. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A schematic diagram of the principle of a frequency measurement circuit provided by the utility model;
[0013] Figure 2 A circuit diagram of the amplifying and shaping circuit provided by the utility model;
[0014] Figure 3 A circuit diagram of the frequency division circuit provided by the utility model;
[0015] Figure 4 This is a circuit diagram of a first frequency measurement circuit provided by the utility model. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical scheme and advantages of the embodiments of the utility model clearer, the technical scheme in the embodiments of the utility model will be clearly and completely described below in conjunction with the drawings in the embodiments of the utility model. Obviously, the described embodiments are part of the embodiments of the utility model, not all of the embodiments. Generally, the components of the embodiments of the utility model described and shown in the drawings here can be arranged and designed in various different configurations.
[0017] like Figure 1As shown, the utility model provides one of the embodiments: a frequency measurement circuit, comprising: a first frequency measurement circuit, a second frequency measurement circuit, and a PLC; the first frequency measurement circuit and the second frequency measurement circuit are respectively connected to the PLC, wherein the second frequency measurement circuit comprises: an amplifying and shaping circuit, a frequency dividing circuit; the amplifying and shaping circuit, the frequency dividing circuit, and the PLC are connected in sequence.
[0018] like Figure 2 As shown, in this embodiment, the amplification and shaping circuit includes: a resistor R5, a resistor R6, a transformer T1, a resistor R8, a diode D1, a diode D2, a diode D3, a diode D4, a resistor R11, a resistor R13, a capacitor C4, a first operational amplifier, a resistor R15, a capacitor C3, a resistor R16, a resistor R17, a capacitor C14, a second operational amplifier, a resistor R18, a resistor R19, and a diode D5; one end of the resistor R5 and one end of the resistor R6 are respectively connected to two ends of the power supply; the other end of the resistor R5 is connected to the port 1 of the transformer T1, the other end of the resistor R6 is connected to the port 3 of the transformer T1, and the port 2 of the transformer T1 is respectively connected to one end of the resistor R8, the cathode of the diode D1, the anode of the diode D3, the non-inverting input port of the first operational amplifier, one end of the resistor R13, and one end of the capacitor C4; the port 4 of the transformer T1 is respectively connected to the other end of the resistor R8, the anode of the diode D2, the cathode of the diode D4, one end of the resistor R11, the cathode of the diode D4, the cathode of the diode D5, the cathode of the resistor R6, the cathode of the diode R17, the cathode of the diode D4 ... The first operational amplifier is connected to one end of the first operational amplifier and one end of the second operational amplifier. The first operational amplifier is connected to one end of the first operational amplifier and one end of the second operational amplifier. The first operational amplifier is connected to one end of the first operational amplifier and one end of the second operational amplifier. The first operational amplifier is connected to one end of the first operational amplifier and one end of the second operational amplifier. The first operational amplifier is connected to one end of the first operational amplifier and one end of the second operational amplifier. The first operational amplifier is connected to one end of the first operational amplifier and one end of the second operational amplifier. The second operational amplifier is connected to one end of the first operational amplifier and one end of the second operational amplifier. The second operational amplifier is connected to one end of the first operational amplifier and one end of the second operational amplifier. The second operational amplifier is connected to one end of the first operational amplifier and one end of the second operational amplifier. The second operational amplifier is connected to one end of the first operational amplifier and one end of the second operational amplifier. The second operational amplifier is connected to one end of the first operational amplifier and one end of the second operational amplifier. The second operational amplifier is connected to one end of the first operational amplifier and one end of the second operational amplifier. The second operational amplifier is connected to one end of the first operational amplifier and one end of the second operational amplifier. The second operational amplifier is connected to one end of the first operational amplifier and one end of the second operational amplifier.
[0019] like Figure 3As shown, further, the frequency division circuit includes: resistor R20, optocoupler U8, resistor R21, chip U9A, chip U9B, resistor R24, optocoupler U11, resistor R25; the output port of the second operational amplifier is respectively connected to the other end of the capacitor C14, the other end of the resistor R18, the negative electrode of the diode D5, and one end of the resistor R20; the other end of the resistor R20 is connected to one end of the optocoupler U8, the other end of the optocoupler U8 is connected to one end of the resistor R21 and port 3 of the chip U9A, the other end of the resistor R21 is connected to the power supply, and the end of the chip U9A is connected to the negative electrode of the diode D5. Port 5 is connected to port 2 of the chip U9A, port 4 and port 6 of the chip U9A are grounded, port 1 of the chip U9A is connected to port 11 of the chip U9B, port 9 of the chip U9B is connected to port 12 of the chip U9B, port 8 and port 10 of the chip U9B are grounded, port 13 of the chip U9B is connected to one end of the resistor R24, the other end of the resistor R24 is connected to one end of the optocoupler U11, the other end of the optocoupler U11 is respectively connected to one end of the resistor R25 and the PLC, and the other end of the resistor R25 is connected to the power supply.
[0020] In the specific implementation, the frequency signal of the unit under test is f1. After amplification and shaping, f1 is transformed from a sine wave into a square wave. The square wave signal is sent to the optocoupler for isolation, and then enters the chip 4013 for four-frequency division (in actual projects, two-frequency division and eight-frequency division are sometimes used, and chips U9A and U9A are both the above chip 4013) to obtain the f3 square wave signal: after frequency division, the half-cycle time of the f3 signal being 1 is equal to the half-cycle time of the f3 signal being 0. In actual applications, the hardware frequency division method can be used; the half-cycle time of the f3 square wave signal being 1 is exactly the period T of the measured signal f1. The square wave signal is finally sent to the I / O port of the PLC as an interrupt.
[0021] like Figure 4As shown, in this embodiment, the first frequency measurement circuit includes: a first circuit, a resistor R10, a chip U1, a switch SW1, a chip U7, and a resistor R1; one end of the first circuit is grounded, and the other end of the first circuit is connected to the port CLK of the chip U1, one end of the resistor R10 is grounded, and the other end of the circuit R10 is connected to the RST port of the chip U1, the port Q2 of the chip U1 is connected to the port 8 of the switch SW1, the port Q3 of the chip U1 is connected to the port 7 of the switch SW1, and the port Q4 of the chip U1 is connected to the port CLK of the switch SW1. 6, port Q5 of the chip U1 is connected to port 5 of the switch SW1, port Q6 of the chip U1 is connected to port 4 of the switch SW1, port Q7 of the chip U1 is connected to port 3 of the switch SW1, port Q8 of the chip U1 is connected to port 2 of the switch SW1, port 1 of the switch SW1 is respectively connected to port 1 and port 2 of the chip U7, port 4 of the chip U7 is grounded, port 8 of the chip U7 is connected to the power supply, port 3 of the chip U7 is respectively connected to one end of the resistor R1 and the PLC, and the other end of the resistor R1 is connected to the power supply.
[0022] Specifically, the first circuit includes: capacitor C1, resistor R4, inverter U6A, inverter U6B, crystal oscillator Y1, capacitor C2, and resistor R9; one end of the capacitor C1 is grounded, and the other end of the capacitor C1 is respectively connected to one end of the resistor R4, port 1 of the inverter U6A, and one end of the crystal oscillator Y1, the other end of the resistor R4 is respectively connected to port 2 of the inverter U6A and one end of the capacitor C2, the other end of the crystal oscillator Y1 is respectively connected to port 4 of the inverter U6B, one end of the resistor R9, and port CLK of the chip U1, and the other end of the capacitor C2 is respectively connected to port 3 of the inverter U6B and the other end of the resistor R9.
[0023] In a specific implementation, N is a high-frequency clock signal, which provides a stable oscillation signal. Its formation is as follows Figure 4 As shown, the crystal oscillator Y1 with a frequency of 2MHz is divided by the chip 4040, i.e., the chip U1, to obtain frequency signals such as two-frequency division and four-frequency division, and one of the signals is selected according to actual needs. Both N and f3 signals are sent to the PLC for processing. The high-speed counter in the PLC can count the half-wave pulse train of the high-frequency signal N. When the interrupt I / O port of the PLC captures the CAP1 signal, the staff reads the value NT1 of the high-speed counter at this time and stores it in a storage unit. When the interrupt I / O port of the PLC captures the CAP2 signal, the staff reads the value NT2 of the high-speed counter at this time and stores it in another storage unit. The staff can obtain the difference NT between the two values through these two values. NT is numerically proportional to the period T of the measured signal, and then obtains the measured frequency value.
[0024] As an example, the staff can complete the above solution implementation process through the following formula. Since the measured frequency value F is proportional to the measured frequency value, for example, the staff takes N as 2×10 to the sixth power, then when the measured frequency is 50Hz, the staff can obtain its T as 0.02s and NT as 40000; if the staff takes the constant C as 2×10 to the ninth power, the staff can obtain the measurement result of F as 50000. If the frequency measured by the staff is 48Hz, the staff can obtain F as 48000.
[0025] NT=NT11-NT2
[0026]
[0027] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may be subject to 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. A frequency measurement circuit, characterized in that: include: A first frequency measurement circuit, a second frequency measurement circuit, and a PLC; The first frequency measurement circuit and the second frequency measurement circuit are connected to the PLC respectively, wherein the second frequency measurement circuit comprises: an amplifying and shaping circuit and a frequency dividing circuit; the amplifying and shaping circuit, the frequency dividing circuit and the PLC are connected in sequence.
2. The frequency measurement circuit according to claim 1, characterized in that: The amplification and shaping circuit includes: a resistor R5, a resistor R6, a transformer T1, a resistor R8, a diode D1, a diode D2, a diode D3, a diode D4, a resistor R11, a resistor R13, a capacitor C4, a first operational amplifier, a resistor R15, a capacitor C3, a resistor R16, a resistor R17, a capacitor C14, a second operational amplifier, a resistor R18, a resistor R19, and a diode D5; one end of the resistor R5 and one end of the resistor R6 are respectively connected to two ends of a power supply; the other end of the resistor R5 is connected to port 1 of the transformer T1, the other end of the resistor R6 is connected to port 3 of the transformer T1, and the port 2 of the transformer T1 is respectively connected to one end of the resistor R8, the negative electrode of the diode D1, the positive electrode of the diode D3, the non-inverting input port of the first operational amplifier, one end of the resistor R13, and one end of the capacitor C4; the port 4 of the transformer T1 is respectively connected to the other end of the resistor R8, the positive electrode of the diode D2, the negative electrode of the diode D4, one end of the resistor R11, one end of the capacitor C3 The anode of the diode D1 is connected to the cathode of the diode D2, the cathode of the diode D3 is connected to the anode of the diode D4, the other end of the resistor R11 is connected to the inverting input port of the first operational amplifier, the output port of the first operational amplifier is respectively connected to the other end of the capacitor C4, the other end of the resistor R13, and one end of the resistor R15, the resistor R15 is respectively connected to the other end of the capacitor C3 and one end of the resistor R16, the other end of the resistor R16 is respectively connected to the non-inverting input port of the second operational amplifier and one end of the capacitor C14, the other end of the resistor R17 is respectively connected to the inverting input port of the second operational amplifier, one end of the resistor R18, and one end of the resistor R19, the other end of the resistor R19 is connected to the anode of the diode D5, and the output port of the second operational amplifier is respectively connected to the other end of the capacitor C14, the other end of the resistor R18, the cathode of the diode D5, and the frequency dividing circuit.
3. The frequency measurement circuit according to claim 2, characterized in that: The frequency division circuit includes: resistor R20, optocoupler U8, resistor R21, chip U9A, chip U9B, resistor R24, optocoupler U11, and resistor R25; the output port of the second operational amplifier is respectively connected to the other end of the capacitor C14, the other end of the resistor R18, the cathode of the diode D5, and one end of the resistor R20; the other end of the resistor R20 is connected to one end of the optocoupler U8, the other end of the optocoupler U8 is connected to one end of the resistor R21 and port 3 of chip U9A, the other end of the resistor R21 is connected to the power supply, and port 5 of the chip U9A is connected to the Port 2 of the chip U9A is connected, port 4 and port 6 of the chip U9A are grounded, port 1 of the chip U9A is connected to port 11 of the chip U9B, port 9 of the chip U9B is connected to port 12 of the chip U9B, port 8 and port 10 of the chip U9B are grounded, port 13 of the chip U9B is connected to one end of the resistor R24, the other end of the resistor R24 is connected to one end of the optocoupler U11, the other end of the optocoupler U11 is respectively connected to one end of the resistor R25 and the PLC, and the other end of the resistor R25 is connected to the power supply.
4. The frequency measurement circuit according to claim 3, characterized in that: The first frequency measurement circuit includes: a first circuit, a resistor R10, a chip U1, a switch SW1, a chip U7, and a resistor R1; one end of the first circuit is grounded, and the other end of the first circuit is connected to the port CLK of the chip U1, one end of the resistor R10 is grounded, and the other end of the circuit R10 is connected to the RST port of the chip U1, the port Q2 of the chip U1 is connected to the port 8 of the switch SW1, the port Q3 of the chip U1 is connected to the port 7 of the switch SW1, and the port Q4 of the chip U1 is connected to the port 6 of the switch SW1. Port Q5 of the chip U1 is connected to port 5 of the switch SW1, port Q6 of the chip U1 is connected to port 4 of the switch SW1, port Q7 of the chip U1 is connected to port 3 of the switch SW1, port Q8 of the chip U1 is connected to port 2 of the switch SW1, port 1 of the switch SW1 is respectively connected to port 1 and port 2 of the chip U7, port 4 of the chip U7 is grounded, port 8 of the chip U7 is connected to the power supply, port 3 of the chip U7 is respectively connected to one end of the resistor R1 and the PLC, and the other end of the resistor R1 is connected to the power supply.
5. The frequency measurement circuit according to claim 4, characterized in that: The first circuit includes: capacitor C1, resistor R4, inverter U6A, inverter U6B, crystal oscillator Y1, capacitor C2, and resistor R9; one end of the capacitor C1 is grounded, and the other end of the capacitor C1 is respectively connected to one end of the resistor R4, port 1 of the inverter U6A, and one end of the crystal oscillator Y1, the other end of the resistor R4 is respectively connected to port 2 of the inverter U6A and one end of the capacitor C2, the other end of the crystal oscillator Y1 is respectively connected to port 4 of the inverter U6B, one end of the resistor R9, and port CLK of the chip U1, and the other end of the capacitor C2 is respectively connected to port 3 of the inverter U6B and the other end of the resistor R9.
