2D hall type combination switch rotation gear calibration method
Patent Information
- Application Number
- CN202610645205.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-12
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2046-05-12
AI Technical Summary
[0005]本发明旨在克服现有技术的不足,提供一种2D霍尔式组合开关旋转档位标定方法,实现组合开关旋转档位精准、同步的自动化标定,解决档位标定精度低、数据不同步的问题
[0025]With the above-mentioned further configuration, the rotary gear mechanism of this product mainly consists of a steel ball, a spring, and a stepped V-shaped inclined slider. The steel ball abuts against the inclined slider under the preload of the spring. When shifting gears, the rotational driving force drives the steel ball to move along the inclined plane, overcoming the top of the step to form a torque peak N5, corresponding to the point of greatest resistance to overcome the mechanism's limit; subsequently, the steel ball slides down the inclined plane to the bottom and enters the V-shaped uphill section, where the torque recovers under the inertia of the human hand operation. To achieve precise and tactile gear triggering, this method sets a trigger threshold: N6 = K3 × N5. The coefficient K3 is quantitatively determined according to the user's desired triggering feel: a smaller value for K3 is used when sensitive response is desired, and a larger value is used when robustness and prevention of accidental touch are desired. Considering the mechanical characteristics of the mechanism and human operating habits, the value of K3 ranges from 0.8 to 1.0. When the torque rises to N6, the steel ball is in the V-shaped uphill section, and the rotational force of the hand and the reaction force of the steel ball-spring mechanism tend to reach a stable balance. At this point, the gear is considered to be engaged. This solution uses an adjustable coefficient K3 to achieve dynamic configuration of the trigger point, which differs from the traditional 3D Hall effect patented fixed equivalent triggering method. It is more suitable for the mechanical characteristics of the rotating V-shaped inclined plane mechanism, effectively balancing trigger sensitivity, operational consistency, and structural stability. Similarly, for N8, the corresponding coefficient K4 can be adjusted according to the actual mechanical characteristics of different down-rotation gears, flexibly adapting to the feel requirements of different gears, further ensuring that the trigger position of each gear meets the design expectations and takes into account the usage needs of different operating scenarios.
Smart Images

Figure CN122172000B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive electronic product manufacturing and testing, specifically to a method for calibrating the rotary gear position of a 2D Hall effect combination switch. Background Technology
[0002] With the popularization of new energy vehicles, the functional integration of combination switches has continued to improve. Their rotary operating handles are mainly divided into two categories: lever-type and column shifter-type. Among them, the column shifter-type rotary handle, due to its ability to integrate multiple shifting functions such as D, N, R, and S in a single structure, and its built-in reset characteristic, along with the ability to rotate (twist) the handle up and down for shifting, offers outstanding operational convenience and has become the mainstream choice for column shifter operation in new energy vehicles. For this type of rotary combination switch, existing solutions mostly use 2D Hall effect sensors for gear position signal acquisition—the combination switch has a built-in 2D Hall effect sensor that determines the current gear function by detecting the rotational position and angle of a magnet in a two-dimensional magnetic field, and relies on software to preset a fixed threshold to trigger the gear. However, in actual production, objective factors such as component processing errors and assembly deviations cannot be completely avoided, leading to individual differences in the rotary gear trigger position between different products. This can easily cause problems such as premature triggering, delayed triggering, or gear skipping, resulting in malfunction of the column shifter operation and even serious driving safety accidents.
[0003] Currently available calibration technologies are also difficult to adapt to this type of demand. For example, the 3D Hall effect combination switch position calibration method disclosed in patent CN121348069A has obvious limitations: it uses a 3D Hall sensor, which not only increases hardware costs but also leads to increased data processing complexity; the solution is designed for linear toggle force scenarios and does not adapt to the torque characteristics of rotational motion; the synchronization mechanism relies on simple IO triggering, resulting in limited calibration accuracy; and it does not consider the inertial compensation requirements of rotational motion, so it cannot be directly applied to the rotational position calibration of combination switches.
[0004] Therefore, there is an urgent need to develop a 2D Hall effect combination switch rotary gear calibration method that is adapted to the characteristics of rotary motion, has high synchronization accuracy, low cost, and can match the ergonomic operating feel. Summary of the Invention
[0005] The present invention aims to overcome the shortcomings of the prior art and provide a 2D Hall effect combination switch rotary gear calibration method to achieve accurate and synchronous automated calibration of the rotary gear of the combination switch, and solve the problems of low gear calibration accuracy and data asynchrony.
[0006] The technical solution of the present invention is a calibrating method for the rotary gear position of a 2D Hall effect combination switch, which is based on a calibration system including a host computer, a CAN bus testing device, a PLC controller, a torque sensor, a servo motor mechanism, a second incremental encoder, a combination switch MCU, and a built-in 2D Hall sensor and magnet. The method includes the following steps: After receiving the start signal, the S1.PLC controller forwards the command to the CAN bus test equipment via the host computer, reads the initial gear Hall angle data of the rotary handle and judges its passability. If it passes, the initial calibration is completed; otherwise, it exits. The S2.CAN bus test equipment sends a rotation command, and the PLC controller controls the servo motor mechanism to drive the rotating handle to rotate forward to the target up-rotation position. Simultaneously, it collects the handle rotation torque data and servo motor rotation angle data at the current up-rotation position of the rotating handle, and forms a two-dimensional array of torque-servo motor rotation angle. S3. The combination switch MCU synchronously acquires the 2D Hall sensor data of the current upward rotation position of the rotary handle and calculates the Hall magnetic field deviation angle θ. The CAN bus test equipment synchronously acquires the second incremental encoder pulse signal of the current upward rotation position of the rotary handle and converts it into rotation angle, forming a two-dimensional array of Hall magnetic field deviation angle - second incremental encoder rotation angle. S4. The host computer determines the maximum operating torque and the servo motor rotation angle corresponding to the gear position torque point based on the two-dimensional array of torque-servo motor rotation angle, and matches it with the Hall magnetic field deviation angle in the two-dimensional array of Hall magnetic field deviation angle-second incremental encoder rotation angle. The matched Hall magnetic field deviation angle data is written into the combination switch product to complete the upper rotation calibration. The S5.PLC controller controls the servo motor mechanism to drive the rotary handle to reset and then rotate it in the opposite direction to the target down-rotation position, repeating the data acquisition and processing process to complete the down-rotation calibration.
[0007] The above technical solution utilizes a 2D Hall sensor to eliminate redundant Z-axis data and 3D angle calculations, significantly reducing data processing complexity and hardware costs. Dynamic phase synchronization is achieved through a second incremental encoder, replacing traditional fixed-delay synchronization and further improving data synchronization accuracy under rotational motion. A multi-dimensional correlation is established between servo motor rotation angle, torque, second incremental encoder rotation angle, and Hall magnetic field deviation angle data, enabling precise matching of rotational motion torque characteristics and adapting to the working mechanism of the column shifter handle. The gear trigger position is determined based on torque feature points, ensuring calibration results align with ergonomic operating feel, effectively eliminating individual differences caused by component processing errors and assembly deviations. This fundamentally avoids problems such as premature gear triggering, delayed triggering, and gear skipping, ensuring stable and reliable column shifter operation and improving driving safety. The entire system is constructed using general-purpose industrial components, has a high degree of automation, and can be stably applied in mass production lines, meeting the high efficiency and high consistency requirements of automotive electronics production testing.
[0008] A further setting of the present invention: In step S1, after the start button is pressed, the PLC controller acquires the start signal through IO and sends a start command to the host computer via Ethernet; the CAN bus test device requests to read the Hall angle data of the initial gear of the rotary handle at a period of no more than 10ms. If it is qualified, the initial gear calibration of the rotary handle is completed by writing a message; In step S3, the CAN bus test device synchronously requests to read the Hall magnetic field deviation angle data of the current upward gear of the rotary handle at a period of no more than 10ms.
[0009] By further configuring the above settings and coordinating the PLC controller and the host computer, the calibration process can be automatically triggered, eliminating the need for repeated manual operation and debugging. This simplifies the manpower required for the calibration startup phase. Simultaneously, by controlling the CAN bus message request cycle to within 10ms, the timeliness of Hall angle data acquisition is ensured, preventing the loss of crucial angle data during rotation due to signal reading delays. This ensures that information from each node is accurately captured and recorded, providing a complete and accurate raw data foundation for subsequent multi-dimensional data association. It also avoids feature point mismatches caused by excessively long data acquisition cycles, further improving the accuracy and efficiency of the entire calibration process.
[0010] A further provision of the present invention: the servo motor mechanism includes a servo motor, a servo driver, and a gripper; in step S2, the CAN bus test device sends a rotation calibration command to the host computer via Ethernet, the PLC controller controls the gripping and releasing of the gripper through a solenoid valve, and sends a positive direction signal and a pulse signal to the servo driver through a direction port and a pulse port, driving the servo motor to rotate the rotating handle held by the gripper at a uniform positive speed not exceeding a preset speed.
[0011] By employing the aforementioned further settings, the rotation speed of the rotary handle can be precisely controlled by the servo motor, stabilizing it within a preset range. This avoids the inconsistencies in speed that can occur during manual rotation, leading to missing data or uneven data density at certain gear positions. Simultaneously, the pneumatic gripper stably clamps the rotary handle, maintaining uniform force during rotation and preventing common issues like hand tremors and slippage common in manual operations. This ensures a smooth and continuous forward rotation, allowing both the torque sensor and Hall angle sensor to continuously and evenly acquire corresponding data. It prevents data gaps caused by interruptions or sudden speed changes during rotation, ensuring a consistent and complete correspondence between the torque-servo motor rotation angle two-dimensional array and the Hall angle data. This guarantees the reliability of calibration data from the rotation execution end. After rotation to the desired position, the servo motor stops rotating, and the pneumatic gripper remains in a clamping state, awaiting data storage confirmation. The entire execution process requires no manual intervention and is entirely automated, reducing operator workload and eliminating errors introduced by manual operation. This results in higher consistency in the forward rotation data acquisition process, ensuring uniform calibration conditions across different products and better repeatability of the final calibration results. It also prevents deviations in calibration results due to different operator habits.
[0012] A further feature of the present invention is that the torque sensor and the second incremental encoder are installed between the servo motor and the pneumatic gripper. The torque sensor is connected in series with the second incremental encoder and rotates coaxially with the pneumatic gripper. The torque sensor collects the rotation torque data of the rotary handle in real time and converts it into an analog voltage signal for the PLC controller to collect in real time. The PLC controller determines the rotation angle data of the servo motor of the current upward rotation position of the rotary handle in real time by pulse counting.
[0013] With the above-mentioned further configuration, the torque sensor and the second incremental encoder work together to accurately capture the torque changes of the handle during rotation and simultaneously obtain accurate rotation angle information. The coaxial series installation of the two also eliminates the angle error caused by installation on different axes, further improving the matching accuracy of torque and angle data. This provides more accurate raw data support for the subsequent generation of the two-dimensional array of Hall magnetic field deviation angle - second incremental encoder rotation angle, ensuring the accuracy of the reference for subsequent gear calibration.
[0014] A further setting of the present invention: In step S3, the combination switch MCU acquires Hall magnetic field data Bx and By of the XY plane coordinate system of the 2D Hall sensor at a rate of no more than 1ms each time, where Bx and By are the relative coordinates of the equivalent center of the magnet in the XY plane coordinate system relative to the center of the 2D Hall sensor; the deviation angle θ is calculated by the formula: θ=atan2(Bx,By), where θ is the angle between the line connecting the equivalent center point of the magnet in the combination switch and the midpoint of the 2D Hall sensor and the Y-axis, the 2D Hall sensor is the origin of the XY plane coordinate system, and the center of the plane center point of the 2D Hall sensor is the center of the Y-axis.
[0015] By employing the above-mentioned further settings, Hall magnetic field data is precisely acquired at a fixed frequency, matching the sampling frequencies of torque and angle to ensure that each torque-angle sampling point corresponds to a unique set of Hall output values, preventing multiple data points from overlapping or being missed. The deviation angle is calculated using the atan2 function, which, compared to ordinary arctangent calculation, can automatically identify the coordinate quadrants corresponding to the Bx and By signs, and the output range covers the complete circumferential angle from -π to π, avoiding angle deviations caused by quadrant judgment errors. This accurately restores the true angular offset of the magnet during rotation, and each set of data in the final corresponding array can accurately correspond to an actual position during rotation. After obtaining the complete two-dimensional array of Hall magnetic field deviation angle - second incremental encoder rotation angle, the position of each gear boundary can be located by combining the torque-angle data acquired in step S2. In the sensing space of the Hall sensor, the magnet is the magnetic field signal source, and the equivalent center point of the magnet can be simulated as an equivalent magnetic field signal source with a center point.
[0016] A further feature of this invention is that the CAN bus testing equipment integrates an MCU microcontroller, a CAN driver, a transceiver, and an orthogonal encoding pulse capture unit. The MCU microcontroller communicates with the combination switch via the CAN driver to acquire the Hall angle of the rotating handle in real time. Simultaneously, it acquires the A and B phase pulse encoding signals of the second incremental encoder via the orthogonal encoding pulse capture unit. The MCU microcontroller then calculates in real time and converts the pulse encoding signals into rotation angle data of the second incremental encoder, synchronizing the rotation angle data of the second incremental encoder with the Hall magnetic field deviation angle data, and sends it to the host computer. The CAN bus testing equipment can receive the calibration calculation results output by the host computer and write the results into the combination switch product via the CAN bus to complete the gear calibration.
[0017] With the above-mentioned further configuration, the CAN bus device directly integrates signal acquisition, calculation, and communication functions, eliminating the need for an additional multi-device collaborative acquisition platform. This simplifies the hardware setup process for calibration and ensures the synchronization of the Hall angle and the actual rotation angle of the rotary handle at the hardware level. The orthogonal encoding pulse capture unit directly acquires the pulse signal from the second incremental encoder, and the actual rotation angle obtained by the MCU microcontroller in real time has a much higher accuracy than the results of traditional manual recording or low-speed acquisition. It corresponds one-to-one with the Hall angle data, preventing position misalignment caused by time differences. Finally, the calibration results calculated by the host computer can be directly written into the combination switch product without the need for manual data transfer or manual programming. The entire calibration process is completed in one go, greatly improving calibration efficiency and reducing errors caused by manual operation.
[0018] A further setting of the present invention: the forward rotation in step S2 is clockwise rotation, and the target upward rotation gears are upward rotation gear 1 and upward rotation gear 2; in step S4, the host computer determines two maximum operating torques N1 and N3 based on the two-dimensional array of torque-servo motor rotation angle corresponding to the upward rotation gear, and finds the gear position torque points N2 and N4 based on the maximum operating torques N1 and N3, and then obtains the corresponding servo motor rotation angles A2 and A4 through the gear position torque points N2 and N4; the rotation angle of the second incremental encoder is the same as the rotation angle of the servo motor, which is A2 and A4. The host computer finds the corresponding Hall magnetic field deviation angles θ2 and θ4 in the Hall magnetic field deviation angle-second incremental encoder rotation angle relationship diagram through the rotation angles A2 and A4 of the second incremental encoder, and sends θ2 and θ4 to the CAN bus test device; the CAN bus test device writes the Hall magnetic field deviation angles θ2 and θ4 into the combination switch product to complete the gear position calibration of upward rotation gear 1 and upward rotation gear 2.
[0019] By employing the aforementioned further settings, the critical position of each gear can be precisely located. Traditional combination switch gear calibration mostly relies on the operator's manual perception to confirm the gear critical point. Differences in the feel of different operators will directly lead to deviations in the calibration position. However, by utilizing the characteristic that the torque first rises to the maximum operating torque during gear switching and then rapidly decreases after passing the critical point, the starting point of the gear interval corresponding to the two maximum torque points can be found through the torque curve. Combined with the torque point at the gear position, the rotation angle corresponding to the critical point can be located. There is no need for subjective human judgment at all, resulting in better calibration consistency. It is suitable for batch calibration operations on mass production lines. With the process of directly writing calibration parameters through the CAN bus, there is no need to add additional processes such as desoldering and soldering storage chips.
[0020] A further setting of the present invention: the torque point at which the gear is engaged satisfies: N2 = K1 × N1, N4 = K2 × N3; wherein the coefficients K1 and K2 are quantitatively determined according to the user's desired trigger feel requirements.
[0021] With the above-mentioned further configuration, the rotary gear mechanism of this product mainly consists of a steel ball, a spring, and a stepped V-shaped inclined slider. The steel ball abuts against the inclined slider under the preload of the spring. When shifting gears, the rotational driving force drives the steel ball to move along the inclined plane, overcoming the top of the step to form a torque peak N1, corresponding to the point of greatest resistance to overcome the mechanism's limit. Subsequently, the steel ball slides down the inclined plane to the bottom and enters the V-shaped uphill section, where the torque recovers under the inertia of the human hand operation. To achieve precise and tactile gear triggering, this method sets a trigger threshold: N2 = K1 × N1. The coefficient K1 is quantitatively determined according to the user's desired triggering feel: a smaller value for K1 is used when sensitive response is desired, and a larger value is used when robustness and prevention of accidental touch are desired. Considering the mechanical characteristics of the mechanism and human operating habits, the value of K1 ranges from 0.8 to 1.0. When the torque rises to N2, the steel ball is in the V-shaped uphill section, and the rotational force of the hand and the reaction force of the steel ball-spring mechanism tend to reach a stable balance. At this point, the gear is considered to be engaged. This solution uses an adjustable coefficient K1 to achieve dynamic configuration of the trigger point, which differs from the traditional 3D Hall effect patented fixed equivalent triggering method. It is more suitable for the mechanical characteristics of the rotating V-shaped inclined plane mechanism, effectively balancing trigger sensitivity, operational consistency, and structural stability. Similarly, for N4, the corresponding coefficient K2 can be adjusted according to the actual mechanical characteristics of different gears, flexibly adapting to the feel requirements of different gears, further ensuring that the trigger position of each gear meets the design expectations and takes into account the usage needs of different operating scenarios.
[0022] A further setting of the present invention: the reverse rotation in step S5 is counterclockwise rotation, and the target downward rotation gears are downward rotation gear 1 and downward rotation gear 2; the host computer determines two maximum operating torques N5 and N7 based on the two-dimensional array of torque-servo motor rotation angle corresponding to the downward rotation gear, and finds the gear position torque points N6 and N8 based on the maximum operating torques N5 and N7, and then obtains the corresponding servo motor rotation angles A6 and A8 through the gear position torque points N6 and N8; the rotation angle of the second incremental encoder is the same as the rotation angle of the servo motor, which is A6 and A8. The host computer finds the corresponding Hall magnetic field deviation angles θ6 and θ8 in the Hall magnetic field deviation angle-second incremental encoder rotation angle relationship diagram through the rotation angles A6 and A8 of the second incremental encoder, and sends θ6 and θ8 to the CAN bus test device; the CAN bus test device writes the Hall magnetic field deviation angles θ6 and θ8 into the combination switch product to complete the gear position calibration of downward rotation gear 1 and downward rotation gear 2.
[0023] By employing the aforementioned further settings, the automatic positioning of the reverse gear critical point is achieved by utilizing the torque variation pattern during the downward rotation. This completely covers all gear calibration scenarios for bidirectional rotation of the combination switch, eliminating calibration accuracy deviations due to different rotation directions. Consistent with the upward rotation gear calibration logic, the entire process relies entirely on objective data from the torque curve to locate the critical point. This eliminates calibration errors caused by differences in human feel and maintains consistency in bidirectional calibration standards, ensuring uniform trigger positions for each gear within the same batch of products. It prevents issues such as some products having accurate upward rotation gears while the downward rotation gears are misaligned. Furthermore, the entire calibration process is automated. From data acquisition to parameter writing, everything is executed automatically by the equipment. Operators only need to start the rotation according to the procedure; no additional manual judgment or adjustment is required. This significantly improves production efficiency in the calibration process, reduces reliance on skilled operators, and facilitates wider adoption on automotive parts mass production lines. The entire calibration method, from initial calibration to writing bidirectional gear parameters, forms a complete automated calibration closed loop. It not only adapts to the sensing characteristics of 2D Hall effect combination switches, but also solves the pain points of poor accuracy and low consistency of traditional calibration methods. It can effectively improve the user experience of the finished combination switch after installation in the vehicle and reduce the probability of gear mis-triggering.
[0024] A further setting of the present invention: the torque point at which the gear is engaged satisfies: N6=K3×N5, N8=K4×N7; wherein the coefficients K3 and K4 are quantitatively determined according to the user's desired trigger feel requirements.
[0025] With the above-mentioned further configuration, the rotary gear mechanism of this product mainly consists of a steel ball, a spring, and a stepped V-shaped inclined slider. The steel ball abuts against the inclined slider under the preload of the spring. When shifting gears, the rotational driving force drives the steel ball to move along the inclined plane, overcoming the top of the step to form a torque peak N5, corresponding to the point of greatest resistance to overcome the mechanism's limit; subsequently, the steel ball slides down the inclined plane to the bottom and enters the V-shaped uphill section, where the torque recovers under the inertia of the human hand operation. To achieve precise and tactile gear triggering, this method sets a trigger threshold: N6 = K3 × N5. The coefficient K3 is quantitatively determined according to the user's desired triggering feel: a smaller value for K3 is used when sensitive response is desired, and a larger value is used when robustness and prevention of accidental touch are desired. Considering the mechanical characteristics of the mechanism and human operating habits, the value of K3 ranges from 0.8 to 1.0. When the torque rises to N6, the steel ball is in the V-shaped uphill section, and the rotational force of the hand and the reaction force of the steel ball-spring mechanism tend to reach a stable balance. At this point, the gear is considered to be engaged. This solution uses an adjustable coefficient K3 to achieve dynamic configuration of the trigger point, which differs from the traditional 3D Hall effect patented fixed equivalent triggering method. It is more suitable for the mechanical characteristics of the rotating V-shaped inclined plane mechanism, effectively balancing trigger sensitivity, operational consistency, and structural stability. Similarly, for N8, the corresponding coefficient K4 can be adjusted according to the actual mechanical characteristics of different down-rotation gears, flexibly adapting to the feel requirements of different gears, further ensuring that the trigger position of each gear meets the design expectations and takes into account the usage needs of different operating scenarios. Attached Figure Description
[0026] Figure 1 This is a schematic diagram of the modules of the calibration system of the present invention; Figure 2 This is a two-dimensional curve showing the relationship between torque and the rotation angle of the servo motor. Figure 3 This is a two-dimensional curve showing the relationship between the Hall magnetic field deviation angle and the rotation angle of the second incremental encoder. Detailed Implementation
[0027] The technical solutions in this embodiment will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] like Figure 1-3As shown, this invention discloses a 2D Hall effect combination switch rotary gear calibration method, applied to the testing of the rotary handle of a combination switch. The method is based on a calibration system comprising a host computer, a CAN bus testing device, a PLC controller, a torque sensor, a servo motor mechanism, a second incremental encoder, a combination switch MCU, and a 2D Hall sensor and magnet built into the combination switch. The actuator includes a servo driver, a servo motor, and a pneumatic gripper. The PLC controller controls the gripping and releasing of the pneumatic gripper via a solenoid valve and sends positive direction signals and pulse signals to the servo driver via a direction port and a pulse port, driving the servo motor to rotate the rotary handle held by the pneumatic gripper at a uniform forward speed not exceeding a preset speed. The torque sensor and the second incremental encoder are installed... Between the servo motor and the gripper, a torque sensor is connected in series with a second incremental encoder and rotates coaxially with the gripper. The torque sensor collects the rotation torque data of the rotary handle in real time and converts it into an analog voltage signal for the PLC controller to collect in real time. The PLC controller determines the rotation angle data of the servo motor for the current upshift position of the rotary handle in real time by pulse counting. The CAN bus test equipment integrates an MCU microcontroller, a CAN driver, a transceiver, and an orthogonal encoder pulse capture unit. The CAN bus test equipment can receive the calibration calculation results output by the host computer and write the results into the combination switch product through the CAN bus to complete the gear calibration.
[0029] The specific steps of the calibration method are as follows: S1. Initial gear calibration; When the operator presses the equipment start button, the PLC controller collects the start signal through the IO port and sends the start command to the host computer via Ethernet. The host computer starts the test program and forwards the command to the CAN bus test device. The CAN bus testing equipment sends messages through the CAN bus at a period of no more than 10ms to request the reading of the Hall angle data of the initial position of the rotary handle and to determine whether the initial angle is qualified. If qualified, the initial position calibration of the rotary handle is completed by writing the message. If unqualified, the product component is determined to be abnormal and the calibration process is exited, providing an accurate reference for subsequent rotation calibration. S2. Forward Rotation and Torque - Formation of a Two-Dimensional Array of Servo Motor Rotation Angles After the initial calibration is completed, the CAN bus test equipment sends a rotation calibration command via Ethernet, which is forwarded to the PLC controller by the host computer. The PLC controller controls the gripper to hold the rotating handle and sends direction signals and pulse signals to the servo driver, which drives the servo motor to rotate the rotating handle clockwise at a uniform speed, and sequentially completes the target rotation gears of 1st and 2nd gear. During rotation, the torque sensor collects the rotation torque data of the rotary handle in real time and converts it into an analog voltage signal for the PLC controller to collect in real time. The PLC controller detects the current number of pulses in real time through its internal pulse counter and converts it into the rotation angle of the servo motor for the current up-rotation gear of the rotary handle, forming a two-dimensional array of torque and servo motor rotation angle corresponding to up-rotation gear 1 and up-rotation gear 2. S3. Hall magnetic field deviation angle - two-dimensional array of rotation angle of the second incremental encoder is formed; The combination switch MCU synchronously acquires 2D Hall sensor data of the current upward rotation position of the rotary handle and calculates the Hall magnetic field deviation angle θ: The combination switch MCU acquires Hall magnetic field data Bx and By of the XY plane coordinate system of the 2D Hall sensor in real time at a rate of no more than 1ms each time; where Bx and By are the relative coordinates of the equivalent center of the magnet in the XY plane coordinate system relative to the center of the 2D Hall sensor. Taking the 2D Hall sensor as the origin of the XY plane coordinate system and the center of the 2D Hall sensor plane as the Y-axis axis, the deviation angle θ is calculated by the formula: θ=atan2(Bx,By), where θ is the angle between the line connecting the equivalent center point of the magnet in the combination switch and the midpoint of the 2D Hall sensor and the Y-axis. While the PLC controller controls the gripper to hold the rotary handle, the CAN bus test equipment synchronously requests to read the Hall magnetic field deviation angle data of the current upward rotation position of the rotary handle at a period of no more than 10ms. The MCU microcontroller communicates with the combination switch through the CAN driver, and at the same time acquires the A and B phase pulse encoding signals of the second incremental encoder through the quadrature encoding pulse capture unit. The MCU microcontroller then calculates the pulse signal of the second incremental encoder at the current up-rotation position of the rotary handle in real time and converts it into a rotation angle. The CAN bus test equipment associates the Hall magnetic field deviation angle θ collected at the same time with the rotation angle of the second incremental encoder to form a two-dimensional array of Hall magnetic field deviation angle and second incremental encoder rotation angle corresponding to the first and second rotations, and sends the synchronized Hall magnetic field deviation angle data and second incremental encoder rotation angle data to the host computer. S4. Upward gear calibration; The host computer receives a two-dimensional array of torque-servo motor rotation angle corresponding to the first and second gears of the up-rotation and a two-dimensional array of Hall magnetic field deviation angle-second incremental encoder rotation angle corresponding to the first and second gears of the up-rotation. The host computer determines two maximum operating torques N1 and N3 based on the two-dimensional array of torque and servo motor rotation angle corresponding to the first and second gears. Based on the maximum operating torques N1 and N3, it finds the gear position torque points N2 and N4, where N2 = K1 × N1 and N4 = K2 × N3. Then, it obtains the corresponding servo motor rotation angles A2 and A4 through the gear position torque points N2 and N4. The rotation angles of the second incremental encoder and the servo motor are the same, namely A2 and A4. The host computer uses the rotation angles A2 and A4 of the second incremental encoder to find the corresponding Hall magnetic field deviation angles θ2 and θ4 in the Hall magnetic field deviation angle-second incremental encoder rotation angle relationship graph corresponding to the first and second gear rotation, and sends θ2 and θ4 to the CAN bus test device. The CAN bus testing equipment writes the Hall magnetic field deviation angles θ2 and θ4 into the combination switch product via the CAN bus, completing the gear calibration for the first and second gears.
[0030] S5. Reverse rotation and downshift gear calibration; After the servo motor is reset to the initial position, the host computer sends a reverse rotation calibration command to the lower computer system. After receiving the command, the PLC controller maintains the stable grip of the pneumatic gripper on the rotating handle, outputs a counterclockwise control signal through the direction port, and sends a continuous pulse signal to the servo driver through the pulse port. This drives the servo motor to rotate the rotating handle at the same speed as the forward rotation, and completes the target downward rotation positions of 1st and 2nd gear in sequence. During the counterclockwise rotation, the PLC controller tracks the rotation angle of the servo motor in real time through pulse counting, and at the same time continuously collects the rotation torque signal through the torque sensor. The torque is correlated with the rotation angle of the servo motor in real time to form a two-dimensional array of torque-servo motor rotation angle corresponding to the first and second gears of downward rotation, and is uploaded to the host computer in real time. The CAN bus test equipment associates the Hall magnetic field deviation angle θ collected at the same time with the rotation angle of the second incremental encoder to form a two-dimensional array of Hall magnetic field deviation angle and second incremental encoder rotation angle corresponding to the first and second gears of downward rotation, and sends the synchronized Hall magnetic field deviation angle data and second incremental encoder rotation angle data to the host computer. The host computer determines two maximum operating torques N5 and N7 based on the two-dimensional array of torque and servo motor rotation angle corresponding to downshift 1 and downshift 2. Based on the maximum operating torques N5 and N7, it finds the gear position torque points N6 and N8, where N6 = K3 × N5 and N8 = K4 × N7. Then, it obtains the corresponding servo motor rotation angles A6 and A8 through the gear position torque points N6 and N8. The rotation angle of the second incremental encoder is the same as that of the servo motor, namely A6 and A8. The host computer uses the rotation angles A6 and A8 of the second incremental encoder to find the corresponding Hall magnetic field deviation angles θ6 and θ8 in the Hall magnetic field deviation angle-second incremental encoder rotation angle relationship diagram corresponding to the first and second gears of downward rotation, and sends θ6 and θ8 to the CAN bus test device. The CAN bus test equipment writes the Hall magnetic field deviation angles θ6 and θ8 into the combination switch product via the CAN bus, completing the gear calibration for downshift 1 and downshift 2, and the overall calibration process is completed.
[0031] The values of the above coefficients K1-K4 range from 0.8 to 1.0.
[0032] This method utilizes an automated mechanism to complete the rotation and data acquisition process, eliminating the need for manual positioning and judgment. This avoids angular deviations caused by manual operation and significantly improves calibration efficiency. Furthermore, by matching the gear boundary through torque mutation points, this method accurately captures the mechanical feedback during gear shifting. Combined with synchronously acquired 2D Hall magnetic field data, it enables the calibration parameters written into the combination switch product to better reflect the actual mechanical characteristics of the product. This solves the problems of gear shifting stuttering and gear identification errors caused by inaccurate manual positioning and blurred gear boundaries in traditional calibration.
[0033] It should be noted that in the description of this invention, all directional indications (such as up, down, forward, backward, etc.) are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0034] Furthermore, in this invention, the use of terms such as "first," "second," etc., is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. In the description of this invention, "a number" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0035] In the description of this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," "fixing," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
Claims
1. A 2D Hall type combination switch rotary position calibration method, characterized in that, It is based on a calibration system that includes a host computer, CAN bus testing equipment, PLC controller, torque sensor, servo motor mechanism, second incremental encoder, combination switch MCU, and built-in 2D Hall sensor and magnet; The method includes the following steps: After receiving the start signal, the S1.PLC controller forwards the command to the CAN bus test equipment via the host computer, reads the initial gear Hall angle data of the rotary handle and judges its passability. If it passes, the initial calibration is completed; otherwise, it exits. The S2.CAN bus test equipment sends a rotation command, and the PLC controller controls the servo motor mechanism to drive the rotating handle to rotate forward to the target up-rotation position. Simultaneously, it collects the handle rotation torque data and servo motor rotation angle data at the current up-rotation position of the rotating handle, and forms a two-dimensional array of torque-servo motor rotation angle. S3. The combination switch MCU synchronously acquires the 2D Hall sensor data of the current upward rotation position of the rotary handle and calculates the Hall magnetic field deviation angle θ. The CAN bus test equipment synchronously acquires the second incremental encoder pulse signal of the current upward rotation position of the rotary handle and converts it into rotation angle, forming a two-dimensional array of Hall magnetic field deviation angle - second incremental encoder rotation angle. S4. The host computer determines the maximum operating torque and the servo motor rotation angle corresponding to the gear position torque point based on the two-dimensional array of torque-servo motor rotation angle. Since the servo motor and the second incremental encoder rotate coaxially, their rotation angle values are equal. Using the above angle as the search index, the corresponding Hall magnetic field deviation angle is matched in the two-dimensional array of Hall magnetic field deviation angle-second incremental encoder rotation angle. The matched Hall magnetic field deviation angle data is then written into the combination switch product to complete the upper rotation calibration. The S5.PLC controller controls the servo motor mechanism to drive the rotary handle to reset and then rotate it in the opposite direction to the target down-rotation position, repeating the data acquisition and processing process to complete the down-rotation calibration.
2. The 2D Hall type combination switch rotary position calibration method according to claim 1, characterized in that, In step S1, after the start button is pressed, the PLC controller acquires the start signal through IO and sends the start command to the host computer via Ethernet; the CAN bus test device requests to read the Hall angle data of the initial gear of the rotary handle at a period of no more than 10ms. If it is qualified, the initial gear calibration of the rotary handle is completed by writing a message; in step S3, the CAN bus test device synchronously requests to read the Hall magnetic field deviation angle data of the current upward gear of the rotary handle at a period of no more than 10ms.
3. The 2D Hall type combination switch rotary position calibration method according to claim 1, characterized in that, The servo motor mechanism includes a servo motor, a servo driver, and a gripper; in step S2, the CAN bus test device sends a rotation calibration command to the host computer via Ethernet, the PLC controller controls the gripping and releasing of the gripper through a solenoid valve, and sends a positive direction signal and a pulse signal to the servo driver through the direction port and pulse port, driving the servo motor to drive the rotating handle held by the gripper to rotate uniformly in the positive direction at a speed not exceeding the preset speed.
4. The 2D Hall type combination switch rotary position calibration method according to claim 3, characterized in that, The torque sensor and the second incremental encoder are installed between the servo motor and the pneumatic gripper. The torque sensor is connected in series with the second incremental encoder and rotates coaxially with the pneumatic gripper. The torque sensor collects the rotation torque data of the rotary handle in real time and converts it into an analog voltage signal for the PLC controller to collect in real time. The PLC controller determines the rotation angle data of the servo motor of the current upward rotation position of the rotary handle in real time by pulse counting.
5. The 2D Hall type combination switch rotary position calibration method according to claim 1, characterized in that, In step S3, the combination switch MCU acquires Hall magnetic field data Bx and By of the 2D Hall sensor in the XY plane coordinate system at a rate of no more than 1ms each time. Bx and By are the relative coordinates of the equivalent center of the magnet in the XY plane coordinate system relative to the center of the 2D Hall sensor. The deviation angle θ is calculated by the formula: θ=atan2(Bx,By), where θ is the angle between the line connecting the equivalent center point of the magnet in the combination switch and the midpoint of the 2D Hall sensor and the Y-axis. The 2D Hall sensor is the origin of the XY plane coordinate system, and the center of the plane center point of the 2D Hall sensor is the center of the Y-axis.
6. The 2D Hall effect combination switch rotary position calibration method according to claim 1, characterized in that, The CAN bus testing equipment integrates an MCU microcontroller, a CAN driver, a transceiver, and an orthogonal encoding pulse capture unit. The MCU microcontroller communicates with the combination switch via the CAN driver to acquire the Hall angle of the rotating handle in real time. Simultaneously, it acquires the A and B phase pulse encoding signals of the second incremental encoder via the orthogonal encoding pulse capture unit. The MCU microcontroller then calculates in real time and converts the pulse encoding signals into rotation angle data of the second incremental encoder, synchronizing the rotation angle data of the second incremental encoder with the Hall magnetic field deviation angle data, and sends it to the host computer. The CAN bus testing equipment can receive the calibration calculation results output by the host computer and write the results into the combination switch product via the CAN bus to complete the gear calibration.
7. The 2D Hall effect combination switch rotary position calibration method according to claim 1, characterized in that, In step S2, the forward rotation is clockwise rotation, and the target upward rotation gears are upward rotation gear 1 and upward rotation gear 2. In step S4, the host computer determines two maximum operating torques N1 and N3 based on the two-dimensional array of torque-servo motor rotation angle corresponding to the upward rotation gear, and finds the gear position torque points N2 and N4 based on the maximum operating torques N1 and N3. Then, it obtains the corresponding servo motor rotation angles A2 and A4 through the gear position torque points N2 and N4. The rotation angles of the second incremental encoder are the same as the rotation angles of the servo motor, namely A2 and A4. The host computer finds the corresponding Hall magnetic field deviation angles θ2 and θ4 in the Hall magnetic field deviation angle-second incremental encoder rotation angle relationship diagram through the rotation angles A2 and A4 of the second incremental encoder, and sends θ2 and θ4 to the CAN bus test device. The CAN bus test device writes the Hall magnetic field deviation angles θ2 and θ4 into the combination switch product to complete the gear calibration of upward rotation gear 1 and upward rotation gear 2.
8. The 2D Hall effect combination switch rotary position calibration method according to claim 7, characterized in that, The torque point at which the gear is engaged satisfies: N2 = K1 × N1, N4 = K2 × N3; The coefficients K1 and K2 are determined quantitatively based on the user's desired trigger feel.
9. The 2D Hall effect combination switch rotary position calibration method according to claim 1, characterized in that, The reverse rotation mentioned in step S5 is counterclockwise rotation, and the target downward rotation gears are downward rotation gear 1 and downward rotation gear 2; The host computer determines two maximum operating torques N5 and N7 based on the two-dimensional array of torque and servo motor rotation angle corresponding to the downshift gear, and finds the gear position torque points N6 and N8 based on the maximum operating torques N5 and N7. Then, it obtains the corresponding servo motor rotation angles A6 and A8 through the gear position torque points N6 and N8. The rotation angles of the second incremental encoder are the same as the servo motor rotation angles, A6 and A8. The host computer finds the corresponding Hall magnetic field deviation angles θ6 and θ8 in the Hall magnetic field deviation angle-second incremental encoder rotation angle relationship diagram through the rotation angles A6 and A8 of the second incremental encoder, and sends θ6 and θ8 to the CAN bus test device. The CAN bus test device writes the Hall magnetic field deviation angles θ6 and θ8 into the combination switch product to complete the gear position calibration of downshift 1 and downshift 2.
10. The 2D Hall effect combination switch rotary position calibration method according to claim 9, characterized in that, The torque point at which the gear is engaged satisfies: N6 = K3 × N5, N8 = K4 × N7; where the coefficients K3 and K4 are quantified and determined according to the user's desired trigger feel.
Citation Information
Patent Citations
Gear calibration method of 3D Hall type combination switch
CN121348069A
Gear calibration method and system for electronic gear shifter
CN113218670A
Angle detection device
JP2022006629A