Sensor detection method and apparatus, hall sensor, medium and product

By detecting the count value and signal reversal of the Hall sensor signal, and using signal processing methods to determine electromagnetic interference, the problem of Hall sensor signals being susceptible to electromagnetic interference is solved, and low-cost and high-efficiency electromagnetic interference detection is achieved.

CN122260198APending Publication Date: 2026-06-23SHANGHAI INTEGRATED CIRCUIT RESEARCH & DEVELOPMENT CENTER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI INTEGRATED CIRCUIT RESEARCH & DEVELOPMENT CENTER CO LTD
Filing Date
2024-12-20
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In the existing technology, the signal output of Hall sensors is susceptible to electromagnetic interference from circuits and other electronic devices, which can lead to signal distortion or false triggering, and the cost of electromagnetic interference detection is relatively high.

Method used

Electromagnetic interference is determined by detecting whether the count value of the induced signal generated by the Hall sensor's magnetic field is greater than the counting threshold, and updating the count value when the signal flips. No additional hardware equipment is required.

Benefits of technology

It reduces the cost of electromagnetic interference detection, improves the accuracy of detection and the reliability of Hall sensors, and simplifies the electromagnetic interference detection process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122260198A_ABST
    Figure CN122260198A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a sensor detection method and device, a Hall sensor, a medium and a product. The method comprises: detecting whether a count value corresponding to a current to-be-processed signal generated by the Hall sensor is greater than a count threshold; if the current count value is greater than the count threshold, it is determined that the Hall sensor has electromagnetic interference; wherein the count value represents the number of signal flips of the to-be-processed signal, if the current count value is not greater than the count threshold and the count value is reset to zero when the signal value in any period of the to-be-processed signal is greater than the signal conversion threshold of the period, if the count value increases beyond the count threshold because it has not been reset to zero, it indicates that the conversion threshold is abnormally increased due to electromagnetic interference. The scheme of the present application detects electromagnetic interference by signal processing, without the need to set electromagnetic interference detection hardware, thereby reducing the detection cost of electromagnetic interference.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of sensors, and more particularly to a sensor detection method, apparatus, Hall sensor, medium, and product. Background Technology

[0002] A Hall sensor is a semiconductor device that uses the Hall effect to detect magnetic fields. Hall sensors are widely used in various applications, such as position and speed detection in the automotive industry, touchscreens and switches in consumer electronics, and non-contact sensing and measurement in medical devices. However, in practical circuit systems, the signal output of a Hall sensor is susceptible to electromagnetic interference from circuits and other electronic components.

[0003] Current electromagnetic interference (EMI) detection solutions typically employ hardware devices such as oscilloscopes and spectrum analyzers, or electronic components like probes, for EMI detection. However, these hardware devices and components increase the number of components in the Hall sensor, raising the cost of EMI detection. Therefore, the current challenge is to reduce the cost of EMI detection. Summary of the Invention

[0004] This application provides a sensor detection method, apparatus, Hall sensor, medium, and product to reduce the cost of electromagnetic interference detection.

[0005] In a first aspect, embodiments of this application provide a sensor detection method, comprising: detecting whether a count value corresponding to a current signal to be processed is greater than a counting threshold; wherein the signal to be processed is an induced signal generated by a Hall sensor sensing a magnetic field, and the count value represents the number of signal flips of the signal to be processed; if the current count value is not greater than the counting threshold and the signal value in any period of the signal to be processed is greater than the signal conversion threshold of that period, the count value is reset to zero; wherein the signal conversion threshold of any period is determined based on the DC component of the previous period; if the current count value is greater than the counting threshold, it is determined that the Hall sensor has electromagnetic interference.

[0006] In one possible implementation, the method further includes incrementing the count value by one when the signal to be processed undergoes a signal flip.

[0007] In one possible implementation, when the signal to be processed undergoes a signal flip, the count value is incremented by one, including: when an upward event is detected, the count value is incremented by one; wherein, an upward event includes: the signal direction of the signal to be processed after flipping is upward, and the signal value of the signal to be processed is greater than a first threshold; when a downward event is detected, the count value is incremented by one; wherein, a downward event includes: the signal direction of the signal to be processed after flipping is downward, and the signal value of the signal to be processed is less than a second threshold; wherein, the second threshold is less than the first threshold.

[0008] In one possible implementation, the method further includes: after detecting an upward event, if another upward event is detected, the count value is not updated; until a downward event is detected, the count value is incremented by one; after detecting a downward event, if another downward event is detected, the count value is not updated; until an upward event is detected, the count value is incremented by one.

