[go: up one dir, main page]

CN118857116B - A method, device, equipment and medium for displacement measurement based on photoelectric reflection - Google Patents

A method, device, equipment and medium for displacement measurement based on photoelectric reflection Download PDF

Info

Publication number
CN118857116B
CN118857116B CN202411328004.2A CN202411328004A CN118857116B CN 118857116 B CN118857116 B CN 118857116B CN 202411328004 A CN202411328004 A CN 202411328004A CN 118857116 B CN118857116 B CN 118857116B
Authority
CN
China
Prior art keywords
displacement
digital signal
displacement digital
positive
measuring medium
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202411328004.2A
Other languages
Chinese (zh)
Other versions
CN118857116A (en
Inventor
龚志
黄绩
董凯
简张勇
陈邦其
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Longshuo Technology Co ltd
Original Assignee
Hangzhou Longshuo Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Longshuo Technology Co ltd filed Critical Hangzhou Longshuo Technology Co ltd
Priority to CN202411328004.2A priority Critical patent/CN118857116B/en
Publication of CN118857116A publication Critical patent/CN118857116A/en
Application granted granted Critical
Publication of CN118857116B publication Critical patent/CN118857116B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/26Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light
    • G01D5/32Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light with attenuation or whole or partial obturation of beams of light
    • G01D5/34Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light with attenuation or whole or partial obturation of beams of light the beams of light being detected by photocells

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention relates to a displacement measurement method, a device, equipment and a medium based on photoelectric reflection, belonging to the field of displacement measurement. The method comprises the steps of obtaining a movable measuring medium, uniformly and alternately arranging bright stripes and dark stripes along the horizontal direction, arranging fixed reflective photoelectric switches on one side of the measuring medium in parallel along the horizontal direction, measuring displacement by moving the measuring medium along the horizontal direction, outputting a displacement sinusoidal signal, converting the displacement sinusoidal signal into a displacement digital signal through an analog-digital converter, transmitting the displacement digital signal to a micro-control unit, and identifying the displacement digital signal through the micro-control unit and obtaining the displacement of the measuring medium. The invention realizes the simple, high-efficiency and high-precision displacement measurement, and the device is simple and flexible and is convenient for practical application.

Description

Displacement measurement method, device, equipment and medium based on photoelectric reflection
Technical Field
The invention belongs to the technical field of displacement measurement, and particularly relates to a displacement measurement method, device, equipment and medium based on photoelectric reflection.
Background
At present, displacement measurement modes such as laser ranging and the like are commonly applied, but most of the displacement measurement modes have higher cost, strict requirements on measurement medium materials and are influenced by the manufacturing level of a process, various deviations can occur in the manufacturing process of the measurement medium, the displacement measurement precision is reduced, part of the measurement medium is complex in structure and difficult to manufacture, the manpower and material resources consumed in the displacement measurement process can be obviously increased, and meanwhile, the application scene of the measurement medium with complex structure is relatively less.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a displacement measurement method, a device, equipment and a medium based on photoelectric reflection.
The aim of the invention can be achieved by the following technical scheme:
A displacement measurement method based on photoelectric reflection, the implementation of the displacement measurement method comprising the steps of:
S1, acquiring a movable measuring medium, wherein the measuring medium comprises an opaque ruler tape, a metal plate and honeycomb paper, a fixed stripe width is preset, the long side of the measuring medium is taken as the horizontal direction, and light stripes and dark stripes are uniformly and alternately arranged on the measuring medium along the horizontal direction according to the fixed stripe width;
S2, arranging fixed reflective photoelectric switches on one side of the measurement medium in parallel along the horizontal direction, wherein the reflective photoelectric switches comprise a first reflective photoelectric switch and a second reflective photoelectric switch, displacement measurement is carried out by moving the measurement medium along the horizontal direction, light rays emitted by the reflective photoelectric switches sequentially reach the bright stripes and the dark stripes and output displacement sine signals to an analog-digital converter during displacement measurement, a central position is set, the central position is a connecting line midpoint of the first reflective photoelectric switch and the second reflective photoelectric switch, the horizontal movement direction of the measurement medium is regulated, the horizontal movement direction of the measurement medium comprises a positive direction and a negative direction, the direction from the connecting line midpoint to the first reflective photoelectric switch is the positive direction, and the direction from the connecting line midpoint to the second reflective photoelectric switch is the negative direction;
S3, converting the displacement sinusoidal signal into a displacement digital signal through the analog-digital converter and transmitting the displacement digital signal to the micro control unit;
S4, identifying the displacement digital signal through the micro control unit and acquiring the displacement of the measuring medium.
Preferably, the step S4 specifically includes:
S401, testing the measuring medium before leaving the factory and acquiring the complete periodic displacement of the measuring medium;
s402, acquiring the horizontal movement direction of the measurement medium based on the displacement digital signal;
S403, acquiring the displacement of the measuring medium according to a signal period identification algorithm based on the horizontal movement direction of the measuring medium, wherein the displacement of the measuring medium comprises positive displacement of the measuring medium and negative displacement of the measuring medium.
Preferably, the step S401 specifically includes:
S401-1, acquiring displacement digital signal information, wherein the displacement digital signal information comprises a maximum amplitude value of a displacement digital signal, a median amplitude value of the displacement digital signal and a minimum amplitude value of the displacement digital signal;
S401-2, acquiring a complete cycle of a displacement digital signal according to the information of the displacement digital signal, wherein the complete cycle of the displacement digital signal is a signal cycle corresponding to the time when the median amplitude value, the maximum amplitude value, the median amplitude value, the minimum amplitude value and the median amplitude value of the displacement digital signal are sequentially detected;
S401-3, obtaining the whole period displacement of the measuring medium corresponding to the whole period of the displacement digital signal.
Preferably, the step S402 specifically includes:
S402-1, acquiring a signal waveform phase of the displacement digital signal, wherein the signal waveform phase comprises a first signal waveform phase and a second signal waveform phase, the first signal waveform phase is output by the first reflective photoelectric switch, and the second signal waveform phase is output by the second reflective photoelectric switch;
s402-2, judging the signal waveform phase, wherein when the first signal waveform phase is smaller than the second signal waveform phase, the horizontal movement direction of the measuring medium is the positive direction;
When the phase of the first signal waveform is larger than that of the second signal waveform, the horizontal moving direction of the measuring medium is the negative direction.
Preferably, the step S403 specifically includes:
S403-1, when the horizontal movement direction of the measurement medium is the positive direction, acquiring positive direction displacement of the measurement medium according to the positive direction period number, wherein the positive direction period number comprises positive direction integer period number and positive direction decimal period number;
s403-2, when the horizontal movement direction of the measuring medium is the negative direction, acquiring negative direction displacement of the measuring medium according to the number of negative direction periods, wherein the number of negative direction periods comprises the integer number of negative direction periods and the decimal number of negative direction periods.
Preferably, the step S403-1 specifically includes:
Acquiring the positive integer period number, wherein the initial value of the positive integer period number is 0, detecting the displacement digital signal information in real time, and sequentially detecting the median value of the displacement digital signal, the minimum amplitude of the displacement digital signal, the median value of the displacement digital signal, the maximum amplitude of the displacement digital signal and the median value of the displacement digital signal to be a complete positive cycle of the displacement digital signal, wherein the positive integer period number is increased by 1 when one positive cycle of the displacement digital signal is detected;
When the fact that the previous positive cycle of the displacement digital signal is a complete cycle and the next positive cycle of the displacement digital signal is an incomplete cycle is detected, a positive direction termination amplitude of the displacement digital signal is obtained, a positive direction termination phase of the displacement digital signal is calculated according to the positive direction termination amplitude of the displacement digital signal, and a calculation formula is as follows:
,
Wherein, The positive direction termination phase of the displacement digital signal is represented by S sig 1, the positive direction termination amplitude of the displacement digital signal is represented by S max, the maximum amplitude of the displacement digital signal is represented by S min, and the minimum amplitude of the displacement digital signal is represented by S min;
calculating the number of decimal periods in the positive direction according to the positive direction termination phase of the displacement digital signal, wherein the calculation formula is as follows:
,
Wherein, l 1 is the number of positive direction decimal periods, Terminating the phase for the positive direction of the displacement digital signal;
Calculating the positive displacement of the measuring medium according to the positive direction period number, wherein the calculation formula is as follows:
,
Wherein L 1 is the positive displacement of the measuring medium, D is the complete period displacement of the measuring medium, N 1 is the integer period number in the positive direction, and L 1 is the fractional period number in the positive direction.
Preferably, the step S403-2 specifically includes:
acquiring the number of negative direction integer periods, wherein the initial value of the number of negative direction integer periods is 0, detecting the displacement digital signal information in real time, and sequentially detecting the median of the displacement digital signal, the maximum amplitude of the displacement digital signal, the median of the displacement digital signal, the minimum amplitude of the displacement digital signal and the median of the displacement digital signal to be a complete displacement digital signal negative cycle, wherein the number of negative direction integer periods is increased by 1 when one displacement digital signal negative cycle is detected;
When the fact that the previous displacement digital signal negative cycle is a complete cycle and the next displacement digital signal negative cycle is an incomplete cycle is detected, obtaining a displacement digital signal negative direction termination amplitude, and calculating a displacement digital signal negative direction termination phase according to the displacement digital signal negative direction termination amplitude, wherein the calculation formula is as follows:
,
Wherein, The phase is terminated in the negative direction of the displacement digital signal, S sig 2 is the termination amplitude in the negative direction of the displacement digital signal, S max is the maximum amplitude of the displacement digital signal, and S min is the minimum amplitude of the displacement digital signal;
Calculating the number of decimal periods in the negative direction according to the negative direction termination phase of the displacement digital signal, wherein the calculation formula is as follows:
,
Wherein, l 2 is the number of negative direction decimal periods, Terminating the phase for the negative direction of the displacement digital signal;
Calculating the negative direction displacement of the measuring medium according to the number of negative direction periods, wherein a calculation formula is as follows:
,
Wherein L 2 is the negative direction displacement of the measuring medium, D is the complete period displacement of the measuring medium, N 2 is the integer period number of the negative direction, and L 2 is the decimal period number of the negative direction.
The displacement measuring device based on photoelectric reflection is used for executing the displacement measuring method and is characterized by comprising a device setting module, a signal conversion module and a displacement measuring module;
The device setting module is used for obtaining a movable measuring medium, the measuring medium comprises an opaque ruler tape, a metal plate and honeycomb paper, fixed stripe widths are preset, the long sides of the measuring medium are taken as horizontal directions, bright stripes and dark stripes are uniformly and alternately arranged on the measuring medium along the horizontal directions according to the fixed stripe widths, fixed reflective photoelectric switches are arranged on one side of the measuring medium in parallel along the horizontal directions, the reflective photoelectric switches comprise a first reflective photoelectric switch and a second reflective photoelectric switch, displacement measurement is carried out by moving the measuring medium along the horizontal directions, light emitted by the reflective photoelectric switches sequentially reaches the bright stripes and the dark stripes and outputs displacement sine signals to an analog-digital converter during displacement measurement, a central position is set, the central position is a connecting line midpoint of the first reflective photoelectric switch and the second reflective photoelectric switch, the horizontal movement direction of the measuring medium is defined to comprise a positive direction and a negative direction, the connecting line midpoint is a positive direction and a negative direction of the first reflective photoelectric switch, and the connecting line midpoint is a negative direction of the second reflective photoelectric switch;
the signal conversion module is used for converting the displacement sinusoidal signal into a displacement digital signal through the analog-digital converter and transmitting the displacement digital signal to the micro control unit;
the displacement measurement module is used for identifying the displacement digital signal through the micro control unit and acquiring the displacement of the measurement medium.
An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the displacement measurement method described above when executing the program.
A storage medium containing computer executable instructions which, when executed by a computer processor, are for performing the displacement measurement method described above.
The beneficial effects of the invention are as follows:
(1) The displacement measurement is carried out through photoelectric reflection, so that the cost is remarkably reduced, the requirement on the material of the measurement medium is wide, the possibility of deviation in the manufacturing process of the measurement medium is reduced, the precision of the displacement measurement is improved, the measurement medium is simple in structure, and the application scene is relatively more.
(2) Measuring medium is tested before delivery, and the complete period displacement of the measuring medium is obtained, so that a foundation is provided for later displacement measurement, and the workload of later calculation is reduced;
(3) The horizontal moving direction of the measuring medium is obtained through the displacement digital signal, the limit that part of the measuring modes can only carry out unidirectional measurement is broken, and the measuring medium can move freely in positive and negative directions;
(4) The displacement of the measured medium is obtained according to the signal period identification algorithm based on the horizontal movement direction of the measured medium, the calculation is simple and convenient, the displacement measurement precision is high, and the displacement measurement work efficiency can be remarkably improved.
Drawings
The present invention is further described below with reference to the accompanying drawings for the convenience of understanding by those skilled in the art.
FIG. 1 is a flow chart showing the steps of a displacement measurement method based on photoelectric reflection according to the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention for achieving the preset aim, the following detailed description is given below of the specific implementation, structure, characteristics and effects according to the invention with reference to the attached drawings and the preferred embodiment.
The working principle and the using flow of the invention are as follows:
referring to fig. 1, a displacement measurement method based on photoelectric reflection includes:
S1, acquiring a movable measuring medium, wherein the measuring medium comprises, but is not limited to, an opaque tape, a metal plate and honeycomb paper, a fixed stripe width is preset, the long side of the measuring medium is taken as a horizontal direction, and light stripes and dark stripes are uniformly and alternately arranged on the measuring medium along the horizontal direction according to the fixed stripe width;
S2, arranging fixed reflective photoelectric switches on one side of the measurement medium in parallel along the horizontal direction, wherein the reflective photoelectric switches comprise a first reflective photoelectric switch and a second reflective photoelectric switch, displacement measurement is carried out by moving the measurement medium along the horizontal direction, light rays emitted by the reflective photoelectric switches sequentially reach the bright stripes and the dark stripes and output displacement sine signals to an analog-digital converter during displacement measurement, a central position is set, the central position is a connecting line midpoint of the first reflective photoelectric switch and the second reflective photoelectric switch, the horizontal movement direction of the measurement medium is regulated, the horizontal movement direction of the measurement medium comprises a positive direction and a negative direction, the direction from the connecting line midpoint to the first reflective photoelectric switch is the positive direction, and the direction from the connecting line midpoint to the second reflective photoelectric switch is the negative direction;
S3, converting the displacement sinusoidal signal into a displacement digital signal through the analog-digital converter and transmitting the displacement digital signal to the micro control unit;
S4, identifying the displacement digital signal through the micro control unit and acquiring the displacement of the measuring medium.
In this embodiment, the micro control unit recognizes the displacement digital signal and obtains the displacement of the measurement medium, which may be implemented by the following steps:
S401, testing the measuring medium before leaving the factory and obtaining the complete periodic displacement of the measuring medium, providing a basis for later displacement measurement, and reducing later calculation workload, wherein the complete periodic displacement of the measuring medium is the displacement of the measuring medium when a complete displacement digital signal period is detected;
S402, acquiring the horizontal movement direction of the measuring medium based on the displacement digital signal, and breaking the limit that part of the measuring modes can only be measured unidirectionally, so that the measuring medium can move freely in positive and negative directions;
S403, based on the horizontal movement direction of the measuring medium, the displacement of the measuring medium is obtained according to a signal period identification algorithm, the calculation is simple and convenient, the displacement measurement precision is high, the displacement measurement work efficiency can be remarkably improved, and the displacement of the measuring medium comprises the positive displacement of the measuring medium and the negative displacement of the measuring medium.
In this embodiment, the measuring medium is tested before shipment and the complete period displacement of the measuring medium is obtained, which can be implemented specifically by the following steps:
S401-1, acquiring displacement digital signal information, wherein the displacement digital signal information comprises a maximum amplitude value of a displacement digital signal, a median amplitude value of the displacement digital signal and a minimum amplitude value of the displacement digital signal;
S401-2, acquiring a complete cycle of a displacement digital signal according to the information of the displacement digital signal, wherein the complete cycle of the displacement digital signal is a signal cycle corresponding to the time when the median amplitude value, the maximum amplitude value, the median amplitude value, the minimum amplitude value and the median amplitude value of the displacement digital signal are sequentially detected;
S401-3, obtaining the whole period displacement of the measuring medium corresponding to the whole period of the displacement digital signal.
In this embodiment, the obtaining the horizontal movement direction of the measurement medium based on the displacement digital signal may be implemented specifically by:
S402-1, acquiring a signal waveform phase of the displacement digital signal, wherein the signal waveform phase comprises a first signal waveform phase and a second signal waveform phase, the first signal waveform phase is output by the first reflective photoelectric switch, and the second signal waveform phase is output by the second reflective photoelectric switch;
s402-2, judging the signal waveform phase, wherein when the first signal waveform phase is smaller than the second signal waveform phase, the horizontal movement direction of the measuring medium is the positive direction;
When the phase of the first signal waveform is larger than that of the second signal waveform, the horizontal moving direction of the measuring medium is the negative direction.
In this embodiment, the measured medium displacement is obtained according to a signal period recognition algorithm based on the horizontal movement direction of the measured medium, where the measured medium displacement includes a measured medium positive direction displacement and a measured medium negative direction displacement, and the method specifically may be implemented by the following steps:
S403-1, when the horizontal movement direction of the measurement medium is the positive direction, acquiring positive direction displacement of the measurement medium according to the positive direction period number, wherein the positive direction period number comprises positive direction integer period number and positive direction decimal period number;
Acquiring the positive integer period number, wherein the initial value of the positive integer period number is 0, detecting the displacement digital signal information in real time, and sequentially detecting the median value of the displacement digital signal, the minimum amplitude of the displacement digital signal, the median value of the displacement digital signal, the maximum amplitude of the displacement digital signal and the median value of the displacement digital signal to be a complete positive cycle of the displacement digital signal, wherein the positive integer period number is increased by 1 when one positive cycle of the displacement digital signal is detected;
When the fact that the previous positive cycle of the displacement digital signal is a complete cycle and the next positive cycle of the displacement digital signal is an incomplete cycle is detected, a positive direction termination amplitude of the displacement digital signal is obtained, a positive direction termination phase of the displacement digital signal is calculated according to the positive direction termination amplitude of the displacement digital signal, and a calculation formula is as follows:
,
Wherein, The positive direction termination phase of the displacement digital signal is represented by S sig 1, the positive direction termination amplitude of the displacement digital signal is represented by S max, the maximum amplitude of the displacement digital signal is represented by S min, and the minimum amplitude of the displacement digital signal is represented by S min;
calculating the number of decimal periods in the positive direction according to the positive direction termination phase of the displacement digital signal, wherein the calculation formula is as follows:
,
Wherein, l 1 is the number of positive direction decimal periods, Terminating the phase for the positive direction of the displacement digital signal;
Calculating the positive displacement of the measuring medium according to the positive direction period number, wherein the calculation formula is as follows:
,
Wherein L 1 is the positive displacement of the measuring medium, D is the complete periodic displacement of the measuring medium, N 1 is the integer number of positive cycles, and L 1 is the fractional number of positive cycles;
S403-2, when the horizontal movement direction of the measurement medium is the negative direction, acquiring negative direction displacement of the measurement medium according to the number of negative direction periods, wherein the number of negative direction periods comprises the integer number of negative direction periods and the decimal number of negative direction periods;
acquiring the number of negative direction integer periods, wherein the initial value of the number of negative direction integer periods is 0, detecting the displacement digital signal information in real time, and sequentially detecting the median of the displacement digital signal, the maximum amplitude of the displacement digital signal, the median of the displacement digital signal, the minimum amplitude of the displacement digital signal and the median of the displacement digital signal to be a complete displacement digital signal negative cycle, wherein the number of negative direction integer periods is increased by 1 when one displacement digital signal negative cycle is detected;
When the fact that the previous displacement digital signal negative cycle is a complete cycle and the next displacement digital signal negative cycle is an incomplete cycle is detected, obtaining a displacement digital signal negative direction termination amplitude, and calculating a displacement digital signal negative direction termination phase according to the displacement digital signal negative direction termination amplitude, wherein the calculation formula is as follows:
,
Wherein, The phase is terminated in the negative direction of the displacement digital signal, S sig 2 is the termination amplitude in the negative direction of the displacement digital signal, S max is the maximum amplitude of the displacement digital signal, and S min is the minimum amplitude of the displacement digital signal;
Calculating the number of decimal periods in the negative direction according to the negative direction termination phase of the displacement digital signal, wherein the calculation formula is as follows:
,
Wherein, l 2 is the number of negative direction decimal periods, Terminating the phase for the negative direction of the displacement digital signal;
Calculating the negative direction displacement of the measuring medium according to the number of negative direction periods, wherein a calculation formula is as follows:
,
Wherein L 2 is the negative direction displacement of the measuring medium, D is the complete period displacement of the measuring medium, N 2 is the integer period number of the negative direction, and L 2 is the decimal period number of the negative direction.
A displacement measuring device based on photoelectric reflection comprises a device setting module, a signal conversion module and a displacement measuring module;
The device setting module is used for obtaining a movable measuring medium, the measuring medium comprises but is not limited to an opaque ruler tape, a metal plate and honeycomb paper, fixed stripe widths are preset, the long sides of the measuring medium are used as horizontal directions, bright stripes and dark stripes are uniformly and alternately arranged on the measuring medium along the horizontal directions according to the fixed stripe widths, fixed reflective photoelectric switches are arranged on one side of the measuring medium along the horizontal directions in parallel, the reflective photoelectric switches comprise a first reflective photoelectric switch and a second reflective photoelectric switch, displacement measurement is carried out by moving the measuring medium along the horizontal directions, light emitted by the reflective photoelectric switches sequentially reaches the bright stripes and the dark stripes and outputs a displacement sine signal to an analog-digital converter during the displacement measurement, a central position is set, the horizontal movement direction of the measuring medium is defined as a connecting midpoint of the first reflective photoelectric switch and the second reflective photoelectric switch, the horizontal movement direction of the measuring medium comprises a positive direction and a negative direction, and the connecting midpoint of the measuring medium is the positive direction and the negative direction of the reflective photoelectric switch;
the signal conversion module is used for converting the displacement sinusoidal signal into a displacement digital signal through the analog-digital converter and transmitting the displacement digital signal to the micro control unit;
the displacement measurement module is used for identifying the displacement digital signal through the micro control unit and acquiring the displacement of the measurement medium.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing. Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The present invention is not limited in any way by the above-described preferred embodiments, but is not limited to the above-described preferred embodiments, and any person skilled in the art will appreciate that the present invention can be embodied in the form of a program for carrying out the method of the present invention, while the above disclosure is directed to equivalent embodiments capable of being altered or modified in a slight manner, any and all concise modifications, equivalent variations and alterations of the above embodiments are still within the scope of the present disclosure, all as may be made without departing from the scope of the present disclosure.

Claims (6)

1. A displacement measurement method based on photoelectric reflection, characterized in that the implementation of the displacement measurement method comprises the following steps:
S1, acquiring a movable measuring medium, wherein the measuring medium comprises an opaque ruler tape, a metal plate and honeycomb paper, a fixed stripe width is preset, the long side of the measuring medium is taken as the horizontal direction, and light stripes and dark stripes are uniformly and alternately arranged on the measuring medium along the horizontal direction according to the fixed stripe width;
S2, arranging fixed reflective photoelectric switches on one side of the measurement medium in parallel along the horizontal direction, wherein the reflective photoelectric switches comprise a first reflective photoelectric switch and a second reflective photoelectric switch, displacement measurement is carried out by moving the measurement medium along the horizontal direction, light rays emitted by the reflective photoelectric switches sequentially reach the bright stripes and the dark stripes and output displacement sine signals to an analog-digital converter during displacement measurement, a central position is set, the central position is a connecting line midpoint of the first reflective photoelectric switch and the second reflective photoelectric switch, the horizontal movement direction of the measurement medium is regulated, the horizontal movement direction of the measurement medium comprises a positive direction and a negative direction, the direction from the connecting line midpoint to the first reflective photoelectric switch is the positive direction, and the direction from the connecting line midpoint to the second reflective photoelectric switch is the negative direction;
S3, converting the displacement sinusoidal signal into a displacement digital signal through the analog-digital converter and transmitting the displacement digital signal to the micro control unit;
s4, identifying the displacement digital signal through the micro control unit and acquiring the displacement of the measuring medium;
S401, testing the measuring medium before leaving the factory and acquiring the complete periodic displacement of the measuring medium;
s402, acquiring the horizontal movement direction of the measurement medium based on the displacement digital signal;
S403, acquiring the displacement of the measuring medium according to a signal period identification algorithm based on the horizontal movement direction of the measuring medium, wherein the displacement of the measuring medium comprises positive displacement of the measuring medium and negative displacement of the measuring medium;
S403-1, when the horizontal movement direction of the measurement medium is the positive direction, acquiring positive direction displacement of the measurement medium according to the positive direction period number, wherein the positive direction period number comprises positive direction integer period number and positive direction decimal period number;
Acquiring the positive integer period number, wherein the initial value of the positive integer period number is 0, detecting the displacement digital signal information in real time, and sequentially detecting the median value of the displacement digital signal, the minimum amplitude of the displacement digital signal, the median value of the displacement digital signal, the maximum amplitude of the displacement digital signal and the median value of the displacement digital signal to be a complete positive cycle of the displacement digital signal, wherein the positive integer period number is increased by 1 when one positive cycle of the displacement digital signal is detected;
When the fact that the previous positive cycle of the displacement digital signal is a complete cycle and the next positive cycle of the displacement digital signal is an incomplete cycle is detected, a positive direction termination amplitude of the displacement digital signal is obtained, a positive direction termination phase of the displacement digital signal is calculated according to the positive direction termination amplitude of the displacement digital signal, and a calculation formula is as follows:
,
Wherein, The positive direction termination phase of the displacement digital signal is represented by S sig 1, the positive direction termination amplitude of the displacement digital signal is represented by S max, the maximum amplitude of the displacement digital signal is represented by S min, and the minimum amplitude of the displacement digital signal is represented by S min;
calculating the number of decimal periods in the positive direction according to the positive direction termination phase of the displacement digital signal, wherein the calculation formula is as follows: ,
Wherein, l 1 is the number of positive direction decimal periods, Terminating the phase for the positive direction of the displacement digital signal;
Calculating the positive displacement of the measuring medium according to the positive direction period number, wherein the calculation formula is as follows:
,
Wherein L 1 is the positive displacement of the measuring medium, D is the complete periodic displacement of the measuring medium, N 1 is the integer number of positive cycles, and L 1 is the fractional number of positive cycles;
S403-2, when the horizontal movement direction of the measurement medium is the negative direction, acquiring negative direction displacement of the measurement medium according to the number of negative direction periods, wherein the number of negative direction periods comprises the integer number of negative direction periods and the decimal number of negative direction periods;
acquiring the number of negative direction integer periods, wherein the initial value of the number of negative direction integer periods is 0, detecting the displacement digital signal information in real time, and sequentially detecting the median of the displacement digital signal, the maximum amplitude of the displacement digital signal, the median of the displacement digital signal, the minimum amplitude of the displacement digital signal and the median of the displacement digital signal to be a complete displacement digital signal negative cycle, wherein the number of negative direction integer periods is increased by 1 when one displacement digital signal negative cycle is detected;
When the fact that the previous displacement digital signal negative cycle is a complete cycle and the next displacement digital signal negative cycle is an incomplete cycle is detected, obtaining a displacement digital signal negative direction termination amplitude, and calculating a displacement digital signal negative direction termination phase according to the displacement digital signal negative direction termination amplitude, wherein the calculation formula is as follows:
,
Wherein, The phase is terminated in the negative direction of the displacement digital signal, S sig 2 is the termination amplitude in the negative direction of the displacement digital signal, S max is the maximum amplitude of the displacement digital signal, and S min is the minimum amplitude of the displacement digital signal;
Calculating the number of decimal periods in the negative direction according to the negative direction termination phase of the displacement digital signal, wherein the calculation formula is as follows:
,
Wherein, l 2 is the number of negative direction decimal periods, Terminating the phase for the negative direction of the displacement digital signal;
Calculating the negative direction displacement of the measuring medium according to the number of negative direction periods, wherein a calculation formula is as follows:
,
Wherein L 2 is the negative direction displacement of the measuring medium, D is the complete period displacement of the measuring medium, N 2 is the integer period number of the negative direction, and L 2 is the decimal period number of the negative direction.
2. The displacement measurement method according to claim 1, wherein the step S401 specifically includes:
S401-1, acquiring displacement digital signal information, wherein the displacement digital signal information comprises a maximum amplitude value of a displacement digital signal, a median amplitude value of the displacement digital signal and a minimum amplitude value of the displacement digital signal;
S401-2, acquiring a complete cycle of a displacement digital signal according to the information of the displacement digital signal, wherein the complete cycle of the displacement digital signal is a signal cycle corresponding to the time when the median amplitude value, the maximum amplitude value, the median amplitude value, the minimum amplitude value and the median amplitude value of the displacement digital signal are sequentially detected;
S401-3, obtaining the whole period displacement of the measuring medium corresponding to the whole period of the displacement digital signal.
3. The displacement measurement method according to claim 1, wherein the step S402 specifically includes:
S402-1, acquiring a signal waveform phase of the displacement digital signal, wherein the signal waveform phase comprises a first signal waveform phase and a second signal waveform phase, the first signal waveform phase is output by the first reflective photoelectric switch, and the second signal waveform phase is output by the second reflective photoelectric switch;
s402-2, judging the signal waveform phase, wherein when the first signal waveform phase is smaller than the second signal waveform phase, the horizontal movement direction of the measuring medium is the positive direction;
When the phase of the first signal waveform is larger than that of the second signal waveform, the horizontal moving direction of the measuring medium is the negative direction.
4. A displacement measuring device based on photoelectric reflection applying the displacement measuring method as claimed in claim 1, which is characterized by comprising a device setting module, a signal conversion module and a displacement measuring module;
The device setting module is used for obtaining a movable measuring medium, the measuring medium comprises an opaque ruler tape, a metal plate and honeycomb paper, fixed stripe widths are preset, the long sides of the measuring medium are taken as horizontal directions, bright stripes and dark stripes are uniformly and alternately arranged on the measuring medium along the horizontal directions according to the fixed stripe widths, fixed reflective photoelectric switches are arranged on one side of the measuring medium in parallel along the horizontal directions, the reflective photoelectric switches comprise a first reflective photoelectric switch and a second reflective photoelectric switch, displacement measurement is carried out by moving the measuring medium along the horizontal directions, light emitted by the reflective photoelectric switches sequentially reaches the bright stripes and the dark stripes and outputs displacement sine signals to an analog-digital converter during displacement measurement, a central position is set, the central position is a connecting line midpoint of the first reflective photoelectric switch and the second reflective photoelectric switch, the horizontal movement direction of the measuring medium is defined to comprise a positive direction and a negative direction, the connecting line midpoint is a positive direction and a negative direction of the first reflective photoelectric switch, and the connecting line midpoint is a negative direction of the second reflective photoelectric switch;
the signal conversion module is used for converting the displacement sinusoidal signal into a displacement digital signal through the analog-digital converter and transmitting the displacement digital signal to the micro control unit;
the displacement measurement module is used for identifying the displacement digital signal through the micro control unit and acquiring the displacement of the measurement medium.
5. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the displacement measurement method according to any one of claims 1-3 when executing the program.
6. A storage medium containing computer executable instructions which, when executed by a computer processor, are for performing the displacement measurement method of any one of claims 1-3.
CN202411328004.2A 2024-09-24 2024-09-24 A method, device, equipment and medium for displacement measurement based on photoelectric reflection Active CN118857116B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411328004.2A CN118857116B (en) 2024-09-24 2024-09-24 A method, device, equipment and medium for displacement measurement based on photoelectric reflection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411328004.2A CN118857116B (en) 2024-09-24 2024-09-24 A method, device, equipment and medium for displacement measurement based on photoelectric reflection

Publications (2)

Publication Number Publication Date
CN118857116A CN118857116A (en) 2024-10-29
CN118857116B true CN118857116B (en) 2025-02-07

Family

ID=93170234

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411328004.2A Active CN118857116B (en) 2024-09-24 2024-09-24 A method, device, equipment and medium for displacement measurement based on photoelectric reflection

Country Status (1)

Country Link
CN (1) CN118857116B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104101369A (en) * 2013-04-12 2014-10-15 佳能株式会社 Position detection apparatus
CN105008865A (en) * 2012-12-20 2015-10-28 瑞尼斯豪公司 Optical element

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3139862B2 (en) * 1993-01-13 2001-03-05 株式会社東芝 Surface defect inspection equipment
JP3639377B2 (en) * 1996-03-26 2005-04-20 オリンパス株式会社 Optical displacement sensor
JP2000121316A (en) * 1998-10-15 2000-04-28 Citizen Watch Co Ltd Dimension measuring apparatus using optical scale
JP4138138B2 (en) * 1999-03-05 2008-08-20 株式会社ミツトヨ Absolute displacement measuring device
DE10132521A1 (en) * 2001-07-09 2003-01-30 Heidenhain Gmbh Dr Johannes Position measuring device
CN1272600C (en) * 2003-12-18 2006-08-30 中国人民解放军国防科学技术大学 Phase differential nonsensitive counting method and device for node tracking mohr interference fringe signals
JP5891921B2 (en) * 2012-04-16 2016-03-23 富士通株式会社 Displacement measuring device, displacement measuring method, and displacement measuring program
CN206488745U (en) * 2017-01-24 2017-09-12 深圳市森瑟科技有限公司 Displacement measuring device
CN116147492A (en) * 2021-11-22 2023-05-23 李志� A photoelectric displacement detection device and method
CN117346665A (en) * 2022-06-28 2024-01-05 段婷婷 Reflective optical reading head for grating ruler
CN115540764A (en) * 2022-10-19 2022-12-30 江苏大学 Displacement measuring device and method based on circular grating sensor and circuit processing unit
CN116007509A (en) * 2023-02-21 2023-04-25 桂林电子科技大学 Grating ruler measuring system based on linear array CCD

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105008865A (en) * 2012-12-20 2015-10-28 瑞尼斯豪公司 Optical element
CN104101369A (en) * 2013-04-12 2014-10-15 佳能株式会社 Position detection apparatus

Also Published As

Publication number Publication date
CN118857116A (en) 2024-10-29

Similar Documents

Publication Publication Date Title
WO2019192196A1 (en) Pseudo-random code channel grating ruler and reading method therefor
CN102147279B (en) Character-wheel-type meter reading method and character-wheel-type direct-reading meter
CN118857116B (en) A method, device, equipment and medium for displacement measurement based on photoelectric reflection
CN113873435B (en) Indoor positioning method and related equipment
Ma et al. Recognizing hand gestures using solar cells
CN115265366A (en) Object deformation detection method, device, terminal device and storage medium
Ahmed et al. Fuel management system
CN101813463A (en) Soft subdivision method of moire frange signal of grating
CN104834523A (en) Terminal
Kim et al. Design and implementation of 3d lidar based on pixel-by-pixel scanning and ds-ocdma
CN113298778B (en) Depth calculation method and system based on flight time and storage medium
CN112748399B (en) Visible light three-dimensional positioning system and method based on multi-PD receiver
CN117375462B (en) Stepping motor calibration method, device, equipment and computer storage medium
CN102680777A (en) Intelligent realization method for measuring gain compression by utilizing network instrument
CN102944255B (en) Digital optical fiber grating demodulation instrument and method
CN204009070U (en) Sense terminals and electronic apparatus
CN111596125B (en) Method, device and equipment for determining power generation capacity and storage medium
CN116701217A (en) Method and equipment for analyzing test data of flight time module
CN203825195U (en) Detection terminal and mobile electronic device
CN211478654U (en) Laser ranging module based on smart phone development
CN211653053U (en) Device for detecting space displacement effect of phototriode
CN105608873A (en) Electricity marketing data acquisition device
CN116090278B (en) A method and device for calculating the power frequency electric field above a building
CN104931009A (en) Method for measuring horizontal distance
CN104155592B (en) Test method of DDS dedicated chip static parameter

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant