Angle sensor, angle detection method, medium and electronic equipment

By designing an angle sensor including main gear, gear, magnet and PCB board, the existing steering wheel sensor has solved the problem of complex structure and low safety performance, achieving simple structure, low cost and improved safety performance.

CN119756436APending Publication Date: 2025-04-04SHANGHAI LONGGAN AUTOMOTIVE ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411983984.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The existing steering wheel sensors are complex in structure and have low safety performance.

Method used

An angle sensor including a main gear, a first gear, a second gear, a first magnet, a second magnet, and a PCB board is designed. Through the rotational magnetic field detection of the first magnet and the second magnet, the angle value and angular velocity of the steering wheel rotation are obtained, and the fault information is monitored to improve safety performance.

Benefits of technology

It realizes a simple structure and low cost steering wheel angle sensor, and improves safety performance through the acquisition of fault information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119756436A_ABST
    Figure CN119756436A_ABST
Patent Text Reader

Abstract

The present disclosure provides an angle sensor, an angle detection method, a medium and an electronic device. The angle sensor includes: a main gear, which is arranged on a steering wheel rotation structure and rotates with the steering wheel; a first gear, which is arranged on one side of the main gear and meshes with the main gear; a second gear, which is arranged on the other side of the main gear and meshes with the main gear; a first magnet, which is arranged on the first gear; a second magnet, which is arranged on the second gear; a PCB board, which is used to detect the rotating magnetic field of the first magnet and the rotating magnetic field of the second magnet to obtain the first rotating magnetic field and the second rotating magnetic field, and obtain the angle value and angular velocity of the steering wheel rotation based on the first rotating magnetic field and the second rotating magnetic field, and obtain fault information. The angle sensor has the advantages of simple structure and low cost, and fault information can be obtained inside the sensor, thereby improving the safety performance of the angle sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the field of automobile angle sensors, and relates to angle sensors, and in particular to angle sensors, angle detection methods, media, and electronic equipment. Background Art

[0002] Automotive functional safety is to avoid unreasonable risks caused by electronic / electrical system failures. With the rapid popularization of automotive intelligence and automotive electronic technology, the number of controllers and electronic components in cars has increased, and the importance of automotive functional safety has also increased. More and more automotive electronic components need to meet functional safety requirements.

[0003] The automotive electronic stability program (ESP) plays a vital role in automotive safety. The steering wheel angle sensor is an important component of the automotive electronic stability program, and the design of the steering wheel angle sensor is particularly important. The current steering wheel sensor has the problems of complex structure and low safety performance. Summary of the invention

[0004] The purpose of the present disclosure is to provide an angle sensor, an angle detection method, a medium and an electronic device, so as to solve the problem that the current steering wheel sensor has a complex structure and low safety performance.

[0005] In the first aspect, an embodiment of the present disclosure provides an angle sensor, comprising: a main gear, which is arranged on a steering wheel rotation structure and rotates as the steering wheel rotates; a first gear, which is arranged on one side of the main gear and meshes with the main gear; a second gear, which is arranged on the other side of the main gear and meshes with the main gear; a first magnet, which is arranged on the first gear; a second magnet, which is arranged on the second gear; a PCB (printed circuit) board, which is used to detect the rotating magnetic field of the first magnet and the rotating magnetic field of the second magnet to obtain the first rotating magnetic field and the second rotating magnetic field, and obtain the angle value and angular velocity of the steering wheel rotation based on the first rotating magnetic field and the second rotating magnetic field, and obtain fault information.

[0006] In the angle sensor, the angle value and angular velocity of the steering wheel can be obtained according to the rotating magnetic field of the first magnet and the rotating magnetic field of the second magnet, and the angle sensor has the advantages of simple structure and low cost. In addition, fault information can be obtained inside the angle sensor, thereby improving the safety performance of the angle sensor.

[0007] In one embodiment of the present disclosure, the PCB board includes a first angle detection module, a second angle detection module and a controller module; the first angle detection module is used to detect the rotating magnetic field of the first magnet to obtain a first rotating magnetic field; obtain a first angle value based on the first rotating magnetic field; and transmit the first angle value to the controller module through a first SPI (serial peripheral interface) signal; the second angle detection module is used to detect the rotating magnetic field of the second magnet to obtain a second rotating magnetic field; obtain a second angle value based on the second rotating magnetic field; and transmit the second angle value to the controller module through a second SPI signal; the controller module is used to process the first SPI signal and the second SPI signal to obtain the angle value and angular velocity of the steering wheel rotation, and obtain the fault information.

