Laser ranging method based on photoelectric sensor and photoelectric sensor

By obtaining teaching data and matching the distance measurement mode, combining TOF and photosensitive distance curves, dynamically adjusting the measurement mode of the photoelectric sensor, the low accuracy and blind spot problems of the photoelectric sensor under dark color targets and long-distance conditions are solved, and the higher measurement accuracy and lower error.

CN114063094BActive Publication Date: 2024-12-31SHANGHAI SODILONG AUTOMATION CO LTD
View PDF 21 Cites 0 Cited by

Patent Information

Application Number
CN202111355065.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-16
Publication Date
2024-12-31
Estimated Expiration
2041-11-16

AI Technical Summary

Technical Problem

Existing photoelectric sensors have low measurement accuracy under detection of dark color targets and long-distance conditions, and there are blind spots, resulting in measurement errors and the need to frequently replace sensors.

Method used

By obtaining teaching data, matching the appropriate distance measurement mode (long-distance mode or short-distance mode), using the TOF method or photosensitive distance curve and voltage signal for distance measurement, dynamically adjusting the measurement mode to improve accuracy, and establishing a photosensitive distance model to overcome Blind spot impact.

Benefits of technology

It improves the measurement accuracy of the photoelectric sensor, reduces blind spot errors, enhances the detection capability under different distances and brightness conditions, and reduces the sensor replacement frequency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114063094B_ABST
    Figure CN114063094B_ABST
Patent Text Reader

Abstract

The present invention proposes a laser ranging method based on a photoelectric sensor and a photoelectric sensor. The laser ranging method based on a photoelectric sensor mainly includes the following steps: obtaining teaching data; matching a corresponding ranging mode according to the teaching data; and detecting an object to be measured according to the ranging mode. Compared with the prior art, the present application can improve the measurement accuracy of the photoelectric sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of sensors, and in particular to a laser ranging method based on a photoelectric sensor and a photoelectric sensor. Background Art

[0002] Photoelectric sensors are sensors that use photoelectric elements as detection elements. They first convert the position change of the object being measured into a change in the light signal, and then use the photoelectric element to further convert the light signal into an electrical signal. Photoelectric sensors are generally composed of three parts: light source, optical path and photoelectric element. Photoelectric sensors are non-contact and have a high response rate, but they are easily affected by the appearance color, size, shape, material and background of the object being detected, and their application in industrial production processes has limitations.

[0003] The original background suppression (BGS) photoelectric sensor uses a 2-ratio photodiode or position detection element. The projected light beam reflected by the detection object is hit on the light receiving element to form an image. This imaging position is based on the triangulation distance measurement principle that varies according to the distance of the detection object. As a result, it will be greatly affected by objects of different colors, and it is difficult to detect and judge dark-colored target detection objects at short distances (up to 30cm). In addition, there is a large blind area in the area close to the sensor. For target detection objects with a large detection range, when the detection object appears in the blind area, it cannot be detected and judged. In addition, in the prior art, most sensors are customized, and their blind areas are different. Therefore, when the object to be measured changes or the position of the sensor changes, it is very easy to cause measurement errors due to changes in the blind area, so it is necessary to replace the corresponding sensor.

[0004] Therefore, how to provide a laser ranging method and a photoelectric sensor to improve the measurement accuracy of the photoelectric sensor is a technical problem that the present invention urgently needs to solve. Summary of the invention

[0005] The object of the present invention is to provide a laser ranging method based on a photoelectric sensor and a photoelectric sensor to improve the measurement accuracy of the photoelectric sensor.

[0006] In order to achieve the above object, the present invention proposes a laser ranging method based on a photoelectric sensor, comprising:

[0007] Get teaching data;

[0008] Matching a corresponding distance measurement mode according to the teaching data;

[0009] The object to be detected is detected according to the distance measurement mode.

[0010] Further preferably, the step of matching the corresponding ranging mode according to the teaching data includes:

