A wire-saving single-turn absolute value magnetic encoder and an absolute position acquisition method
By designing a wire-saving single-turn absolute value magnetic encoder, the main control chip and magnetic induction angle chip are used to realize the initial angle pre-storage and real-time angle transmission of the motor rotor, the problem of numerous lines and difficulty in obtaining initial positions in the existing technology is solved, and the rapid and economical motor position acquisition is achieved.
Patent Information
- Application Number
- CN202011074556.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-09
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2040-10-09
AI Technical Summary
Existing magnetic encoders require multiple signal lines when obtaining the initial absolute position of the motor rotor, resulting in a large number of lines and high cost, and the inability to quickly obtain the initial position when powered on.
A single-turn absolute value magnetic encoder is designed, using the main control chip and the magnetic induction angle chip, and is connected to the driver board through the signal output of A and B, so as to realize the initial angle pre-storage and real-time angle transmission of the motor rotor, and eliminate the signal transmission stability of the U, V, W, and Z channel, and improve the signal transmission stability through the differential communication chip.
It realizes the rapid acquisition of the initial single-turn absolute position of the motor rotor when powered on, reduces the number of lines, reduces the cost, and improves positioning efficiency and signal transmission stability.
Smart Images

Figure CN112260592B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of encoders, and in particular to a wire-saving single-turn absolute value magnetic encoder applied to closed-loop control of a motor and a method for acquiring the absolute position of a motor rotor. Background Art
[0002] The device that converts angular displacement or linear displacement is called an encoder. According to the signal reading method, it can be divided into contact encoders and non-contact encoders. According to the type, it can be divided into photoelectric encoders and magnetic encoders. According to the scale method, it can be divided into incremental, absolute and hybrid types.
[0003] Magnetic encoders have gradually begun to develop in recent years. Magnetic encoders generally output absolute positions, and outputting absolute positions requires obtaining the initial position when the motor starts and the real-time position during the operation of the motor. In order to meet the initial position and real-time position acquisition functions, most of the magnetic encoders currently used for stepper motor and servo motor control on the market have six signals of A, B, Z, U, V, and W, as well as power VCC and GND lines, and most of them are transmitted using RS485 communication. Among them, the six signals of A, B, Z, U, V, and W are respectively led to A+, A-, B+, B-, Z+, Z-, U+, U-, V+, V-, W+, and W-. 12 lines are connected to the driver board, and together with the power VCC and GND lines, the existing magnetic encoders have a total of 14 lines. The A and B signal lines are used to determine the real-time position during the operation of the motor. The U, V, and W signal lines, i.e., the Hall signal lines, are used to roughly determine the initial position when the motor starts. The Z signal line is used to reset the motor position to zero every time the motor rotates, thereby reducing the accumulated error during the operation of the motor.
[0004] There are many studies on absolute encoders at home and abroad. The invention patent application with application number CN201710678148.4 discloses a multi-turn absolute encoder, which uses a single-turn absolute encoder for position detection during normal power supply and a single-chip microcomputer during normal power supply to record the data position data, and an ordinary encoder for position detection during power failure, and another single-chip microcomputer continues to record the position data after power failure. Although this patent can obtain the absolute value of the initial position of the motor, the structure is complex and the cost is too high. The invention patent application with application number CN201810694360.4 discloses a method of realizing the breakpoint position using a single-turn absolute encoder. This patent uses a main controller, a single-turn absolute encoder and a backup power supply. Although the function of storing the absolute position of the breakpoint is realized, it still does not achieve both wire saving and allowing the driver board to obtain the absolute position of the motor when powered on.
[0005] Therefore, the existing technology has yet to be developed. Summary of the invention
[0006] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to propose a wire-saving absolute magnetic encoder and a method for obtaining the absolute position of the motor rotor, aiming to make the magnetic encoder both wire-saving and able to obtain the initial single-turn absolute position of the motor rotor when powered on.
[0007] To achieve the above object, the present invention adopts the following technical solutions:
[0008] A wire-saving single-turn absolute magnetic encoder, comprising a main control chip and a magnetic induction angle chip connected to the main control chip, wherein the magnetic encoder is provided with two signal outputs A and B for connecting to a driving board;
[0009] The magnetic induction angle chip is used to obtain the angle of the motor rotor fixed at a position during the motor calibration phase and send it to the main control chip, and is also used to obtain the real-time angle of the motor rotor within the T time of startup during the motor operation phase and send it to the main control chip, and is also used to obtain the real-time angle of the motor rotor after the T time during the motor operation phase and send it to the driver board through A and B two-way signals;
[0010] The main control chip is used to store the angle of the motor rotor fixed at a position sent by the magnetic induction angle chip as the initial angle of the motor rotor during the motor calibration stage, and is also used to compare the real-time angle of the motor rotor with the initial angle within the startup time T during the motor operation stage to calculate the initial single-turn absolute position of the motor rotor, and send it to the drive board through A and B signals.
[0011] Wherein, the single-turn zeroing signal Z of the magnetic encoder to the motor rotor is realized by software.
[0012] Among them, it also includes a differential communication chip;
[0013] The input end of the differential communication chip is connected to the two signals A and B, and the output end of the differential communication chip is provided with four output lines A+, A-, B+, and B- for connecting to the driver board;
[0014] During the motor operation phase, the differential communication chip converts the initial single-turn absolute position of the motor rotor calculated by the main control chip within the startup time T and transmits it to the driver board in the form of pulses through four output lines A+, A-, B+, and B-;
[0015] During the motor operation phase, after the T time, the real-time angle of the motor rotor acquired by the magnetic induction angle chip is converted and transmitted to the drive board in the form of pulses through the four output lines A+, A-, B+, and B-.
[0016] Wherein, during the motor operation stage, the starting T time is 80ms.
[0017] Among them, the main control chip model is STM32031F4P6.
[0018] Wherein, the magnetic induction angle chip is AK7451.
[0019] Among them, the differential communication chip model is YD3082E.
[0020] The present invention also proposes a method for obtaining the absolute position of a motor rotor, wherein the method adopts the above-mentioned wire-saving single-turn absolute value magnetic encoder, and comprises the following steps:
[0021] Calibration stage: First, calibrate the motor to obtain the initial rotor angle of the motor and save it in the Flash of the main control chip;
[0022] Running phase: power on and start up. Within T time, obtain the real-time angle of the motor rotor, and read the initial angle of the motor rotor pre-stored in the Flash of the main control chip. Compare the real-time angle of the motor rotor with the initial angle to calculate the initial single-turn absolute position of the motor rotor and send it to the driver board. After the T time, obtain the real-time angle of the motor rotor and send it directly to the driver board.
[0023] The motor calibration process in the calibration phase includes:
[0024] Install the wire-saving single-turn absolute value magnetic encoder on the motor to be calibrated, and connect it to the calibration circuit board, the host computer and the driver board;
[0025] Power on, calibrate the circuit board to rotate the motor rotor to a fixed position and lock it;
[0026] The host computer sends a calibration command. After the main control chip on the magnetic encoder receives the calibration command, the magnetic induction angle chip will obtain the angle value of the motor rotor locking position and store it in the register of the magnetic induction angle chip.
[0027] The main control chip obtains the angle value in the register of the magnetic induction angle chip as the initial angle of the motor rotor and saves it in the Flash of the main control chip.
[0028] The processing process of the operation stage specifically includes:
[0029] After powering on, the main control chip of the magnetic encoder first determines whether it has received the calibration command sent by the host computer;
[0030] If received, calibration is performed;
[0031] If not received, it is assumed that the motor has been calibrated;
[0032] If it has been calibrated, then within T time, the magnetic induction angle chip will send the real-time angle of the motor rotor to the main control chip, and the main control chip will read the initial angle of the motor rotor pre-stored in its Flash. The main control chip will compare the two and calculate the initial single-turn absolute position of the motor rotor and send it to the driver board through A and B signals;
[0033] After T time, the magnetic induction angle chip will obtain the real-time angle of the motor rotor and send it directly to the driver board through the A and B signals, so that the driver board can control the rotation of the motor.
[0034] The wire-saving single-turn absolute magnetic encoder of the present invention stores the initial angle of the motor rotor after the motor is calibrated in the Flash of the main control chip in advance by setting a main control chip and a magnetic induction angle chip. During operation, within the startup T time, the real-time angle of the motor rotor is obtained and compared with the pre-stored initial angle to calculate the initial single-turn absolute position of the motor rotor and send it to the drive board through A and B two-way signals. After the startup T time, the obtained real-time angle of the motor rotor is directly sent to the drive board through A and B two-way signals. In this way, the wire-saving single-turn absolute magnetic encoder of the present invention no longer needs to set U, V, and W three-way signal lines to obtain the initial position of the rotor when the motor is started. Instead, within the T time when the magnetic encoder is powered on, the drive board directly receives the initial single-turn absolute position of the motor rotor sent from the magnetic encoder, so that the U+, U-, V+, V-, W+, and W- connection lines related to the U, V, and W three-way signals can be omitted. And the Z-path signal can also be realized by software, thereby saving the Z+ and Z-connecting wires. Thus, compared with the magnetic encoder with 14 wires in the prior art, the magnetic encoder of the present invention can save 8 wires. At the same time, since the magnetic encoder of the present invention directly stores the initial angle of the motor rotor, the initial single-turn absolute position of the motor rotor can be quickly obtained after power-on, without first obtaining the U, V, and W signals, and then obtaining the initial angle after conversion calculation, thereby improving the positioning efficiency. At the same time, the initial angle will not be lost after power failure, and there is no need to recalibrate and obtain it. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0036] Figure 1 This is a schematic diagram of the circuit principle of the first embodiment of the wire-saving single-turn absolute magnetic encoder of the present invention;
[0037] Figure 2This is a schematic diagram of the circuit principle of the second embodiment of the wire-saving single-turn absolute magnetic encoder of the present invention;
[0038] Figure 3 This is a schematic diagram of the circuit connection of the main control chip in the magnetic encoder of the present invention;
[0039] Figure 4 This is a schematic diagram of the circuit connection of the magnetic induction angle chip in the magnetic encoder of the present invention;
[0040] Figure 5 This is a circuit connection diagram of a differential communication chip in a magnetic encoder of the present invention;
[0041] Figure 6 It is a connection diagram of the low voltage difference voltage stabilizing circuit in the magnetic encoder of the present invention;
[0042] Figure 7 It is a flow chart of a first embodiment of a method for obtaining the absolute position of a motor rotor according to the present invention;
[0043] Figure 8 A schematic diagram of the flow chart of the motor calibration of the present invention;
[0044] Fig. 9 This is a schematic diagram of the processing flow after the magnetic encoder is powered on when the motor of the present invention is running.
[0045] Description of Reference Numerals
[0046] 100-magnetic encoder, 10-main control chip, 20-magnetic induction angle chip, 30-differential communication chip, 200-driver board. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] refer to Figure 1 The present invention proposes a wire-saving single-turn absolute magnetic encoder 100, including a main control chip 10 and a magnetic induction angle chip 20 connected to the main control chip 10. The magnetic encoder 100 is provided with two signal outputs A and B for connecting to a drive board 200. The magnetic encoder 100 also includes mechanical structural parts such as magnets, shells, etc. When in use, the wire-saving single-turn absolute magnetic encoder 100 is installed on the motor, and the magnet rotates with the motor rotor. The wire-saving single-turn absolute magnetic encoder 100 of the present invention is provided with a power connection line VCC and a ground connection GND.
[0049] The magnetic induction angle chip 20 is used to obtain the angle of the motor rotor fixed at a position during the motor calibration phase and send it to the main control chip 10. It is also used to obtain the real-time angle of the motor rotor within the startup T time during the motor operation phase and send it to the main control chip 10. It is also used to obtain the real-time angle of the motor rotor after the T time during the motor operation phase and send it to the drive board 200 through A and B signals.
[0050] The magnetic induction angle chip 20 of the present invention first obtains the angle of the motor rotor fixed at a position as the initial angle of the motor rotor during the calibration phase. With the initial angle, the initial single-turn absolute position can be calculated during the subsequent operation phase.
[0051] The main control chip 10 of the present invention is used to store the angle of the motor rotor fixed at a position sent by the magnetic induction angle chip 20 as the initial angle of the motor rotor during the motor calibration stage. The initial angle can be stored in the Flash or ROM of the main control chip 10. The main control chip 10 is also used to compare the real-time angle of the motor rotor with the initial angle during the startup T time during the motor operation stage to calculate the initial single-turn absolute position of the motor rotor, and send it to the drive board 200 through the A and B two-way signals.
[0052] That is, during operation, after startup, within T time, the main control chip 10 compares the real-time angle of the motor rotor sent by the magnetic induction angle chip 20 with the initial angle of the motor rotor pre-stored in the main control chip 10 to calculate the initial single-turn absolute position of the motor rotor, and outputs it to the drive board 200 through the A and B signal output terminals of the magnetic encoder 100. In this way, the drive board 200 obtains the initial single-turn absolute position of the electronic rotor when powered on, and then after starting T time, the magnetic induction angle chip 20 directly outputs the obtained real-time angle of the motor rotor to the drive board 200 through the A and B signals of the magnetic encoder 100. Since the drive board 200 has already obtained the initial single-turn absolute position of the motor rotor, the single-turn absolute position of the motor rotor can be obtained according to the subsequent real-time angle of the motor rotor.
[0053] In the motor operation stage of the present invention, the magnetic induction angle chip 20 of the magnetic encoder 100 obtains the real-time angle of the motor rotor within T after power-on and sends it to the main control chip 10 of the magnetic encoder 100. After the magnetic induction angle chip 20 of the magnetic encoder 100 is powered on for T, the real-time angle of the motor is obtained and the real-time angle is sent to the driving board 200 through the two-way signals A and B. The main control chip 10 of the magnetic encoder 100 only sends the absolute position of the single-turn of the motor rotor to the driving board 200 through the two-way signals A and B within T time after power-on.
[0054] Since the initial angle of the motor rotor of the present invention is stored in the main control chip 10 after being calibrated in advance, it can be directly called during operation. The magnetic encoder 100 of the present invention directly reads the single-turn absolute position of the motor rotor from the magnetic encoder 100 after power-on, without obtaining it through U, V, and W signals. Through control, the initial single-turn absolute position of the motor rotor can be obtained within T time after power-on and sent to the drive board 200, so that the drive board 200 can quickly respond to control the motor, thereby improving the positioning control efficiency.
[0055] Preferably, during the motor operation stage, the startup T time of the present invention is set to 80ms, that is, the present invention can obtain the initial single-turn absolute position of the motor rotor within 80ms after power-on and send it to the drive board 200, which can greatly improve the positioning control efficiency of the drive board 200.
[0056] That is, the acquisition of the initial position after the motor is powered on is obtained by the U, V, and W signals in the prior art. Within 80ms after the magnetic encoder of the present invention is powered on, the main control chip of the magnetic encoder obtains the real-time position of the motor rotor in the magnetic induction angle chip register and performs a difference calculation and conversion with the initial angle in its Flash, thereby eliminating the U+, U-, V+, V-, W+, and W- connection lines related to the U, V, and W signals in the existing magnetic encoder, thereby achieving the purpose of saving lines. At the same time, since the magnetic encoder 100 of the present invention directly stores the initial angle of the motor rotor, it will not be lost after power failure, and no recalibration is required after power failure.
[0057] Furthermore, the magnetic encoder 100 of the present invention implements the single-turn zeroing signal Z of the motor rotor by software. For example, the single-turn zeroing of the magnetic encoder 100 of the present invention can be implemented in the software by using a timer update interrupt, and the angle value of the motor rotor after running one turn can be cleared in the interrupt service function to achieve the effect of eliminating the cumulative error, which can further save the Z+ and Z- connecting wires related to the Z-line signal. In this way, the magnetic encoder 100 of the present invention can save a total of 9 wires, namely, U+, U-, V+, V-, W+, W-, Z+, and Z-. Compared with the 14-wire magnetic encoder in the prior art, it greatly saves the connecting wires and is easy to install.
[0058] like Figure 2 As shown, preferably, the magnetic encoder 100 of the present invention further includes a differential communication chip 30 .
[0059] The input end of the differential communication chip 30 is connected to the two signals A and B, and the output end of the differential communication chip 30 is provided with four output lines A+, A−, B+, and B− for connecting to the driving board 200 .
[0060] During the motor operation phase, the differential communication chip 30 converts the initial single-turn absolute position of the motor rotor calculated by the main control chip 10 within the startup time T and transmits it to the driver board 200 in a pulse manner (i.e. high and low levels) through the four output lines A+, A-, B+, and B-.
[0061] During the motor operation phase, the differential communication chip 30 converts the real-time angle of the motor rotor obtained by the magnetic induction angle chip 20 after the T time and transmits it to the drive board 200 in a pulsed manner through the four output lines A+, A-, B+, and B-.
[0062] The differential communication chip 30 enables the main control chip 10 and the magnetic induction angle chip 20 to transmit data with the driver board 200 in the RS485 communication mode. The differential communication chip 30 processes the A and B signals sent by the main control chip 10 or the magnetic induction angle chip 20 and sends them to the driver board 200 through A+, A-, B+, and B-, thereby reducing interference during signal transmission and improving the stability of signal transmission to ensure the accuracy of the driver board 200 in controlling the motor. At the same time, the differential communication chip 30 sets four output lines A+, A-, B+, and B- as signal connection lines of the magnetic encoder 100 of the present invention, plus the power supply VCC line and GND line. The magnetic encoder 100 of the embodiment of the present invention has a total of 6 lines, which is much less than the 14-line magnetic encoder in the prior art.
[0063] Specifically, Figure 3 As shown, the main control chip 10 of the present invention is model STM32031F4P6. Its A_in' pin outputs A-way signal, and B_in' pin outputs B-way signal, so as to send the initial single-turn absolute position of the motor rotor to the driver board 200 within the motor start-up T time. In this embodiment, the A_in' and B_in' pins are first connected to the differential communication chips U3 and U5, and then sent to the driver board 200 after differential processing. The CSQ, SCK, MISO, and MOSI pins of the main control chip 10 are connected to the magnetic induction angle chip 20 to obtain the real-time angle of the motor rotor in the magnetic induction angle chip U2 within the motor start-up T time and the initial angle of the motor rotor pre-stored in the main control chip U4 to calculate the initial single-turn absolute position of the motor rotor. As an embodiment, the Flash of the main control chip STM32031F4P6 of the present invention is used to pre-save the initial angle of the motor rotor obtained after the motor is calibrated.
[0064] like Figure 4As shown, the magnetic induction angle chip 20 of the present invention is AK7451. Its A_in and B_in pins output A and B signals to send the real-time angle of the motor rotor rotation process to the drive board 200. In this embodiment, the A_in and B_in pins are first connected to the differential communication chips U3 and U5, and then sent to the drive board 200 after differential processing. Since the present invention does not require U, V, W, and Z signals, the Z, U, V, and W pins of the magnetic induction angle chip U2 do not need to be connected to the circuit. It can be understood that in order to expand the scope, when the magnetic encoder 100 of the present invention is used on a brushless motor, the Z, U, V, and W pins of the magnetic induction angle chip U2 can be used.
[0065] like Figure 5 As shown, the differential communication chip 30 of the present invention is model YD3082E. The differential communication chips U3 and U5 of the present invention process the A and B signals sent by the main control chip U4 or the A and B signals sent by the magnetic induction angle chip U2 into differential signals and then send them from A_out+, A_out-, B_out+, and B_out-. Preferably, the present invention is provided with a P1 plug to connect A_out+, A_out-, B_out+, and B_out- to the driver 200.
[0066] like Figure 6 As shown, the magnetic encoder 100 of the present invention is also provided with a low voltage difference voltage stabilizing circuit for converting the input 5V DC into 3.3V for supplying the main control chip U4 and the differential communication chips U3 and U5. In the embodiment of the present invention, the low voltage difference voltage stabilizing circuit includes a low voltage difference voltage stabilizing chip U1, model ME6211A33M3.
[0067] like Figure 7 As shown, the present invention also proposes a method for obtaining the absolute position of a motor rotor, using the above-mentioned wire-saving single-turn absolute value magnetic encoder 100, comprising the following steps:
[0068] S701, calibration phase: firstly, the motor is calibrated to obtain the initial rotor angle of the motor and save it in the Flash of the main control chip.
[0069] That is, the absolute position of the motor rotor of the present invention is obtained by first using a wire-saving single-turn absolute magnetic encoder 100 to calibrate the motor to obtain the initial angle of the motor rotor of the motor and store it in the Flash of the main control chip 10 of the magnetic encoder 100, so that the initial angle can be directly used to obtain the initial position of the motor rotor when the power is turned on next time, and the stored initial angle will not be lost due to power failure.
[0070] S702, operation phase: power on and start, within T time, obtain the real-time angle of the motor rotor, and read the initial angle of the motor rotor pre-stored in the Flash of the main control chip, compare the real-time angle of the motor rotor with the initial angle to calculate the initial single-turn absolute position of the motor rotor and send it to the drive board, after the T time, obtain the real-time angle of the motor rotor and send it directly to the drive board.
[0071] That is, after the motor is calibrated, in the subsequent operation process, the present invention directly reads the initial angle of the motor rotor pre-stored in the Flash of the main control chip 10 of the magnetic encoder 100 within T time after power-on, and compares and calculates with the real-time angle of the motor rotor to obtain the initial single-turn absolute position of the motor rotor and sends it to the drive board 200. Then, after the startup T time, the real-time angle of the motor rotor is directly read and sent directly to the drive board 200. The drive board 200 compares the two to obtain the real-time absolute position of the motor rotor.
[0072] In this way, there is no need to obtain the initial position of the motor when it starts through U, V, and W signals as in the prior art, and the initial position in the prior art is lost after power failure. In this way, the present invention can save the U+, U-, V+, V-, W+, and W- connecting wires.
[0073] At the same time, in the method for obtaining the absolute position of the motor rotor of the present invention, the single-turn zeroing signal Z of the motor rotor is implemented by software, which can further save the Z+ and Z- connecting wires of the magnetic encoder 100.
[0074] Specifically, Figure 8 As shown, as an implementation mode, the motor calibration process in the calibration phase of the method of the present invention includes:
[0075] S801, install the wire-saving single-turn absolute magnetic encoder on the motor to be calibrated, and connect it to the calibration circuit board, the host computer and the driver board.
[0076] S802, power on, calibrate the circuit board so that the motor rotor rotates to a fixed position and locks it.
[0077] S803, the host computer sends a calibration instruction. After the main control chip on the magnetic encoder receives the calibration instruction, the magnetic induction angle chip will obtain the angle value of the motor rotor locking position and store it in the register of the magnetic induction angle chip.
[0078] S804, the main control chip obtains the angle value in the register of the magnetic induction angle chip as the initial angle of the motor rotor and saves it in the Flash of the main control chip.
[0079] The motor calibration of the present invention enables the magnetic encoder 100 to acquire and store the initial angle of the motor rotor in advance for subsequent calculation of the absolute position.
[0080] like Fig. 9 As shown, in the method of the present invention, the processing process of the operation stage specifically includes:
[0081] S901, start power-on, the main control chip of the magnetic encoder first determines whether it has received the calibration instruction sent by the host computer.
[0082] S902: If received, perform calibration.
[0083] S903, if not received, it is assumed that the motor has been calibrated.
[0084] S904, if it has been calibrated, then within T time, the magnetic induction angle chip will send the acquired real-time angle of the motor rotor to the main control chip, and the main control chip will read the initial angle of the motor rotor pre-stored in its Flash. The main control chip will compare the two and calculate the initial single-turn absolute position of the motor rotor and send it to the driver board through A and B signals.
[0085] S905, after T time, the magnetic induction angle chip sends the acquired real-time angle of the motor rotor directly to the driver board through the A and B signals, so that the driver board controls the rotation of the motor.
[0086] In this method, it is first determined whether the motor has been calibrated, thereby avoiding failure of the driver board to control the positioning of the motor due to failure to obtain the initial position.
[0087] The method for acquiring the absolute position of a single-turn absolute magnetic encoder 100 proposed in an embodiment of the present invention is to set a main control chip 10 and a magnetic induction angle chip 20, and store the initial angle of the motor rotor after the motor is calibrated in advance in the magnetic encoder 100. During operation, within the T time of startup, the real-time angle of the motor rotor is obtained and compared with the pre-stored initial angle to calculate the initial single-turn absolute position of the motor rotor and send it to the drive board 200 through the A and B two-way signals. After the T time of startup, the real-time angle of the motor rotor is directly sent to the drive board 200 through the A and B two-way signals. In this way, the single-turn absolute magnetic encoder 100 of the present invention no longer needs to set the U, V, and W three-way signal lines to acquire the initial position of the motor when it is started. Instead, within the T time of the magnetic encoder 100 being powered on, the drive board 200 directly receives the initial single-turn absolute position of the motor rotor sent from the magnetic encoder 100, so that the U+, U-, V+, V-, W+, and W- connection lines related to the U, V, and W three-way signals can be omitted. And the Z-path signal can also be realized by software, thereby saving the Z+ and Z-connection wires. Thus, compared with the magnetic encoder with 14 wires in the prior art, the magnetic encoder 100 of the present invention can save 8 wires. At the same time, since the magnetic encoder 100 of the present invention directly stores the initial angle of the motor rotor, the initial single-turn absolute position of the motor rotor can be quickly obtained after power-on, without first obtaining the U, V, and W signals, and then converting and calculating to obtain the initial angle, thereby improving the positioning efficiency. At the same time, the initial angle will not be lost after power failure, and there is no need to recalibrate and obtain it.
[0088] The above description is only an example to clearly illustrate the present invention, and does not limit the patent scope of the present invention. It is impossible to list all the implementation methods here. All equivalent structural changes made by using the contents of the technical solution of the present invention under the concept of the present invention, or directly / indirectly used in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A wire-saving single-turn absolute magnetic encoder, characterized in that: It includes a main control chip and a magnetic induction angle chip connected to the main control chip. The magnetic encoder is provided with two signal outputs A and B for connecting to the driving board; The magnetic induction angle chip is used to obtain the angle of the motor rotor fixed at a position during the motor calibration phase and send it to the main control chip, and is also used to obtain the real-time angle of the motor rotor within the T time of startup during the motor operation phase and send it to the main control chip, and is also used to obtain the real-time angle of the motor rotor after the T time during the motor operation phase and send it to the driver board through A and B two-way signals; The main control chip is used to store the angle of the motor rotor fixed at a position sent by the magnetic induction angle chip as the initial angle of the motor rotor during the motor calibration stage, and is also used to compare the real-time angle of the motor rotor with the initial angle within the T time of startup during the motor operation stage to calculate the initial single-turn absolute position of the motor rotor, and send it to the drive board through two signals A and B; The single-turn zeroing signal Z of the magnetic encoder to the motor rotor is realized by software; Also included is a differential communication chip; The input end of the differential communication chip is connected to the two signals A and B, and the output end of the differential communication chip is provided with four output lines A+, A-, B+, and B- for connecting to the driver board; During the motor operation phase, the differential communication chip converts the initial single-turn absolute position of the motor rotor calculated by the main control chip within the startup time T and transmits it to the driver board in the form of pulses through four output lines A+, A-, B+, and B-; During the motor operation phase, after the T time, the real-time angle of the motor rotor acquired by the magnetic induction angle chip is converted and transmitted to the drive board in the form of pulses through the four output lines A+, A-, B+, and B-.
2. The wire-saving single-turn absolute magnetic encoder according to claim 1, characterized in that: During the motor operation phase, the starting T time is 80ms.
3. The wire-saving single-turn absolute magnetic encoder according to claim 1, characterized in that: The main control chip model is STM32031F4P6.
4. The wire-saving single-turn absolute magnetic encoder according to claim 1, characterized in that: The magnetic induction angle chip is AK7451.
5. The wire-saving single-turn absolute magnetic encoder according to claim 1, characterized in that: The differential communication chip model is YD3082E.
6. A method for obtaining the absolute position of a motor rotor, characterized in that: The wire-saving single-turn absolute magnetic encoder according to any one of claims 1 to 5 is used, comprising the following steps: Calibration stage: First, calibrate the motor to obtain the initial rotor angle of the motor and save it in the Flash of the main control chip; Running phase: power on and start up. Within T time, obtain the real-time angle of the motor rotor, and read the initial angle of the motor rotor pre-stored in the Flash of the main control chip. Compare the real-time angle of the motor rotor with the initial angle to calculate the initial single-turn absolute position of the motor rotor and send it to the driver board. After the T time, obtain the real-time angle of the motor rotor and send it directly to the driver board.
7. The method according to claim 6, characterized in that The motor calibration process in the calibration phase includes: Install the wire-saving single-turn absolute value magnetic encoder on the motor to be calibrated, and connect it to the calibration circuit board, the host computer and the driver board; Power on, calibrate the circuit board to rotate the motor rotor to a fixed position and lock it; The host computer sends a calibration command. After the main control chip on the magnetic encoder receives the calibration command, the magnetic induction angle chip will obtain the angle value of the motor rotor locking position and store it in the register of the magnetic induction angle chip. The main control chip obtains the angle value in the register of the magnetic induction angle chip as the initial angle of the motor rotor and saves it in the Flash of the main control chip.
8. The method according to claim 7, characterized in that The processing process of the operation stage specifically includes: After powering on, the main control chip of the magnetic encoder first determines whether it has received the calibration command sent by the host computer; If received, calibration is performed; If not received, it is assumed that the motor has been calibrated; If it has been calibrated, then within T time, the magnetic induction angle chip will send the real-time angle of the motor rotor to the main control chip, and the main control chip will read the initial angle of the motor rotor pre-stored in its Flash. The main control chip will compare the two and calculate the initial single-turn absolute position of the motor rotor and send it to the driver board through A and B signals; After T time, the magnetic induction angle chip will obtain the real-time angle of the motor rotor and send it directly to the driver board through the A and B signals, so that the driver board can control the rotation of the motor.
Citation Information
Patent Citations
A multi-turn absolute encoder and its working method
CN107367289B
Method for realizing power-off position memory through utilizing single-turn absolute value encoder
CN108844558A
Stepping motor position detection device
CN209692537U
Wire-saving type single-loop absolute value magnetic encoder
CN213072495U