[0008] In one embodiment of the present disclosure, the first angle detection module includes: a first capacitor, one end of which is grounded; a first chip, pin 1 of the first chip is connected to a power supply voltage and the other end of the first capacitor, pins 2, 3 and 6 of the first chip are grounded, and pins 4, 5, 7 and 8 of the first chip are connected to the controller module; the second angle detection module includes: a second capacitor, one end of which is grounded; a second chip, pin 1 of the second chip is connected to a power supply voltage and the other end of the second capacitor, pins 2, 3 and 6 of the second chip are grounded, and pins 4, 5, 7 and 8 of the second chip are connected to the controller module.

[0009] In one embodiment of the present disclosure, the controller module also includes: a first unit, used to process the first SPI signal and the second SPI signal through a vernier algorithm to obtain the angle value and angular velocity of the steering wheel rotation; a second unit, used to monitor the first angle detection module and the second angle detection module to obtain the first fault information, and monitor the inside of the controller module to obtain the second fault information; a baud rate adaptation unit, used to automatically match CAN (controller area network) buses with different Kbps (kilobits per second) rates; a sending unit, used to send the angle value and the angular velocity of the steering wheel rotation to a CAN transceiver module through a CAN signal, and the CAN transceiver module is used to send the CAN signal to the vehicle CAN bus.

[0010] In one embodiment of the present disclosure, the PCB board also includes a functional safety monitoring module, which is used to set the Reset signal connected to the controller module by the functional safety monitoring module to a low level output when the power supply voltage of the controller module exceeds a voltage threshold range, and the controller module is reset; and when a watchdog timeout is monitored, set the Reset signal to a low level output.

[0011] In one embodiment of the present disclosure, the controller module includes a third chip, and the functional safety monitoring module includes a fourth chip; the UV (voltage monitoring input) pin of the fourth chip is connected to the power supply voltage, and the SCK (serial clock line) pin, MOSI (host output / slave input data line) pin, MISO (host input / slave output data line) pin, CS (chip select) pin and RST (reset) pin of the fourth chip are connected to the controller module; the third chip, the 5th and 6th pins of the third chip are connected to the power supply voltage, the 14th pin of the third chip is connected to the 4th pin of the second chip, and the Pin 23 of the third chip is connected to pin 7 of the first chip, pin 7 of the second chip and the MOSI pin of the fourth chip, pin 24 of the third chip is connected to pin 8 of the first chip, pin 8 of the second chip and the SCK pin of the fourth chip, pin 25 of the third chip is connected to pin 5 of the first chip, pin 5 of the second chip and the MISO pin of the fourth chip, pin 26 of the third chip is connected to pin 4 of the first chip, pin 29 of the third chip is connected to the CS pin of the fourth chip, and pin 47 of the third chip is connected to the RST pin of the fourth chip.

[0012] In one embodiment of the present disclosure, the CAN transceiver module includes a fifth chip and a third capacitor; pin 1 of the fifth chip is connected to pin 16 of the third chip, pins 2 and 8 of the fifth chip are grounded, pin 3 of the fifth chip is connected to the power supply voltage and one end of the third capacitor, pin 4 of the fifth chip is connected to pin 17 of the third chip, pin 6 of the fifth chip is connected to CANL (low-speed line) of the CAN bus, and pin 7 of the fifth chip is connected to CANH (high-speed line) of the CAN bus; the other end of the third capacitor is grounded.

[0013] In a second aspect, an embodiment of the present disclosure provides an angle detection method, including: obtaining a first rotating magnetic field, a second rotating magnetic field and fault information; obtaining the angle value and angular velocity of the steering wheel rotation based on the first rotating magnetic field and the second rotating magnetic field; based on the fault information, obtaining a verification result, the verification result is safe or unsafe; when the verification result is safe, generating a CAN signal based on the angle value and the angular velocity; when the verification result is unsafe, the angle value is an invalid value.

[0014] In a third aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the angle detection method described in the second aspect is implemented.

[0015] In a fourth aspect, an embodiment of the present disclosure provides an electronic device, comprising: a memory; and a processor, coupled to the memory and configured to execute the angle detection method described in the second aspect.

[0016] As described above, the angle sensor, angle detection method, medium and electronic device described in the present application have the following beneficial effects:

[0017] In the angle sensor, the angle value and angular velocity of the steering wheel can be obtained according to the rotating magnetic field of the first magnet and the rotating magnetic field of the second magnet, and the angle sensor has the advantages of simple structure and low cost. In addition, fault information can be obtained inside the angle sensor, thereby improving the safety performance of the angle sensor. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 Shown is a schematic structural diagram of the angle sensor according to an embodiment of the present disclosure.

[0019] Figure 2 Shown is a schematic diagram of the structure of the PCB board described in an embodiment of the present disclosure.

[0020] Figure 3 It is a schematic diagram showing the structure of the first chip and the second chip according to an embodiment of the present disclosure.

[0021] Figure 4 Shown is a schematic diagram of the structure of the third chip described in an embodiment of the present disclosure.

[0022] Figure 5 Shown is a schematic diagram of the structure of the fourth chip described in an embodiment of the present disclosure.

[0023] Figure 6 Shown is a schematic diagram of the structure of the fifth chip described in an embodiment of the present disclosure.

[0024] Figure 7 Shown is a flow chart of the angle detection method described in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] The following is an explanation of the embodiments of the present disclosure by specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0026] It should be noted that the illustrations provided in the following embodiments are only used to illustrate the basic concept of the present disclosure in a schematic manner, and thus the illustrations only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0027] The technical solutions in the embodiments of the present disclosure are described in detail below in conjunction with the drawings in the embodiments of the present disclosure.

[0028] The principles and implementation methods of the angle sensor and the angle detection method of the embodiments of the present disclosure will be explained in detail below so that those skilled in the art can understand the angle sensor and the angle detection method of the embodiments of the present disclosure without creative work.

[0029] Figure 1 Schematic diagram showing the structure of an angle sensor according to an embodiment of the present disclosure. Figure 1 As shown, this embodiment provides an angle sensor, and the angle sensor includes:

[0030] The main gear 1 is arranged on the steering wheel rotation structure and rotates with the steering wheel rotation;

[0031] A first gear 2, disposed on one side of the main gear 1, meshing with the main gear 1;

[0032] A second gear 4 is disposed on the other side of the main gear 1 and meshes with the main gear 1;

[0033] A first magnet 3 is disposed on the first gear 2;

[0034] A second magnet 5 is disposed on the second gear 4;

[0035] PCB board 6 is used to detect the rotating magnetic field of the first magnet 3 and the rotating magnetic field of the second magnet 5 to obtain the first rotating magnetic field and the second rotating magnetic field, and to obtain the angle value and angular velocity of the steering wheel rotation based on the first rotating magnetic field and the second rotating magnetic field, and to obtain fault information.

[0036] Optionally, the angle sensor may be installed on a steering column or a combination switch of a car steering wheel to measure the steering angle of the steering wheel.

[0037] Optionally, the PCB board 6 can be arranged in an area capable of detecting the rotating magnetic field of the first magnet 3 and the rotating magnetic field of the second magnet 5 , and needs to be arranged within the magnetic field range of the first magnet 3 and the second magnet 5 .

[0038] Optionally, the PCB board has a sensor for detecting a magnetic field, and the fault information may refer to fault information of the sensor. The fault of the sensor causes the inability to effectively detect the rotating magnetic field, thereby failing to obtain the angle value and angular velocity of the steering wheel rotation.

[0039] Optionally, the fault information may refer to fault flag information, and the fault flag may be 1 or 0. When the fault flag is 1, it may indicate that the angle sensor has a fault and the angle sensor is in an unsafe state. When the fault flag is 0, it may indicate that the angle sensor has no fault and the angle sensor is in a safe state.

[0040] Optionally, Figure 2 is a schematic diagram showing the structure of a PCB board according to an embodiment of the present disclosure, wherein the PCB board 6 includes a first angle detection module, a second angle detection module and a controller module;

[0041] The first angle detection module is used to detect the rotating magnetic field of the first magnet to obtain a first rotating magnetic field; obtain a first angle value based on the first rotating magnetic field; and transmit the first angle value to the controller module through a first SPI signal;

