Engine speed detection circuit, method and electric vehicle
By using an engine speed detection circuit and method, dynamically switching comparison threshold gears, and detecting engine speed based on the actual magnetoelectric signal amplitude, the problem of engine speed detection being susceptible to interference is solved, and the accuracy and anti-interference ability of the detection are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WEICHAI POWER CO LTD
- Filing Date
- 2026-03-11
- Publication Date
- 2026-07-10
AI Technical Summary
In existing technologies, engine speed detection is easily affected by speed differences, resulting in insufficient detection reliability.
Using an original reference circuit and a threshold gear circuit, the engine speed is detected based on the amplitude of the real magnetoelectric signal by dynamically switching the comparison threshold gear. This includes an initial gear circuit and a comparison gear circuit. The controller switches the gear of the threshold gear circuit to output a modulation signal to determine the speed.
It improves the accuracy and anti-interference capability of engine speed detection, while maintaining controllable hardware costs and adapting to different individual engines and installation differences.
Smart Images

Figure CN121805617B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of engine speed detection, specifically to an engine speed detection circuit, method, and electric vehicle. Background Technology
[0002] With the advancement of technology, engines, as widely used driving devices, are applied to all aspects of human life, bringing convenience to people. In scenarios such as electric vehicles that require engine drive, it is usually necessary to monitor the engine speed for efficient and reliable control. Currently, magnetoelectric speed sensors are commonly used as engine speed detection elements. Through the transmission of magnetoelectric signals, the engine controller analyzes these signals to determine the engine speed and then performs operations such as engine operation regulation.
[0003] However, individual differences in engines and sensor mounting structures can cause different deviations in the magnetoelectric signals output by the magnetoelectric speed sensor. As the engine speed changes, the magnetoelectric signal will be subject to varying degrees of interference, with different interference differences at different speeds. Current speed detection methods cannot provide effective anti-interference measures against this interference.
[0004] Therefore, improving the reliability of engine speed detection is an urgent problem to be solved. Summary of the Invention
[0005] In view of this, the embodiments of this application aim to provide an engine speed detection circuit, method and electric vehicle to solve the problem that the engine speed detection in the prior art is easily affected by speed difference interference and the detection reliability is insufficient.
[0006] In a first aspect, this application provides an engine speed detection circuit, which includes an original reference circuit, a threshold gear circuit, and a controller. The original reference circuit and the threshold gear circuit are both connected to the controller and are also connected to the engine's magnetoelectric speed sensor.
[0007] The original reference circuit is used to transmit the magnetoelectric signal of the magnetoelectric speed sensor as the original signal to the controller. The controller switches the gear of the threshold gear circuit based on the original signal so that the threshold gear circuit is in the corresponding comparison threshold state. The threshold gear circuit outputs a modulation signal to the controller based on the magnetoelectric signal. The modulation signal is used to determine the engine speed.
[0008] In one embodiment, the threshold gear circuit includes an initial gear circuit and a comparison gear circuit, both of which are connected to the magnetoelectric speed sensor and the controller.
[0009] In one embodiment, the threshold level circuit further includes a detection selection switch, the input contact of which is connected to the initial level circuit and the comparison level circuit, and the output contact and control terminal of which are both connected to the controller.
[0010] In one embodiment, the initial gear circuit includes a first clamping diode, a first comparator, and a first threshold resistor. The first clamping diode is connected to the magneto-electric speed sensor and the inverting input of the first comparator. The output of the first comparator is connected to the controller. The non-inverting input of the first comparator is equipped with a first threshold resistor for adjusting the comparison threshold of the initial gear circuit.
[0011] In one embodiment, the comparison range circuit includes a second clamping diode, a second comparator, a threshold switching switch, and a plurality of second threshold resistors. The second clamping diode is connected to the magneto-electric speed sensor and the inverting input of the second comparator. The output of the second comparator is connected to the controller. The inverting input of the second comparator is connected to the threshold switching switch. The threshold switching switch is connected to the controller and each of the second threshold resistors, and is used to adjust the comparison threshold of the comparison range circuit under the control of the controller.
[0012] In one embodiment, the threshold gear circuit further includes a differential amplifier unit connected to the magneto-electric speed sensor, the initial gear circuit, and the comparison gear circuit.
[0013] In one embodiment, the engine speed detection circuit further includes a preprocessing circuit connected to the original reference circuit, the threshold gear circuit, and the magnetoelectric speed sensor.
[0014] Secondly, this application also provides an engine speed detection method, applied to the aforementioned engine speed detection circuit, the method comprising:
[0015] Acquire the original signal; the original signal is obtained by the original reference circuit based on the magnetoelectric signal of the magnetoelectric speed sensor;
[0016] The voltage threshold is determined based on the original signal;
[0017] The threshold level circuit is switched according to the voltage threshold of the current cycle, so that the threshold level circuit is in a comparison threshold state corresponding to the level.
[0018] The system receives the modulation signal output by the threshold gear circuit and determines the engine speed based on the modulation signal.
[0019] In one embodiment, determining the voltage threshold based on the original signal includes:
[0020] The zero-crossing point of two adjacent falling edges in the original signal is taken as the recording period;
[0021] The maximum voltage value in the recording period is identified as the voltage threshold.
[0022] Thirdly, this application also provides an electric vehicle, which includes an engine, a magnetoelectric speed sensor, and an engine speed detection circuit as described above. The magnetoelectric speed sensor is disposed in the engine and is used to generate a magnetoelectric signal according to the engine speed. The engine speed detection circuit is connected to the magnetoelectric speed sensor and detects the engine speed based on the engine speed detection method described above.
[0023] The aforementioned engine speed detection circuit, method, and electric vehicle include an engine speed detection circuit comprising a primary reference circuit, a threshold gear circuit, and a controller. Both the primary reference circuit and the threshold gear circuit are connected to the controller and to the engine's magnetoelectric speed sensor. The primary reference circuit transmits the magnetoelectric signal from the magnetoelectric speed sensor as the primary signal to the controller. The controller switches the threshold gear circuit based on the primary signal to position it at the corresponding comparison threshold state. The threshold gear circuit outputs a modulation signal to the controller based on the magnetoelectric signal. This modulation signal is used to determine the engine speed. By directly acquiring the magnetoelectric signal as the primary signal for reference, it is beneficial to accurately switch the comparison threshold of the threshold gear circuit, thereby obtaining a highly accurate modulation signal, reducing interference caused by differences in engine speed, and improving the reliability of engine speed detection. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0025] Figure 1 This is a block diagram of the engine speed detection circuit in one embodiment.
[0026] Figure 2 This is a flowchart illustrating an engine speed detection method in one embodiment.
[0027] Figure 3 This is a schematic diagram of the circuit structure of the engine speed detection circuit in one embodiment.
[0028] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application.
[0030] It is understood that the terms "first," "second," etc., used herein may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of this application, a first resistor may be referred to as a second resistor, and similarly, a second resistor may be referred to as a first resistor. Both the first resistor and the second resistor are resistors, but they are not the same resistor.
[0031] It is understood that the term "connection" in the following embodiments should be understood as "electrical connection," "communication connection," etc., if the connected circuits, modules, units, etc., have electrical signal or data transmission with each other.
[0032] When used herein, the singular forms of “a,” “an,” and “the” may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprising,” “including,” or “having,” etc., specify the presence of the stated feature, whole, step, operation, component, part, or combination thereof, but do not preclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof.
[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
[0034] In the current automotive industry, magnetoelectric speed sensors are widely used in engine speed detection due to their advantages such as simple structure, low cost, high temperature resistance, and vibration resistance. However, the methods for analyzing the magnetoelectric signals of magnetoelectric speed sensors to determine engine speed differ:
[0035] Some high-end engine controllers use dedicated magnetoelectric signal processing chips. These dedicated chips are expensive to procure, have limited supply channels, and require additional chip configuration for communication lines, increasing the complexity of hardware design and the difficulty of PCB (Printed Circuit Board) wiring. For cost-sensitive mass-produced vehicles, this solution is not economically viable.
[0036] A fixed threshold comparison circuit is partially constructed using discrete components. This scheme sets a fixed comparison voltage through a resistor divider network. The magnetoelectric signal is filtered and shaped before being compared with this fixed voltage, outputting a square wave signal. However, the fixed threshold cannot adapt to the characteristic of the magnetoelectric signal amplitude changing drastically with engine speed. When the engine starts at low speed, the magnetoelectric signal amplitude may only be a few hundred millivolts, and a fixed threshold that is too high will cause signal loss. When the engine is running at high speed, the signal amplitude can reach tens of volts, and a fixed threshold that is too low will misidentify electromagnetic interference as valid speed pulses, leading to incorrect speed calculations.
[0037] To address the shortcomings of the aforementioned technologies, this application provides an engine speed detection circuit, method, and electric vehicle. Based on the original amplitude of the actual magnetoelectric signal, it dynamically switches the comparison threshold level, thereby solving the problem of mismatch between the threshold setting and the actual signal, improving the accuracy and anti-interference capability of speed detection, while maintaining controllable hardware costs. The following embodiments are provided for illustration.
[0038] In one exemplary embodiment, this application provides an engine speed detection circuit, such as... Figure 1 As shown, the engine speed detection circuit 100 includes a primary reference circuit 130, a threshold gear circuit 150, and a controller 110. The primary reference circuit 130 and the threshold gear circuit 150 are both connected to the controller 110 and are also connected to the engine's magnetoelectric speed sensor.
[0039] Among them, the magnetoelectric speed sensor is a sensor that works based on the principle of electromagnetic induction. It is installed in the flywheel housing of the engine, etc. When the engine rotates, the gears cut magnetic field lines to generate an alternating induced electromotive force (i.e., a magnetoelectric signal). The frequency of the signal is proportional to the engine speed, and the amplitude increases with the increase of the speed. After processing, the magnetoelectric signal can be used to analyze the engine speed. For example, after being modulated into a square wave signal, the engine speed can be determined based on the change in level.
[0040] In this application, the magnetoelectric signal is modulated into a modulation signal after passing through a threshold gear circuit. The modulation signal is used to determine the engine speed. For example, the modulation signal refers to a standard square wave signal output after comparison processing by the threshold gear circuit. The high and low level transitions of this signal correspond to the engine speed, and the controller can calculate the speed by counting the transitions.
[0041] Specifically, the original reference circuit is used to transmit the magnetoelectric signal of the magnetoelectric speed sensor as the original signal to the controller. The controller switches the threshold level circuit based on the original signal so that the threshold level circuit is in the corresponding comparison threshold state. The threshold level circuit outputs a modulation signal to the controller based on the magnetoelectric signal.
[0042] The raw magnetoelectric signal output from the magnetoelectric speed sensor is split into two inputs: a raw reference circuit and a threshold circuit. The raw reference circuit transmits the magnetoelectric signal from the speed sensor as the raw signal to the controller. Based on the raw signal, the controller determines the comparison threshold for the threshold circuit and controls the threshold circuit to switch to the corresponding comparison threshold level. The magnetoelectric signal is then modulated by the threshold circuit, which has been adjusted to the corresponding level. The modulated signal is input to the controller, which analyzes the modulated signal to determine the engine speed, thus completing the engine speed detection.
[0043] The controller is typically a microcontroller unit (MCU, also known as a single-chip microcomputer) or an application-specific integrated circuit (ASIC), such as an MCU, DSP (Digital Signal Processor), or FPGA (Field Programmable Gate Array). The specific model is not limited here, as long as it has input and output pins. In this application, one input pin of the controller is connected to the original reference circuit to acquire the original signal; another pin, such as a general-purpose input / output (GPIO) pin, is connected to the gear control terminal of the threshold gear circuit, such as the control terminal of a threshold switch, to send gear shifting commands. A third pin can also receive the modulated signal output from the threshold gear circuit and calculate the engine speed by measuring its frequency or other parameter characteristics.
[0044] Based on the same technical concept, this application also provides an engine speed detection method, applied to the engine speed detection circuit described in the above embodiments. In one embodiment, the method is applied to... Figure 1 The following explanation uses controller 110 as an example, including steps 202 to 208. Figure 2 As shown.
[0045] Step 202: Obtain the original signal.
[0046] The original signal is obtained by the original reference circuit based on the magnetoelectric signal of the magnetoelectric speed sensor; the controller acquires the original magnetoelectric signal output by the magnetoelectric speed sensor without threshold comparison in real time through the original reference circuit.
[0047] Step 204: Determine the voltage threshold based on the original signal. The controller performs waveform analysis on the acquired original signal, extracts the signal amplitude characteristics, and determines the comparison voltage threshold to be used in the current cycle according to a preset mapping rule or algorithm.
[0048] In one embodiment, step 204, which determines the voltage threshold based on the original signal, includes the following steps:
[0049] Step 302: The zero-crossing point between two consecutive falling edges in the original signal is taken as the recording period. Here, a falling edge refers to the process of the signal transitioning from a high level to a low level; a zero-crossing point refers to the moment when the signal waveform crosses the 0V reference point (or a set reference level). Specifically, the controller continuously monitors the voltage value of the original signal. Each time a falling edge zero-crossing point is detected, it marks the beginning of a new signal period, and the end of the previous period. The time interval between two consecutive falling edge zero-crossing points is defined as a complete recording period.
[0050] Step 304: The maximum voltage value in the recording period is identified as the voltage threshold. Within a recording period, the controller acquires the instantaneous value of the original signal at a high sampling rate and continuously compares and updates it with the maximum value stored in the current period. When the period ends (i.e., the next falling edge crosses zero), the maximum voltage value recorded in this period is output as the peak value of the original signal, and the final comparison voltage threshold is calculated based on this peak value.
[0051] In this embodiment, peak value tracking is achieved through real-time periodic recording and updating. For example, if the original signal peak value is 10V in a certain period, the comparison threshold is set to half of it, i.e., 5V; if the peak value is 6V in the next period, the threshold is automatically adjusted to 3V. This method can adaptively adapt to changes in signal amplitude cycle by cycle, with an extremely fast response speed.
[0052] Step 206: Switch the threshold level circuit to the appropriate level based on the voltage threshold of the current cycle, so that the threshold level circuit is in the comparison threshold state corresponding to the specified level. Specifically, the controller outputs a control command to switch the threshold level circuit to the comparison threshold state corresponding to the specified level via an electronic switch inside the threshold level circuit, such as a threshold switching switch.
[0053] Step 208: Receive the modulation signal output from the threshold gear circuit and determine the engine speed based on the modulation signal. The controller receives the standard square wave modulation signal output from the threshold gear circuit and calculates the current engine speed by measuring the square wave frequency or period.
[0054] In this embodiment, by setting up an independent raw signal acquisition channel and dynamically configuring the comparison threshold based on the actual signal amplitude, the engine speed detection has high accuracy, strong anti-interference, adaptability to installation differences, and controllable cost.
[0055] Furthermore, in one embodiment, the engine speed detection circuit also includes a preprocessing circuit connected to the original reference circuit, the threshold gear circuit, and the magneto-electric speed sensor.
[0056] Specifically, the preprocessing circuit is used to attenuate the high-voltage signal output by the magnetoelectric speed sensor to ensure the safety of the engine speed detection circuit. If the engine speed detection circuit does not include the preprocessing circuit, the high-voltage signal directly output by the magnetoelectric speed sensor is a magnetoelectric signal. In embodiments that include the preprocessing circuit, the signal attenuated by the preprocessing circuit is used as the magnetoelectric signal.
[0057] like Figure 3 As shown, the preprocessing circuit 170 includes resistors R1-R6, which attenuate the input signal through R4 / R5 / R6. The voltage ΔU across diode D1 after attenuation is calculated as follows:
[0058] △U=(U+-U-)·R6 / (R4+R5+R6)
[0059] Diode D1 is used to limit the input voltage to prevent excessive input voltage from damaging components (such as U1 / U2 / U5).
[0060] Furthermore, resistors R1 / R2 divide V1 to create a voltage bias at the negative input of U1, which is used to ensure compatibility with HALL signal acquisition.
[0061] Reference Figure 3 For example, in one embodiment, the original reference circuit includes a high-voltage precision amplifier U5 for converting the double-ended input voltage in the magnetoelectric signal of the magnetoelectric speed sensor into a single-ended voltage so that the controller can receive and acquire it. The advantage of converting to a single-ended voltage is that it is easier for the controller to identify the voltage amplitude and can be adapted to more types of controllers, such as microcontrollers.
[0062] In one embodiment, such as Figure 3 As shown, the threshold gear circuit includes an initial gear circuit 151 and a comparison gear circuit 153. Both the initial gear circuit 151 and the comparison gear circuit 153 are connected to a magnetoelectric speed sensor and are also connected to a controller 110.
[0063] The initial threshold circuit provides a fixed, low comparison threshold for initial capture after engine start or signal loss. This threshold is typically set to correspond to the minimum signal amplitude from the sensor at the minimum starting speed. The comparison threshold circuit provides multiple configurable, higher comparison thresholds for signal processing during normal engine operation. These thresholds dynamically switch based on the original signal amplitude.
[0064] Furthermore, such as Figure 3 As shown, the threshold gear circuit also includes a differential amplifier unit 155, which is connected to the magnetoelectric speed sensor, the initial gear circuit 151, and the comparison gear circuit 153. Specifically, before the magnetoelectric signal is received by the initial gear circuit and the comparison gear circuit, the signal is processed by the differential amplifier unit. This can work in conjunction with the preprocessing circuit to process the magnetoelectric signal, thereby improving the accuracy of speed detection.
[0065] Figure 3 U1 and U2 in the diagram are differential operational amplifiers, which serve the functions of converting dual-ended to single-ended voltage and amplifying voltage, similar to the function of U5. The output voltage of U1 / U2 can be expressed as:
[0066] U1 OUT =△U·R10 / R7
[0067] The resistance values of the resistors are in the following relationships: R4=R5; R7=R8; R9=R10.
[0068] U2 OUT =△U·R19 / R27
[0069] The resistance values of the resistors are in the following relationships: R4=R5; R27=R28; R19=R20.
[0070] In one embodiment, the threshold level circuit further includes a detection selection switch. The input contact of the detection selection switch is connected to the initial level circuit and the comparison level circuit, and the output contact and control terminal of the detection selection switch are both connected to the controller. Figure 3 In the middle, the detection selection switch is a two-to-one switch U6. The controller can select the circuit to be connected through the two-to-one switch to obtain the modulation signal.
[0071] In one embodiment, such as Figure 3 As shown, the initial gear circuit 151 includes a first clamping diode D3, a first comparator U4, and a first threshold resistor R25. The first clamping diode D3 is connected to the magneto-electric speed sensor and the inverting input terminal of the first comparator U4. The output terminal of the first comparator U4 is connected to the controller 110. The first threshold resistor R25 is configured at the non-inverting input terminal of the first comparator U4 to adjust the comparison threshold of the initial gear circuit.
[0072] Similarly, such as Figure 3In one embodiment, the comparison range circuit includes a second clamping diode D2, a second comparator U3, a threshold switching switch, and a plurality of second threshold resistors (R16-R18). The second clamping diode D2 is connected to the magneto-electric speed sensor and the inverting input terminal of the second comparator U3. The output terminal of the second comparator U3 is connected to the controller 110. The non-inverting input terminal of the second comparator U3 is connected to the threshold switching switch. The threshold switching switch is connected to the controller 110 and each of the second threshold resistors, and is used to adjust the comparison threshold of the comparison range circuit under the control of the controller 110.
[0073] Specifically, D2 and D3 are clamping diodes. When the input signal is a magnetoelectric signal, the output voltage of U1 and U2 has a large negative voltage. D2 and D3 clamp the voltage to about -0.3V for subsequent zero-crossing comparison.
[0074] U3 and U4 are comparators, and different comparison thresholds can be configured by adjusting the resistors. Details are as follows:
[0075] For U3, the resistance value of the connected second threshold resistor can be adjusted by the comparison threshold switching switch. Taking the connected second threshold resistor as RX as an example:
[0076] positive input voltage V T+ =V OUT_high ·RX / (RX+R13), reverse input voltage V T- =V OUT_low ·RX / (RX+R13), where RX is configured with R16 / R17 / R18, and can be connected individually or in parallel with two or three resistors. More resistors can also be configured; this is not limited here. V OUT_low V is the actual output voltage when the comparator output is low. OUT_high This is the actual output voltage when the comparator output is high.
[0077] For U4:
[0078] V T+ =V1·R29 / (R23+R26+R29)·(R24 / / R23+R26+R29) / ((R24 / / R23+R26+R29)+R25), V T- =V1·R23·R25 / (R23+R29)·(R24+R25). Where / / represents the parallel structure in the circuit.
[0079] The following is an example: During the application process, after the MCU is powered on and initialized or after the loss of the magneto-electric speed signal is detected, the threshold of the magneto-electric speed signal is configured to a low threshold mode by configuring the two-to-one switch U6, that is, the initial gear circuit is turned on. At this time, the hardware circuit will switch to receive the modulation signal processed by U2 and U4.
[0080] After identifying the first valid signal, the software continuously acquires the signal amplitude after processing by U5. The original signal amplitude range supports 0.3V~100V, and the corresponding voltage ranges entering the microcontroller are shown in Table 1 below:
[0081] Table 1
[0082]
[0083] The microcontroller acquires and calculates the maximum voltage value between the zero-crossing points of two adjacent falling edges. The specific method is as follows: The voltage signal processed by U5 is continuously acquired. A recording period is defined as two adjacent zero-crossing points of falling edges. When the newly acquired voltage value is greater than the maximum voltage value within the current recording period, the maximum voltage value is updated to the newly acquired voltage value. The maximum voltage value V within the current acquisition period is recorded at the zero-crossing point of the falling edge. max The high threshold level is calculated based on the maximum voltage value. Simultaneously, the maximum voltage value is reset to zero, and maximum voltage acquisition restarts for the next recording cycle. The microcontroller performs different threshold matching based on the voltage range of the maximum voltage value acquired in each recording cycle and configures corresponding resistor selection switches. The different threshold matching conditions are as follows:
[0084] Table 2
[0085]
[0086] V1, V2, and V3 represent the maximum raw voltage range corresponding to different voltage thresholds, based on the maximum raw voltage value V in the previous acquisition period. max Make a selection.
[0087] In the embodiments described above, the speed threshold is determined based on the original signal amplitude range. The threshold can be calculated based on the actual speed signal voltage, making it less affected by the consistency of installation gaps. Furthermore, magnetoelectric speed signals for the corresponding gears are acquired, adapting to the original signal amplitude under different operating conditions. Different thresholds can be configured simply by selecting the resistor path in the circuit. This effectively solves the problems of interference signal differences at different speeds and the impact of individual engine assembly differences on the normal speed signal.
[0088] Based on the foregoing description and the same technical concept, this application also provides an electric vehicle, which includes an engine, a magnetoelectric speed sensor, and an engine speed detection circuit as described in the above embodiments. The magnetoelectric speed sensor is disposed in the engine and is used to generate a magnetoelectric signal based on the engine speed. The engine speed detection circuit is connected to the magnetoelectric speed sensor and detects the engine speed based on the engine speed detection method described in the above embodiments. The engine speed detection circuit and engine speed detection method have been described in detail in the above embodiments and will not be repeated here.
[0089] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0090] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0091] Based on the same inventive concept, this application also provides an engine speed detection device for implementing the engine speed detection method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations of one or more engine speed detection device embodiments provided below can be found in the limitations of the engine speed detection method described above, and will not be repeated here.
[0092] In one embodiment, an engine speed detection device is provided, comprising: an output module, an input module, and a calculation module, wherein:
[0093] The initial input module is used to acquire the original signal; the original signal is obtained by the original reference circuit based on the magnetoelectric signal of the magnetoelectric speed sensor.
[0094] The threshold calibration module is used to determine the voltage threshold based on the original signal.
[0095] The threshold switching module is used to switch the threshold level circuit according to the voltage threshold of the current cycle, so that the threshold level circuit is in the comparison threshold state corresponding to the level.
[0096] The speed analysis module is used to receive the modulation signal output by the threshold gear circuit and determine the engine speed based on the modulation signal.
[0097] Each module in the aforementioned engine speed detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.
[0098] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements an engine speed detection method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0099] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0100] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0101] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0102] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0103] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0104] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0105] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An engine speed detection circuit, characterized in that, The engine speed detection circuit includes a raw reference circuit, a threshold gear circuit, and a controller. The raw reference circuit and the threshold gear circuit are both connected to the controller and are also connected to the engine's magnetoelectric speed sensor. The original reference circuit is used to transmit the magnetoelectric signal of the magnetoelectric speed sensor as the original signal to the controller. The controller switches the gear of the threshold gear circuit based on the original signal so that the threshold gear circuit is in the corresponding comparison threshold state. The threshold gear circuit outputs a modulation signal to the controller based on the magnetoelectric signal. The modulation signal is used to determine the engine speed. The threshold gear circuit includes an initial gear circuit and a comparison gear circuit. Both the initial gear circuit and the comparison gear circuit are connected to the magnetoelectric speed sensor and the controller. The initial gear circuit includes a first clamping diode, a first comparator, and a first threshold resistor. The first clamping diode is connected to the magnetoelectric speed sensor and the inverting input of the first comparator. The output of the first comparator is connected to the controller. The inverting input of the first comparator is equipped with a first threshold resistor for adjusting the comparison threshold of the initial gear circuit. The comparison range circuit includes a second clamping diode, a second comparator, a threshold switching switch, and multiple second threshold resistors. The second clamping diode is connected to the magneto-electric speed sensor and the inverting input terminal of the second comparator. The output terminal of the second comparator is connected to the controller. The inverting input terminal of the second comparator is connected to the threshold switching switch. The threshold switching switch is connected to the controller and each of the second threshold resistors, and is used to adjust the comparison threshold of the comparison range circuit under the control of the controller. The threshold level circuit also includes a detection selection switch. The input contact of the detection selection switch is connected to the initial level circuit and the comparison level circuit. The output contact and control terminal of the detection selection switch are both connected to the controller. The threshold gear circuit also includes a differential amplifier unit, which is connected to the magnetoelectric speed sensor, the initial gear circuit, and the comparison gear circuit.
2. The engine speed detection circuit according to claim 1, characterized in that, The engine speed detection circuit also includes a preprocessing circuit, which is connected to the original reference circuit, the threshold gear circuit and the magnetoelectric speed sensor.
3. An engine speed detection method, applied to the engine speed detection circuit according to claim 1 or 2, characterized in that, The method includes: Acquire the original signal; the original signal is obtained by the original reference circuit based on the magnetoelectric signal of the magnetoelectric speed sensor; The voltage threshold is determined based on the original signal; The threshold level circuit is switched according to the voltage threshold so that the threshold level circuit is in a comparison threshold state corresponding to the level. The system receives the modulation signal output by the threshold gear circuit and determines the engine speed based on the modulation signal.
4. The engine speed detection method according to claim 3, characterized in that, Determining the voltage threshold based on the original signal includes: The zero-crossing point of two adjacent falling edges in the original signal is taken as the recording period; The maximum voltage value in the recording period is identified as the voltage threshold.
5. An electric vehicle, characterized in that, The electric vehicle includes an engine, a magnetoelectric speed sensor, and an engine speed detection circuit as described in claim 1 or 2. The magnetoelectric speed sensor is disposed on the engine and is used to generate a magnetoelectric signal based on the engine speed. The engine speed detection circuit is connected to the magnetoelectric speed sensor and detects the engine speed based on the engine speed detection method as described in claim 3 or 4.