[0011] Acquire an initial distance of the object to be measured through an initial distance measurement mode, wherein the initial distance measurement mode is a long distance mode, wherein the long distance mode measures the distance of the object to be measured through a TOF method;

[0012] Determining whether the distance of the object to be measured is less than the teaching data;

[0013] If yes, switch to the short-distance mode to calculate the measurement distance of the object to be measured by a preset short-distance measurement method, wherein the short-distance measurement method is: obtaining the measurement distance of the object to be measured according to the photosensitive distance curve and the acquired real-time photosensitive signal, or obtaining the measurement distance of the object to be measured according to the photosensitive model and the acquired real-time voltage signal;

[0014] If not, the initial distance of the object to be measured is used as the measured distance of the object to be measured.

[0015] Further preferably, before the step of obtaining teaching data, the method further includes:

[0016] Obtaining light-sensing data corresponding to the target object placed at different short distances, and corresponding induced voltage signal data;

[0017] The light-sensing distance curve is generated by fitting according to the distance data corresponding to the light-sensing data and the induced voltage signal data.

[0018] Further preferably, the step of obtaining teaching data includes:

[0019] Obtaining a real-time voltage signal corresponding to the initial light sensitivity of the object to be measured;

[0020] The teaching data is obtained by inputting a preset teaching data model according to the real-time voltage signal.

[0021] Further preferably, the step of inputting the initial voltage signal into a preset teaching data model to obtain the teaching data comprises:

[0022] Obtaining a corresponding first target distance according to the real-time voltage signal and a preset light-sensing distance curve;

[0023] Obtaining a corresponding second target distance according to the real-time voltage signal and a preset photosensitivity distance model;

[0024] The teaching data is determined according to the first target distance, the second target distance and a preset rule.

[0025] Further preferably, before the step of obtaining teaching data, the method further includes:

[0026] Pre-collecting measured distance data obtained by measuring the target object by placing the photoelectric sensor in multiple brightness level environments and multiple distance levels, as well as corresponding measured distance data and brightness data;

[0027] Calculate difference data according to the measured distance data and the actually measured distance data;

[0028] Analyzing the difference data according to a preset difference threshold to obtain normal difference data analysis;

[0029] According to the normal difference data analysis, matching the target distance data in the measured distance data and the target brightness data in the brightness data corresponding to the target distance data;

[0030] The photosensing distance model is established according to the target brightness data, the target distance data and the voltage signal data corresponding to the target distance data.

[0031] Further preferably, the step of determining the teaching data according to the first target distance and the second target distance and a preset rule comprises:

[0032] Determine the weight values ​​corresponding to the first target distance and the second target distance according to a preset weight algorithm;

[0033] The first target distance and the second target distance after weighting are calculated according to a weighted algorithm to obtain the teaching data.

[0034] The present application also provides a photoelectric sensor for measuring a target object using the above-mentioned laser ranging method based on a photoelectric sensor.

[0035] Further preferably, it includes: a control main board for connecting to the external communication; a key circuit board electrically connected to the control main board; a button rod arranged above the key circuit board; a button cover connected to the button rod; an indicator light electrically connected to the control main board; wherein the button rod is used to energize the key circuit board after the button cover is pressed, so that the control main board obtains the teaching data and controls the changing state of the indicator light according to the teaching data.

[0036] Further preferably, the photoelectric sensor also includes: a lens; a frame; a shell; a lampshade; wherein the lampshade, the frame and the shell are fixedly connected by snaps; when the lens and the frame are assembled, they are integrally formed with the lampshade and the shell by secondary injection molding; and the lampshade is provided with a dovetail groove for mounting the frame; the key circuit board is arranged on the key substrate and is welded to the control main board; wherein the photoelectric sensor also includes: a communication module electrically connected to the control main board.

