Structure and method for detecting position of linear motor through Hall encoder
By using Hall encoders to detect the position of linear motors and utilizing the uniform distribution and logical operations of Hall sensors within the pole pitch range, the high cost and poor robustness of existing linear motor position detection technologies are solved, achieving high-precision and highly interference-resistant position detection.
Patent Information
- Application Number
- CN202411515950.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2024-11-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing linear motor position detection methods suffer from high cost, large size, strict environmental requirements, high installation difficulty, and poor robustness due to the lack of position sensor detection technology. In particular, they suffer from unstable signal feedback and inability to control properly when magnetic components are missing in non-linear applications.
Hall encoders are used to detect the position of linear motors. Hall sensors are evenly distributed within the pole pitch range of the linear motor. The Hall output signals are processed by logic operations to avoid interference caused by missing magnetic components and improve control accuracy.
It enables accurate acquisition of linear motor position information in multiple positions, reduces costs, enhances anti-interference capabilities, improves control accuracy, and the Hall sensor has a robust structure, small size, long lifespan, and is adaptable to various environments.
Smart Images

Figure CN119022770A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of logistics sorting, and in particular relates to a structure and a method for detecting the position of a linear motor by using a Hall encoder. Background Art
[0002] One of the key links in the study of linear motor control systems is the position detection link, which directly affects the control cost and performance of the linear motor. The position detection accuracy is crucial to the control accuracy of the motor. The methods for detecting the magnetic pole position of a linear motor are mainly divided into two categories: detection method with position sensor and detection method without position sensor. Currently, the most commonly used position sensors include magnetic grating, optical grating, pull rod displacement sensor and Hall sensor. Among them, although magnetic grating and optical grating have high detection accuracy, they are expensive, large in size, and have high requirements for the working environment, which seriously limits the scope of use of the motor; However, magnetic scales and encoders have strict requirements on installation accuracy, which increases the difficulty of processing and design, and there is also the problem of reduced structural accuracy after component aging; Secondly, the magnetic encoder or optical encoder has an independent running track. During the movement, the running stroke of the logistics line in curved sections, uphill sections, etc. will be different from that of the linear motor. Therefore, the current magnetic encoder or optical encoder needs to be kept horizontal relative to the magnetic scale or optical scale and the horizontal and vertical directions should not be offset as much as possible. It is only suitable for straight line applications. When the magnet is missing, the magnetic encoder or optical encoder will not be able to receive feedback signals, resulting in the inability to control the linear motor normally.
[0003] There are many types of position sensorless detection technologies, but they are highly dependent on motor parameters and have poor control robustness. Therefore, a solution is needed to solve the above problems.
[0004] It should be noted that the above contents belong to the technical knowledge of the inventor and do not necessarily constitute prior art. Summary of the invention
[0005] In order to solve the above problems, the purpose of the present invention is to provide a structure and method for detecting the position of a linear motor through a Hall encoder, which performs logical operations on Hall outputs in multiple positions, avoids interference caused by the lack of magnetic parts, reduces the cost of position sensors, and improves the control accuracy of the linear motor.
[0006] To achieve the above-mentioned purpose, the present invention proposes a structure for detecting the position of a linear motor through a Hall encoder, characterized in that it includes a linear motor and an encoder, the linear motor includes a running track and two magnetic component groups with opposite magnetic properties, the magnetic component groups are movably arranged on the running track and move horizontally along the extension direction of the running track, the linear motor and the encoder correspond to the same running track, the encoder is communicatively connected to a single-chip microcomputer, the encoder includes a plurality of Hall sensors, the Hall sensors are arranged within the pole pitch range of the linear motor, the Hall sensors output corresponding Hall signals by detecting the magnetic field signals of the magnetic components, and the single-chip microcomputer performs logical operations on the Hall outputs of the same position under different magnetic components to obtain accurate position information.
[0007] In one example, the Hall sensor outputs a high level signal when the magnetic field of the magnetic component is N, and the Hall sensor outputs a low level signal when the magnetic field of the magnetic component is S.
[0008] In one example, the number of the Hall sensors is several groups, and when the number of the Hall sensors is 2N+1, the accuracy is L / 2(2N+1), and when the number of the Hall sensors is 2N, the accuracy is L / 2N.
[0009] In one example, the total length of two adjacent magnetic members is the same as the pole pitch length of the linear motor.
[0010] In one example, the Hall sensors are mounted on the stator side of the linear motor and are evenly distributed with a pole pitch of 2 / N along the NS direction.
[0011] A method for detecting the position of a linear motor by using a Hall encoder comprises the following steps: S1: During the operation of the linear motor, the magnetic part moves together in the running track, and the Hall sensor outputs a corresponding Hall signal by detecting the magnetic field signal of the magnetic part. As the position of the magnetic part moves, the Hall sensor directly outputs 1 or 0, and sends the data collected by the Hall sensor to the single-chip microcomputer; S2: The signal output by the Hall sensor is transmitted to the single chip microcomputer, and the single chip microcomputer performs AND operation on the Hall outputs at the same position under different magnetic parts through logic software, and then performs AND operation on the remainder of the result to avoid the high level of the Hall output in the suspended state affecting the final result; S3: The single chip microcomputer obtains the accurate position of the corresponding magnetic component according to the data collected by the Hall sensor, and adjusts the operation of the linear motor according to the state of the magnetic component.
[0012] A method for detecting the position of a linear motor by using a Hall encoder comprises the following steps: S1: During the operation of the linear motor, the magnetic part moves together in the running track, and the Hall sensor outputs a corresponding Hall signal by detecting the magnetic field signal of the magnetic part. As the position of the magnetic part moves, the Hall sensor directly outputs 1 or 0; S2: The output signal of the Hall sensor is transmitted to the logic gate chip, and the logic gate chip performs AND operation on the Hall outputs at the same position under different magnetic parts in pairs through the AND gate chip, and then uses the OR gate chip to perform the remainder operation on the remainder result, so as to avoid the high level of the Hall output in the suspended state affecting the final result; S3: The logic gate chip transmits the data after the logic operation to the single chip microcomputer; S3: The single chip microcomputer obtains the accurate position of the corresponding magnetic component according to the data, and adjusts the operation of the linear motor according to the state of the magnetic component.
[0013] The structure and method for detecting the position of a linear motor by using a Hall encoder proposed by the present invention can bring the following beneficial effects: 1. By taking the output signals of the Hall sensors at the same position under multi-pole moments and performing AND operation on each pair, and then performing OR operation on the results after AND operation, the accurate position information of the linear motor can be obtained even when the magnetic parts are missing, thus avoiding the interference of the missing magnetic parts; 2. The Hall sensors in each pole pitch form a group, and the anti-interference ability of the linear motor can be enhanced by increasing the number of groups; 3. The number of Hall sensors can be increased by arranging multiple Hall sensors at equal intervals to increase the control accuracy of the linear motor; 4. The Hall switch sensor has the advantages of firm structure, small size, light weight, long life, easy installation, low power consumption, vibration resistance, and no fear of pollution or corrosion from dust, oil, water vapor, salt spray, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings: Figure 1 This is a structural diagram of a Hall encoder for detecting the position of a linear motor and a method for installing the same according to the present invention.
[0015] Figure 2 The present invention is a structure block diagram of a control system for a structure and method for detecting the position of a linear motor using a Hall encoder.
[0016] Figure 3 This is another control system structure block diagram of a structure and method for detecting the position of a linear motor using a Hall encoder of the present invention.
[0017] Figure 4 The present invention is a hardware design diagram of a structure and method for detecting the position of a linear motor using a Hall encoder. DETAILED DESCRIPTION
[0018] In order to more clearly illustrate the overall concept of the present invention, a detailed description is given below in an exemplary manner in conjunction with the accompanying drawings.
[0019] In the description of the present invention, it is necessary to understand that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0020] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0021] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or a communication; it can be a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0022] In the present invention, unless otherwise clearly specified and limited, the first feature "on" or "under" the second feature may be that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. In the description of this specification, the description with reference to the terms "one scheme", "some schemes", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the scheme or example are included in at least one scheme or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same scheme or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more schemes or examples in a suitable manner.
[0023] like Figure 1 to Figure 4 As shown, an embodiment of the present invention proposes a structure for detecting the position of a linear motor through a Hall encoder, including a linear motor 1 and an encoder 2. The linear motor 1 includes a running track 11 and two magnetic component groups 12 with opposite magnetic properties. The magnetic component group 12 is movably arranged on the running track 11 and moves horizontally along the extension direction of the running track 11. The linear motor 1 and the encoder 2 correspond to the same running track 11. The encoder 2 is communicatively connected to the single-chip microcomputer 3. The encoder 2 includes a plurality of Hall sensors 21. The Hall sensors 21 are arranged within the pole pitch range of the linear motor 1. The Hall sensors 21 output corresponding Hall signals by detecting the magnetic field signals of the magnetic components. The single-chip microcomputer 3 performs logical operations on the Hall outputs of the same position under different magnetic components to obtain accurate position information.
[0024] Specifically, the Hall sensor 21 outputs a high level signal when the magnetic field of the magnetic element is N, and the Hall sensor 21 outputs a low level signal when the magnetic field of the magnetic element is S.
[0025] Specifically, the signals output by the Hall sensors 21 under different magnetic parts are subjected to an AND operation for every two groups, and the obtained signals are subjected to an OR operation, so as to finally obtain accurate position information.
[0026] Specifically, the number of Hall sensors 21 can be selected. The more Hall sensors 21 there are, the higher the accuracy is. When the number of Hall sensors 21 is 2N+1, the accuracy is L / 2(2N+1); when the number of Hall sensors 21 is 2N, the accuracy is L / 2N.
[0027] Specifically, the total length of two adjacent magnetic members is the same as the pole pitch length of the linear motor 1 .
[0028] The relationship between the spacing between the Hall sensors 21 and the pole pitch is as follows: L = T / 2 / N; Wherein, L represents the distance between the Hall sensors 21; T represents the pole length; N represents the number of encoder 2.
[0029] As a preferred solution, the Hall sensor 21 can adopt a Hall switch sensor, which has high precision: the precision is better than 1% in the working temperature range, and this precision is suitable for measuring any waveform; the Hall switch device has no contacts, no wear, clear output waveform, no jitter, no rebound, and high position repeatability accuracy (up to μm level). It has a firm structure, small size, light weight, long life, easy installation, low power consumption, high frequency (up to 1MHZ), vibration resistance, and is not afraid of pollution or corrosion from dust, oil, water vapor, salt spray, etc.
[0030] Based on the structure of the Hall encoder detecting the position of the linear motor, a method for detecting the position of the linear motor by using the Hall encoder is introduced below, including the following steps: S1: Install the Hall sensor 21 on the stator side of the linear motor 1, and evenly distribute the Hall sensors 21 at an interval of 2 / N pole pitch along the NS direction. The Hall sensor 21 detects the magnetic field signal of the magnetic part to output the corresponding Hall signal. As the position of the magnetic part moves, the Hall sensor 21 directly outputs 1 or 0, and sends the data collected by the Hall sensor 21 to the single-chip computer 3; S2: The signal output by the Hall sensor 21 is transmitted to the single chip microcomputer 3, and the single chip microcomputer 3 performs AND operation on the Hall outputs at the same position under different magnetic parts in pairs through logic software (the Hall sensors 21 in each pole pitch are a group, and when there are more than two groups), and then performs AND operation on the result after the remainder is performed. The purpose of AND operation is to avoid the high level of the Hall output in the suspended state from affecting the final result (the Hall sensor 21 may output any state in the suspended state); that is, the operation logic is realized by software; and production costs can be saved; S3: The single chip microcomputer 3 obtains the accurate position of the corresponding magnetic component according to the data collected by the Hall sensor 21, and adjusts the operation of the linear motor 1 according to the state of the magnetic component.
[0031] Based on the structure of the Hall encoder detecting the position of the linear motor, another method for detecting the position of the linear motor by using the Hall encoder is introduced below, including the following steps: S1: Install the Hall sensor 21 on the stator side of the linear motor 1, and evenly distribute it with a pole pitch of 2 / N along the NS direction. The Hall sensor 21 detects the magnetic field signal of the magnetic part to output the corresponding Hall signal. As the position of the magnetic part moves, the Hall sensor 21 directly outputs 1 or 0; S2: The signal output by the Hall sensor 21 is transmitted to the logic gate chip. The logic gate chip performs AND operation on the Hall outputs at the same position under different magnetic parts in pairs (the Hall sensors 21 in each pole pitch are a group, and when there are more than two groups), and then uses the OR gate chip to perform the remainder operation on the remainder. The AND operation is to avoid the high level of the Hall output in the suspended state from affecting the final result (the Hall sensor 21 may output any state in the suspended state); that is, the logic operation is realized through the hardware circuit; the difficulty of software programming can be simplified; S3: The logic gate chip transmits the data after the logic operation to the microcontroller 3; S4: The single chip microcomputer 3 obtains the accurate position of the corresponding magnetic component according to the data of the logic gate chip, and adjusts the operation of the linear motor 1 according to the state of the magnetic component.
[0032] like Figure 1When in the position shown, Hall sensors 21A1, A2, A3 output high level 1, B1, B2, B3 output low level 0. When the magnets above A2 and B2 are lost, A2 and B2 output X (X is 1 or 0). A1 and A2 are ANDed to output X, A2 and A3 are ANDed to output X, A1 and A3 are ANDed to output 1, and then X, X and 1 are ORed to get 1. Similarly, B1, B2, B3 can get 0, thus avoiding the error caused by the lack of magnets.
[0033] It can be seen that the output of the Hall sensor 21 is 1111000, the linear motor 1 moves forward, and the magnetic part also moves forward. At this time, the Hall output changes to 1110000, and then changes to 1110001, and so on. Each time it changes, it can be known that the linear motor 1 runs L / 2 / 7 (L is the pole pitch, and 7 is the number of Hall sensors 21 in 1 pole pitch), thereby obtaining the accurate position of the magnetic part.
[0034] As a preferred solution, the STM32 series controller can be used to collect and process the output signal of the Hall sensor 21, and perform logical operations on the collected data without a logic gate chip. The STM32G0 only requires a set of power pins, which not only reduces the BOM cost but also reduces the PCB area. The internal high-speed clock HSI with an accuracy of 1% can meet the vast majority of applications, further saving costs and reducing the cost and effort caused by different architectures and different development tools. Provide a variety of low-power modes to save energy and extend battery life.
[0035] Working principle: During the operation of the linear motor, the magnetic parts move together in the running track. The Hall sensors located on the corresponding moving track are installed on the stator side of the linear motor and are evenly distributed with a pole pitch of 2 / N along the NS direction. When the magnetic parts pass through the Hall sensors, the Hall sensors detect the magnetic field signals of the magnetic parts to output the corresponding Hall signals. The single-chip microcomputer or hardware circuit performs AND operations on every two groups of signals output by the Hall sensors under different magnetic parts, and obtains the signals obtained by OR operations, and finally obtains accurate position information.
[0036] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0037] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A structure for detecting the position of a linear motor by means of a Hall encoder, characterized in that: It includes a linear motor, an encoder and a single-chip microcomputer. The linear motor includes a running track and a magnetic part. The magnetic part is movably arranged on the running track and moves horizontally along the extension direction of the running track. The linear motor and the encoder correspond to the same running track. The encoder transmits the collected data to the single-chip microcomputer. The encoder includes a plurality of Hall sensors. The Hall sensors are arranged within the pole pitch range of the linear motor. The Hall sensors output corresponding Hall signals by detecting the magnetic field signals of the magnetic part. The single-chip microcomputer obtains the accurate position information of the linear motor according to the data collected by the Hall sensor.
2. The structure for detecting the position of a linear motor by a Hall encoder according to claim 1, characterized in that: The Hall sensor outputs a high level signal when the magnetic field of the magnetic component is N, and the Hall sensor outputs a low level signal when the magnetic field of the magnetic component is S.
3. The structure for detecting the position of a linear motor by a Hall encoder according to claim 1, characterized in that: The number of the Hall sensors is several groups, and when the number of the Hall sensors is 2N+1, the accuracy is L / 2(2N+1), and when the number of the Hall sensors is 2N, the accuracy is L / 2N.
4. The structure for detecting the position of a linear motor by a Hall encoder according to claim 1, characterized in that: The Hall sensors are mounted on the stator side of the linear motor and are evenly distributed at intervals of 2 / N pole pitches along the NS direction.
5. The structure for detecting the position of a linear motor by a Hall encoder according to claim 1, characterized in that: There are a plurality of magnetic members, and the total length of two adjacent magnetic members is the same as the pole pitch length of the linear motor.
6. The structure for detecting the position of a linear motor by a Hall encoder according to claim 5, characterized in that: The magnetism of two adjacent magnetic members is opposite.
7. A method for detecting the position of a linear motor by a Hall encoder, comprising the following steps: S1: During the operation of the linear motor, the magnetic part moves together in the running track, and the Hall sensor outputs a corresponding Hall signal by detecting the magnetic field signal of the magnetic part. As the position of the magnetic part moves, the Hall sensor directly outputs 1 or 0, and sends the data collected by the Hall sensor to the single-chip microcomputer; S2: The signal output by the Hall sensor is transmitted to the single chip microcomputer, and the single chip microcomputer performs AND operation on the Hall outputs at the same position under different magnetic parts through logic software, and then performs AND operation on the remainder of the result to avoid the high level of the Hall output in the suspended state affecting the final result; S3: The single chip microcomputer obtains the accurate position of the corresponding magnetic component according to the data collected by the Hall sensor, and adjusts the operation of the linear motor according to the state of the magnetic component.
8. A method for detecting the position of a linear motor by a Hall encoder, comprising the following steps: S1: During the operation of the linear motor, the magnetic part moves together in the running track, and the Hall sensor outputs a corresponding Hall signal by detecting the magnetic field signal of the magnetic part. As the position of the magnetic part moves, the Hall sensor directly outputs 1 or 0; S2: The output signal of the Hall sensor is transmitted to the logic gate chip, and the logic gate chip performs AND operation on the Hall outputs at the same position under different magnetic parts in pairs through the AND gate chip, and then uses the OR gate chip to perform the remainder operation on the remainder result, so as to avoid the high level of the Hall output in the suspended state affecting the final result; S3: The logic gate chip transmits the data after the logic operation to the single chip microcomputer; S3: The single chip microcomputer obtains the accurate position of the corresponding magnetic component according to the data, and adjusts the operation of the linear motor according to the state of the magnetic component.
Citation Information
Patent Citations
Linear motor positioning method based on switch Hall sensor sequential coding
CN103557782A
Permanent-magnet synchronous linear motor magnetic pole detecting system
CN109687650A
Encoder for detecting position of linear motor
CN113037019A
Position detection method of linear motor encoder under magnetic field loss condition
CN116345963A
Structure for controlling position of linear motor through magnetic encoder
CN118157402A
Cited By
Linear motor position detection method based on space Hall element
CN119984018A