[0042] The second angle detection module is used to detect the rotating magnetic field of the second magnet to obtain a second rotating magnetic field; obtain a second angle value based on the second rotating magnetic field; and transmit the second angle value to the controller module through a second SPI signal;

[0043] The controller module is used to process the first SPI signal and the second SPI signal to obtain the angle value and angular velocity of the steering wheel rotation and to obtain the fault information.

[0044] Optionally, the first angle value and the second angle value may be calculated based on the first rotating magnetic field and the second rotating magnetic field, respectively, which will not be described in detail in this embodiment.

[0045] Optionally, the first SPI signal can be used to transmit the first angle value, the second SPI signal can be used to transmit the second angle value, the first rotating magnetic field is the rotating magnetic field of the first magnet, and the second rotating magnetic field is the rotating magnetic field of the second magnet.

[0046] Optionally, the first angle detection module includes:

[0047] A first capacitor, one end of which is grounded;

[0048] A first chip, wherein pin 1 of the first chip is connected to a power supply voltage and the other end of the first capacitor, pins 2, 3 and 6 of the first chip are grounded, and pins 4, 5, 7 and 8 of the first chip are connected to the controller module;

[0049] The second angle detection module comprises:

[0050] a second capacitor, one end of which is grounded;

[0051] The second chip, pin 1 of the second chip is connected to the power supply voltage and the other end of the second capacitor, pins 2, 3 and 6 of the second chip are grounded, and pins 4, 5, 7 and 8 of the second chip are connected to the controller module.

[0052] Optionally, the first chip and the second chip may be Hall chips.

[0053] Figure 3 The structure of the first chip and the second chip in the embodiment of the present disclosure is shown as a schematic diagram. The structure of the first chip and the second chip can be referred to Figure 3 , this embodiment will not be described in detail.

[0054] Optionally, the controller module further includes:

[0055] A first unit is used to process the first SPI signal and the second SPI signal by a vernier algorithm to obtain an angle value and an angular velocity of the steering wheel rotation;

[0056] a second unit, configured to monitor the first angle detection module and the second angle detection module to obtain the first fault information, and to monitor the inside of the controller module to obtain second fault information;

[0057] Baud rate adaptive unit, used to automatically match CAN buses with different Kbps rates;

[0058] The sending unit is used to send the steering wheel rotation angle value and the angular velocity to the CAN transceiver module through a CAN signal, and the CAN transceiver module is used to send the CAN signal to the automobile CAN bus.

[0059] Optionally, the CAN transceiver module may be on the PCB board.

[0060] Optionally, the first fault information may be the fault information of the sensor for detecting the magnetic field and the fault information of inaccurate angle detection, and the second fault information may refer to the fault information of the clock, voltage, memory, etc. inside the controller module. Different faults in the first fault information and the second fault information may have corresponding fault codes, for example, the fault code of the clock fault is 1, the fault code of the voltage fault is 2, etc. According to the corresponding fault code, corresponding corrective measures can be taken in time to ensure the safety and reliability of the system.

[0061] Optionally, the PCB board further includes a functional safety monitoring module, which is used to set the Reset signal of the functional safety monitoring module connected to the controller module to a low level output when the power supply voltage of the controller module exceeds a voltage threshold range, and the controller module is reset; and when a watchdog timeout is detected, the Reset signal is set to a low level output. The voltage threshold range can be flexibly set according to actual conditions, and this embodiment does not explicitly limit this.

[0062] Optionally, the controller module includes a third chip, and the functional safety monitoring module includes a fourth chip;

[0063] The UV pin of the fourth chip is connected to the power supply voltage, and the SCK pin, MOSI pin, MISO pin, CS pin and RST pin of the fourth chip are connected to the controller module;

[0064] The third chip, pins 5 and 6 of the third chip are connected to the power supply voltage, pin 14 of the third chip is connected to pin 4 of the second chip, pin 23 of the third chip is connected to pin 7 of the first chip, pin 7 of the second chip and the MOSI pin of the fourth chip, pin 24 of the third chip is connected to pin 8 of the first chip, pin 8 of the second chip and the SCK pin of the fourth chip, pin 25 of the third chip is connected to pin 5 of the first chip, pin 5 of the second chip and the MISO pin of the fourth chip, pin 26 of the third chip is connected to pin 4 of the first chip, pin 29 of the third chip is connected to the CS pin of the fourth chip, and pin 47 of the third chip is connected to the RST pin of the fourth chip.