[0037] Compared with the prior art, the present application provides a laser ranging method based on a photoelectric sensor and a photoelectric sensor to improve the measurement accuracy of the photoelectric sensor. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 FIG. 1 is a flowchart of a laser ranging method based on a photoelectric sensor in one embodiment of the present invention;

[0039] FIG2 is a specific flow chart of step S20 in one embodiment of the present invention;

[0040] FIG3 is a specific flow chart of step S10 in one embodiment of the present invention;

[0041] FIG4 is a specific flow chart of step S101 in one embodiment of the present invention;

[0042] FIG5 is a flowchart of another preferred laser ranging method based on a photoelectric sensor in one embodiment of the present invention;

[0043] FIG6 is a specific flow chart of step S1013 in one embodiment of the present invention;

[0044] Figure 7 The schematic diagram of the distance measurement principle of the photoelectric sensor in one embodiment of the present invention is as follows;

[0045] Figure 8 A schematic diagram of a photoelectric sensor performing mode switching in one embodiment of the present invention;

[0046] Fig. 9 is a schematic diagram of a photosensitive distance curve fitted in one embodiment of the present invention;

[0047] Fig.10 This is a schematic diagram of the explosion structure of the photoelectric sensor in the second embodiment of the present invention;

[0048] Fig.11 A schematic diagram of the external structure of a photoelectric sensor in a second embodiment of the present invention;

[0049] Description of the drawings: lens 1, mirror frame 2, photoelectric sensor 3, shell 31, shielding cover 4, control main board 5, key circuit board 6, receiving module 7, transmitting module 8, button rod 9, button cover 10, light window 11, key substrate 12, wire 13, rubber-coated structure 14, object to be measured 16. DETAILED DESCRIPTION

[0050] The light curtain of the present invention will be described in more detail below in conjunction with a schematic diagram, wherein a preferred embodiment of the present invention is shown, and it should be understood that those skilled in the art may modify the present invention described herein while still achieving the beneficial effects of the present invention. Therefore, the following description should be understood as being broadly known to those skilled in the art and not as a limitation of the present invention.

[0051] Embodiment 1

[0052] This embodiment proposes a laser ranging method based on a photoelectric sensor, such as Figure 1 As shown, the following steps are included:

[0053] Step S10: obtaining teaching data;

[0054] Step S20: matching the corresponding distance measurement mode according to the teaching data;

[0055] Step S30: Detect the object to be detected according to the distance measurement mode.

[0056] From the above content, it can be seen that: since this embodiment can obtain the corresponding ranging mode according to the matching of the teaching data, such as the long-distance mode or the short-distance mode, the measurement accuracy of the photoelectric sensor 3 can be improved to avoid the phenomenon that some objects to be measured cannot be accurately measured due to the blind spots of the photoelectric sensor 3 when the distance is close or the distance changes dynamically.

[0057] In addition, it is worth mentioning that the teaching data in this embodiment can be obtained through external input, such as manual input or manual setting, or can be automatically obtained through a preset method. It is worth mentioning that the teaching data in this embodiment, that is, the initial value of the blind spot threshold, can be preferably set to 5 cm.

[0058] Specifically, the steps of matching the corresponding ranging mode according to the teaching data are as follows: Figure 2 As shown, step S20 specifically includes the following steps:

[0059] Step S201: Obtain the initial distance of the object 16 to be measured by using the initial distance measurement mode, wherein the initial distance measurement mode is the long distance mode, wherein the long distance mode is used for Figure 8The long distance D3 or D3+D2 shown is measured to measure the distance of the object 16 to be measured by the TOF (Time of Fly) method, that is, the distance of the object 16 to be measured is calculated by the signal time difference between the sent sensing light and the sensing light reflected and received by the object 16 to be measured and the corresponding sensing light speed. D3 represents the setting range of the teaching data.

[0060] Step S202: determining whether the distance of the object to be measured 16 is less than the teaching data;

