High-threshold adaptive frequency detection circuit
By designing a high-threshold adaptive frequency detection circuit and using hardware control to adjust the threshold voltage, the problem of insufficient frequency detection accuracy and applicability in the prior art is solved, and the frequency detection effect of high accuracy and wide applicability is achieved.
Patent Information
- Application Number
- CN202422241245.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2034-09-12
AI Technical Summary
The prior art is difficult to achieve high accuracy and wide applicability in frequency detection, and the threshold voltage cannot be adjusted through pure hardware.
A high-threshold adaptive frequency detection circuit is designed. Through the combination of the signal acquisition module, the threshold output module, the signal comparison module and the signal detection module, the threshold voltage is adjusted using hardware control, and adaptive adjustment is performed according to the peak-to-peak value of the input signal.
It improves the accuracy of frequency detection, increases the scope of application of sensors, reduces the risk problems caused by frequency detection, and avoids the increase in costs and debugging difficulties caused by software interference.
Smart Images

Figure CN222965310U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of signal processing, and particularly relates to a frequency detection circuit with high-threshold adaptability. Background Art
[0002] With the development of industrial technology in all aspects, the applications of industrial automation and intelligence are very extensive, and AC signals are popularized in all aspects. Therefore, more and more devices need to perform accurate frequency measurement and monitoring.
[0003] At present, many circuits in the industry that can achieve frequency measurement are either designed with a fixed threshold, which cannot guarantee the accuracy of frequency detection, or adjust the threshold voltage by software to adjust the DAC output, thereby improving the accuracy of frequency detection, but it is impossible to improve the accuracy of frequency detection using pure hardware. Summary of the Utility Model
[0004] Purpose of the utility model: The technical problem to be solved by the utility model is to provide a frequency detection circuit with high-threshold adaptability aiming at the deficiencies of the prior art. The circuit adjusts the actual detected threshold voltage value according to the peak-to-peak value of the input signal to improve the accuracy of frequency detection, increase the applicable range of the sensor, and reduce the risk problems caused by frequency detection.
[0005] A frequency detection circuit with high-threshold adaptability provided by the utility model includes a signal acquisition module, a threshold output module, a signal comparison module, and a signal detection module; the signal acquisition module includes a first output port and a second output port; the threshold output module includes a first input port, a second input port, and a third output port; the signal comparison module includes a third input port, a fourth input port, a fourth output port, and a fifth output port; the signal detection module includes a fifth input port and a sixth input port;
[0006] The first output port of the signal acquisition module is connected to the third input port of the signal comparison module, and the second output port is respectively connected to the fifth input port of the signal detection module and the first input port of the threshold output module;
[0007] The third output port of the threshold output module is connected to the fourth input port of the signal comparison module;
[0008] The fourth output port of the signal comparison module is connected to the sixth input port of the signal detection module.
[0009] The signal acquisition module includes a port protection module and an input filtering module;
[0010] The output end of the port protection module is connected to the input end of the input filtering module to achieve EMC (Electro Magnetic Compatibility) protection such as electrostatic protection for the original signal. The input filtering module is connected to the second input port of the signal comparison module for comparison with the threshold voltage of the threshold output module.
[0011] The signal acquisition module further includes a peak acquisition module;
[0012] The input end of the peak acquisition module is connected to the output end of the input filtering module, and the output end of the peak acquisition module is connected to the fifth input port of the signal detection module, supporting the acquisition of the peak-to-peak value of the original input signal and inputting it to the signal detection module.
[0013] The threshold output module includes a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, a sixth resistor R6, an analog switch U2, a first capacitor C1, and a second capacitor C2;
[0014] The sixth pin of the analog switch U2 is the enable end, which is active low; the seventh pin is the negative power input end, powered by a negative power supply; the eighth pin is the ground; the ninth pin is the positive power input end, powered by a positive power supply; the ninth, tenth, and eleventh pins are address ports for selecting the conduction channel; the thirteenth and fourteenth pins are channel switching pins for channel switching, where the thirteenth pin is the first input port and the fourteenth pin is the second input port; the third pin is the sixth output port for channel voltage output, and the other pins are floating;
[0015] The analog switch U2 includes two input ports, namely the seventh input port and the eighth input port;
[0016] The analog switch U2 includes two output ports, namely the sixth output port and the seventh output port;
[0017] The seventh input port of the analog switch U2 is connected to one end of the first resistor R1 and the second resistor R2. The other end of the first resistor R1 is grounded, and the other end of the second resistor R2 is connected to the negative power supply;
[0018] The eighth input port of the analog switch U2 is connected to one end of the fourth resistor R4 and the sixth resistor R6. The other end of the fourth resistor R4 is connected to the third resistor R3. The other port of the sixth resistor R6 is connected to the ground, and the other end of the third resistor R3 is connected to the input filtering port;
[0019] The third pin of the analog switch U2 belongs to the output end of the threshold output module and is connected to the fourth input port of the signal comparison module;
[0020] One end of the first capacitor C1 is grounded, and the other end is connected to the positive power supply port of the analog switch U2;
[0021] One end of the second capacitor C2 is grounded, and the other end is connected to the negative power supply port of the analog switch U2;
[0022] The sixth pin of the analog switch U2 is a low-level enable pin, so the sixth pin is connected to the ground;
[0023] The ninth, tenth, and eleventh pins of the analog switch U2 are control ports for controlling the actual output of the third pin. The ninth and tenth pins of the analog switch U2 are grounded, and the eleventh pin EN is connected to the output port of the signal comparison module;
[0024] The adaptive adjustment of the high threshold is completely controlled by hardware;
[0025] The threshold output module can switch the high threshold to 1 / N (N>1) of the peak-to-peak value of the frequency signal collected by the signal acquisition module. The value 1 / N can be set by adjusting the resistors in the signal acquisition circuit, and at the same time, it can compare the amplitude of the input signal with the threshold value to achieve the switching between high and low thresholds.
[0026] The sixth output port is connected to the fourth input port of the signal comparison module, and the seventh output port is connected to the fifth output port of the signal comparison module;
[0027] The threshold output module circuit can achieve the switching between high and low threshold values according to the output of the module comparison circuit.
[0028] The signal comparison module includes a comparison module and a feedback module.
[0029] The comparison module includes a comparator U1, a fifth resistor R5, a third capacitor C3, and a fourth capacitor C4;
[0030] The comparator U1 includes a ninth input port, a tenth input port, and an eighth output port;
[0031] The first pin of the comparator U1 is grounded; the second and third pins are the second and ninth input ports respectively for connecting the pre-stage input signal; the fourth pin is the negative power supply input terminal and is powered by a negative power supply; the fifth and sixth pins can be left floating; the seventh pin is the first output port for outputting high and low level signals; the eighth pin is the positive power supply input port and is powered by a negative power supply;
[0032] The ninth input port of the comparison module U1 is connected to the sixth output port of the analog switch U2; the tenth input port of the comparator U1 is connected to the third resistor R3 and the fourth resistor R4; the eighth output port of the comparator U1 is connected to the fifth resistor R5, and the other end of the fifth resistor is connected to the positive power supply; one end of the first capacitor C3 is grounded, and the other end is connected to the positive power supply port of the comparator U2; one end of the second capacitor C4 is grounded, and the other end is connected to the negative power supply port of the comparator U2; the comparison module directly realizes the switching control of high and low thresholds through the output of the threshold output module;
[0033] The feedback module includes an eleventh input port and a ninth output port;
[0034] The eleventh input port of the feedback module is connected to the eighth output port of the comparator U1 to realize the address selection of the comparator; the ninth output port of the feedback module is connected to the ninth input port of the comparator U1 to shield the error caused by the jitter of frequency detection and improve the accuracy of frequency detection.
[0035] The fifth input port of the signal detection module is connected to the signal acquisition module to realize the peak-to-peak detection of the original signal; the sixth input port of the signal detection module is connected to the signal comparison module to realize the frequency detection of the original signal; at the same time, it supports the use of MCU and FPGA.
[0036] In the embodiment of the present invention, the signal output by the signal comparison module circuit belongs to a square wave signal;
[0037] In the embodiment of the present invention, the signal detection module supports the peak-to-peak detection and frequency detection of the original signal, and at the same time supports the use of MCU, FPGA, etc.
[0038] Through reasonable and reliable hardware design, this circuit realizes the adjustment of the threshold voltage without software intervention. This design will neither reduce the accuracy of frequency detection due to the fixed resistor voltage division design, which cannot perform hardware anti-shake processing on the input signal, nor cause excessive upfront cost investment and difficult debugging due to the need to cooperate with software design. At the same time, it can adaptively adjust the threshold voltage according to the voltage input range of the input signal, improving the applicable range of various sensors. Therefore, this design effectively improves the accuracy of frequency detection and increases the applicable environment of the signal detection system.
[0039] Beneficial effects: Based on the peak-to-peak value of the input frequency signal, the utility model adjusts the high threshold voltage value of the signal comparison module by pure hardware control. It will neither reduce the accuracy of frequency detection due to the inability to perform hardware anti-shake processing on the input signal caused by the fixed resistor voltage division design, nor cause excessive upfront cost investment and difficult debugging due to the need to cooperate with software design. It effectively improves the accuracy of frequency detection, expands the applicable environment of the signal detection system, and saves software configuration costs at the same time. Brief Description of the Drawings
[0040] The following further specifically describes the present utility model in conjunction with the drawings and specific embodiments, and the above and / or other advantages of the present utility model will become clearer.
[0041] Figure 1 It is a schematic structural diagram of a high-threshold adaptive frequency detection provided by an embodiment of the present utility model.
[0042] Figure 2 It is a schematic diagram of the threshold output module provided by an embodiment of the present utility model.
[0043] Figure 3 It is a schematic structural diagram of a high-threshold adaptive frequency detection circuit in another embodiment of the present utility model.
[0044] Figure 4 It is a schematic diagram of a high-threshold adaptive overall example in another embodiment of the present utility model. Detailed Embodiments
[0045] In an embodiment of the present utility model, a high-threshold adaptive frequency detection circuit is provided. Refer to Figure 1 the schematic structural diagram of a high-threshold adaptive frequency detection circuit shown, which includes a signal acquisition module 10, a threshold output module 20, a signal comparison module 30, and a signal detection module 40;
[0046] Among them, the signal acquisition module 10 is connected to the signal comparison module 30, the threshold output module 20 is connected to the signal comparison module 30, and the signal acquisition module 10 and the signal comparison module are respectively connected to the signal detection module 40;
[0047] The signal acquisition module 10 is used for electrostatic and other EMC (Electro Magnetic Compatibility) protection of the input signal and realizing filtering control of the input signal. At the same time, it supports collecting the peak-to-peak value of the input signal and inputting it to the signal detection module to realize amplitude detection of the input signal;
[0048] The threshold output module 20 is used to switch the high threshold to 1 / N (N>1) of the peak-to-peak value of the frequency signal collected by the signal acquisition module, and can also compare the amplitude of the input signal with the threshold value to realize the switching of high and low thresholds;
[0049] The signal comparison module 30 is used to control the switching of high and low thresholds of the circuit, and can also input the compared output frequency signal to the signal detection module to realize the detection of the input frequency signal. At the same time, it can shield the error caused by the jitter of frequency detection and improve the accuracy of frequency detection.
[0050] The signal detection module 40 is used to detect the peak-to-peak value and frequency of the original signal.
[0051] The following further specifically introduces the method for detecting the access of a dry contact to a high voltage disclosed in the present invention in combination with the embodiments shown in the drawings.
[0052] As Figure 2 shown, the schematic diagram of the threshold output module provided by the embodiment of the present invention includes a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, a sixth resistor R6, an analog switch U2, a first capacitor C1, and a second capacitor C2;
[0053] The sixth pin of the analog switch U2 is the enable terminal, which is valid at low level; the seventh pin is the negative power input terminal, which is powered by a negative power supply; the eighth pin is the ground; the ninth pin is the negative power input terminal, which is powered by a positive power supply; the ninth, tenth, and eleventh pins are address ports for selecting the conduction channel; the thirteenth and fourteenth pins are channel switching pins for channel switching, where the thirteenth pin is the first input port and the fourteenth pin is the second input port; the third pin is the output terminal for output after channel switching, and other pins are floating.
[0054] The first input port of the analog switch U2 is connected to one end of the first resistor R1 and the second resistor R2. The other end of the first resistor R1 is grounded, and the other end of the second resistor R2 is connected to the negative power supply;
[0055] The second input port of the analog switch U2 is connected to one end of the fourth resistor R4 and the sixth resistor R6. The other end of the fourth resistor R4 is connected to the third resistor R3, the other port of the sixth resistor R6 is connected to the ground, and the other end of the third resistor is connected to the input filter port;
[0056] The third pin belongs to the output terminal of the threshold output module and is connected to the second input port of the signal comparison module;
[0057] One end of the first capacitor C1 is grounded, and the other end is connected to the positive power supply port of the analog switch U2;
[0058] One end of the second capacitor C2 is grounded, and the other end is connected to the negative power supply port of the analog switch U2;
[0059] The sixth pin is the low-level enable pin of the analog switch U2, so the sixth pin is connected to the ground;
[0060] The ninth, tenth, and eleventh pins are control ports, which are used to control the actual output of the third pin. Among them, the ninth and tenth pins are grounded, and the eleventh pin EN is connected to the output port of the signal comparison module.
[0061] In this embodiment, C1 and C2 are negative and positive power supply filter capacitors. The first input port of the analog switch in the figure uses the voltage division relationship of R1 and R2 to limit the low level of the threshold output module; the second input port uses the voltage division relationship of R3 and R4 to limit the high level of the threshold output. Since R3 is connected to the signal input port, the high level of the threshold output can change with the amplitude of the input signal;
[0062] In this embodiment, the control signals received through the eighth, ninth, and eleventh ports determine that the output of the analog switch U2 is the threshold voltage. It effectively improves the accuracy of frequency detection, increases the applicable environment of the signal detection system, and saves the software configuration cost at the same time.
[0063] In another embodiment of the present invention, on the basis of Embodiment 1, the high-threshold adaptive frequency detection circuit is further described.
[0064] As Figure 3 shown is a schematic structural diagram of a high-threshold adaptive frequency detection circuit in another embodiment of the present invention. In this embodiment, the high-threshold adaptive circuit includes a port protection module 101, an input filtering module 102, a peak acquisition module 103, a threshold output module 20, a comparison module 301, a feedback module 302, and a signal detection module 40. The input signal is input from the port protection module.
[0065] The output end of the port input module 101 is connected to the input end of the input filtering module 102 for protecting the input signal; the output end of the filtering input module 102 is connected to the input ends of the peak acquisition module 103 and the comparison module 301 to implement band-pass filtering of the original input signal; the output port of the peak acquisition module 103 is connected to the input ports of the signal detection module and the threshold output module to implement the acquisition of the peak-to-peak value of the original input signal and feedback the collected voltage value to the threshold output module.
[0066] The output end of the threshold output module 20 is connected to the input end of the comparison module 301 to implement high-threshold adaptive adjustment according to the peak-to-peak value of the original input signal and realize the switching between high and low thresholds.
[0067] The output terminal of the comparison module 301 is connected to the input port of the signal detection module, so as to realize the frequency detection of the original input frequency signal; the input terminal of the feedback module 302 is connected to the output terminal of the comparison module 301 and the input terminal of the threshold output module 20, so as to shield the error caused by the jitter of the frequency detection and improve the accuracy of the frequency detection.
[0068] Figure 4 This is a high-threshold adaptive overall example diagram in another embodiment of the present invention, as Figure 4 shown, the threshold output module is as described in the first embodiment; the signal comparison module includes a comparison module and a feedback module, and the comparison module includes a comparator U1, a fifth resistor R5, a third capacitor C3, and a fourth capacitor C4;
[0069] Among them, the first pin of the comparator U1 is grounded; the second and third pins are the second and first input ports respectively, used to connect the pre-stage input signal; the fourth pin is the negative power input terminal, powered by a negative power supply; the fifth and sixth pins can be left floating; the seventh pin is the first output port, used to output high and low level signals; the eighth pin is the positive power input port, powered by a negative power supply;
[0070] The first input port of the comparison module U1 is connected to the first output port of the analog switch U2; the second input port of the comparator U1 is connected to the third resistor R3 and the fourth resistor R4; the first output port of the comparator U1 is connected to the fifth resistor R5, and the other end of the fifth resistor is connected to the positive power supply; one end of the first capacitor C3 is grounded, and the other end is connected to the positive power supply port of the comparator U2; one end of the second capacitor C4 is grounded, and the other end is connected to the negative power supply port of the comparator U2; that is, the signal output by the comparison module is connected to the threshold output module, and the high and low threshold switching control is directly realized through the output of the threshold output module; the signal of the feedback module is connected to the positive end of the signal comparison module, and the feedback module includes a first output port, a first output port; the first input port of the feedback module is connected to the first output port of the comparator U1 to realize the address selection of the comparator; the first output port of the feedback module is connected to the first input port of the comparator to shield the error caused by the jitter of the frequency detection and improve the accuracy of the frequency detection.
[0071] As Figure 4 shown, in this embodiment, when the original frequency signal is input, the port protection module will provide a discharge path for the input interference signal; after passing through the signal filtering module, the frequency of the input signal can be band-pass filtered through the RC time constant; as Figure 4As shown, the third resistor R3, the fourth resistor R4, and the sixth resistor R6 use a resistor voltage division mode to reduce the amplitude of the input signal, and change with the change of the amplitude of the input signal. At the same time, the reduced amplitude is input to the second input port of the comparator U1 and the input port of the peak acquisition circuit to realize the amplitude detection of the input signal, and the further reduced amplitude is input to the second input port of the analog switch U2; while the first input port of the analog switch U2 uses the voltage division mode of the first resistor R1 and the second resistor R2 to input the negative threshold to the first input port of the analog switch U2; the analog switch U2 realizes the switching of high and low thresholds through the level information of the control signal, and inputs this threshold to the second input port of the comparator U1; the comparator U1 compares the output voltages of the first port and the second port, and thus outputs a level signal, connects this level signal to the feedback module to shield the error caused by the jitter of the frequency detection, improves the accuracy of the frequency detection, inputs this level signal to the analog switch U2 to realize the hardware control of the threshold output, and at the same time inputs it to the signal detection module to realize the detection of the original frequency signal.
[0072] The present invention provides a frequency detection circuit with high threshold adaptability. There are many methods and ways to specifically implement this technical solution. The above is only the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention. Each component not clearly defined in this embodiment can be realized by the prior art.
Claims
1. A high threshold adaptive frequency detection circuit, characterized in that: It includes a signal acquisition module, a threshold output module, a signal comparison module, and a signal detection module; the signal acquisition module includes a first output port and a second output port; the threshold output module includes a first input port, a second input port, and a third output port; the signal comparison module includes a third input port, a fourth input port, a fourth output port, and a fifth output port; the signal detection module includes a fifth input port and a sixth input port; The first output port of the signal acquisition module is connected to the third input port of the signal comparison module, and the second output port is connected to the fifth input port of the signal detection module and the first input port of the threshold output module respectively; The third output port of the threshold output module is connected to the fourth input port of the signal comparison module; The fourth output port of the signal comparison module is connected to the sixth input port of the signal detection module.
2. The high threshold adaptive frequency detection circuit according to claim 1, characterized in that: The signal acquisition module includes a port protection module and an input filtering module; The output end of the port protection module is connected to the input end of the input filter module to protect the original signal. The input filter module is connected to the second input port of the signal comparison module for comparison with the threshold voltage of the threshold output module.
3. The high threshold adaptive frequency detection circuit according to claim 2, characterized in that: The signal acquisition module also includes a peak value acquisition module; The input end of the peak acquisition module is connected to the output end of the input filtering module, and the output end of the peak acquisition module is connected to the fifth input port of the signal detection module, supporting the acquisition of the peak-to-peak value of the original input signal and inputting it into the signal detection module.
4. The high threshold adaptive frequency detection circuit according to claim 3, characterized in that: The threshold output module includes a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, a sixth resistor R6, an analog switch U2, a first capacitor C1, and a second capacitor C2; The sixth pin of the analog switch U2 is an enable terminal, which is valid at a low level; the seventh pin is a negative power input terminal, which is powered by a negative power supply; the eighth pin is a ground; the ninth pin is a positive power input terminal, which is powered by a positive power supply; the ninth, tenth and eleventh pins are address ports, which are used to select a conduction channel; the thirteenth and fourteenth pins are channel switching pins, which are used to switch channels, wherein the thirteenth pin is a first input port and the fourteenth pin is a second input port; the third pin is a sixth output port, which is used for channel voltage output, and the other pins are all left floating; The analog switch U2 includes two input ports, namely a seventh input port and an eighth input port; The analog switch U2 includes two output ports, namely a sixth output port and a seventh output port; The seventh input port of the analog switch U2 is connected to one end of the first resistor R1 and the second resistor R2, the other end of the first resistor R1 is grounded, and the other end of the second resistor R2 is connected to a negative power supply; The eighth input port of the analog switch U2 is connected to one end of the fourth resistor R4 and the sixth resistor R6, the other end of the fourth resistor R4 is connected to the third resistor R3, the other end of the sixth resistor R6 is connected to the ground, and the other end of the third resistor R3 is connected to the input filter port; The third pin of the analog switch U2 belongs to the output end of the threshold output module and is connected to the fourth input port of the signal comparison module; One end of the first capacitor C1 is grounded, and the other end is connected to the positive power supply port of the analog switch U2; One end of the second capacitor C2 is grounded, and the other end is connected to the negative power supply port of the analog switch U2; The sixth pin of the analog switch U2 is a low level enable pin, so the sixth pin is connected to the ground; The ninth, tenth and eleventh pins of the analog switch U2 belong to the control port, which is used to control the actual output of the third pin. The ninth and tenth pins of the analog switch U2 are grounded, and the eleventh pin EN is connected to the output port of the signal comparison module. The adaptive adjustment of the high threshold is completely controlled by hardware.
5. The high threshold adaptive frequency detection circuit according to claim 4, characterized in that: The sixth output port is connected to the fourth input port of the signal comparison module, and the seventh output port is connected to the fifth output port of the signal comparison module.
6. The high threshold adaptive frequency detection circuit according to claim 5, characterized in that: The signal comparison module includes a comparison module and a feedback module.
7. The high threshold adaptive frequency detection circuit according to claim 6, characterized in that: The comparison module includes a comparator U1, a fifth resistor R5, a third capacitor C3, and a fourth capacitor C4; The comparator U1 includes a ninth input port, a tenth input port, and an eighth output port; The first pin of the comparator U1 is ground; the second pin and the third pin are the second and ninth input ports respectively, which are used to connect the previous stage input signal; the fourth pin is the negative input terminal of the power supply, which is powered by a negative power supply; the fifth pin and the sixth pin can be left floating; the seventh pin is the first output port, which is used to output high and low level signals; the eighth pin is the positive power input port, which is powered by a negative power supply.
8. The high threshold adaptive frequency detection circuit according to claim 7, characterized in that: The ninth input port of the comparison module U1 is connected to the sixth output port of the analog switch U2; the tenth input port of the comparator U1 is connected to the third resistor R3 and the fourth resistor R4; the eighth output port of the comparator U1 is connected to the fifth resistor R5, and the other end of the fifth resistor is connected to the positive power supply; one end of the first capacitor C3 is grounded, and the other end is connected to the positive power supply port of the comparator U2; one end of the second capacitor C4 is grounded, and the other end is connected to the negative power supply port of the comparator U2; the comparison module directly realizes the switching control of the high and low thresholds through the output of the threshold output module.
9. The high threshold adaptive frequency detection circuit according to claim 8, characterized in that: The feedback module comprises an eleventh input port and a ninth output port; The eleventh input port of the feedback module is connected to the eighth output port of the comparator U1 to implement the address selection of the comparator; the ninth output port of the feedback module is connected to the ninth input port of the comparator U1.
10. The high threshold adaptive frequency detection circuit according to claim 9, characterized in that: The fifth input port of the signal detection module is connected to the signal acquisition module to realize the peak-to-peak value detection of the original signal; the sixth input port of the signal detection module is connected to the signal comparison module to realize the frequency detection of the original signal; and the use of MCU and FPGA is supported at the same time.