[0065] Optionally, the third chip may be a controller (MCU) chip.

[0066] Optionally, the fourth chip may be a SBC (System Basis Chip) chip. Figure 2 The third SPI signal in may refer to signals of the SCK pin, MOSI pin, MISO pin and CS pin in the fourth chip.

[0067] Figure 4 It is a schematic diagram showing the structure of the third chip according to the embodiment of the present disclosure, Figure 5 The structure of the fourth chip in the embodiment of the present disclosure is shown as a schematic diagram. The structure of the third chip and the fourth chip can be referred to Figure 4 and Figure 5 , this embodiment will not be described in detail.

[0068] Optionally, the supply voltage may be flexibly set according to actual conditions, and the supply voltage may be 5V, which is not explicitly limited in this embodiment.

[0069] Optionally, the CAN transceiver module includes a fifth chip and a third capacitor;

[0070] Pin 1 of the fifth chip is connected to pin 16 of the third chip, pins 2 and 8 of the fifth chip are grounded, pin 3 of the fifth chip is connected to the power supply voltage and one end of the third capacitor, pin 4 of the fifth chip is connected to pin 17 of the third chip, pin 6 of the fifth chip is connected to CANL of the CAN bus, and pin 7 of the fifth chip is connected to CANH of the CAN bus;

[0071] The other end of the third capacitor is grounded.

[0072] Optionally, the fifth chip may be a CAN transceiver chip.

[0073] Figure 6 The structure of the fifth chip in the embodiment of the present disclosure is shown as follows: Figure 6 , this embodiment will not be described in detail.

[0074] Optionally, the PCB board also has a power conversion module, which is used to convert the vehicle power supply into the supply voltage to supply the first angle detection module, the second angle detection module, the controller module, the functional safety monitoring module and the CAN transceiver module.

[0075] In summary, in the angle sensor, the angle value and angular velocity of the steering wheel can be obtained according to the rotating magnetic field of the first magnet and the rotating magnetic field of the second magnet, and the angle sensor has the advantages of simple structure and low cost. In addition, fault information can be obtained inside the angle sensor, thereby improving the safety performance of the angle sensor.

[0076] In addition, the functional safety development of the steering wheel angle sensor of this embodiment has high integration, high precision, good anti-interference ability, small size, low cost, can be mass-produced, has a baud rate adaptive function, can realize the platformization of products, has good fault handling function, can timely identify and respond to faults, and take corresponding corrective measures to ensure the safety and reliability of the system. In one embodiment of the present disclosure, the embodiment of the present disclosure provides a steering wheel angle sensor with functional safety, including a main gear 1 for measuring the steering wheel angle, a pinion 2, a magnet 3, a pinion 4, a magnet 5 and a PCB board 6.

[0077] The main gear 1 is mounted on the steering wheel rotation mechanism of the car and rotates as the steering wheel rotates. The magnet 3 is mounted on the pinion 2, and the magnet 5 is mounted on the pinion 4. The PCB board 6 has a power conversion module, a voltage monitoring module, a first angle detection module, a second angle detection module, a controller module, a watchdog monitoring unit, and a CAN transceiver module. The power conversion module converts the car power into a 5V voltage to supply the first angle detection module, the second angle detection module, the controller module, the watchdog monitoring unit, the CAN transceiver module, and the voltage monitoring unit. The first angle detection module detects the rotating magnetic field of the magnet on the first pinion and calculates the angle value, which is transmitted to the controller module through the first SPI signal. The second angle detection module detects the rotating magnetic field of the magnet on the second pinion and calculates the angle value, which is transmitted to the controller module through the second SPI signal. The controller module receives the first SPI signal and the second SPI signal, and then calculates the angle value and angular velocity of the steering wheel rotation through the cursor algorithm. The angle and angular velocity values ​​are sent to the CAN transceiver module through the CAN signal, and the CAN transceiver module sends the CAN signal to the car CAN bus.

[0078] The controller module includes an L1 unit and an L2 unit. The L1 unit is a functional unit, which includes the functions of obtaining the angle values ​​of the first angle detection module and the second angle detection module, and calculating the steering wheel angle and angular velocity. The L2 unit is a fault detection unit, which monitors the fault information of the first angle detection module and the second angle detection module, and monitors the fault information of the clock, voltage, memory, etc. inside the controller, and sends it out through CAN signals.