[0061] Step S203: If yes, switch to short-distance mode, where the short-distance mode is used for Figure 8 The short distance D1 or D1+D2 shown is measured to calculate and output the measured distance of the object to be measured 16 through a preset short-distance measurement method, wherein the short-distance measurement method is to obtain the measured distance of the object to be measured 16 based on a photosensitive distance curve or a photosensitive model and an acquired real-time voltage signal. For example, the real-time voltage signal is input into the photosensitive model or the photosensitive formula corresponding to the photosensitive distance curve to obtain the distance of the object to be measured 16.

[0062] Step S204 : If not, taking the initial distance of the object to be measured 16 as the measured distance of the object to be measured 16 .

[0063] Through this step, the initial distance of the object 16 to be measured measured in the long-distance mode is compared with the teaching data to automatically select a suitable distance measurement mode, so that the distance of the object 16 to be measured can be measured more accurately.

[0064] Further preferably, in the step of obtaining teaching data, as Figure 4 As shown, before step S10, the following steps are also included:

[0065] Step S7: Obtain the induced voltage signal data of the reflected sensing light corresponding to the target object placed at different short distances, wherein the induced voltage signal data matches the light sensitivity data received by the photoelectric sensor 3; for example: obtain the light sensitivity data at short distances such as 0.5cm, 0.6cm, 0.7cm…5cm.

[0066] Step S8: Generate a photosensing distance curve by fitting based on the induced voltage signal data and the corresponding distance data.

[0067] Through the above steps, it can be known that: the measured distance of the object 16 to be measured is obtained by pre-collecting the voltage signal corresponding to the corresponding light sensitivity at different short distances, and the light sensitivity distance curve is generated by fitting, so that the light sensitivity signal obtained in real time is input into the light sensitivity distance formula corresponding to the light sensitivity distance curve to obtain the corresponding measured distance of the object 16 to be measured. Therefore, the whole process is as follows. Figure 7As shown, there is no need to consider the signal time difference between the sensing light A sent by the photoelectric sensor 3 and the sensing light B reflected and received by the object to be measured 16, which overcomes the problem that the distance is easily calculated by TOF and other methods due to the short distance in the prior art. In addition, it is worth mentioning that in the short-distance mode, since the amount of sensing light reflected by the photoelectric sensor 3 is large when the object to be measured is close to the photoelectric sensor 3, the amount of light sensitivity is large. By generating a corresponding light sensitivity distance curve based on the light sensitivity and the corresponding short distance fitting, the relationship between them can be better reflected.

[0068] Further preferably, Figure 3 As shown, the step of obtaining teaching data, i.e., step S10, specifically includes:

[0069] Step S101: obtaining a real-time voltage signal corresponding to the initial light sensitivity of the object 16 to be measured;

[0070] Step S102: Input a preset teaching data model according to the real-time voltage signal to obtain teaching data.

[0071] Further preferably, Figure 4 As shown, the step of inputting the initial voltage signal into a preset teaching data model to obtain teaching data, that is, step S101, specifically includes:

[0072] Step S1011: obtaining a corresponding first target distance according to the real-time voltage signal and a preset light-sensing distance curve;

[0073] Step S1012: obtaining a corresponding second target distance according to the real-time voltage signal and a preset photosensitivity distance model;

[0074] Step S1013: Determine teaching data according to the first target distance, the second target distance and preset rules.

[0075] Through the above steps, the target distances respectively measured by the photosensitive distance curve and the photosensitive distance model are comprehensively calculated according to the preset rules to obtain the teaching data, which can not only realize the automatic calculation of the teaching data, but also can consider the measurement errors caused by the distance between the object to be measured 16 and the photoelectric sensor 3, the brightness data in the environment, the brightness factors in the environment, etc. according to the actual situation, so that the teaching data can be dynamically adjusted to overcome the large error caused by the manual setting of the teaching data in the prior art, especially when the target object is in the vicinity of the teaching data set manually in the prior art, the measurement error is low.

