Circuit system based on AMR angle measuring device
By designing a circuit system including a magnetic encoding chip, real-time clock, CAN communication and core processor module, the problem of insufficient flexibility and adaptability of the AMR angle measurement device is solved, and flexible output and accurate transmission of angle data are achieved, which is suitable for Various application scenarios.
Patent Information
- Application Number
- CN202410726725.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-09-20
AI Technical Summary
Existing AMR-based angle measurement devices have poor flexibility and adaptability, making it difficult to meet various application requirements.
A circuit system including a magnetic encoding chip module, a real-time clock module, a CAN communication module and a core processor module is designed. Through two-way communication and timer interrupt mechanism, real-time transmission and flexible output of angle data are realized, and zero position transformation and Function parameter adjustment.
It effectively improves the flexibility and adaptability of the AMR-based angle measurement device, improves the adaptability and accuracy of the system, and supports miniaturization and portability applications.
Smart Images

Figure CN118670252A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of angle measurement, and in particular to a circuit system based on an AMR angle measurement device. Background Art
[0002] Angle measurement is one of the basic parameters in scientific research of measurement and metrology. With the continuous development of production and science, angle measurement is increasingly widely used in various fields such as machinery, optics, aerospace, and navigation, and the measurement accuracy of the technical level is constantly improving. As the executive component of industrial control, the feedback of parameters such as angle and distance is the basis for realizing system control. The traditional contact angle measurement method will damage the measuring mechanism itself and shorten its service life. The non-contact angle measurement method represented by photoelectric and magnetoresistive technology can extend the service life of the components and avoid many factors that interfere with the measurement.
[0003] However, there are many problems with the current angle measurement for servo mechanisms. For example, the measurement method based on photoelectric encoders has high requirements for the use environment, and needs to avoid factors such as dust and stains, and it is difficult to construct a miniaturized and portable measurement mechanism; the magnetic angle measurement method based on the Hall principle has high requirements for the magnetic source and the installation position of the magnetic source, and the measurement accuracy is low; the angle measurement device based on AMR anisotropic magnetoresistance technology shows poor performance in terms of flexibility and adaptability.
[0004] For an angle measurement device based on the AMR anisotropic magnetoresistance technology, the present invention proposes a circuit system, which can effectively improve the flexibility and adaptability of the angle measurement device based on the AMR anisotropic magnetoresistance technology. Summary of the invention
[0005] In order to solve the problem that the existing AMR-based angle measurement device has poor flexibility and adaptability, the present invention provides a circuit system based on the AMR angle measurement device.
[0006] In a first aspect, the present invention provides a circuit system based on an AMR angle measurement device, comprising:
[0007] Magnetic encoding chip module, real-time clock module, CAN communication module, core processor module and voltage regulator module; among them,
[0008] The voltage stabilizing module is electrically connected to the magnetic encoding chip module, the real-time clock module, the CAN communication module and the core processor module, and is used to convert the external power supply to supply power to the internal circuit;
[0009] The magnetic encoding chip module is bidirectionally connected to the core processor module for communication. The magnetic encoding chip module is used to measure the direction of magnetic field change, obtain angle data through calculation and transmit it to the core processor module.
[0010] The real-time clock module is connected to the core processor module in a unidirectional communication manner, and the real-time clock module is used to set a timer so that the core processor module generates a timer interrupt;
[0011] The CAN communication module is bidirectionally connected to the core processor module for sending the angle data to the upper controller, and can also receive instructions from the upper controller to cause the core processor to generate a CAN reception interrupt;
[0012] The core processor module is used to implement sending read instructions to the magnetic encoding chip module, receiving the angle data, zero position conversion function, the timer interrupt, and the CAN communication interrupt.
[0013] In some embodiments, the voltage stabilization module includes a voltage stabilizer chip, a first capacitor, a second capacitor, and a third capacitor;
[0014] The voltage regulator chip pin 7 and pin 8 are connected to the first input voltage and one end of the first capacitor, the other end of the first capacitor is connected to pin 6 and grounded, the voltage regulator chip pin 1, pin 2 and pin 3 are connected to one end of the second capacitor, the magnetic encoding chip module, the real-time clock module, the CAN communication module and the core processor module, the other end of the second capacitor is grounded, and the voltage regulator chip pin 4 is connected to the third capacitor and then grounded.
[0015] In some embodiments, the real-time clock module includes a crystal oscillator and a first resistor;
[0016] The crystal oscillator pin 3 is connected to one end of the first resistor, the other end of the first resistor is connected to the core processor module, the crystal oscillator pin 4 is connected to the voltage stabilizing module, and the crystal oscillator pin 2 is grounded.
[0017] In some embodiments, the CAN communication module includes a CAN communication chip, a second resistor and a fourth capacitor;
[0018] The CAN communication chip pin, the CAN communication chip pin 8 and pin 2 are grounded, the CAN communication chip pin 3 is connected to one end of the fourth capacitor and the voltage stabilizing module, the other end of the fourth capacitor is grounded, the CAN communication chip pin 7 and pin 6 are respectively connected to the two ends of the second resistor, and pin 1 and pin 4 are connected to the core processor module.
[0019] In some embodiments, the magnetic encoding chip module includes: a magnetic encoding chip and a fifth capacitor;
[0020] The magnetic encoding chip pins 5, 6, 7 and 8 are SPI dedicated pins, which are connected to the core processor module dedicated pins. The magnetic encoding chip pin 9 is connected to the voltage stabilizing module and one end of the fifth capacitor. The magnetic encoding chip pins 13, 12 and 11 are connected to the ground and the other end of the fifth capacitor.
[0021] In some embodiments, the core processor module includes: an MCU chip, a third resistor, a fourth resistor, a sixth capacitor, a seventh capacitor, and an eighth capacitor;
[0022] The MCU chip pin 1 is connected to one end of the third resistor, and the other end of the third resistor is grounded. The MCU chip pin 4 is connected to one end of the fourth resistor and one end of the sixth capacitor. The other end of the fourth resistor is connected to the voltage stabilizing module, and the other end of the sixth capacitor is grounded. The MCU chip pins 10, 11, 12, and 13 are respectively connected to pins 8, 7, 5, and 6 of the magnetic encoding chip. The MCU chip pins 19 and 20 are connected to the CAN communication module. The MCU chip pins 21 and 22 are connected to the real-time clock module. The MCU chip pin 16 is connected to one end of the seventh capacitor, one end of the eighth capacitor and grounded. The other end of the seventh capacitor is connected to the MCU chip pin 17, pin 5 and the voltage stabilizing module, and the other end of the eighth capacitor is connected to the MCU chip pin 5 and the voltage stabilizing module.
[0023] In some embodiments, the zero position conversion function includes: processing the original angle reading value and the zero position value through the following formula:
[0024] Angle processing value = (((angle original reading value - zero value) & 0x7fff) + 0x4000) & 0x7fff
[0025] The angle original reading value is the angle data of the first angle reading, the zero position value is the preset mechanical zero position, and the angle processing value is the angle value after the current angle data is converted.
[0026] In some embodiments, the timer interrupt includes: after a first time, entering an interrupt processing function, and setting a counter, each time the interrupt processing function is entered, the built-in value of the counter is increased by 1;
[0027] Compare the built-in value with the interval value, and if the built-in value is smaller than the interval value, exit the interrupt processing function; or
[0028] If the built-in value is greater than the interval value, the built-in value is reset to zero, and the angle data is sent through the CAN communication module with a specified ID;
[0029] The first time is a preset value, and the interval value is a preset value.
[0030] In some embodiments, the CAN receiving interrupt includes: the CAN communication module receives a control instruction, enters a CAN receiving interrupt processing function, determines the category of the received control instruction, and implements storage and reading of function parameters according to the category of the control instruction.
[0031] In some embodiments, the functional parameters include the null value, the designated ID, and the interval value.
[0032] In order to solve the problem of poor flexibility and adaptability of the existing AMR-based angle measurement device, the present invention has the following advantages:
[0033] The technical solution of the present invention can effectively improve the flexibility and adaptability of the AMR-based angle measurement device. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 The overall structure diagram of a circuit system based on an AMR angle measurement device is shown;
[0035] Figure 2 Shows Figure 1 The circuit diagram of the voltage regulator module shown in;
[0036] Figure 3 Shows Figure 1 The circuit diagram of the real-time clock module shown in;
[0037] Figure 4 Shows Figure 1 The circuit diagram of the CAN communication module shown in;
[0038] Figure 5 Shows Figure 1 The circuit diagram of the magnetic encoding chip module shown in;
[0039] Figure 6 Shows Figure 1 The circuit diagram of the core processor module is shown in . DETAILED DESCRIPTION
[0040] The present disclosure will now be discussed with reference to several exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and thus implement the present disclosure, rather than implying any limitation on the scope of the present disclosure.
[0041] As used herein, the term "including" and its variants are to be interpreted as open-ended terms meaning "including but not limited to". The term "based on" is to be interpreted as "based at least in part on". The terms "one embodiment" and "an embodiment" are to be interpreted as "at least one embodiment". The term "another embodiment" is to be interpreted as "at least one other embodiment". The orientation or position relationship indicated by the terms "upper", "lower", "left", "right", "front", "back", "top", "bottom", "inner", "outer", "vertical", "horizontal", "lateral", "longitudinal" and the like is based on the orientation or position relationship shown in the accompanying drawings. These terms are mainly for better describing the present application and its embodiments, and are not used to limit the indicated devices, elements or components to have a specific orientation, or to be constructed and operated in a specific orientation. In addition, in addition to being used to indicate an orientation or position relationship, some of the above terms may also be used to indicate other meanings, such as the term "upper" may also be used to indicate a certain dependency or connection relationship in some cases. For those of ordinary skill in the art, the specific meanings of these terms in this application can be understood according to the specific circumstances. In addition, the terms "install", "set", "provided with", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection, or an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or it can be an internal connection between two devices, elements or components. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to the specific circumstances. In addition, the terms "first", "second", etc. are mainly used to distinguish different devices, elements or components (the specific types and structures may be the same or different), and are not used to indicate or imply the relative importance and quantity of the indicated devices, elements or components. Unless otherwise specified, "plurality" means two or more.
[0042] This embodiment discloses a circuit system based on an AMR angle measurement device, such as Figure 1 As shown, including:
[0043] Magnetic encoding chip module, real-time clock module, CAN communication module, core processor module and voltage regulator module; among them,
[0044] The voltage stabilizing module is electrically connected to the magnetic encoding chip module, the real-time clock module, the CAN communication module and the core processor module, and is used to convert the external power supply to supply power to the internal circuit;
[0045] The magnetic encoding chip module is bidirectionally connected to the core processor module for communication. The magnetic encoding chip module is used to measure the direction of magnetic field change, obtain angle data through calculation and transmit it to the core processor module.
[0046] The real-time clock module is connected to the core processor module in a unidirectional communication manner, and the real-time clock module is used to set a timer so that the core processor module generates a timer interrupt;
[0047] The CAN communication module is bidirectionally connected to the core processor module for sending the angle data to the upper controller, and can also receive instructions from the upper controller to cause the core processor to generate a CAN reception interrupt;
[0048] The core processor module is used to implement sending read instructions to the magnetic encoding chip module, receiving the angle data, zero position conversion function, the timer interrupt, and the CAN communication interrupt.
[0049] In this embodiment, the system includes a magnetic encoding chip module, a real-time clock module, a CAN communication module, a core processor module and a voltage stabilization module. Among them, the voltage stabilization module is electrically connected to the other modules, and the external power supply is stabilized to supply power to the other modules; the magnetic encoding chip module and the core processor module have a two-way communication connection, the magnetic encoding chip can obtain the magnetic field change data, and then calculate the rotation angle data, and transmit the data to the core processor module through a two-way connection channel; the real-time clock module is connected to the core processor module in a unidirectional communication manner, providing a clock signal to the core processor module, and the core processor generates a timer interrupt; the CAN communication module is connected to the core processor module in a two-way communication manner, and after the core processor module reads the angle data from the magnetic encoding module, it can send the angle data to the upper-level controller through the CAN communication module, and the CAN communication module can also To receive instructions from the upper-level controller, thereby generating a CAN receive interrupt. The function parameters can be adjusted through the CAN receive interrupt to determine the ID and time of the angle data output; SPI communication is configured between the core processor module and the magnetic encoding chip module to send read instructions and receive angle data to the magnetic encoding chip, and CAN communication is configured between the core processor module and the CAN communication module to transmit angle data to the upper-level controller through the CAN bus. The core processor module can also realize the calculation of relative angles, dynamic configuration of CAN communication ID, and dynamic configuration of CAN communication data sending intervals. In this way, the output interval time of the angle data can be adjusted at any time and the output angle data can be clearly known, which greatly improves the flexibility of the system.
[0050] Furthermore, if an instruction is received from the upper-level controller to change the frequency of the angle output, the CAN communication is interrupted, the parameters are adjusted, and the output frequency is changed, thus improving the flexibility of the system.
[0051] Furthermore, the upper-level controller may be a single-chip microcomputer, a host computer, etc.
[0052] In some embodiments, the voltage stabilization module includes a voltage stabilizer chip, a first capacitor, a second capacitor, and a third capacitor;
[0053] The voltage regulator chip pin 7 and pin 8 are connected to the first input voltage and one end of the first capacitor, the other end of the first capacitor is connected to pin 6 and grounded, the voltage regulator chip pin 1, pin 2 and pin 3 are connected to one end of the second capacitor, the magnetic encoding chip module, the real-time clock module, the CAN communication module and the core processor module, the other end of the second capacitor is grounded, and the voltage regulator chip pin 4 is connected to the third capacitor and then grounded.
[0054] In this embodiment, if Figure 2 As shown in the figure, the specific circuit structure of the voltage regulator module is introduced. A voltage regulator chip is used in conjunction with the first capacitor C1, the second capacitor C2 and the third capacitor C3, wherein pins 7 and 8 are VIN pins connected to an external power supply, and pins 1 and 2 are VOUT pins, which can convert a 5V DC power supply into 3.3V to power the magnetic encoding chip module, the CAN communication module, the real-time clock module and the core processor module.
[0055] Furthermore, the voltage regulator chip is a low voltage line differential voltage regulator, and the JXYP7122DN-3.3 model may be selected.
[0056] In some embodiments, the real-time clock module includes a crystal oscillator and a first resistor;
[0057] The crystal oscillator pin 3 is connected to one end of the first resistor, the other end of the first resistor is connected to the core processor module, the crystal oscillator pin 4 is connected to the voltage stabilizing module, and the crystal oscillator pin 2 is grounded.
[0058] In this embodiment, if Figure 3 As shown, the specific circuit structure of the real-time clock module is introduced, including a crystal oscillator and a first resistor R1. Pin 4 of the crystal oscillator is a VCC pin, which is connected to the output voltage of the voltage regulator module.
[0059] Furthermore, the crystal oscillator is used as an external clock source with a frequency of 10 MHz. The crystal oscillator OUT pin is connected to the core processor module, and after frequency multiplication, a 40 MHz frequency is obtained as the system clock of the microcontroller.
[0060] In some embodiments, the CAN communication module includes a CAN communication chip, a second resistor and a fourth capacitor;
[0061] The CAN communication chip pin, the CAN communication chip pin 8 and pin 2 are grounded, the CAN communication chip pin 3 is connected to one end of the fourth capacitor and the voltage stabilizing module, the other end of the fourth capacitor is grounded, the CAN communication chip pin 7 and pin 6 are respectively connected to the two ends of the second resistor, and pin 1 and pin 4 are connected to the core processor module.
[0062] In this embodiment, if Figure 4 As shown in the figure, the specific structure of the CAN communication module is introduced, including a CAN communication chip, a second resistor R2 and a fourth capacitor C4. Pin 3 of the CAN communication chip is connected to the output voltage of the voltage regulator module. Pin 1 and pin 4 are the sending pin CANTX and the receiving pin CANRX respectively. Pin 6 and pin 7 are the low potential input and output terminal CANL and the high potential input and output terminal CANH respectively.
[0063] Furthermore, the CAN communication chip preferably has a model number of SIT65HVD233, which supports a maximum communication rate of 1 Mbps and meets the ISO11898-2 bus standard.
[0064] Furthermore, the adaptability of the system can be greatly increased through the CAN communication module.
[0065] In some embodiments, the magnetic encoding chip module includes: a magnetic encoding chip and a fifth capacitor;
[0066] The magnetic encoding chip pins 5, 6, 7 and 8 are SPI dedicated pins, which are connected to the core processor module dedicated pins. The magnetic encoding chip pin 9 is connected to the voltage stabilizing module and one end of the fifth capacitor. The magnetic encoding chip pins 13, 12 and 11 are connected to the ground and the other end of the fifth capacitor.
[0067] In this embodiment, if Figure 5 As shown, the specific structure of the magnetic encoding chip module is introduced, including the magnetic encoding chip and the fifth capacitor. Pins 5, 6, 7, and 8 of the magnetic encoding chip are SPI dedicated pins, which are connected to the corresponding dedicated pins of the core processor.
[0068] Furthermore, the magnetic encoding chip can realize 12-bit PWM output and can also output 18-bit angle data through the SPI interface. When the chip is used normally, it only needs to connect the SPI interface and power supply.
[0069] Furthermore, the magnetic encoding chip may preferably be a MT6825 model chip.
[0070] Furthermore, MT6825 can measure the angle data of the magnetic field direction parallel to the chip package surface within a 360° range. The full-bridge circuit can amplify the signal and eliminate the influence of temperature. The output voltages x and y of the two Wheatstone bridges represent the cosine and sine values of the angle data, respectively. The internal processing circuit of the chip calculates the angle data based on x and y, converts the angle data into an 18-bit digital quantity and outputs it to the core processor through the SPI interface.
[0071] In some embodiments, the core processor module includes: an MCU chip, a third resistor, a fourth resistor, a sixth capacitor, a seventh capacitor, and an eighth capacitor;
[0072] The MCU chip pin 1 is connected to one end of the third resistor, and the other end of the third resistor is grounded. The MCU chip pin 4 is connected to one end of the fourth resistor and one end of the sixth capacitor. The other end of the fourth resistor is connected to the voltage stabilizing module, and the other end of the sixth capacitor is grounded. The MCU chip pins 10, 11, 12, and 13 are respectively connected to pins 8, 7, 5, and 6 of the magnetic encoding chip. The MCU chip pins 19 and 20 are connected to the CAN communication module. The MCU chip pins 21 and 22 are connected to the real-time clock module. The MCU chip pin 16 is connected to one end of the seventh capacitor, one end of the eighth capacitor and grounded. The other end of the seventh capacitor is connected to the MCU chip pin 17, pin 5 and the voltage stabilizing module, and the other end of the eighth capacitor is connected to the MCU chip pin 5 and the voltage stabilizing module.
[0073] In this embodiment, if Figure 6 As shown, the specific structure of the core processor module is introduced, including the MCU chip, the third resistor, the fourth resistor, the sixth capacitor, the seventh capacitor and the eighth capacitor. Among them, the MCU chip pins 10, 11, 12, and 13 are dedicated SPI pins, which are connected to the SCN, SCK, MISO, and MOSI pins of the magnetic encoding chip. Among them, pin 10 is configured as a push-pull output mode to output a chip select signal to the magnetic encoding chip, and pin 11 is configured as a push-pull output mode to output a clock signal to the magnetic encoding chip. The SPI clock is configured to 8MHz based on the system clock division frequency. Pin 12 is configured as a pull-up input mode to receive the angle data sent by the magnetic encoding chip. Pin 13 is configured as a push-pull output mode to output a read instruction to the magnetic encoding chip; MCU chip pins 19 and 20 are respectively configured as floating input mode and push-pull output mode, and are connected to the corresponding pins of the CAN communication chip for sending and receiving CAN communication data; MCU chip pins 21 and 22 realize data transmission and data transmission clock functions, and cooperate with VDDA and VSS pins to realize the burning and debugging of the control program.
[0074] Furthermore, the preferred model of the MCU chip is MM32F0144C3N.
[0075] In some embodiments, the zero position conversion function includes: processing the original angle reading value and the zero position value through the following formula:
[0076] Angle processing value = (((angle original reading value - zero value) & 0x7fff) + 0x4000) & 0x7fff
[0077] The angle original reading value is the angle data of the first angle reading, the zero position value is the preset mechanical zero position, and the angle processing value is the angle value after the current angle data is converted.
[0078] In this embodiment, 0 to 0x7FFF corresponds to -180° to 180°. In the actual use of the sensor, the zero angle information read by the encoding chip is not the mechanical zero position of the product, so a program zero adjustment function is required. The complete code is as follows:
[0079]
[0080] }
[0081] Return (changed data);
[0082] }.
[0083] Furthermore, in actual use, the MCU reads the data output of the magnetic encoding chip in real time. When a zero-position transformation is required, the currently read angle needs to be transformed, and the data conversion shown in the schematic code is performed to convert the actual angle value of the sensor into output data with the current angle as 0° and return the value as the program output.
[0084] Furthermore, through the zero position conversion function, the output of angle data is more convenient and flexible.
[0085] In some embodiments, the timer interrupt includes: after a first time, entering an interrupt processing function, and setting a counter, each time the interrupt processing function is entered, the built-in value of the counter is increased by 1;
[0086] Compare the built-in value with the interval value, and if the built-in value is smaller than the interval value, exit the interrupt processing function; or
[0087] If the built-in value is greater than the interval value, the built-in value is reset to zero, and the angle data is sent through the CAN communication module with a specified ID;
[0088] The first time is a preset value, and the interval value is a preset value.
[0089] In this embodiment, the interrupt processing function is entered periodically through the timer, and each time the interrupt processing function is entered, the built-in value of the counter is increased by 1, and then the built-in value is compared with the preset interval value. If the built-in value of the counter is greater than the interval value, the angle data is sent to the upper-level controller through the CAN communication module with the specified ID.
[0090] Furthermore, by designing the interval value, the time when the angle data is sent can be set, and by specifying the ID, the source of the angle data can be accurately identified.
[0091] Furthermore, the first time can be set according to the output frequency requirement of the angle data, such as 50us.
[0092] In some embodiments, the CAN receiving interrupt includes: if the CAN communication module receives a control instruction, entering a CAN receiving interrupt processing function, determining the category of the received control instruction, and implementing storage and reading of functional parameters according to the category of the control instruction.
[0093] In this embodiment, after receiving the instruction from the upper-level controller, the CAN receive interrupt enters the CAN receive interrupt processing function, determines the type of the received instruction, implements the storage and reading of different function parameters according to the type of the instruction, and writes the parameters to the corresponding FLASH location.
[0094] Furthermore, changes to these function parameters remain valid after the system is powered on again.
[0095] Further, the CAN receiving interrupt is set to adjust the output time and form of the angle data by adjusting different functional parameters, which can greatly provide system flexibility. In some embodiments, the functional parameters include the zero position value, the specified ID and the interval value.
[0096] In this embodiment, the zero position conversion function can be realized by adjusting the zero position value in the function parameters; the source of the angle data can be accurately identified by adjusting the ID; and the output time and frequency of the angle data can be adjusted by adjusting the interval value.
[0097] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, the embodiments should be considered exemplary and non-restrictive in all respects, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present invention.
[0098] In addition, it should be understood that although the present specification is described according to embodiments, not every embodiment contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation methods that those skilled in the art can understand.
Claims
1. A circuit system based on an AMR angle measurement device, characterized in that: include: Magnetic encoding chip module, real-time clock module, CAN communication module, core processor module and voltage regulator module; among them, The voltage stabilizing module is electrically connected to the magnetic encoding chip module, the real-time clock module, the CAN communication module and the core processor module, and is used to convert the external power supply to supply power to the internal circuit; The magnetic encoding chip module is bidirectionally connected to the core processor module for communication. The magnetic encoding chip module is used to measure the direction of magnetic field change, obtain angle data through calculation and transmit it to the core processor module. The real-time clock module is connected to the core processor module in a unidirectional communication manner, and the real-time clock module is used to set a timer so that the core processor module generates a timer interrupt; The CAN communication module is bidirectionally connected to the core processor module for sending the angle data to the upper controller, and can also receive instructions from the upper controller to cause the core processor to generate a CAN reception interrupt; The core processor module is used to implement sending read instructions to the magnetic encoding chip module, receiving the angle data, zero position conversion function, the timer interrupt, and the CAN communication interrupt.
2. A circuit system based on an AMR angle measurement device as claimed in claim 1, characterized in that: The voltage stabilization module includes a voltage stabilizer chip, a first capacitor, a second capacitor and a third capacitor; The voltage regulator chip pin 7 and pin 8 are connected to the first input voltage and one end of the first capacitor, the other end of the first capacitor is connected to pin 6 and grounded, the voltage regulator chip pin 1, pin 2 and pin 3 are connected to one end of the second capacitor, the magnetic encoding chip module, the real-time clock module, the CAN communication module and the core processor module, the other end of the second capacitor is grounded, and the voltage regulator chip pin 4 is connected to the third capacitor and then grounded.
3. A circuit system based on an AMR angle measurement device as claimed in claim 1, characterized in that: The real-time clock module includes a crystal oscillator and a first resistor; The crystal oscillator pin 3 is connected to one end of the first resistor, the other end of the first resistor is connected to the core processor module, the crystal oscillator pin 4 is connected to the voltage stabilizing module, and the crystal oscillator pin 2 is grounded.
4. The circuit system based on the AMR angle measurement device according to claim 1, characterized in that: The CAN communication module includes a CAN communication chip, a second resistor and a fourth capacitor; The CAN communication chip pin, the CAN communication chip pin 8 and pin 2 are grounded, the CAN communication chip pin 3 is connected to one end of the fourth capacitor and the voltage stabilizing module, the other end of the fourth capacitor is grounded, the CAN communication chip pin 7 and pin 6 are respectively connected to the two ends of the second resistor, and pin 1 and pin 4 are connected to the core processor module.
5. The circuit system based on the AMR angle measurement device according to claim 1, characterized in that: The magnetic encoding chip module includes: a magnetic encoding chip and a fifth capacitor; The magnetic encoding chip pins 5, 6, 7 and 8 are SPI dedicated pins, which are connected to the core processor module dedicated pins. The magnetic encoding chip pin 9 is connected to the voltage stabilizing module and one end of the fifth capacitor. The magnetic encoding chip pins 13, 12 and 11 are connected to the ground and the other end of the fifth capacitor.
6. The circuit system based on the AMR angle measurement device according to claim 1, characterized in that: The core processor module includes: an MCU chip, a third resistor, a fourth resistor, a sixth capacitor, a seventh capacitor and an eighth capacitor; The MCU chip pin 1 is connected to one end of the third resistor, and the other end of the third resistor is grounded. The MCU chip pin 4 is connected to one end of the fourth resistor and one end of the sixth capacitor. The other end of the fourth resistor is connected to the voltage stabilizing module, and the other end of the sixth capacitor is grounded. The MCU chip pins 10, 11, 12, and 13 are respectively connected to pins 8, 7, 5, and 6 of the magnetic encoding chip. The MCU chip pins 19 and 20 are connected to the CAN communication module. The MCU chip pins 21 and 22 are connected to the real-time clock module. The MCU chip pin 16 is connected to one end of the seventh capacitor, one end of the eighth capacitor and grounded. The other end of the seventh capacitor is connected to the MCU chip pin 17, pin 5 and the voltage stabilizing module, and the other end of the eighth capacitor is connected to the MCU chip pin 5 and the voltage stabilizing module.
7. The circuit system based on the AMR angle measurement device according to claim 1, characterized in that: The zero position conversion function includes: processing the original angle reading value and the zero position value through the following formula: Angle processing value = (((angle original reading value - zero value) & 0x7fff) + 0x4000) & 0x7fff The angle original reading value is the angle data of the first angle reading, the zero position value is the preset mechanical zero position, and the angle processing value is the angle value after the current angle data is converted.
8. The circuit system based on the AMR angle measurement device according to claim 7, characterized in that: The timer interrupt comprises: after a first time, entering an interrupt processing function, and setting a counter, each time the interrupt processing function is entered, the built-in value of the counter is increased by 1; Compare the built-in value with the interval value, and if the built-in value is smaller than the interval value, exit the interrupt processing function; or If the built-in value is greater than the interval value, the built-in value is reset to zero, and the angle data is sent through the CAN communication module with a specified ID; The first time is a preset value, and the interval value is a preset value.
9. The circuit system based on the AMR angle measurement device according to claim 8, characterized in that: The CAN receiving interruption includes: the CAN communication module receives a control instruction, enters a CAN receiving interruption processing function, determines the category of the received control instruction, and implements storage and reading of function parameters according to the category of the control instruction.
10. The circuit system based on the AMR angle measurement device according to claim 9, characterized in that: The function parameters include the null value, the specified ID, and the interval value.