[0009] In one possible implementation, the method further includes: acquiring the signal value of the signal to be processed at a first time and the signal value at a second time; wherein the first time is earlier than the second time; if the signal value at the first time is less than the signal value at the second time, then determining that the current signal direction of the signal to be processed is upward; if the signal value at the first time is greater than the signal value at the second time, then determining that the current signal direction of the signal to be processed is downward.

[0010] In one possible implementation, before detecting whether the count value corresponding to the current signal to be processed is greater than the counting threshold, the method further includes: detecting whether the difference between the maximum signal value and the minimum signal value in any period of the signal to be processed is greater than the noise threshold; if the difference is not greater than the noise threshold, then no processing is performed; detecting whether the count value corresponding to the current signal to be processed is greater than the counting threshold includes: if the difference is greater than the noise threshold, then detecting whether the count value corresponding to the current signal to be processed is greater than the counting threshold.

[0011] In one possible implementation, the method further includes performing a reset if electromagnetic interference is present in the Hall sensor.

[0012] Secondly, embodiments of this application provide a sensor detection device, comprising: a detection module, configured to detect whether a count value corresponding to a current signal to be processed is greater than a counting threshold; wherein the signal to be processed is an induced signal generated by a Hall sensor sensing a magnetic field, and the count value represents the number of signal flips of the signal to be processed; if the current count value is not greater than the counting threshold and the signal value in any period of the signal to be processed is greater than the signal conversion threshold of that period, the count value is reset to zero; wherein the signal conversion threshold of any period is determined based on the DC component of the previous period; and a determination module, configured to determine that the Hall sensor has electromagnetic interference if the current count value is greater than the counting threshold.

[0013] Thirdly, embodiments of this application provide a Hall sensor for performing the first aspect and / or various possible implementations of the first aspect as described above; or the Hall sensor includes the second aspect and / or various possible implementations of the second aspect as described above.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0015] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0016] In the sensor detection method, apparatus, device, medium, and product provided in this application, it is determined whether the count value corresponding to the current signal to be processed generated by the Hall sensor is greater than a counting threshold. If the current count value is greater than the counting threshold, it is determined that the Hall sensor is experiencing electromagnetic interference. The count value represents the number of signal transitions of the signal to be processed. If the current count value is not greater than the counting threshold and the signal value in any period of the signal to be processed is greater than the signal transition threshold for that period, the count value is reset to zero. If the count value increases beyond the counting threshold because it is not reset to zero, it indicates that the transition threshold has increased abnormally due to electromagnetic interference. The solution in this application detects electromagnetic interference through signal processing, eliminating the need for electromagnetic interference detection hardware and reducing the cost of electromagnetic interference detection. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] Figure 1 A schematic flowchart of the sensor detection method provided in this application;

[0019] Figure 2 A schematic flowchart of the sensor detection method provided in this application;

[0020] Figure 3 A schematic flowchart of the sensor detection method provided in this application;

[0021] Figure 4 A schematic flowchart of the sensor detection method provided in this application;

[0022] Figure 5 A schematic flowchart of the sensor detection method provided in this application;

[0023] Figure 6 This is a schematic diagram of the sensor detection device provided in this application.

[0024] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0025] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0026] A Hall effect sensor is a semiconductor device that uses the Hall effect to detect magnetic fields. Its working principle is based on the fact that when an electric current passes through a semiconductor material, a magnetic field perpendicular to the current direction generates a voltage difference within the material. This voltage difference can be used to measure the strength and direction of the magnetic field. Hall effect sensors are widely used in various applications due to their high sensitivity, reliability, and non-contact measurement capabilities. In the automotive industry, Hall effect sensors are widely used for position and speed detection. For example, they can be used to detect the position of the crankshaft and camshaft to ensure precise ignition and fuel injection timing of the engine. In consumer electronics, Hall effect sensors are commonly used in touchscreens and switches.

[0027] However, in practical circuit systems, the signal output of Hall sensors is susceptible to electromagnetic interference from circuits and other electronic components. This interference can lead to signal distortion or false triggering, affecting the performance and reliability of the equipment. Therefore, real-time detection of electromagnetic interference is particularly important. Related technologies typically require the use of hardware devices such as oscilloscopes and spectrum analyzers, or the addition of other electromagnetic devices such as probes to mitigate electromagnetic interference. However, this approach increases the number of hardware devices and components required, leading to an increase in the number of circuit system modules housing the Hall sensor and raising the overall system construction cost. Therefore, the current challenge is to reduce the cost of electromagnetic interference detection.

[0028] The technical content provided in this application is only for solving the above-mentioned technical problems in related technologies. In the sensor detection method, apparatus, Hall sensor, medium, and product provided in the embodiments of this application, it is determined whether the count value corresponding to the current signal to be processed generated by the Hall sensor is greater than a counting threshold; if the current count value is greater than the counting threshold, it is determined that the Hall sensor has electromagnetic interference; wherein, the count value represents the number of signal transitions of the signal to be processed; if the current count value is not greater than the counting threshold and the signal value in any period of the signal to be processed is greater than the signal transition threshold of that period, the count value is reset to zero; if the count value increases beyond the counting threshold because it is not reset to zero, it indicates that the transition threshold has increased abnormally due to electromagnetic interference. The solution of this application detects electromagnetic interference through signal processing, eliminating the need for electromagnetic interference detection hardware and reducing the detection cost of electromagnetic interference.

[0029] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0030] Figure 1 This is a schematic flowchart of the sensor detection method provided in the embodiments of this application, as shown below. Figure 1 As shown, the method includes:

[0031] Step 101: Detect whether the count value corresponding to the current signal to be processed is greater than the count threshold; wherein, the signal to be processed is the induced signal generated by the Hall sensor sensing the magnetic field, and the count value represents the number of signal flips of the signal to be processed;

[0032] Step 102: If the current count value is not greater than the count threshold and the signal value in any period of the signal to be processed is greater than the signal conversion threshold of that period, the count value is reset to zero; wherein, the signal conversion threshold of any period is determined based on the DC component of the previous period.

[0033] Step 103: If the current count value is greater than the count threshold, it is determined that the Hall sensor is experiencing electromagnetic interference.

[0034] In practical applications, the execution entity of this method can be a sensor detection device, which can be implemented in various ways. For example, it can be implemented through a computer program, such as application software; or it can be implemented through a physical device that integrates or installs relevant computer programs, such as a chip. In practical applications, the sensor detection device is also integrated into the Hall sensor. Optionally, the execution entity of this method can also be the processor of the Hall sensor.

[0035] In this example, the signal to be processed is the induced signal generated by the Hall sensor sensing the magnetic field. This induced signal is a periodic and continuous signal, such as a sine wave or sawtooth wave, similar to the hardware architecture of the Hall sensor. The induced signal can be an analog or digital signal. In practical applications, when multiple Hall sensors exist, each Hall sensor has a corresponding induced signal, and a corresponding count value can be created for each induced signal. Specifically, a count variable corresponding to the induced signal can be created by defining a variable, and the count value can be modified or updated by assigning values ​​to the variable. For example, the count value represents the number of signal transitions of the signal to be processed, specifically the number of times the signal changes from one state (e.g., high level) to another state (e.g., low level) within a certain time. In practical applications, the more signal transitions, the larger the count value, which can be represented by numbers or letters.

[0036] For example, based on different period definitions, the number of signal flips within a period is fixed, such as two or three, and the count value is reset to zero when the signal value in any period of the signal to be processed exceeds the signal transition threshold of that period. Therefore, it can be understood that this embodiment is applicable to scenarios where the signal to be processed is in an upward phase from the beginning of the period. The count value is reset to zero when the signal value in each period exceeds the signal transition threshold of that period, and the number of signal flips in that period is subsequently recorded. On one hand, if electromagnetic interference in a period causes an abnormal increase in the number of signal flips in that period, exceeding the aforementioned fixed number of flips, the anomaly can be recorded through the count value and used for subsequent electromagnetic interference determination. On the other hand, if electromagnetic interference exists in a period but does not cause an increase in the number of signal flips in that period, the DC component of that period will be increased due to the characteristic that electromagnetic interference causes the signal to jump abnormally upwards. Furthermore, this increased DC component will prevent the signal in the next period from exceeding the signal transition threshold, thus preventing the count from being reset to zero and exceeding the aforementioned fixed number of flips. It should be noted that in this embodiment, the DC component of a period or the DC component of a certain period refers to the DC component of the signal within that period. The anomaly can also be recorded using a count value and used for subsequent electromagnetic interference determination. It should also be noted that in related technologies, for a certain type of Hall sensor, the signal conversion threshold is the threshold required to convert the induced signal generated by the magnetic field of that type of Hall sensor into other forms of induced signal, such as converting the generated sinusoidal induced signal into a pulse induced signal. In practical applications, to determine the signal conversion threshold, it can be directly obtained for Hall sensors that require signal conversion; while for Hall sensors that do not require signal conversion, it can be determined based on the DC component of the previous period. Specifically, the DC component of the previous period can be used as the signal conversion threshold; or the gain or modified result of the DC component of the previous period can be used as the signal conversion threshold.

[0037] In this example, if the current count value is greater than the counting threshold, the Hall sensor is determined to be experiencing electromagnetic interference. In practical applications, the technical threshold can be calibrated experimentally by technicians during the testing phase. For example, for a signal to be processed with a fixed cycle of two flips, the corresponding signal conversion threshold could be four flips.

[0038] In the sensor detection method provided in this application, it is detected whether the count value corresponding to the current signal to be processed generated by the Hall sensor is greater than a counting threshold. If the current count value is greater than the counting threshold, it is determined that the Hall sensor is experiencing electromagnetic interference. The count value represents the number of signal transitions of the signal to be processed. If the current count value is not greater than the counting threshold and the signal value in any period of the signal to be processed is greater than the signal transition threshold for that period, the count value is reset to zero. If the count value increases beyond the counting threshold because it is not reset to zero, it indicates that the transition threshold has increased abnormally due to electromagnetic interference. This application's solution detects electromagnetic interference through signal processing, eliminating the need for electromagnetic interference detection hardware and reducing the cost of electromagnetic interference detection.

[0039] As yet another example, based on any example, the sensor detection method further includes: incrementing the count value by one when the signal to be processed undergoes a signal inversion.

[0040] The solution in this example increments the count value by one when the signal to be processed undergoes a signal flip, which can accurately record the number of signal flips and simplify the counting process.

[0041] Figure 2 This is a schematic flowchart illustrating the sensor detection method provided in an embodiment of this application. Figure 2 As shown, based on any example, when the signal to be processed undergoes a signal inversion, the count value is incremented by one, specifically including:

[0042] Step 201: When an upward event is detected, increment the count value by one; wherein, an upward event includes: the signal direction of the signal to be processed after flipping is upward, and the signal value of the signal to be processed is greater than the first threshold.

[0043] Step 202: When a drop event is detected, increment the count value by one; wherein, a drop event includes: the signal direction of the signal to be processed after flipping is downward, and the signal value of the signal to be processed is less than the second threshold; wherein, the second threshold is less than the first threshold.

[0044] In this example, the reversal of the signal to be processed refers to the change in the direction of the signal from one direction to the opposite direction, such as changing from "down" to "up" in a digital signal, or the change in the slope of a signal in an analog signal. In practical applications, signal sampling and filtering are performed on the signal to be processed. For example, an appropriate sampling rate is selected to ensure that the signal changes can be accurately captured, and low-pass filters or other signal processing techniques are used to reduce the impact of noise on signal reversal detection. In this example, after determining the signal direction after the reversal, it is also necessary to determine the change in the signal value of the signal to be processed relative to a threshold, which can avoid false detections due to noise or small fluctuations. In practical applications, the selection of the first and second thresholds should be based on the characteristics of the signal and application requirements. Typically, these thresholds can be adjusted using experimental data or historical data. The scheme in this example improves the accuracy of signal reversal detection by detecting the signal direction of the signal to be processed after the reversal, comparing the signal value with the threshold, and then updating the count value.

[0045] Figure 3 This is a schematic flowchart illustrating the sensor detection method provided in an embodiment of this application. Figure 3 As shown, based on any example, the sensor detection method further includes:

[0046] Step 301: After an upward event is detected, if another upward event is detected, the count value is not updated; until a downward event is detected, the count value is incremented by one.

[0047] Step 302: After a fall event is detected, if another fall event is detected, the count value is not updated; until an rise event is detected, the count value is incremented by one.

[0048] In practical applications, a state machine can be designed to track the current signal state. Specifically, the state machine has two states: a rising state and a falling state; when a rising event is detected, the state machine switches to the rising state; when a falling event is detected, the state machine switches to the falling state. In practical applications, de-jitter algorithms can also be implemented on the signal to be processed, such as using time windows or filtering techniques, to ensure the stability of signal transitions. The scheme in this example avoids double counting by incrementing the count value after a rising event is detected and then incrementing it again after a falling event is detected.

[0049] Figure 4 This is a schematic flowchart illustrating the sensor detection method provided in an embodiment of this application. Figure 4 As shown, based on any example, the sensor detection method further includes:

[0050] Step 401: Obtain the signal value of the signal to be processed at the first time and the signal value at the second time; wherein the first time is earlier than the second time.

[0051] Step 402: If the signal value at the first moment is less than the signal value at the second moment, then the current signal direction of the signal to be processed is determined to be upward.