[0076] Further preferably, Figure 5 As shown, before the step of acquiring teaching data, that is, step S10, the following steps are also included:

[0077] Step S1: pre-collect the measured distance data obtained by measuring the target object by placing the photoelectric sensor 3 in multiple brightness level environments and multiple distance levels, as well as the corresponding measured distance data and brightness data; wherein, for example, the above-mentioned brightness level can be divided into level 1, level 2, level 3... level 8, level 9, level 10, etc. from low to high according to the brightness of the ambient light measured by measuring tools such as a brightness meter. Of course, the brightness level can also be other levels, such as level 1, level 2, level 3, level 4, etc. How to divide it specifically and how many levels it is divided into depends on the actual use environment, and this embodiment does not make specific limitations or elaborate on this.

[0078] Step S2: Calculate the difference data based on the measured distance data and the actual distance data;

[0079] Step S3: Analyze the difference data according to the preset difference threshold to obtain normal difference data analysis;

[0080] Step S4: According to normal difference data analysis, matching the target distance data in the measured distance data and the target brightness data corresponding to the target distance data in the brightness data;

[0081] Step S5: Establish a photosensing distance model according to the target brightness data, the target distance data and the voltage signal data corresponding to the target distance data.

[0082] For example: the voltage signal data is (voltage signals at the same distance but different brightness, and voltage signals at different distances but the same brightness) U11, U12, U13...U1n; U21, U22, U23...U2n; U31, U32, U33...U3n; Um1, Um2...Umn, where m represents the divided distance level, and n represents the divided brightness level.

[0083] The corresponding measured distance data are L11, L12, L13... L1n; L21, L22, L23... L2n; L31, L32, L33... L3n; Lm1, Lm2... Lmn;

[0084] The measured distance data corresponding to different levels of distance are L1, L2, L3... Lm;

[0085] The difference data is L1-L11; L1-L12...L1-L1n; L2-L21; L2-L22...L2-L2n; L3-L31; L3-L32...L3-L3n... Lm-Lm1; Lm-Lm2...Lm-Lmn.

[0086] In addition, it is worth mentioning that the difference threshold in this embodiment can be preferably illustrated by taking 0.01 cm as an example, while in actual applications, the difference threshold can be preferably other values ​​such as 0.02 cm, and can be dynamically adjusted according to actual conditions, such as determining whether the obtained target brightness data and target distance data and the voltage signal data corresponding to the target distance data meet the modeling requirements. If not, the difference threshold can be adaptively adjusted, for example, by increasing or decreasing the difference threshold by 0.01 cm.

[0087] Through the above steps, by dividing different distance levels and different external environment brightness levels for testing, the corresponding measured distance data is obtained, and then the measured distance data and the measured distance data are calculated for difference. If the difference calculation is within the preset range, it meets the requirements of the subsequent photosensitive distance model, and then the measured distance data that meets the requirements is screened out as the target distance data, and the corresponding target brightness data and voltage signal data are matched, and then the voltage signal data and the target brightness data are used as independent variables, and the target distance data is used as the dependent variable and modeling is performed according to the regression analysis method and other modeling methods to establish a photosensitive distance model. The photosensitive distance model takes into account both the distance factor and the brightness factor and other factors, and can effectively predict the distance of the object to be measured in the teaching data or short-distance mode.

[0088] In addition, it is worth mentioning that the measured distance data in this embodiment can be measured by setting appropriate teaching data, without distinguishing between long-distance mode and short-distance mode, using the traditional TOF method to measure the object to be measured, or by other existing measurement methods to measure the object to be measured to obtain the corresponding measured distance data, which will not be elaborated here.

[0089] Further preferably, Figure 6 As shown, according to the first target distance and the second target distance and the preset rule, the step of determining the teaching data, that is, step S1013, specifically includes the following steps:

