Frequency detection circuit, vehicle controller and vehicle
By combining the signal type switching module and the comparator module in the frequency detection circuit, the problem that existing technologies can only detect a single signal frequency is solved, achieving compatible detection of both high and low effective signal frequencies and expanding the application range.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2026-03-31
AI Technical Summary
Existing frequency detection circuits can only detect a single type of signal, resulting in poor compatibility, limited application range, and an inability to simultaneously detect the frequencies of both high-active and low-active signals.
A frequency detection circuit was designed, which combines a signal type switching module with a comparator module to achieve switchable detection of high and low effective signals. It has good compatibility and a wide range of applications.
It enables switchable detection of high-active and low-active signal frequencies, improving the compatibility and application range of the frequency detection circuit.
Smart Images

Figure CN224066891U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of frequency detection technology, specifically to a frequency detection circuit, a vehicle controller, and a vehicle. Background Technology
[0002] Detecting the frequency of signals is crucial in vehicle electronic control systems. Vehicles involve a wide variety of signals, including engine operation signals, various sensor signals, communication signals, fault signals, and control command indicator lights. Some of these signals are active high (meaning they are active when the logic level is high), while others are active low (meaning they are active when the logic level is low).
[0003] Current frequency detection circuits can only detect a single type of signal. For example, a frequency sampling circuit containing a comparator can only detect the frequency of low effective signals, resulting in poor compatibility and a limited range of applications. Utility Model Content
[0004] To solve the above-mentioned technical problems, this utility model provides a frequency detection circuit, a vehicle controller, and a vehicle, which can realize switchable detection of the frequencies of two signals, namely high active and low active signals, with good compatibility and wide application range.
[0005] The technical solution adopted in this utility model is as follows:
[0006] A frequency detection circuit according to a first aspect of this utility model includes: a comparator module, wherein a first input terminal of the comparator module is connected to a frequency source to be detected, a second input terminal of the comparator module is connected to a reference source, and an output terminal of the comparator module is used to output a frequency detection result; and a signal type switching module, wherein the signal type switching module is connected to the first input terminal of the comparator module, wherein the signal type switching module, by switching to a first state, enables the comparator module to detect the frequency of the high effective frequency signal output by the frequency source to be detected, and by switching to a second state, enables the comparator module to detect the frequency of the low effective frequency signal output by the frequency source to be detected.
[0007] According to the frequency detection circuit of this utility model, by means of a signal type switching module connected to the first input terminal of the comparator module, the function of the comparator module can be switched to detect high effective frequency signals or low effective frequency signals. That is, it can realize the switchable detection of the frequencies of high effective and low effective signals, with good compatibility and wide application range.
[0008] Furthermore, the control terminal of the signal type switching module and the output terminal of the comparator module are respectively connected to the MCU (Microcontroller Unit) module. The MCU module switches the signal type switching module to a first state or a second state by inputting a control signal to the control terminal of the signal type switching module. The MCU module receives the frequency detection result through the output terminal of the comparator module.
[0009] Furthermore, the first input terminal of the comparator module is connected to the frequency source to be detected through a first resistor, and the first input terminal of the comparator module is also grounded through a first capacitor.
[0010] Specifically, the signal type switching module includes: a switching transistor, the control terminal of which serves as the control terminal of the signal type switching module, and the first terminal of which is grounded; a second resistor, one end of which is connected to a first power supply, and the other end of which is connected to the second terminal of the switching transistor; and a third resistor, one end of which is connected to the second terminal of the switching transistor, and the other end of which is connected to the first input terminal of the comparator module.
[0011] Specifically, the comparator module includes: a comparator, wherein a first input terminal of the comparator serves as the first input terminal of the comparator module, and an output terminal of the comparator serves as the output terminal of the comparator module; the positive power supply terminal of the comparator is connected to a first power supply, and the negative power supply terminal of the comparator is grounded; a fourth resistor, one end of which serves as the second input terminal of the comparator module, and the other end of which is connected to the second input terminal of the comparator; a fifth resistor, one end of which is connected to the second input terminal of the comparator, and the other end of which is connected to the output terminal of the comparator; and a sixth resistor, one end of which is connected to a second power supply, and the other end of which is connected to the output terminal of the comparator.
[0012] Furthermore, the first input terminal of the comparator module is connected to the first power supply via a first diode and grounded via a second diode.
[0013] Specifically, the reference source includes: an operational amplifier, the output terminal of which serves as the output terminal of the reference source, a first input terminal of which is connected to the output terminal of the operational amplifier, a positive power supply terminal of which is connected to a second power supply, and a negative power supply terminal of which is grounded; a seventh resistor, one end of which serves as the input terminal of the reference source, and the other end of which is connected to the second input terminal of the operational amplifier; and a second capacitor, one end of which is connected to the other end of the seventh resistor, and the other end of which is grounded.
[0014] Furthermore, the input terminal of the reference source is connected to the MCU module. The MCU module inputs a PWM (Pulse Width Modulation) control signal to the input terminal of the reference source, causing the output terminal of the reference source to output a corresponding reference voltage signal. This reference source configuration enables the comparator module to have an adjustable reference voltage.
[0015] A vehicle controller according to a second aspect of this utility model includes the aforementioned frequency detection circuit.
[0016] Furthermore, the vehicle controller also includes multiple MCU modules, each MCU module being connected to at least one frequency detection circuit, and the multiple MCU modules communicating with each other. Each MCU module being connected to at least one frequency detection circuit meets actual detection needs, and the use of multiple MCU modules improves vehicle safety.
[0017] A vehicle according to a third aspect of this utility model includes the aforementioned vehicle controller. Attached Figure Description
[0018] Figure 1 This is a block diagram of the frequency detection circuit according to an embodiment of the present utility model;
[0019] Figure 2 This is a topology diagram of a frequency detection circuit according to an embodiment of the present invention;
[0020] Figure 3 This is a schematic diagram of the structure of a vehicle controller according to an embodiment of the present invention. Detailed Implementation
[0021] The technical solutions of the present utility model will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present utility model, and not all embodiments. Based on the embodiments of the present utility model, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present utility model.
[0022] like Figure 1As shown, the frequency detection circuit of this embodiment includes a comparator module 10 and a signal type switching module 20. The first input terminal of the comparator module 10 is connected to the frequency source to be detected, the second input terminal of the comparator module 10 is connected to a reference source, and the output terminal of the comparator module 10 is used to output the frequency detection result. The signal type switching module 20 is connected to the first input terminal of the comparator module 10. The signal type switching module 20, by switching to a first state, enables the comparator module 10 to detect the frequency of the high effective frequency signal output by the frequency source to be detected; by switching to a second state, the signal type switching module 20 enables the comparator module 10 to detect the frequency of the low effective frequency signal output by the frequency source to be detected.
[0023] In this embodiment of the invention, the high effective frequency signal is firstly a high level indicating that the signal is valid, and secondly a periodic signal, that is, a detectable frequency. Similarly, the low effective frequency signal is a low level indicating that the signal is valid, and is also a periodic signal.
[0024] In one embodiment of this utility model, the comparator module 10 includes a hysteresis comparator with dual thresholds, thus obtaining the frequency detection result by determining the number of times the output signal flips according to the signal output from the frequency source. The signal type switching module 20 includes a resistor branch and a switching transistor capable of changing the resistor branch to a pull-up resistor or a pull-down resistor, thereby realizing the detection of low and high effective frequency signals through the action of the pull-up and pull-down resistors on the resistor branch.
[0025] According to the frequency detection circuit of this utility model embodiment, by means of a signal type switching module connected to the first input terminal of the comparator module, the function of the comparator module can be switched to detect high effective frequency signals or low effective frequency signals. That is, it can realize the switchable detection of the frequencies of high effective and low effective signals, with good compatibility and wide application range.
[0026] Furthermore, the control terminal of the signal type switching module 20 and the output terminal of the comparator module 10 are respectively connected to the MCU module. The MCU module switches the signal type switching module 20 to the first state or the second state by inputting a control signal to the control terminal of the signal type switching module 20. The MCU module receives the frequency detection result through the output terminal of the comparator module 10.
[0027] The frequency detection circuit of this utility model will be described in detail below with a feasible specific circuit topology.
[0028] In one embodiment of this utility model, such as Figure 2As shown, the first input terminal of comparator module 10 can be connected to the frequency source to be detected through the first resistor R1, and the first input terminal of comparator module 10 can also be grounded through the first capacitor C1. The filter circuit formed by the first resistor R1 and the first capacitor C1 can filter the signal output by the frequency source to be detected, thereby improving the signal quality.
[0029] like Figure 2 As shown, the signal type switching module 20 may include a switch Q, a second resistor R2, and a third resistor R3. The control terminal of the switch Q serves as the control terminal of the signal type switching module 20, and the first terminal of the switch Q is grounded. One end of the second resistor R2 is connected to the first power supply Power1, and the other end of the second resistor R2 is connected to the second terminal of the switch Q. One end of the third resistor R3 is connected to the second terminal of the switch Q, and the other end of the third resistor R3 is connected to the first input terminal of the comparator module 10. The control terminal of the switch Q, i.e., the control terminal of the signal type switching module 20, is connected to the high and low level pins of the MCU module to receive control signals, i.e., high and low level signals. When the switch Q is turned on, the third resistor R3 is grounded, forming a pull-down resistor; when the switch Q is turned off, the third resistor R3 and the second resistor R2 are connected to the first power supply Power1, forming a pull-up resistor. The figure uses an NMOS transistor as an example, where its first terminal, second terminal, and control terminal are the source, drain, and gate of the NMOS transistor, respectively.
[0030] like Figure 2 As shown, comparator module 10 may include comparator A1, a fourth resistor R4, a fifth resistor R5, and a sixth resistor R6. The first input terminal of comparator A1 serves as the first input terminal of comparator module 10, and the output terminal of comparator A1 serves as the output terminal of comparator module 10. The positive power supply terminal of comparator A1 is connected to the first power supply Power1, and the negative power supply terminal of comparator A1 is grounded. One end of the fourth resistor R4 serves as the second input terminal of comparator module 10, and the other end of the fourth resistor R4 is connected to the second input terminal of comparator A1. One end of the fifth resistor R5 is connected to the second input terminal of comparator A1, and the other end of the fifth resistor R5 is connected to the output terminal of comparator A1. One end of the sixth resistor R6 is connected to the second power supply Power2, and the other end of the sixth resistor R6 is connected to the output terminal of comparator A1. Due to the feedback at the output terminal, the transition of the output signal of comparator module 10 has a hysteresis, with a hysteresis range of V. TL ~V TH , has V TL and V TH With two thresholds, the frequency detection result can be obtained by determining the number of times the output signal flips based on the signal output from the frequency source. The frequency detection result is output from the output of comparator module 10 to the frequency detection pin of the MCU module.
[0031] like Figure 2As shown, the first input terminal of comparator module 10 can also be connected to the first power supply Power1 via a first diode and grounded via a second diode. The first diode and the second diode have a clamping function.
[0032] like Figure 2 As shown, the reference source may include operational amplifier A2, a seventh resistor R7, a second capacitor C2, and a third capacitor C3. The output terminal of operational amplifier A2 serves as the output terminal of the reference source. The first input terminal of operational amplifier A2 is connected to its output terminal. The positive power supply terminal of operational amplifier A2 is connected to the second power supply Power2, and the negative power supply terminal is grounded. One end of the seventh resistor R7 serves as the input terminal of the reference source, and the other end is connected to the second input terminal of operational amplifier A2. One end of the second capacitor C2 is connected to the other end of the seventh resistor R7, and the other end is grounded. One end of the third capacitor C3 is connected to the output terminal of operational amplifier A2, and the other end is grounded. The input terminal of this reference source is connected to the MCU module, specifically to the PWM signal pin. The MCU module inputs a PWM control signal to the input terminal of the reference source to cause the output terminal of the reference source to output a corresponding reference voltage signal. This reference source configuration enables the comparator module 10 to have an adjustable reference voltage.
[0033] The following is a pair Figure 2 The circuit diagram shown illustrates the specific principles behind the functions implemented by each module.
[0034] The upper threshold V of comparator module 10 TH =(U Power2 ×R4+V ref ×R5) / (R4+R5), lower threshold V TL =V ref ×R5 / (R4+R5), where U Power2 The voltage of the second power supply, Power2, is V. ref R is the reference voltage output by the reference source. x This represents the resistance value of resistor Rx. The amplitude is U. c The PWM control signal with a duty cycle of Duty passes through an RC low-pass filter composed of the seventh resistor R7 and the second capacitor R2, and outputs a DC level, V. ref =U c ×Duty. Operational amplifier A2 can act as a voltage follower, which can improve circuit stability and reduce signal distortion.
[0035] When the output signal of the frequency source to be detected is a high effective frequency signal, the high and low level pins of the MCU module output a high level signal during frequency detection. The first input terminal of the comparator module 10 has a pull-down resistor. The high effective state level of the output signal of the frequency source to be detected, for example, 8~36V, is clamped to the U signal by a diode. Power1 +V F V F The voltage drop across the clamping diode is U. When the output of the frequency source to be detected is 0V, the output of comparator module 10 is U. Power2 The output of the frequency source to be detected rises from 0V to V. TH The output of time comparator module 10 is from U Power2 Converted to 0V, the output of the frequency source to be detected is U Power1 +V F Descending to V TL The output of time comparator module 10 is converted from 0V to U. Power2 .
[0036] When the output signal of the frequency source to be detected is a low effective frequency signal, the MCU module outputs a low-level signal on its high and low level pins during frequency detection. The first input terminal of the comparator module 10 has a pull-up resistor. When the output signal of the frequency source to be detected is a low effective state level, for example, 0~1.5V, the comparator module 10 outputs U. Power2 The output of the frequency source to be detected increases from 0-1.5V to V. TH The output of time comparator module 10 is from U Power2 Converted to 0V, the output of the frequency source to be detected is U Power1 Descending to V TL The output of time comparator module 10 is converted from 0V to U. Power2 .
[0037] Furthermore, when the first input terminal of comparator module 10 is short-circuited to ground, the output of comparator module 10 is U. Power2 When the first input terminal of comparator module 10 is short-circuited to the power supply, the output of comparator module 10 is 0V. After the short-circuit fault disappears, the circuit can operate normally. In other words, the MCU module can also detect short circuits to ground and power supply at the input terminal of the frequency detection circuit through the output of comparator module 10, thus facilitating the implementation of corresponding protection measures.
[0038] Based on the frequency detection circuit of the above embodiments, this utility model also proposes a vehicle controller.
[0039] The vehicle controller of this utility model includes the frequency detection circuit of any of the above embodiments of this utility model.
[0040] Furthermore, the vehicle controller in this embodiment of the present invention also includes multiple MCU modules. Each MCU module is connected to at least one frequency detection circuit according to actual detection requirements, and the multiple MCU modules are interconnected. In a specific embodiment of the present invention, as shown... Figure 3 As shown, the vehicle controller includes two MCU modules, MCU1 and MCU2. Each MCU module is connected to two frequency detection circuits (connected to circuits 1 and 2, and circuits 3 and 4 respectively) to detect the frequency of the corresponding frequency source signal. Through communication between multiple MCU modules, multi-core control and information sharing can be achieved. When the main MCU module malfunctions, the secondary MCU module can initiate vehicle safety protection, such as issuing alarms, automatic stopping, or braking control. Alternatively, if the detection and control results of the same object are inconsistent among multiple MCUs, vehicle safety protection can be activated. This improves vehicle safety.
[0041] The vehicle controller according to the present invention can realize switchable detection of the frequencies of two signals, namely high active and low active, with good compatibility and wide application range.
[0042] Based on the vehicle controller of the above embodiments, this utility model also proposes a vehicle.
[0043] The vehicle in this embodiment of the present invention includes the vehicle controller of the above embodiments of the present invention. The specific implementation method can be referred to the above embodiments, and will not be repeated here.
[0044] The vehicle according to the present invention, under the control of its vehicle controller, can achieve switchable detection of the frequencies of two signals, namely high active and low active signals, with good compatibility and wide application range.
[0045] In the description of this utility model, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. "A plurality of" means two or more, unless otherwise explicitly specified.
[0046] In this utility model, unless otherwise explicitly specified and limited, the terms "installation," "connection," "joining," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this utility model according to the specific circumstances.
[0047] In this utility model, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "on top of," and "over" the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
[0048] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0049] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A frequency detection circuit, characterized by, The application relates to a frequency detection device, which comprises the following parts: a comparator module, a first input end of the comparator module being connected to a frequency source to be detected, a second input end of the comparator module being connected to a reference source, and an output end of the comparator module being used to output a frequency detection result; a signal type switching module, the signal type switching module being connected to the first input end of the comparator module, the signal type switching module being used to make the comparator module detect a high active frequency signal output by the frequency source to be detected by switching to a first state, and the signal type switching module being used to make the comparator module detect a low active frequency signal output by the frequency source to be detected by switching to a second state.
2. The frequency detection circuit of claim 1, wherein, A control end of the signal type switching module and an output end of the comparator module are respectively connected to an MCU module, the MCU module inputs a control signal to the control end of the signal type switching module to switch the signal type switching module to the first state or the second state, and the MCU module receives the frequency detection result through the output end of the comparator module.
3. The frequency detection circuit of claim 1, wherein, The first input end of the comparator module is connected to the frequency source to be detected through a first resistor and grounded through a first capacitor.
4. The frequency detection circuit of claim 1, wherein, The signal type switching module comprises: a switch tube, a control electrode of the switch tube being used as the control end of the signal type switching module, and a first electrode of the switch tube being grounded; a second resistor, one end of the second resistor being connected to a first power supply, and the other end of the second resistor being connected to a second electrode of the switch tube; a third resistor, one end of the third resistor being connected to the second electrode of the switch tube, and the other end of the third resistor being connected to the first input end of the comparator module.
5. The frequency detection circuit of claim 1, wherein, The comparator module comprises: a comparator, a first input end of the comparator being used as the first input end of the comparator module, an output end of the comparator being used as the output end of the comparator module, a positive power supply end of the comparator being connected to the first power supply, and a negative power supply end of the comparator being grounded; a fourth resistor, one end of the fourth resistor being used as the second input end of the comparator module, and the other end of the fourth resistor being connected to a second input end of the comparator; a fifth resistor, one end of the fifth resistor being connected to the second input end of the comparator, and the other end of the fifth resistor being connected to the output end of the comparator; a sixth resistor, one end of the sixth resistor being connected to a second power supply, and the other end of the sixth resistor being connected to the output end of the comparator.
6. The frequency detection circuit of claim 1, wherein, The first input end of the comparator module is also connected to the first power supply through a first diode and grounded through a second diode.
7. The frequency detection circuit of claim 1, wherein, The reference source comprises: an operational amplifier, an output end of the operational amplifier being used as the output end of the reference source, a first input end of the operational amplifier being connected to the output end of the operational amplifier, a positive power supply end of the operational amplifier being connected to the second power supply, and a negative power supply end of the operational amplifier being grounded; a seventh resistor, one end of the seventh resistor being used as the input end of the reference source, and the other end of the seventh resistor being connected to a second input end of the operational amplifier. A second capacitor, one end of the second capacitor is connected with the other end of the seventh resistor, and the other end of the second capacitor is grounded.
8. The frequency detection circuit of claim 7, wherein, The input end of the reference source is connected with an MCU module, and the MCU module inputs a PWM control signal to the input end of the reference source, so that the output end of the reference source outputs a corresponding reference voltage signal.
9. A vehicle controller characterized by comprising: The frequency detection circuit according to any one of claims 1-8.
10. The vehicle controller of claim 9, wherein, The frequency detection circuit according to any one of claims 1-8.
11. A vehicle characterized by comprising: The vehicle controller according to claim 9 or 10.