[0052] Step 403: If the signal value at the first moment is greater than the signal value at the second moment, then the current signal direction of the signal to be processed is determined to be downward.

[0053] In practical applications, a suitable frequency for acquiring the signal value of the signal to be processed can be selected to ensure accurate capture of signal changes. For example, following the Nyquist sampling theorem, the acquisition frequency should be at least twice the highest frequency of the signal. For instance, a suitable time interval needs to be selected, i.e., the interval between the first and second moments, to ensure effective detection of the signal's direction of change. In this example, the direction can be determined through a simple comparison operation, improving the real-time performance of the solution. It is also applicable to various types of signals, whether analog or digital, as long as sampling and comparison are possible.

[0054] Figure 5 This is a schematic flowchart illustrating the sensor detection method provided in an embodiment of this application. Figure 5 As shown, based on any example, before detecting whether the count value corresponding to the current signal to be processed is greater than the count threshold in step 101, the method further includes:

[0055] Step 501: Detect whether the difference between the maximum and minimum signal values ​​in any period of the signal to be processed is greater than the noise threshold;

[0056] Step 501: If the difference is not greater than the noise threshold, no processing is performed;

[0057] Step 101 involves detecting whether the count value corresponding to the current signal to be processed is greater than the count threshold, including:

[0058] Step 503: If the difference is greater than the noise threshold, then check whether the count value corresponding to the current signal to be processed is greater than the count threshold.

[0059] For example, the signal period of the signal to be processed can be determined through spectral analysis such as Fourier transform, or by detecting the zero-crossing points of the signal (the transition points from positive to negative or from negative to positive). In practical applications, considering the low signal strength of the noise input, noise filtering can be achieved by calculating the amplitude of the signal to be processed, i.e., the difference between the maximum and minimum signal values ​​within the signal period, and comparing it with a preset threshold. For example, the preset threshold can be set based on experience or historical data, or by analyzing the statistical characteristics of the signal (such as mean, standard deviation), for example, it can be set as a multiple of the signal standard deviation. Optionally, the preset threshold can be dynamically adjusted according to the real-time signal characteristics. For example, an adaptive algorithm can be used to adjust the threshold based on short-term changes in the signal. The scheme in this example achieves noise filtering by standardizing the signal to be processed based on the preset threshold, and only processes signals exceeding the threshold, thereby reducing processing time and latency and improving the real-time performance of the system.

[0060] As yet another example, based on any example, the sensor detection method further includes: performing a reset if electromagnetic interference is present in the Hall sensor.

[0061] In this example, the object being reset can be the electromagnetic interference (EMI) detection circuit or the EMI detection logic. Optionally, the Hall sensor itself can also be reset, thereby resetting the EMI detection circuit or logic within the Hall sensor. In practical applications, the Hall sensor's reset process is automatically triggered upon detecting EMI. This can be achieved through a hardware reset signal or software control. Optionally, a manual reset option can be provided to notify the operator to perform a manual reset if the automatic reset fails. This example solution, by resetting the Hall sensor, can quickly restore the sensor to its normal operating state when EMI occurs, improving system reliability.

[0062] In the sensor detection method provided in this application, it is detected whether the count value corresponding to the current signal to be processed generated by the Hall sensor is greater than a counting threshold. If the current count value is greater than the counting threshold, it is determined that the Hall sensor is experiencing electromagnetic interference. The count value represents the number of signal transitions of the signal to be processed. If the current count value is not greater than the counting threshold and the signal value in any period of the signal to be processed is greater than the signal transition threshold for that period, the count value is reset to zero. If the count value increases beyond the counting threshold because it is not reset to zero, it indicates that the transition threshold has increased abnormally due to electromagnetic interference. This application's solution detects electromagnetic interference through signal processing, eliminating the need for electromagnetic interference detection hardware and reducing the cost of electromagnetic interference detection.

[0063] Figure 6 This is a schematic diagram of the sensor detection device provided in this application, as shown below. Figure 6As shown, the sensor detection device provided in this embodiment includes:

[0064] The detection module 61 is used to detect whether the count value corresponding to the current signal to be processed is greater than the counting threshold; wherein, the signal to be processed is the induced signal generated by the Hall sensor sensing the magnetic field, and the count value represents the number of signal flips of the signal to be processed; if the current count value is not greater than the counting threshold and the signal value in any period of the signal to be processed is greater than the signal conversion threshold of that period, the count value is reset to zero; wherein, the signal conversion threshold of any period is determined based on the DC component of the previous period.

[0065] The determination module 62 is used to determine that the Hall sensor is experiencing electromagnetic interference if the current count value is greater than the count threshold.