[0090] Step S10131: Determine the weight values ​​corresponding to the first target distance and the second target distance according to a preset weight algorithm;

[0091] Step S10136: According to the weighted algorithm, the first target distance and the second target distance after the weights are assigned are calculated to obtain teaching data.

[0092] In addition, as a further preferred embodiment, Figure 6 As shown, before step S10136, the following steps are also included:

[0093] Step S10132: Determine a photosensitive signal that matches the real-time voltage signal based on the acquired real-time voltage signal; wherein the photosensitive signal is a total light quantity signal received in real time corresponding to when the photoelectric sensor 3 receives the real-time voltage signal, including the above-mentioned sensing light B reflected by the object to be measured 16, the ambient light reflected by the object to be measured 16, and other light quantity signals.

[0094] Step S10133: Process the photosensitive signal according to a preset filtering algorithm to obtain a visible light quantity signal that matches the ambient light of the external environment, wherein the filtering algorithm can be a wavelet algorithm, an LMS algorithm, a denoising algorithm, or the like that can separate the visible light quantity signal corresponding to the ambient light.

[0095] Step S10134: Determine the brightness level of the external environment according to the visible light quantity signal and a preset brightness level algorithm.

[0096] Step S10135: Adjust the weight value according to the brightness level. For example, the weight value is adjusted according to the brightness level divided as described above. When the brightness level of the external environment is determined to be lower, the weight value is more biased towards the first target distance, that is, the weight of the first target distance is larger. For example, when the brightness level is the first level, the weight value of the first target distance is 1, and the weight value of the second target distance is 0. When the brightness level of the external environment is higher, the weight value is more biased towards the second target distance. For example, when the brightness level is the tenth level, the weight value of the first target distance is 0, and the weight value of the second target distance is 1. When, for example, the brightness level is the fifth level, the weight value of the first target distance is 0.5, and the weight value of the second target distance is 0.5. This embodiment only takes 0.1 as the adjustment value of the weight value to adjust the level as an example, and in actual applications, the adjustment value of the weight value can also be 0.2 or other numerical values ​​as an example to adjust the weight value as a difference, which will not be repeated here. Generally, when the brightness is higher, the ambient light will cause greater interference to the photoelectric sensor 3, such as reflection caused by the ambient light irradiating the target object. When the brightness is lower, the ambient light will cause greater interference to the photoelectric sensor 3.

[0097] Through the above steps, it can be known that the photoelectric sensor 3 can adjust the weight value according to the actual brightness change of the external environment, so as to give full play to the advantages of each photosensitive distance model, make up for the advantages of each photosensitive distance model, and play a role of balancing and dynamic adjustment, so as to achieve accurate detection of the target object in different environments, such as night, day, indoors, outdoors, etc., so as to define appropriate teaching data, so as to facilitate the distinction between the target object and the background object, such as reflective paper, transparent film, and sunlight refraction. Here, it should be noted that this embodiment only takes the indoor environment as the external environment, and when there is normal lighting equipment turned on or no normal lighting is turned on in the indoor environment, the brightness of the ambient light corresponding to different time periods is collected, and the brightness level is divided. Obviously, the external environment in this embodiment can also refer to the external natural environment, which will not be specifically limited or repeated here. In addition, through the above steps, the first target distance and the second target distance can be reasonably calculated comprehensively to avoid the target distance obtained by a single method from causing large errors due to accidental reasons.

[0098] Embodiment 2

[0099] This embodiment further provides a photoelectric sensor for measuring a target object using the laser ranging method based on the photoelectric sensor 3 in the above embodiment.

[0100] Specifically, the photoelectric sensor 3 includes: a control main board 5 for connecting to external communication, wherein the control main board 5 includes a processor and a memory electrically connected to the processor, wherein the memory stores a program for executing each step of the method for measuring a target object using a laser ranging method based on a photoelectric sensor in the above-mentioned embodiment.

