Contact type displacement sensor and displacement measuring method
By designing an absolute position code on the grating ruler and combining it with a linear array image sensor, and utilizing collimated beams and electrical signal analysis, the measurement problem of traditional contact displacement sensors under high-frequency vibration and temperature changes was solved, achieving high-precision displacement measurement with fast response and high temperature stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN CHEVEN TECH
- Filing Date
- 2025-12-16
- Publication Date
- 2026-04-10
AI Technical Summary
Existing contact displacement sensors have slow response speed in high-frequency vibration environments, unstable measurement accuracy due to temperature changes, and zero-position accuracy affected by residual voltage, making it difficult to meet the comprehensive requirements of modern precision measurement for high stability, high response speed, and low temperature sensitivity.
The design employs a grating ruler, on which alternating light-transmitting and light-blocking areas form an absolute position code. Combined with a linear array image sensor and a light emission module, displacement measurement is achieved through collimated beams and electrical signal analysis. The nonlinearity of the optical system is compensated by the mapping relationship, and the displacement measurement results are calculated.
It achieves rapid response, high temperature stability, and absolute position measurement without zeroing operation, maintaining high precision consistency throughout the entire measurement range, avoiding tracking errors in traditional solutions, and significantly improving measurement accuracy and reliability.
Smart Images