[0066] In practical applications, this sensor detection device can be implemented in various ways. For example, it can be implemented through computer programs, such as application software; or it can be implemented through a physical device that integrates or installs relevant computer programs, such as a chip. In practical applications, the sensor detection device is also integrated into the Hall sensor.

[0067] In this example, the signal to be processed is the induced signal generated by the Hall sensor sensing the magnetic field. This induced signal is a periodic and continuous signal, such as a sine wave or sawtooth wave, similar to the hardware architecture of the Hall sensor. The induced signal can be an analog or digital signal. In practical applications, when multiple Hall sensors exist, each Hall sensor has a corresponding induced signal, and a corresponding count value can be created for each induced signal. Specifically, a count variable corresponding to the induced signal can be created by defining a variable, and the count value can be modified or updated by assigning values ​​to the variable. For example, the count value represents the number of signal transitions of the signal to be processed, specifically the number of times the signal changes from one state (e.g., high level) to another state (e.g., low level) within a certain time. In practical applications, the more signal transitions, the larger the count value, which can be represented by numbers or letters.

[0068] For example, based on different period definitions, the number of signal flips within a period is fixed, such as two or three, and the count is reset to zero when the signal value in any period of the signal to be processed exceeds the signal transition threshold of that period. Therefore, it can be understood that the count is reset to zero when the signal value in each period exceeds the signal transition threshold, and the number of signal flips in that period is subsequently recorded. On one hand, if electromagnetic interference in a period causes an abnormal increase in the number of signal flips exceeding the aforementioned fixed number of flips, this anomaly can be recorded using the count and used for subsequent electromagnetic interference determination. On the other hand, if electromagnetic interference exists in a period but does not cause an increase in the number of signal flips, the DC component of that period will be increased due to the characteristic that electromagnetic interference causes abnormal upward jumps in the signal. Furthermore, this increased DC component will prevent the signal in the next period from exceeding the signal transition threshold, thus preventing it from resetting to zero and exceeding the aforementioned fixed number of flips. In this case, the anomaly can also be recorded using the count and used for subsequent electromagnetic interference determination. It should be noted that in related technologies, for a certain type of Hall sensor, the signal conversion threshold is the threshold required to convert the induced signal generated by the magnetic field of that type of Hall sensor into other forms of induced signal, such as converting the generated sinusoidal induced signal into a pulse induced signal. In practical applications, to determine the signal conversion threshold, it can be directly obtained for Hall sensors that require signal conversion; while for Hall sensors that do not require signal conversion, it can be determined based on the DC component of the previous cycle. Specifically, the DC component of the previous cycle can be used as the signal conversion threshold; or the gain or modified result of the DC component of the previous cycle can be used as the signal conversion threshold.

[0069] In this example, if the current count value is greater than the counting threshold, the Hall sensor is determined to be experiencing electromagnetic interference. In practical applications, the technical threshold can be calibrated experimentally by technicians during the testing phase. For example, for a signal to be processed with a fixed cycle of two flips, the corresponding signal conversion threshold could be four flips.

[0070] In the sensor detection device provided in this application embodiment, it is detected whether the count value corresponding to the current signal to be processed generated by the Hall sensor is greater than a counting threshold. If the current count value is greater than the counting threshold, it is determined that the Hall sensor is experiencing electromagnetic interference. The count value represents the number of signal transitions of the signal to be processed, and the count value is reset to zero when the signal value in any period of the signal to be processed is greater than the signal transition threshold for that period. If the count value increases beyond the counting threshold because it is not reset to zero, it indicates that the transition threshold has increased abnormally due to electromagnetic interference. The solution of this application detects electromagnetic interference through signal processing, eliminating the need for electromagnetic interference detection hardware and reducing the cost of electromagnetic interference detection.

[0071] In one example, the sensor detection device further includes a processing module 63; the processing module 63 is configured to increment the count value by one when the signal to be processed undergoes a signal inversion.

[0072] The solution in this example increments the count value by one when the signal to be processed undergoes a signal flip, which can accurately record the number of signal flips and simplify the counting process.

[0073] In one example, processing module 63 is specifically used for:

[0074] When an upward event is detected, the count value is incremented by one; wherein, an upward event includes: the signal direction of the signal to be processed after flipping is upward, and the signal value of the signal to be processed is greater than a first threshold;

[0075] When a drop event is detected, the count value is incremented by one; wherein, a drop event includes: the signal direction of the signal to be processed after flipping is downward, and the signal value of the signal to be processed is less than a second threshold; wherein, the second threshold is less than a first threshold.