[0101] In addition, as 9 and Fig.10 As shown, the photoelectric sensor 3 also includes: a key circuit board 6 electrically connected to the control main board 5; a button rod 9 arranged above the key circuit board 6; a button cover 10 connected to the button rod 9; an indicator light electrically connected to the control main board 5; wherein the button rod 9 is used to energize the key circuit board 6 after the button cover 10 is pressed, so that the control main board 5 obtains the above-mentioned teaching data and controls the changing state of the indicator light according to the teaching data. For example, when the teaching data is set, the color of the indicator light is changed or the light is turned on, etc., to prompt the user that the setting of the teaching data has been completed and the actual measurement work can be carried out.

[0102] Further preferably, the photoelectric sensor 3 also includes: a lens 1; a frame 2; a shell 3; a lampshade 11; wherein the lampshade 11, the frame 2 and the shell 3 are fixedly connected by snaps; when the lens 1 and the frame 2 are assembled, they are integrally formed with the lampshade 11 and the shell 3 by secondary injection molding; and, the lampshade 11 is provided with a dovetail groove for mounting the frame 2.

[0103] Further preferably, the key substrate 12 circuit board is arranged on the key substrate 12 and is welded to the control main board 5 .

[0104] Further preferably, the photoelectric sensor 3 further includes: a communication module electrically connected to the control mainboard 5 .

[0105] Further preferably, the photoelectric sensor 3 also includes: a receiving module 7 and a transmitting module 8 which are arranged on the control main board 5 and are electrically connected; wherein the light emitted by the transmitting module 8 passes through the lens 1, is reflected by the target object, and is received by the receiving module 7.

[0106] In addition, it is worth mentioning that the photoelectric sensor 3 in this embodiment also includes: a shielding cover 4, a wire 13 and a rubber-encapsulated structure 14. The shielding cover 4 is first welded to the control main board 5 and then riveted to the frame 2; the key substrate 12 is riveted to the lampshade 11.

[0107] The above is only a preferred embodiment of the present invention and does not have any limiting effect on the present invention. Any technician in the relevant technical field, without departing from the scope of the technical solution of the present invention, makes any form of equivalent replacement or modification to the technical solution and technical content disclosed in the present invention, which does not depart from the content of the technical solution of the present invention and still falls within the protection scope of the present invention. Therefore, how to provide a laser ranging method and a photoelectric sensor to improve the measurement accuracy of the photoelectric sensor is a technical problem that the present invention urgently needs to solve.

Claims

1. A laser ranging method based on a photoelectric sensor, characterized in that: include: Get teaching data; Matching a corresponding distance measurement mode according to the teaching data; Detecting the object to be measured according to the ranging mode; The step of matching the corresponding distance measurement mode according to the teaching data comprises: Acquire an initial distance of the object to be measured through an initial distance measurement mode, wherein the initial distance measurement mode is a long distance mode, wherein the long distance mode measures the distance of the object to be measured through a TOF method; Determining whether the distance of the object to be measured is less than the teaching data; If yes, switch to the short-distance mode to calculate the measurement distance of the object to be measured by a preset short-distance measurement method, wherein the short-distance measurement method is: obtaining the measurement distance of the object to be measured according to the photosensitive distance curve and the acquired real-time photosensitive signal, or obtaining the measurement distance of the object to be measured according to the photosensitive distance model and the acquired real-time voltage signal; If not, the initial distance of the object to be measured is used as the measured distance of the object to be measured; Before the step of obtaining teaching data, the method further includes: Pre-collecting measured distance data obtained by measuring the target object by placing the photoelectric sensor in multiple brightness level environments and multiple distance levels, as well as corresponding measured distance data and brightness data; Calculate difference data according to the measured distance data and the actually measured distance data; Analyzing the difference data according to a preset difference threshold to obtain normal difference data analysis; According to the normal difference data analysis, matching the target distance data in the measured distance data and the target brightness data in the brightness data corresponding to the target distance data; Establishing the photosensitivity distance model according to the target brightness data, the target distance data, and the voltage signal data corresponding to the target distance data; The step of obtaining teaching data comprises: Obtaining a real-time voltage signal corresponding to the initial light sensitivity of the object to be measured; Input a preset teaching data model according to the real-time voltage signal to obtain the teaching data; The step of inputting a preset teaching data model according to the real-time voltage signal to obtain the teaching data comprises: Obtaining a corresponding first target distance according to the real-time voltage signal and the light-sensing distance curve; Obtaining a corresponding second target distance according to the real-time voltage signal and the photosensitivity distance model; The teaching data is determined according to the first target distance, the second target distance and a preset rule.