[0079] The controller module integrates a baud rate adaptive function and has the function of automatically matching CAN buses of 250Kbps, 500Kbps and 1000Kbps.

[0080] The functional safety monitoring module may include the watchdog monitoring unit and the voltage monitoring unit, wherein the watchdog monitoring unit has the function of monitoring the watchdog signal, and the voltage monitoring unit has the function of monitoring the power supply voltage of the controller module. When the power supply voltage of the controller module exceeds the voltage threshold range, the Reset signal connected to the controller module is set to a low level output, and the controller is reset. When the watchdog timeout is monitored, the Reset signal connected to the controller module is set to a low level output, and the controller is reset.

[0081] Preferably, the first angle detection module is composed of a chip U1 (first chip) and a capacitor C1 (first capacitor), pin 1 of the chip U1 is connected to a 5V voltage and one end of the capacitor C1, the other end of the capacitor C1 is grounded, pins 2, 3 and 6 of the chip U1 are grounded, and pins 4, 5, 7 and 8 of the chip U1 are connected to the controller module.

[0082] Preferably, the second angle detection module is composed of a chip U2 (second chip) and a capacitor C2 (second capacitor), pin 1 of the chip U2 is connected to a 5V voltage and one end of the capacitor C2, the other end of the capacitor C2 is grounded, pins 2, 3 and 6 of the chip U2 are grounded, and pins 4, 5, 7 and 8 of the chip U2 are connected to the controller module.

[0083] Preferably, the functional safety monitoring module is composed of a chip U4, a UV pin of the chip U4 is connected to a 5V voltage, and an SCK pin, a MOSI pin, a MISO pin, a CS pin and an RST pin of the chip U4 are connected to a controller module.

[0084] Preferably, the controller module is composed of chip U3 (the third chip), pins 5 and 6 of the chip U3 are connected to a 5V voltage, pin 14 of the chip U3 is connected to pin 4 of U2, pin 23 of the chip U3 is connected to pin 7 of the chip U1, pin 7 of the chip U2 and the MOSI pin of the chip U4 (the fourth chip), pin 24 of the chip U3 is connected to pin 8 of the chip U1, pin 8 of the chip U2 and the SCK pin of the chip U4, pin 25 of the chip U3 is connected to pin 5 of the chip U1, pin 5 of the chip U2 and the MISO pin of the chip U4, pin 26 of the chip U3 is connected to pin 4 of the chip U1, pin 29 of the chip U3 is connected to the CS pin of the chip U4, and pin 47 of the chip U3 is connected to the RST pin of the chip U4.

[0085] Preferably, the CAN transceiver module is composed of a chip U5 (the fifth chip) and a capacitor C3 (the third capacitor), pin 1 of the chip U5 is connected to pin 16 of the chip U3, pins 2 and 8 of the chip U5 are grounded, pin 3 of the chip U5 is connected to a 5V voltage and one end of the capacitor C3, the other end of the capacitor C3 is grounded, pin 4 of the chip U5 is connected to pin 17 of the chip U3, pin 6 of the chip U5 is connected to CANL of the car CAN bus, and pin 7 of the chip U5 is connected to CANH of the car CAN bus.

[0086] Figure 7 is a flow chart showing the angle detection method of the embodiment of the present disclosure. Figure 7 As shown, this embodiment provides an angle detection method, including:

[0087] S11, obtaining the first rotating magnetic field, the second rotating magnetic field and fault information.

[0088] Optionally, the method for obtaining the first rotating magnetic field, the second rotating magnetic field and fault information includes: obtaining the first rotating magnetic field, the second rotating magnetic field and fault information in real time, and the first rotating magnetic field, the second rotating magnetic field and the fault information are not described in detail in this embodiment.

[0089] S12: Acquire the angle value and angular velocity of the steering wheel rotation based on the first rotating magnetic field and the second rotating magnetic field.

[0090] Optionally, the method for acquiring the angle value and angular velocity of the steering wheel rotation based on the first rotating magnetic field and the second rotating magnetic field includes: acquiring the angle value and angular velocity of the steering wheel rotation in real time based on the first rotating magnetic field and the second rotating magnetic field.