[0076] In this example, the reversal of the signal to be processed refers to the change in the direction of the signal from one direction to the opposite direction, such as changing from "down" to "up" in a digital signal, or the change in the slope of a signal in an analog signal. In practical applications, signal sampling and filtering are performed on the signal to be processed. For example, an appropriate sampling rate is selected to ensure that the signal changes can be accurately captured, and low-pass filters or other signal processing techniques are used to reduce the impact of noise on signal reversal detection. In this example, after determining the signal direction after the reversal, it is also necessary to determine the change in the signal value of the signal to be processed relative to a threshold, which can avoid false detections due to noise or small fluctuations. In practical applications, the selection of the first and second thresholds should be based on the characteristics of the signal and application requirements. Typically, these thresholds can be adjusted using experimental data or historical data. The scheme in this example improves the accuracy of signal reversal detection by detecting the signal direction of the signal to be processed after the reversal, comparing the signal value with the threshold, and then updating the count value.

[0077] In one example, processing module 63 is also used for:

[0078] If an upward event is detected and another upward event is detected, the count value is not updated; the count value is incremented by one when a downward event is detected.

[0079] If a fall event is detected and another fall event is detected, the count value is not updated; the count value is incremented by one when a rise event is detected.

[0080] In practical applications, a state machine can be designed to track the current signal state. Specifically, the state machine has two states: a rising state and a falling state; when a rising event is detected, the state machine switches to the rising state; when a falling event is detected, the state machine switches to the falling state. In practical applications, de-jitter algorithms can also be implemented on the signal to be processed, such as using time windows or filtering techniques, to ensure the stability of signal transitions. The scheme in this example avoids double counting by incrementing the count value after a rising event is detected and then incrementing it again after a falling event is detected.

[0081] In one example, processing module 63 is also used for:

[0082] Acquire the signal value of the signal to be processed at the first time point and the signal value at the second time point; wherein the first time point is earlier than the second time point.

[0083] If the signal value at the first moment is less than the signal value at the second moment, then the current signal direction of the signal to be processed is determined to be upward.

[0084] If the signal value at the first moment is greater than the signal value at the second moment, then the current signal direction of the signal to be processed is determined to be downward.

[0085] In practical applications, a suitable frequency for acquiring the signal value of the signal to be processed can be selected to ensure accurate capture of signal changes. For example, following the Nyquist sampling theorem, the acquisition frequency should be at least twice the highest frequency of the signal. For instance, a suitable time interval needs to be selected, i.e., the interval between the first and second moments, to ensure effective detection of the signal's direction of change. In this example, the direction can be determined through a simple comparison operation, improving the real-time performance of the solution. It is also applicable to various types of signals, whether analog or digital, as long as sampling and comparison are possible.

[0086] In one example, the detection module 61 is further configured to: detect whether the difference between the maximum signal value and the minimum signal value in any period of the signal to be processed is greater than a noise threshold;

[0087] If the difference is not greater than the noise threshold, no processing is performed;

[0088] Detection module 61 is specifically used for:

[0089] If the difference is greater than the noise threshold, then check whether the count value corresponding to the current signal to be processed is greater than the count threshold.

[0090] For example, the signal period of the signal to be processed can be determined through spectral analysis such as Fourier transform, or by detecting the zero-crossing points of the signal (the transition points from positive to negative or from negative to positive). In practical applications, considering the low signal strength of the noise input, noise filtering can be achieved by calculating the amplitude of the signal to be processed, i.e., the difference between the maximum and minimum signal values ​​within the signal period, and comparing it with a preset threshold. For example, the preset threshold can be set based on experience or historical data, or by analyzing the statistical characteristics of the signal (such as mean, standard deviation), for example, it can be set as a multiple of the signal standard deviation. Optionally, the preset threshold can be dynamically adjusted according to the real-time signal characteristics. For example, an adaptive algorithm can be used to adjust the threshold based on short-term changes in the signal. The scheme in this example achieves noise filtering by standardizing the signal to be processed based on the preset threshold, and only processes signals exceeding the threshold, thereby reducing processing time and latency and improving the real-time performance of the system.

[0091] In one example, the decision module 62 is also used for:

[0092] If electromagnetic interference is present in the Hall sensor, a reset will be performed.

[0093] In this example, the object being reset can be the electromagnetic interference (EMI) detection circuit or the EMI detection logic. Optionally, the Hall sensor itself can also be reset, thereby resetting the EMI detection circuit or logic within the Hall sensor. In practical applications, the Hall sensor's reset process is automatically triggered upon detecting EMI. This can be achieved through a hardware reset signal or software control. Optionally, a manual reset option can be provided to notify the operator to perform a manual reset if the automatic reset fails. This example solution, by resetting the Hall sensor, can quickly restore the sensor to its normal operating state when EMI occurs, improving system reliability.