Figure CN121829327A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of sensor technology, specifically to a contact displacement sensor and a displacement measurement method. Background Technology
[0002] In industrial measurement and precision control, contact displacement sensors are widely used in various high-precision measurement scenarios. As modern manufacturing demands increasingly higher measurement accuracy and stability, existing contact displacement sensors face severe challenges in terms of response speed, temperature stability, and measurement accuracy consistency. This is especially true in high-frequency vibration environments, where traditional sensors struggle to simultaneously meet the dual requirements of high accuracy and rapid response.
[0003] To address the aforementioned issues, the industry primarily employs two technical solutions: the differential transformer principle and the grating ruler principle. The differential transformer solution utilizes the principle of electromagnetic induction, measuring displacement by detecting changes in coil impedance. The grating ruler solution includes two implementation methods: reflective and transmissive. The reflective method utilizes the moiré fringe effect, receiving optical signals through multiple photodetectors and converting them into sine and cosine electrical signals for further subdivision. The transmissive method, on the other hand, measures displacement by detecting the intensity distribution of transmitted light through the grating.
[0004] However, existing technical solutions have obvious drawbacks: differential transformer sensors, although highly accurate, suffer from residual voltage issues that affect zero-position accuracy and are sensitive to temperature changes, making them prone to temperature drift; while grating ruler sensors have insufficient response speed in dynamic measurement scenarios. When the measured object vibrates rapidly, the response lag of the photodetector can easily lead to tracking errors, resulting in distorted measurement results. Furthermore, traditional grating ruler designs still need improvement in absolute position recognition and temperature stability, making it difficult to meet the comprehensive requirements of modern precision measurement for high stability, high response speed, and low temperature sensitivity. Summary of the Invention
[0005] In view of the above problems, this application provides a contact displacement sensor and a displacement measurement method to solve the above technical problems.
[0006] In a first aspect, this application provides a contact displacement sensor, comprising: A displacement transmission mechanism is used to generate displacement in a first direction in response to the movement of the object being measured. The grating ruler is configured to move synchronously along the first direction following the displacement transmission mechanism; multiple light-transmitting areas and multiple light-blocking areas are alternately arranged on the grating ruler along the first direction, and the width of the light-blocking areas is set according to a preset rule to form an absolute position code; A light emitting module and a linear array image sensor are disposed opposite each other on both sides of the grating ruler along a second direction intersecting the first direction. The light emitting module is used to emit a collimated light beam toward the grating ruler; the linear array image sensor is used to receive light signals transmitted through the plurality of light-transmitting areas and output an electrical signal corresponding to the light signals. The detection and calculation module, connected to the linear array image sensor, is configured to determine the displacement measurement result of the grating ruler based on the electrical signal; An output display module, connected to the detection and calculation module, is used to output the displacement measurement results; The step of determining the displacement measurement result of the grating ruler based on the electrical signal includes: Based on the peak position of the electrical signal, the positions of the light signals corresponding to the multiple light-transmitting areas on the linear image sensor are determined respectively, and the imaging distance between each pair of adjacent positions is calculated according to the determined multiple positions. Based on the absolute position encoding and the preset mapping relationship, the physical distance between adjacent light-transmitting areas on the grating ruler corresponding to each of the imaging distances is obtained, and the displacement measurement result of the grating ruler in the first direction is determined according to all the obtained physical distances; the mapping relationship represents the relationship between the imaging distance and the physical distance.
[0007] Secondly, this application provides a displacement measurement method applied to a contact displacement sensor as described in the first aspect, comprising: Acquire electrical signals generated by collimated beams passing through multiple light-transmitting areas on the grating ruler; Based on the peak position of the electrical signal, the positions of the light signals corresponding to the multiple light-transmitting areas on the linear image sensor are determined respectively, and the imaging distance between each pair of adjacent positions is calculated according to the determined multiple positions. Based on the absolute position encoding and the preset mapping relationship, the physical distance between adjacent light-transmitting areas on the grating ruler corresponding to each of the imaging distances is obtained, and the displacement measurement result of the grating ruler in the first direction is determined according to all the obtained physical distances; the mapping relationship represents the relationship between the imaging distance and the physical distance.
[0008] This application provides a contact displacement sensor and a displacement measurement method. The contact displacement sensor includes a displacement transmission mechanism, an optical detection system consisting of a grating ruler with absolute position encoding, a light emitting module, and a linear array image sensor, and a detection and calculation module. The light emitting module emits a collimated beam towards the grating ruler. The linear array image sensor simultaneously receives light signals transmitted through multiple light-transmitting areas of the grating ruler and converts them into electrical signals. The detection and calculation module analyzes the peak positions of the electrical signals to determine the positions of the images of each light-transmitting area on the sensor and calculates the imaging distance between adjacent positions. Then, combining the absolute position encoding of the grating ruler with a preset mapping relationship, it obtains the actual physical distance corresponding to the imaging distance, thereby calculating the displacement. The measurement results solve the problems of slow response speed, unstable measurement accuracy due to temperature changes, and residual voltage affecting zero-position accuracy of traditional contact displacement sensors in high-frequency vibration environments. It features fast measurement response speed, high temperature stability, absolute position measurement without zero-return operation, and high accuracy consistency throughout the entire measurement range. In particular, by combining collimated beam with linear array image sensor, it achieves real-time overall perception of the light-transmitting area distribution of grating ruler, avoiding tracking errors caused by phase delay in traditional multi-channel photodetector schemes. At the same time, the calculation method based on mapping relationship effectively compensates for the nonlinearity of optical system, significantly improving the stability and reliability of measurement accuracy.
[0009] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A schematic diagram of a contact displacement sensor provided in an embodiment of this application is shown.
[0012] Figure 2 A schematic diagram of the optical emission module provided in an embodiment of this application is shown.
[0013] Figure 3 The waveform of the electrical signal output by the linear image sensor is shown.
[0014] Figure 4 This illustration shows a subpixel diagram corresponding to the electrical signal output by the linear array image sensor according to an embodiment of this application.
[0015] Figure 5This illustration shows a schematic diagram of the subpixel positions corresponding to the electrical signals output by the linear array image sensor according to an embodiment of this application.
[0016] Figure 6 A schematic diagram illustrating the conversion of imaging spacing to physical spacing provided in an embodiment of this application is shown.
[0017] Figure 7 This illustration shows a schematic diagram of the physical spacing of the imaging spacing conversion provided in the embodiments of this application and the corresponding absolute position range on the grating ruler.
[0018] Figure 8 A schematic diagram showing the imaging spacing and the physical spacing on the grating ruler provided in the embodiments of this application is shown.
[0019] Figure 9 This illustration shows another schematic diagram of the imaging spacing and the physical spacing on the grating ruler provided in the embodiments of this application.
[0020] Figure 10 A schematic diagram of the calibration process for a contact displacement sensor provided in an embodiment of this application is shown.
[0021] Figure 11 A flowchart of the displacement measurement method provided in an embodiment of this application is shown. Detailed Implementation
[0022] To enable those skilled in the art to better understand the solutions of this application, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0023] In the embodiments of this application, it should be noted that, in this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0024] Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0025] Furthermore, in the embodiments of this application, "multiple" refers to two or more. Therefore, in the embodiments of this application, "multiple" can also be understood as "at least two". "At least one" can be understood as one or more, such as one, two, or more. For example, including at least one means including one, two, or more, and is not limited to which ones are included. For example, including at least one of A, B, and C, then it could include A, B, C, A and B, A and C, B and C, or A and B and C.
[0026] It should be noted that in the embodiments of this application, "and / or" describes the relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. In addition, the character " / ", unless otherwise specified, generally indicates that the associated objects before and after it are in an "or" relationship.
[0027] This application provides a contact displacement sensor. Figure 1 A schematic diagram of a contact displacement sensor provided in an embodiment of this application is shown, as follows: Figure 1 As shown, the contact displacement sensor includes a displacement transmission mechanism 100, a grating ruler 200, a light emission module 300, a linear array image sensor 400, a detection and calculation module 500, and an output display module 600.
[0028] The displacement transmission mechanism generates displacement in a first direction in response to the movement of the object being measured. A grating ruler is configured to move synchronously along the first direction following the displacement transmission mechanism. Multiple light-transmitting areas and multiple light-blocking areas are alternately arranged on the grating ruler along the first direction, and the width of the light-blocking areas is set according to a preset rule to form an absolute position code. A light-emitting module and a linear array image sensor are positioned opposite each other on both sides of the grating ruler along a second direction intersecting the first direction. The light-emitting module emits a collimated beam towards the grating ruler; the linear array image sensor receives light signals transmitted through the multiple light-transmitting areas and outputs an electrical signal corresponding to the light signal. A detection and calculation module is connected to the linear array image sensor and configured to determine the displacement measurement result of the grating ruler based on the electrical signal. An output display module, connected to the detection and calculation module, outputs the displacement measurement result. Specifically, determining the displacement measurement result of the grating ruler based on the electrical signal includes: Based on the peak position of the electrical signal, the positions of the optical signals corresponding to multiple light-transmitting areas on the linear image sensor are determined, and the imaging distance between each pair of adjacent positions is calculated based on the determined multiple positions.
[0029] Based on absolute position encoding and a preset mapping relationship, the physical distance between adjacent light-transmitting areas on the grating ruler corresponding to each imaging distance is obtained. The displacement measurement result of the grating ruler in the first direction is determined based on all the obtained physical distances. The mapping relationship represents the relationship between the imaging distance and the physical distance.
[0030] Optionally, the grating ruler is typically made of glass with good temperature drift characteristics to ensure dimensional accuracy. The width of the light-transmitting area remains uniform, while the width of the light-blocking area is arranged according to a specific pattern to form an absolute position code. For example, if the light-blocking areas are M1 to M40, they can be designed to be arranged in a regular pattern with varying sizes. For instance, a pattern of 5 light-transmitting slits per group could be used, with M1~M5, M6~M10, M11~M15, and M16~M20 forming one combination, and M21~M25, M26~M30, M31~M35, and M36~M40 forming another. The light-emitting module emits a collimated beam, and the linear array image sensor uses a linear array CMOS image sensor to convert the received light intensity distribution into a voltage signal. The detection and calculation module calculates the imaging distance between adjacent light-transmitting areas by analyzing the peak position of the electrical signal output by the CMOS sensor, and converts the imaging distance into a physical distance by combining it with a pre-calibrated mapping relationship, thereby determining the absolute displacement position, i.e., the displacement measurement result. The output display module then outputs the displacement measurement result for display to the user.
[0031] It is understood that the detection and calculation module includes a signal acquisition section and a main control section. The signal acquisition section is used to perform analog-to-digital conversion processing on the electrical signals output by the linear array image sensor to convert the optical signals into digital signals. The main control section is used to determine the displacement measurement result of the grating ruler based on the electrical signals output by the linear array image sensor. In practical applications, the main control section can also be used to control the light emission module and drive the linear array image sensor. This application does not limit the specific circuit structure, device selection, and implementation method of the signal acquisition section and the main control section, as long as the corresponding signal acquisition and displacement calculation functions can be achieved. For example, the signal acquisition section may include an analog-to-digital conversion circuit, a filtering circuit, and a signal conditioning circuit, while the main control section may be a chip device with processing functions, such as a microcontroller, a digital signal processor, a field-programmable gate array, or an application-specific integrated circuit.
[0032] The contact displacement sensor provided in this application includes a displacement transmission mechanism, an optical detection system consisting of a grating ruler with absolute position encoding, a light emitting module, and a linear array image sensor, and a detection calculation module. The light emitting module emits a collimated beam towards the grating ruler. The linear array image sensor simultaneously receives light signals from multiple light-transmitting areas of the grating ruler and converts them into electrical signals. The detection calculation module analyzes the peak positions of the electrical signals to determine the positions of each light-transmitting area on the sensor and calculates the imaging distance between adjacent positions. Then, combining the absolute position encoding of the grating ruler with a preset mapping relationship, it obtains the actual physical distance corresponding to the imaging distance, thereby calculating the displacement measurement result and solving the problem of... Traditional contact displacement sensors suffer from slow response speed in high-frequency vibration environments, unstable measurement accuracy due to temperature changes, and zero-position accuracy affected by residual voltage. This new sensor offers advantages such as fast measurement response speed, high temperature stability, absolute position measurement without zero-return operation, and high accuracy consistency across the entire measurement range. In particular, by combining a collimated beam with a linear array image sensor, it achieves real-time overall perception of the light-transmitting area distribution of the grating ruler, avoiding tracking errors caused by phase delay in traditional multi-channel photodetector schemes. At the same time, the calculation method based on mapping relationships effectively compensates for the nonlinearity of the optical system, significantly improving the stability and reliability of measurement accuracy.
[0033] In some embodiments, such as Figure 1 As shown in the embodiment of this application, the displacement transmission mechanism 100 of the contact displacement sensor includes a contact component 110, a guide component 120, and an elastic reset component 130.
[0034] The contact component is connected to the guide component, used to contact the object being measured and drive the guide component to generate displacement in a first direction in response to the movement of the object being measured. The guide component is also connected to the grating ruler, used to drive the grating ruler to follow the movement in response to the movement of the object being measured. The elastic reset component is set along the first direction of movement of the guide component, used to drive the guide component back to a preset initial position when the contact component is not driven by the object being measured. Optionally, the contact component 110 typically adopts a ball bearing structure design, similar to the principle of a ballpoint pen tip, to effectively reduce friction between the contact component and the object being measured, thereby improving measurement accuracy and response speed; the guide component 120 typically adopts a structure of metal bearings combined with ball bearings, with the ball bearings distributed on the outer circumference of the bearing, which can reduce frictional resistance when the guide component moves, thereby making the movement of the grating ruler smoother and more stable; the elastic reset component 130 typically adopts a spring structure, when the contact component leaves the object being measured, the elastic force generated by the spring can drive the guide component to quickly return to the initial position, ensuring that the sensor remains stable when there is no measurement.
[0035] It is understood that the specific implementation of the displacement transmission mechanism 100 in this application embodiment is not limited. The contact component can be a ball, a planar contact head or other structural form suitable for contacting the object being measured. The guide component can be a slide rail, a guide post or other linear guide structure. The elastic reset component can be a helical spring, a leaf spring, elastic rubber or other elements with elastic reset function. As long as the basic functions of contact, guidance and reset can be achieved, the accuracy and stability of displacement transmission can be ensured.
[0036] In some embodiments, Figure 2 A schematic diagram of the optical emitting module provided in an embodiment of this application is shown, as follows: Figure 2 As shown in the embodiment of this application, the contact displacement sensor includes a light-emitting module comprising a light-emitting element and a collimating lens. The collimating lens is disposed in the optical path of the light-emitting element and is used to convert the light signal emitted by the light-emitting element into a collimated beam. Optionally, the light-emitting element can be a custom-designed small patch light source, and the collimating lens can be a resin lens. The resin lens is encapsulated on the surface of the patch light source, and the light emitted by the light source is optically designed to form an approximately parallel collimated beam within the effective measurement range. This collimated beam design ensures that the light uniformly illuminates the light-transmitting and light-blocking areas of the grating ruler, avoiding the uneven phenomenon of high light intensity in the middle and weak light intensity at the edges caused by divergent light, thereby improving the stability of optical signal detection and the accuracy and consistency of displacement measurement.
[0037] In some embodiments, in the contact displacement sensor provided in this application, determining the position of the optical signal corresponding to the plurality of light-transmitting areas on the linear image sensor based on the peak position of the electrical signal, and calculating the imaging distance between every two adjacent positions based on the determined plurality of positions, includes: Based on the peak position of the electrical signal, the sub-pixel positions of the optical signals corresponding to multiple light-transmitting areas on the linear image sensor are obtained, and the distance between every two adjacent sub-pixel positions is calculated to obtain the imaging spacing. Optionally, Figure 3 The waveform of the electrical signal output by the linear image sensor is shown. Figure 4 This illustration shows a sub-pixel diagram corresponding to the electrical signal output by the linear image sensor according to an embodiment of this application. Figure 5 This illustration shows a schematic diagram of the sub-pixel positions corresponding to the electrical signals output by the linear array image sensor according to an embodiment of this application, as follows: Figures 3 to 5As shown, the electrical signal output by the linear image sensor presents multiple peak shapes, with each peak corresponding to a light-transmitting area. By analyzing the voltage distribution of each peak, the peak position can be obtained, and then the sub-pixel positions s1, s2, s3...sn, which are more precise than the pixel units, can be calculated. The difference between two adjacent sub-pixel positions is the imaging spacing, for example, d1=s2-s1, d2=s3-s2, and so on. The imaging spacings d1, d2, d3...dn-1 corresponding to all adjacent light-transmitting areas can be calculated. These imaging spacings can accurately reflect the imaging distribution characteristics of the light-transmitting areas on the grating ruler on the sensor.
[0038] It is understood that the innovation of this application embodiment does not lie in calculating the sub-pixel position based on the peak value of the electrical signal output by the linear array image sensor. Therefore, this application embodiment does not limit the specific algorithm for sub-pixel calculation, as long as it can obtain position information with sub-pixel accuracy from the peak position of the electrical signal.
[0039] In some embodiments, in the contact displacement sensor provided in this application, the step of obtaining the physical distance between adjacent light-transmitting areas on the grating ruler corresponding to each imaging distance based on the absolute position encoding and a preset mapping relationship, and determining the displacement measurement result of the grating ruler in the first direction based on all the obtained physical distances, includes: Based on the mapping relationship, each imaging spacing is converted into multiple corresponding physical spacings. Optionally, Figure 6 This illustration shows a schematic diagram of converting the imaging spacing into physical spacing according to an embodiment of this application, such as... Figure 6 As shown, the mapping relationship is represented by a ratio k, which converts the imaging spacing d between adjacent peaks on the linear array image sensor into the physical spacing D between adjacent light-transmitting areas on the grating ruler, satisfying the relationship D=k×d, where k is the ratio of the imaging spacing on the linear array image sensor to the corresponding physical spacing on the grating ruler.
[0040] As one implementation method, the ratio k is pre-acquired through calibration and stored in the detection calculation module.
[0041] The converted physical spacings are matched with absolute position codes to determine the corresponding absolute position intervals on the grating ruler. Optionally, Figure 7 This illustration shows a schematic diagram of the physical spacing of the imaging spacing conversion provided in this application and the corresponding absolute position range on the grating ruler, as shown below. Figure 7As shown, the multiple physical spacings obtained by conversion are arranged in sequence to form an identification code, which is then matched with the preset absolute position code on the grating ruler. This process may yield multiple candidate position intervals that conform to a certain pattern. For example, when the absolute position code of the grating ruler forms a specific pattern by grouping every 5 light-blocking areas, multiple candidate intervals that conform to a certain pattern may be obtained, such as M1~M18, M20~M38, M40~M58, etc. For each candidate interval, the difference between the physical spacing and the standard spacing at the corresponding position on the grating ruler can be calculated, such as D1-M1, D2-M2, D3-M3, ...D18-M18, and these differences are averaged. This operation is repeated for all candidate intervals to obtain multiple average differences. The candidate interval with the smallest average difference is selected as the matching result, thereby determining the absolute position interval of the physical spacing on the grating ruler.
[0042] Based on the absolute position encoding and absolute position interval, the distance from the initial light-transmitting slit of the grating ruler to any light-transmitting slit within the absolute position interval is obtained as the first displacement. Optionally, the first displacement is obtained by accumulating the length of the light-blocking area between the initial light-transmitting slit of the grating ruler and any light-transmitting slit within the absolute position interval. This distance represents a coarse absolute displacement. Here, the selection of any light-transmitting slit within the absolute position interval corresponding to the multiple physical spacings on the grating ruler is not limited; it is usually selected as the last light-transmitting slit within the absolute position interval corresponding to the multiple physical spacings on the grating ruler.
[0043] The pixel offset between the sub-pixel position corresponding to any light-transmitting slit within the absolute position range and a preset reference pixel position is obtained. Based on a preset conversion coefficient, the pixel offset is converted into a second displacement, which is used to convert the pixel offset into a physical length. Optionally, the reference pixel position can be set at any position within the effective pixel range of the linear array image sensor. The pixel offset reflects the minute difference between the current precise position and the reference position. The second displacement can be positive or negative, depending on the relative relationship between the sub-pixel position and the reference pixel position, representing a precise absolute displacement.
[0044] The displacement measurement result is obtained by algebraically adding the first displacement and the second displacement. Optionally, the first displacement and the second displacement are like the main scale and vernier scale of a vernier caliper. By algebraically adding them, the coarse absolute displacement and the precise absolute displacement can be combined to obtain a high-precision displacement measurement result.
[0045] In some embodiments, the contact displacement sensor provided in this application further includes: obtaining the physical distance between adjacent light-transmitting areas on the grating ruler corresponding to each imaging spacing based on absolute position encoding and a preset mapping relationship, and determining the displacement measurement result of the grating ruler in the first direction based on all obtained physical distances; Execute preset number of times: "Based on the absolute position encoding and absolute position interval, the distance from the initial light-transmitting slit of the grating ruler to any light-transmitting slit in the absolute position interval is obtained as the first displacement, wherein each light-transmitting slit in the absolute position interval is different; Obtain the pixel offset between the sub-pixel position corresponding to any light-transmitting slit in the absolute position range and the preset reference pixel position. Based on the preset conversion coefficient, convert the pixel offset into a second displacement amount. The conversion coefficient is used to convert the pixel offset into a physical length. The displacement measurement result is obtained by algebraically adding the first displacement and the second displacement. The displacement measurement results obtained each time are statistically processed to obtain statistical feature values, which are used as the displacement measurement results of the detection calculation module. The statistical feature processing includes one of the following: average value calculation, weighted average value calculation, median calculation, and mode calculation.
[0046] Optionally, by selecting different light-transmitting slits in the absolute position intervals corresponding to multiple physical spacings on the grating ruler as calculation benchmarks, multiple displacement measurement results can be obtained. Statistical processing of these results can effectively reduce random errors and improve the stability and repeatability of the measurement. In particular, when the sensor is subjected to slight vibration or environmental interference, the measurement accuracy can be significantly improved.
[0047] As one implementation method, statistical feature processing is preferably performed by calculating the average value.
[0048] In some embodiments, the contact displacement sensor provided in this application, the conversion of pixel offset into second displacement based on a preset conversion coefficient includes any one of the following formulas (1), (2), and (3); Equation (1): in, This is the second displacement. For reference pixel position, This represents the sub-pixel position corresponding to any light-transmitting slit within the absolute position range. It is the ratio of the imaging spacing on the linear image sensor to the physical spacing corresponding to the imaging spacing on the grating ruler.
[0049] Optionally, when calculating the second displacement in equation (1), the conversion accuracy between the imaging spacing and the physical spacing is further improved by recalculating the ratio K1 between the physical position of the current grating ruler and the pixel position of the linear array pixel sensor. K1 is preferably calculated based on the ratios of multiple imaging spacings near the reference pixel position to their corresponding physical spacings. For example, Figure 8 A schematic diagram showing the imaging spacing and the physical spacing on the grating ruler provided in an embodiment of this application is shown, as follows: Figure 8 As shown, when the reference pixel position is set to 100, K1 can be taken as the second displacement corresponding to the light-transmitting slit in the absolute position interval s3. Where d2, d3, and d4 are the imaging spacings of adjacent light-transmitting areas Nx2, Nx3, Nx4, and Nx5 on the linear array image sensor, and Mx2, Mx3, and Mx4 are the physical spacings between adjacent light-transmitting areas on the corresponding grating ruler, then the second displacement... First displacement The final displacement measurement result is .
[0050] Equation (2): Where W is the second displacement, S is the reference pixel position, S0 is the subpixel position corresponding to any light-transmitting slit in the absolute position range, and K2 is the pixel width of the linear image sensor.
[0051] Optionally, such as Figure 8 As stated above, when calculating the second displacement using equation (2), the pixel offset is directly converted into the physical displacement by using the pixel physical width parameter of the linear array image sensor. The calculation process is simple and direct, and is suitable for scenarios where the sensor parameters are stable and known.
[0052] Equation (3): Where W is the second displacement, S is the reference pixel position, S0 is the sub-pixel position corresponding to any light-transmitting slit in the absolute position interval, S1 is at least one sub-pixel position adjacent to the reference pixel position, and M is the physical distance between the sub-pixel position corresponding to any light-transmitting slit in the absolute position interval and at least one sub-pixel position adjacent to the reference pixel position.
[0053] Optionally, Figure 9 Another schematic diagram illustrating the imaging spacing and physical spacing on the grating ruler provided in this application embodiment is shown, as follows: Figure 9 As shown, when calculating the second displacement using equation (3), the reference pixel position is preferably taken as the central axis position of the linear array image sensor. The fine displacement is obtained by calculating the proportional relationship between adjacent sub-pixel positions and the corresponding relationship between the physical distance. This method makes full use of the symmetry characteristics of the sensor and has strong robustness to sensor installation offset, which can effectively improve the accuracy and stability of displacement measurement. For example, when the total number of effective pixels of the linear array image sensor is 1024, the reference pixel position S is taken as the center value of 512. If the sub-pixel position corresponding to the x8th light-transmitting slit in the absolute position interval is s8, the sub-pixel position corresponding to the x9th light-transmitting slit is s9, and the physical distance between two adjacent light-transmitting slits is 512, then the reference pixel position S is 512. Then the second displacement The first displacement is The final displacement measurement result is .
[0054] In some embodiments, Figure 10 A schematic diagram of the calibration process for a contact displacement sensor provided in an embodiment of this application is shown, as follows: Figure 10 As shown in this embodiment, the mapping relationship is obtained through calibration processing and stored in the detection calculation module. The calibration processing specifically includes: The linear array image sensor receives the electrical signal output by the collimated beam when the grating ruler is in its initial position.
[0055] Based on the peak position of the electrical signal, the correspondence between the pixel position of the linear array image sensor and the first light-transmitting slit in the absolute position encoding is determined.
[0056] Based on the correspondence, determine the ratio between the imaging spacing of at least one adjacent light-transmitting slit on the linear image sensor and the physical spacing of at least one adjacent light-transmitting slit.
[0057] The statistical feature values obtained by performing statistical feature processing on the comparison values serve as a mapping relationship. Statistical feature processing includes one of the following: mean calculation, weighted average calculation, median calculation, and mode calculation.
[0058] Optionally, the calibration process is performed when the grating ruler is in its initial state, which is a stress-free state without displacement. In the initial state, the light source illuminates a specially designed light-shielding area of the grating ruler, and the initial position of the linear array image sensor is outside the effective area (i.e., absolute position encoding) of the grating ruler. In this state, the end of the linear array image sensor's imaging will not form a pulse peak signal, only a basic voltage quantity. By identifying this special imaging state, the initial effective scale of the grating ruler can be located, and the spacing between adjacent light-transmitting slits of the grating ruler can be matched with the spacing between adjacent peaks of the linear array image sensor's imaging. The initial peak spacing of the linear array image sensor corresponds to the initial spacing between adjacent light-transmitting slits of the grating ruler. In this state, by calculating the ratio of the imaging spacing to the physical spacing of multiple sets of adjacent light-transmitting slits, and performing statistical feature calculations on these ratios, the final mapping ratio is obtained, and the ratio is stored to complete the calibration process.
[0059] As one implementation method, statistical feature processing is preferably performed by calculating the average value.
[0060] This application also provides a displacement measurement method, applied to the contact displacement sensor described in the above embodiments. Figure 11 A flowchart of the displacement measurement method provided in an embodiment of this application is shown, as follows: Figure 11 As shown, the method includes: S100: Acquires the electrical signal generated by the collimated beam passing through multiple light-transmitting areas on the grating ruler.
[0061] S200: Based on the peak position of the electrical signal, determine the position of the optical signal on the linear image sensor corresponding to multiple light-transmitting areas, and calculate the imaging distance between each pair of adjacent positions based on the determined multiple positions.
[0062] Based on absolute position encoding and a preset mapping relationship, S300 obtains the physical distance between adjacent light-transmitting areas on the grating ruler corresponding to each imaging distance, and determines the displacement measurement result of the grating ruler in the first direction based on all the obtained physical distances; the mapping relationship represents the relationship between the imaging distance and the physical distance.
[0063] The contact displacement method provided in this application determines the position of each light-transmitting area imaged on the sensor by analyzing the peak position of the electrical signal and calculating the imaging distance between adjacent positions. Then, combined with the absolute position encoding of the grating ruler and the preset mapping relationship, the actual physical distance corresponding to the imaging distance is obtained, thereby calculating the displacement measurement result. This solves the problems of slow response speed, unstable measurement accuracy due to temperature changes, and the influence of residual voltage on zero position accuracy of traditional contact displacement sensors in high-frequency vibration environments. It has the effects of fast measurement response speed, high temperature stability, absolute position measurement without zero return operation, and high accuracy consistency throughout the entire measurement range. In particular, by combining the collimated beam with the linear array image sensor, real-time overall perception of the distribution of the light-transmitting area of the grating ruler is realized, avoiding the tracking error caused by phase delay in the traditional multi-channel photodetector scheme. At the same time, the calculation method based on the mapping relationship effectively compensates for the nonlinearity of the optical system, significantly improving the stability and reliability of the measurement accuracy.
[0064] In some embodiments of the displacement measurement method provided in this application, the mapping relationship is obtained through calibration processing, which specifically includes: The linear array image sensor receives the electrical signal output by the collimated beam when the grating ruler is in its initial position.
[0065] Based on the peak position of the electrical signal, the correspondence between the pixel position of the linear array image sensor and the first light-transmitting slit in the absolute position encoding is determined.
[0066] Based on the correspondence, determine the ratio between the imaging spacing of at least one adjacent light-transmitting slit on the linear image sensor and the physical spacing of at least one adjacent light-transmitting slit.
[0067] The statistical feature values obtained by performing statistical feature processing on the comparison values serve as a mapping relationship. Statistical feature processing includes one of the following: mean calculation, weighted average calculation, median calculation, and mode calculation.
[0068] As one implementation method, statistical feature processing is preferably performed by calculating the average value.
[0069] For other details regarding the above displacement measurement method, please refer to the description of the contact displacement sensor provided in the above embodiments of the invention, which will not be repeated here.
[0070] The above description, in conjunction with specific embodiments, provides a further detailed explanation of this application and should not be construed as limiting the specific implementation of this application to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of this application, and all such modifications and substitutions should be considered within the scope of protection of this application.
Claims
1. A contact displacement sensor, characterized in that, include: A displacement transmission mechanism is used to generate displacement in a first direction in response to the movement of the object being measured. The grating ruler is configured to move synchronously along the first direction following the displacement transmission mechanism; multiple light-transmitting areas and multiple light-blocking areas are alternately arranged on the grating ruler along the first direction, and the width of the light-blocking areas is set according to a preset rule to form an absolute position code; A light emitting module and a linear array image sensor are disposed opposite each other on both sides of the grating ruler along a second direction intersecting the first direction. The light emitting module is used to emit a collimated light beam toward the grating ruler; the linear array image sensor is used to receive light signals transmitted through the plurality of light-transmitting areas and output an electrical signal corresponding to the light signals. The detection and calculation module, connected to the linear array image sensor, is configured to determine the displacement measurement result of the grating ruler based on the electrical signal; An output display module, connected to the detection and calculation module, is used to output the displacement measurement results; The step of determining the displacement measurement result of the grating ruler based on the electrical signal includes: Based on the peak position of the electrical signal, the positions of the light signals corresponding to the multiple light-transmitting areas on the linear image sensor are determined respectively, and the imaging distance between each pair of adjacent positions is calculated according to the determined multiple positions. Based on the absolute position encoding and the preset mapping relationship, the physical distance between adjacent light-transmitting areas on the grating ruler corresponding to each of the imaging distances is obtained, and the displacement measurement result of the grating ruler in the first direction is determined according to all the obtained physical distances; the mapping relationship represents the relationship between the imaging distance and the physical distance.
2. The contact displacement sensor as described in claim 1, characterized in that, The displacement transmission mechanism includes a contact component, a guide component, and an elastic reset component; The contact component is connected to the guide component and is used to contact the object under test and drive the guide component to generate a displacement in the first direction in response to the movement of the object under test. The guide component is also connected to the grating ruler and is used to drive the grating ruler to move in response to the movement of the object being measured. The elastic reset component is disposed along a first direction of movement of the guide component, and is used to drive the guide component back to a preset initial position when the contact component is not driven by the object under test.
3. The contact displacement sensor as described in claim 1, characterized in that, The light emitting module includes a light-emitting element and a collimating lens. The collimating lens is disposed in the optical path of the light-emitting element and is used to convert the light signal emitted by the light-emitting element into the collimated beam.
4. The contact displacement sensor as described in claim 1, characterized in that, The step of determining the position of the optical signal on the linear image sensor corresponding to the plurality of light-transmitting areas based on the peak position of the electrical signal, and calculating the imaging distance between every two adjacent positions based on the determined positions, includes: Based on the peak position of the electrical signal, the sub-pixel positions of the optical signals corresponding to the plurality of light-transmitting areas on the linear image sensor are obtained respectively, and the distance between each pair of adjacent sub-pixel positions is calculated to obtain the imaging spacing.
5. The contact displacement sensor as described in claim 4, characterized in that, The step of obtaining the physical distance between adjacent light-transmitting areas on the grating ruler corresponding to each of the imaging intervals based on the absolute position encoding and the preset mapping relationship, and determining the displacement measurement result of the grating ruler in the first direction based on all the obtained physical distances, includes: Based on the mapping relationship, each of the imaging intervals is converted into a plurality of corresponding physical intervals; The multiple physical spacings obtained by conversion are matched with the absolute position codes to determine the absolute position intervals corresponding to the multiple physical spacings on the grating ruler; Based on the absolute position code and the absolute position interval, the distance from the initial light-transmitting slit of the grating ruler to any light-transmitting slit in the absolute position interval is obtained as the first displacement amount; Obtain the pixel offset between the sub-pixel position corresponding to any light-transmitting slit in the absolute position range and the preset reference pixel position, and convert the pixel offset into a second displacement based on a preset conversion coefficient, wherein the conversion coefficient is used to convert the pixel offset into a physical length; The displacement measurement result is obtained by algebraically adding the first displacement and the second displacement.
6. The contact displacement sensor as described in claim 5, characterized in that, The step of obtaining the physical distance between adjacent light-transmitting areas on the grating ruler corresponding to each of the imaging distances based on the absolute position encoding and the preset mapping relationship, and determining the displacement measurement result of the grating ruler in the first direction based on all the obtained physical distances, further includes: Execute preset number of times: Based on the absolute position code and the absolute position interval, the distance from the initial light-transmitting slit of the grating ruler to any light-transmitting slit in the absolute position interval is obtained as the first displacement, wherein each time any light-transmitting slit in the absolute position interval is different; Obtain the pixel offset between the sub-pixel position corresponding to any light-transmitting slit in the absolute position range and the preset reference pixel position, and convert the pixel offset into a second displacement based on a preset conversion coefficient, wherein the conversion coefficient is used to convert the pixel offset into a physical length; The displacement measurement result is obtained by algebraically adding the first displacement and the second displacement. The displacement measurement results obtained each time are statistically processed to obtain statistical feature values, which are used as the displacement measurement results of the detection calculation module. The statistical feature processing includes one of the following: average calculation, weighted average calculation, median calculation, and mode calculation.
7. The contact displacement sensor as described in claim 5, characterized in that, The conversion of the pixel offset into a second displacement based on a preset conversion coefficient includes any one of the following formulas (1), (2), and (3); Equation (1): in, This is the second displacement. The reference pixel position, This refers to the sub-pixel position corresponding to any light-transmitting slit within the absolute position range. The ratio of the imaging spacing on the linear image sensor to the physical spacing corresponding to the imaging spacing on the grating ruler; Equation (2): Wherein, W is the second displacement, S is the reference pixel position, S0 is the sub-pixel position corresponding to any light-transmitting slit in the absolute position range, and K2 is the pixel width of the linear image sensor. Equation (3): Wherein, W is the second displacement, S is the reference pixel position, S0 is the sub-pixel position corresponding to any light-transmitting slit in the absolute position interval, S1 is at least one sub-pixel position adjacent to the reference pixel position, and M is the physical distance between the sub-pixel position corresponding to any light-transmitting slit in the absolute position interval and at least one sub-pixel position adjacent to the reference pixel position.
8. The contact displacement sensor as described in claim 1, characterized in that, The mapping relationship is obtained through calibration processing and stored in the detection calculation module; The calibration process includes: The linear array image sensor receives the electrical signal output by the collimated beam when the grating ruler is placed in the initial position. Based on the peak position of the electrical signal, the correspondence between the pixel position of the linear array image sensor and the first light-transmitting slit in the absolute position encoding is determined; Based on the correspondence, determine the ratio between the imaging spacing of at least one adjacent light-transmitting slit on the linear image sensor and the physical spacing of the at least one adjacent light-transmitting slit; The ratio is subjected to statistical feature processing to obtain statistical feature values as the mapping relationship. The statistical feature processing includes one of the following: average calculation, weighted average calculation, median calculation, and mode calculation.
9. A displacement measurement method, characterized in that, The method, applied to a contact displacement sensor as described in any one of claims 1 to 8, comprises: Acquire electrical signals generated by collimated beams passing through multiple light-transmitting areas on the grating ruler; Based on the peak position of the electrical signal, the positions of the light signals corresponding to the multiple light-transmitting areas on the linear image sensor are determined respectively, and the imaging distance between each pair of adjacent positions is calculated according to the determined multiple positions. Based on the absolute position encoding and the preset mapping relationship, the physical distance between adjacent light-transmitting areas on the grating ruler corresponding to each of the imaging distances is obtained, and the displacement measurement result of the grating ruler in the first direction is determined according to all the obtained physical distances; the mapping relationship represents the relationship between the imaging distance and the physical distance.
10. A displacement measurement method, characterized in that, The mapping relationship is obtained through a calibration process, which includes: The linear array image sensor receives the electrical signal output by the collimated beam when the grating ruler is placed in the initial position. Based on the peak position of the electrical signal, the correspondence between the pixel position of the linear array image sensor and the first light-transmitting slit in the absolute position encoding is determined; Based on the correspondence, determine the ratio between the imaging spacing of at least one adjacent light-transmitting slit on the linear image sensor and the physical spacing of the at least one adjacent light-transmitting slit; The ratio is subjected to statistical feature processing to obtain statistical feature values as the mapping relationship. The statistical feature processing includes one of the following: average calculation, weighted average calculation, median calculation, and mode calculation.