[0091] S13: Based on the first fault information, obtain a verification result, where the verification result is safe or unsafe.

[0092] S14, when the verification result is safe, generating a CAN signal based on the angle value and the angular velocity.

[0093] Optionally, when the verification result is safe, the method for generating a CAN signal based on the angle value and the angular velocity includes: when the verification result is safe, generating a CAN signal based on the angle value and the angular velocity; sending the CAN signal to the CAN bus every preset number of cycles. The preset number can be flexibly set according to actual conditions, and this embodiment does not explicitly limit this. For example, the CAN signal can be sent to the CAN bus every 5 cycles.

[0094] S15, when the verification result is unsafe, the angle value is an invalid value.

[0095] Optionally, the invalid value may be represented as 7FFF.

[0096] Optionally, when the verification result is unsafe, the angle sensor may be reset to eliminate the CAN signal.

[0097] In one embodiment of the present disclosure, after the sensor is powered on, it first performs internal voltage, memory self-test and watchdog test, and then enters the functional program L1 module. The L1 module runs periodically, and after every 5 cycles, it calculates the real-time steering wheel angle and angular velocity and sends them to the CAN bus. The L2 module monitors the fault signal of the first angle detection unit and the fault signal of the second angle detection unit, as well as the watchdog, controller memory and other faults. The L2 module runs periodically and verifies whether the sensor is safe based on the acquired fault flag. If it is safe, it outputs the correct CAN signal. If the verification result is unsafe, it enters the safe state. There are two safe states, one is that the output angle value is an invalid value 7FFF, and the other is that the sensor is reset and there is no CAN signal.

[0098] The protection scope of the angle detection method described in the embodiment of the present disclosure is not limited to the execution order of the steps listed in the present embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present disclosure are included in the protection scope of the present disclosure.

[0099] In the several embodiments provided in the present disclosure, it should be understood that the disclosed device or method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules / units is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules or units, which can be electrical, mechanical or other forms.

[0100] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure. For example, the functional modules / units in the various embodiments of the present disclosure may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.

[0101] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0102] This embodiment provides an electronic device, the electronic device comprising a memory; a processor, coupled to the memory and configured to execute Figure 7 Angle detection method shown.

[0103] The present disclosure embodiment also provides a computer-readable storage medium. A person of ordinary skill in the art can understand that all or part of the steps in the method for implementing the above embodiment can be completed by instructing the processor through a program, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.

[0104] The embodiments of the present disclosure may also provide a computer program product, which includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiments of the present disclosure is generated in whole or in part. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer or data center to another website site, computer or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0105] When the computer program product is executed by a computer, the computer executes the method described in the above method embodiment. The computer program product may be a software installation package, and when the above method is required, the computer program product may be downloaded and executed on a computer.

[0106] In addition, the terms "first", "second" and the like may also be used herein for reference purposes only, and thus are not intended to be limiting. For example, the terms "first", "second" and other such numerical terms referring to structures or elements do not imply a sequence or order unless the context clearly indicates otherwise.

[0107] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0108] The above embodiments are merely illustrative of the principles and effects of the present disclosure, and are not intended to limit the present disclosure. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present disclosure. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present disclosure shall still be covered by the claims of the present disclosure.

Claims

1. An angle sensor, characterized in that: include: The main gear is arranged on the steering wheel rotation structure and rotates with the steering wheel rotation; A first gear, disposed on one side of the main gear and meshing with the main gear; A second gear, disposed on the other side of the main gear and meshing with the main gear; A first magnet is disposed on the first gear; A second magnet is disposed on the second gear; A PCB board is used to detect the rotating magnetic field of the first magnet and the rotating magnetic field of the second magnet to obtain the first rotating magnetic field and the second rotating magnetic field, and to obtain the angle value and angular velocity of the steering wheel rotation based on the first rotating magnetic field and the second rotating magnetic field, as well as to obtain fault information.

2. The angle sensor according to claim 1, characterized in that: The PCB board includes a first angle detection module, a second angle detection module and a controller module; The first angle detection module is used to detect the rotating magnetic field of the first magnet to obtain a first rotating magnetic field; and obtain a first angle value based on the first rotating magnetic field; and transmitting the first angle value to the controller module via a first serial peripheral interface SPI signal; The second angle detection module is used to detect the rotating magnetic field of the second magnet to obtain a second rotating magnetic field; Acquire a second angle value based on the second rotating magnetic field; and transmitting the second angle value to the controller module via a second SPI signal; The controller module is used to process the first SPI signal and the second SPI signal to obtain the angle value and angular velocity of the steering wheel rotation and to obtain the fault information.