[0094] In the sensor detection device provided in this application embodiment, it is detected whether the count value corresponding to the current signal to be processed generated by the Hall sensor is greater than a counting threshold. If the current count value is greater than the counting threshold, it is determined that the Hall sensor has electromagnetic interference. The count value represents the number of signal transitions of the signal to be processed. If the current count value is not greater than the counting threshold and the signal value in any period of the signal to be processed is greater than the signal transition threshold of that period, the count value is reset to zero. If the count value increases beyond the counting threshold because it is not reset to zero, it indicates that the transition threshold has increased abnormally due to electromagnetic interference. The solution of this application detects electromagnetic interference through signal processing, eliminating the need for electromagnetic interference detection hardware and reducing the cost of electromagnetic interference detection.

[0095] This application also provides a Hall sensor for performing the method of any embodiment of this application; or the Hall sensor includes the apparatus of any embodiment of this application.

[0096] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0097] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0098] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A sensor detection method, characterized in that, The method includes: Detect whether the count value corresponding to the current signal to be processed is greater than the count threshold; wherein, the signal to be processed is the induced signal generated by the Hall sensor sensing the magnetic field, and the count value represents the number of signal flips of the signal to be processed; If the current count value is not greater than the count threshold, and the count value is set to zero when the signal value in any period of the signal to be processed is greater than the signal conversion threshold of that period; wherein, the signal conversion threshold of any period is determined based on the DC component of the previous period. If the current count value is greater than the count threshold, it is determined that the Hall sensor is experiencing electromagnetic interference.

2. The method according to claim 1, characterized in that, The method further includes: When the signal to be processed undergoes a signal flip, the count value is incremented by one.

3. The method according to claim 2, characterized in that, When the signal to be processed undergoes a signal inversion, incrementing the count value by one includes: When an upward event is detected, the count value is incremented by one; wherein, the upward event includes: the signal direction of the signal to be processed after flipping is upward, and the signal value of the signal to be processed is greater than a first threshold; When a drop event is detected, the count value is incremented by one; wherein, the drop event includes: the signal direction of the signal to be processed after flipping is downward, and the signal value of the signal to be processed is less than a second threshold; wherein, the second threshold is less than the first threshold.

4. The method according to claim 3, characterized in that, The method further includes: If an upward event is detected and another upward event is detected, the count value is not updated; the count value is incremented by one until a downward event is detected. If a fall event is detected and another fall event is detected, the count value is not updated; the count value is incremented by one until a rise event is detected.

5. The method according to claim 3, characterized in that, The method further includes: Acquire the signal value of the signal to be processed at a first time and at a second time; wherein the first time is earlier than the second time. If the signal value at the first moment is less than the signal value at the second moment, then the current signal direction of the signal to be processed is determined to be upward. If the signal value at the first moment is greater than the signal value at the second moment, then the current signal direction of the signal to be processed is determined to be downward.

6. The method according to claim 1, characterized in that, Before detecting whether the count value corresponding to the current signal to be processed is greater than the count threshold, the method further includes: Detect whether the difference between the maximum and minimum signal values ​​in any period of the signal to be processed is greater than a noise threshold; If the difference is not greater than the noise threshold, no processing is performed; The step of detecting whether the count value corresponding to the current signal to be processed is greater than the count threshold includes: If the difference is greater than the noise threshold, then it is detected whether the count value corresponding to the current signal to be processed is greater than the count threshold.

7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: If electromagnetic interference is present in the Hall sensor, a reset is performed.

8. A sensor detection device, characterized in that, The device includes: A detection module is used to detect whether the count value corresponding to the current signal to be processed is greater than a counting threshold; wherein, the signal to be processed is an induced signal generated by a Hall sensor sensing a magnetic field, and the count value represents the number of signal flips of the signal to be processed; if the current count value is not greater than the counting threshold and the signal value in any period of the signal to be processed is greater than the signal conversion threshold of that period, the count value is reset to zero; wherein, the signal conversion threshold of any period is determined based on the DC component of the previous period. The determination module is used to determine that the Hall sensor is subject to electromagnetic interference if the current count value is greater than the count threshold.

9. A Hall sensor, characterized in that, The Hall sensor is used to perform the method as described in any one of claims 1 to 7; or the Hall sensor includes the sensor detection device as described in claim 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 7.

11. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 7.