2. The laser ranging method based on photoelectric sensor according to claim 1, characterized in that: Obtaining light-sensing data corresponding to the target object placed at different short distances, and corresponding induced voltage signal data; The light-sensing distance curve is generated by fitting according to the distance data corresponding to the light-sensing data and the induced voltage signal data.

3. The laser ranging method based on photoelectric sensor according to claim 1, characterized in that: The step of determining the teaching data according to the first target distance, the second target distance and a preset rule comprises: Determine the weight values ​​corresponding to the first target distance and the second target distance according to a preset weight algorithm; The first target distance and the second target distance after weighting are calculated according to a weighted algorithm to obtain the teaching data.

4. The laser ranging method based on photoelectric sensor according to claim 3 is characterized in that: Before the step of calculating the first target distance and the second target distance after the weights are assigned according to the weighted algorithm to obtain the teaching data, the method further includes: According to the acquired real-time voltage signal, a photosensitive signal matching the real-time voltage signal is determined; wherein the photosensitive signal is a total light quantity signal received in real time corresponding to when the photoelectric sensor receives the real-time voltage signal, including the sensing light B reflected by the object to be measured and the ambient light reflected by the object to be measured; The photosensitive signal is processed according to a preset filtering algorithm to obtain a visible light quantity signal that matches the ambient light of the external environment; Determine the brightness level of the external environment based on the visible light quantity signal and a preset brightness level algorithm; The weight value is adjusted according to the brightness level, wherein when it is determined that the brightness level of the external environment is lower, the weight of the first target distance is larger, otherwise, the weight of the second target distance is larger.

5. A photoelectric sensor, characterized in that: Used to measure a target object using a laser ranging method based on a photoelectric sensor as described in any one of claims 1 to 4.

6. The photoelectric sensor according to claim 5, characterized in that: include: A control mainboard for connecting to external communication; a key circuit board electrically connected to the control mainboard; A button rod disposed above the button circuit board; A button cover connected to the button rod; an indicator light electrically connected to the control main board; wherein the button rod is used to power on the key circuit board after the button cover is pressed, so that the control main board obtains the teaching data and controls the changing state of the indicator light according to the teaching data.

7. The photoelectric sensor according to claim 6, characterized in that: Also includes: Lens; frame; shell; lampshade; wherein the lampshade, the frame and the shell are fixedly connected by snaps; when the lens and the frame are assembled, they are integrally formed with the lampshade and the shell by secondary injection molding; and a dovetail groove for mounting the frame is provided on the lampshade; the key circuit board is arranged on the key substrate and is welded to the control main board; wherein the photoelectric sensor also includes: a communication module electrically connected to the control main board.

Citation Information

Patent Citations

  • Method and system for field application and calibration of reflection fiber optic displacement sensor

    CN104048610A

  • Pulse-based laser distance measuring instrument and distance measuring method thereof

    CN104142504A

  • Automatic measuring system for photosensitive characteristic of optical sensing device

    CN104655270A

  • Aerosol thickness and laser radar ranging delay automatic calibration method

    CN105527620A

  • Method and device for detecting distance through use of distance sensor

    CN105759258A