3. The angle sensor according to claim 2, characterized in that: The first angle detection module comprises: A first capacitor, one end of which is grounded; A first chip, wherein pin 1 of the first chip is connected to a power supply voltage and the other end of the first capacitor, pins 2, 3 and 6 of the first chip are grounded, and pins 4, 5, 7 and 8 of the first chip are connected to the controller module; The second angle detection module comprises: a second capacitor, one end of which is grounded; The second chip, pin 1 of the second chip is connected to the power supply voltage and the other end of the second capacitor, pins 2, 3 and 6 of the second chip are grounded, and pins 4, 5, 7 and 8 of the second chip are connected to the controller module.

4. The angle sensor according to claim 2, characterized in that: The fault information includes first fault information and second fault information, and the controller module further includes: A first unit is used to process the first SPI signal and the second SPI signal by a vernier algorithm to obtain an angle value and an angular velocity of the steering wheel rotation; a second unit, configured to monitor the first angle detection module and the second angle detection module to obtain the first fault information, and to monitor the inside of the controller module to obtain the second fault information; Baud rate adaptive unit, used to automatically match the controller area network CAN bus with different Kbps rates; The sending unit is used to send the steering wheel rotation angle value and the angular velocity to the CAN transceiver module through a CAN signal, and the CAN transceiver module is used to send the CAN signal to the automobile CAN bus.

5. The angle sensor according to claim 4, characterized in that: The PCB board also includes a functional safety monitoring module, which is used to set a reset signal of the functional safety monitoring module connected to the controller module to a low level output when the power supply voltage of the controller module exceeds a voltage threshold range, and the controller module is reset; and when a watchdog timeout is monitored, set the Reset signal to a low level output.

6. The angle sensor according to claim 5, characterized in that: The controller module includes a third chip, and the functional safety monitoring module includes a fourth chip; The voltage monitoring input UV pin of the fourth chip is connected to the power supply voltage, and the serial clock line SCK pin, the host output / slave input data line MOSI pin, the host input / slave output data line MISO pin, the chip select CS pin and the reset RST pin of the fourth chip are connected to the controller module; Pins 5 and 6 of the third chip are connected to the power supply voltage, pin 14 of the third chip is connected to pin 4 of the second chip, pin 23 of the third chip is connected to pin 7 of the first chip, pin 7 of the second chip and the MOSI pin of the fourth chip, pin 24 of the third chip is connected to pin 8 of the first chip, pin 8 of the second chip and the SCK pin of the fourth chip, pin 25 of the third chip is connected to pin 5 of the first chip, pin 5 of the second chip and the MISO pin of the fourth chip, pin 26 of the third chip is connected to pin 4 of the first chip, pin 29 of the third chip is connected to the CS pin of the fourth chip, and pin 47 of the third chip is connected to the RST pin of the fourth chip.

7. The angle sensor according to claim 6, characterized in that: The CAN transceiver module includes a fifth chip and a third capacitor; Pin 1 of the fifth chip is connected to pin 16 of the third chip, pins 2 and 8 of the fifth chip are grounded, pin 3 of the fifth chip is connected to the power supply voltage and one end of the third capacitor, pin 4 of the fifth chip is connected to pin 17 of the third chip, pin 6 of the fifth chip is connected to the low-speed line CANL of the CAN bus, and pin 7 of the fifth chip is connected to the high-speed line CANH of the CAN bus; The other end of the third capacitor is grounded.

8. An angle detection method, characterized in that: include: Acquire the first rotating magnetic field, the second rotating magnetic field and fault information; Acquire the angle value and angular velocity of steering wheel rotation based on the first rotating magnetic field and the second rotating magnetic field; Based on the fault information, obtaining a verification result, the verification result being safe or unsafe; When the verification result is safe, generating a CAN signal based on the angle value and the angular velocity; When the verification result is unsafe, the angle value is an invalid value.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the angle detection method according to claim 8 is implemented.

10. An electronic device, characterized in that: include: Memory; A processor is coupled to the memory and configured to execute the angle detection method according to claim 8.