A dual photoelectric sensor and its signal processing method
Through dual photoelectric sensors and signal processing methods, the difference judgment between the differential signal and the integral interval is used to remove the interference signal, which solves the problem of inaccurate measurement of the background suppression photoelectric sensor under natural light and light interference, and improves the measurement accuracy.
Patent Information
- Application Number
- CN202410940266.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-15
AI Technical Summary
Under the influence of interference light such as natural light and lights, the background suppression photoelectric sensor causes inaccurate measurement signals and affects the accuracy of the measurement.
Using dual photoelectric sensors and signal processing methods, by obtaining the differential signal of the first electrical signal and the second electrical signal, sampling to form a data curve, dividing the integration interval, and judging whether it is the measured object data based on the difference between adjacent integration intervals. Remove interfering signals.
It effectively reduces interference, improves measurement accuracy, and ensures the immediacy and effectiveness of signal judgment in complex environments.
Smart Images

Figure CN118465735B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of signal processing, and in particular to a dual photoelectric sensor and a signal processing method thereof. Background Art
[0002] The background suppression photoelectric sensor adopts the principle of optical triangulation ranging and uses a photoelectric double-junction sensor receiving module. The sensor combines the photoelectric effect and the bicrystalline structure to convert light energy into electrical signals, and detects and processes signals through electrical signals to achieve ranging. The sensor receives light reflected from objects at different distances. The light is focused to form a light spot, which falls on the photoelectric double-junction sensor. The strength of the signal generated by the two photoelectric sensors determines whether the object to be measured is within the effective distance. Compared with diffuse reflection photoelectric sensors, background suppression photoelectric sensors can more accurately determine the position of the object to be measured and can ignore the reflectivity of the surface of the object to be measured. Especially at close distances such as <10cm, the black and white error can be within 1mm. Background suppression photoelectric sensors have been widely used in industrial control, logistics and other fields.
[0003] However, in addition to receiving light emitted by its own emission source and reflected by the object being measured, the background suppression photoelectric sensor also receives interference light generated by other light sources such as natural light and lamplight. These interference lights can cause the photoelectric sensor to respond differently and generate signals that do not meet product requirements, causing interference and affecting the accuracy of the measurement. Summary of the invention
[0004] The object of the present invention is to provide a dual photoelectric sensor and a signal processing method thereof, which can reduce interference and improve measurement accuracy.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A dual photoelectric sensor signal processing method, the dual photoelectric sensor comprises a first photoelectric sensor and a second photoelectric sensor, the first photoelectric sensor is used to receive light and convert it into a first electrical signal, and the second photoelectric sensor is used to receive light and convert it into a second electrical signal;
[0007] The dual photoelectric sensor signal processing method comprises:
[0008] Acquire the first electrical signal and the second electrical signal, obtain a differential signal between the first electrical signal and the second electrical signal, sample the differential signal, and obtain a data curve, wherein the data curve is formed by arranging sampling point data of the differential signal along a sampling time;
[0009] Integral intervals are sequentially drawn for the data curve, and for any integral interval of the data curve, an integral operation is performed on the integral interval to obtain an integral value of the integral interval;
[0010] According to the difference between the integral values of two adjacent integral intervals, it is determined whether the sampling point data included in the two integral intervals are data corresponding to the object under test.
[0011] In some implementations, determining whether the sampling point data included in two adjacent integration intervals is data corresponding to the object under test according to the difference between the integration values of the two adjacent integration intervals comprises:
[0012] For any of the integral intervals, a first difference between the integral value of the current integral interval and the integral value of the subsequent integral interval is obtained, and it is determined whether the first difference is within a preset range. If the first difference is within the preset range, it is determined that the sampling point data included in the current integral interval and the subsequent integral interval are data corresponding to the object under test.
[0013] In some implementations, determining whether the sampling point data included in two adjacent integration intervals is data corresponding to the object under test according to the difference between the integration values of the two adjacent integration intervals comprises:
[0014] For any of the integral intervals, obtaining a first difference between the integral value of the current integral interval and the integral value of the next integral interval, and determining whether the first difference is within a preset range;
[0015] If the first differences corresponding to a continuous preset number of integration intervals are all within the preset range, it is determined that the sampling point data included in the preset number of integration intervals on the data curve is data corresponding to the object under test.
[0016] In some embodiments, before sequentially dividing the data curve into integral intervals, the method further includes:
[0017] For any sampling point of the data curve, taking a plurality of continuous sampling points with the sampling point as the central sampling point on the data curve, and obtaining a first average value of the sampling point data of the plurality of sampling points;
[0018] A second difference between the sampling point data of the current sampling point and the first average value is obtained; if the second difference is greater than or equal to a third threshold, a second average value of the sampling point data of other sampling points among the multiple sampling points except the current sampling point is obtained, and the second average value is used as the sampling point data of the current sampling point.
[0019] In some embodiments, before sequentially dividing the data curve into integral intervals, the method further includes:
[0020] The data curve is sequentially divided into detection intervals, and for any detection interval, the maximum sampling point data and the minimum sampling point data among the sampling points included in the detection interval are removed.
[0021] In some embodiments, obtaining a differential signal between the first electrical signal and the second electrical signal and sampling the differential signal to obtain a data curve includes:
[0022] A differential signal between the first electrical signal and the second electrical signal is obtained, the differential signal is amplified, and the amplified differential signal is sampled to obtain the data curve.
[0023] A dual photoelectric sensor, comprising:
[0024] a first photoelectric sensor and a second photoelectric sensor, wherein the first photoelectric sensor is used to receive light and convert it into a first electrical signal, and the second photoelectric sensor is used to receive light and convert it into a second electrical signal;
[0025] a signal processing module, connected to the first photoelectric sensor and the second photoelectric sensor respectively, and used to obtain the first electrical signal and the second electrical signal, obtain a differential signal between the first electrical signal and the second electrical signal, sample the differential signal, and obtain a data curve, wherein the data curve is formed by arranging the sampling point data of the differential signal along with the sampling time;
[0026] The data processing module is connected to the signal processing module and is used to divide the data curve into integral intervals in turn, perform an integral operation on any integral interval of the data curve to obtain the integral value of the integral interval, and determine whether the sampling point data included in the two integral intervals corresponds to the data of the object under test based on the difference between the integral values of two adjacent integral intervals.
[0027] In some embodiments, the signal processing module includes an operational amplifier circuit, which includes a first input terminal, a second input terminal, and an output terminal, the first input terminal is connected to the first photoelectric sensor, so that the first electrical signal is input into the operational amplifier circuit through the first input terminal, the second input terminal is connected to the second photoelectric sensor, so that the second electrical signal is input into the operational amplifier circuit through the second input terminal, and the output terminal is connected to the data processing module.
[0028] In some embodiments, it further comprises:
[0029] The second lens assembly is used for acquiring light from the outside and converging the acquired light. The first photoelectric sensor and the second photoelectric sensor are arranged side by side on the focal plane of the second lens assembly.
[0030] In some embodiments, it further comprises:
[0031] A signal transmitting module, used for emitting light so that the light is incident on the first lens assembly;
[0032] The first lens assembly is used to converge the light incident to the first lens assembly and emit the converged light to the outside.
[0033] It can be known from the above technical scheme that the present invention provides a dual photoelectric sensor and a signal processing method thereof, wherein the dual photoelectric sensor includes a first photoelectric sensor and a second photoelectric sensor, wherein the first photoelectric sensor is used to receive light and convert it to generate a first electrical signal, and the second photoelectric sensor is used to receive light and convert it to generate a second electrical signal. The method includes: obtaining the first electrical signal and the second electrical signal, obtaining a differential signal between the first electrical signal and the second electrical signal and sampling the differential signal, obtaining a data curve, wherein the data curve is formed by arranging the sampling point data of the differential signal along with the sampling time, and sequentially dividing the data curve into integral intervals, and for any integral interval, performing an integral operation on the integral interval to obtain the integral value of the integral interval, and further determining whether the sampling point data included in the two integral intervals corresponds to the data of the object to be measured according to the difference in the integral values of the two adjacent integral intervals.
[0034] The beneficial effect of the present invention lies in that a data curve is obtained by sampling the differential signal of the electrical signal generated by the first photoelectric sensor and the electrical signal generated by the second photoelectric sensor, and integration intervals are sequentially drawn on the data curve. According to the difference in the integral values of two adjacent integration intervals on the data curve, it is judged whether the sampling point data included in the two integration intervals corresponds to the data of the object to be measured. The dual photoelectric sensor and its signal processing method of the present invention can reduce interference and improve measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 A flow chart of a dual photoelectric sensor signal processing method provided by one embodiment of the present invention;
[0037] Figure 2Three relatively ideal data curves measured by a dual photoelectric sensor of an embodiment;
[0038] Figure 3 Three data curve graphs under interference light conditions measured by a dual photoelectric sensor of an embodiment;
[0039] Figure 4 A schematic diagram of two adjacent integral intervals on a data curve measured in one embodiment of the present invention;
[0040] Figure 5 A schematic diagram of an operational amplifier circuit of a dual photoelectric sensor provided by an embodiment of the present invention;
[0041] Figure 6 A schematic diagram of a dual photoelectric sensor provided by an embodiment of the present invention;
[0042] Figure 7 A schematic diagram of a dual photoelectric sensor receiving interference light provided by an embodiment of the present invention;
[0043] Figure 8 A schematic diagram of a module of a dual photoelectric sensor provided by an embodiment of the present invention.
[0044] The reference numerals in the drawings of the specification include:
[0045] 101 - first photoelectric sensor, 102 - second photoelectric sensor, 103 - second lens assembly, 104 - signal transmission module, 105 - first lens assembly. DETAILED DESCRIPTION
[0046] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0047] This embodiment provides a dual photoelectric sensor signal processing method, wherein the dual photoelectric sensor includes a first photoelectric sensor and a second photoelectric sensor, wherein the first photoelectric sensor is used to receive light and convert it into a first electrical signal, and the second photoelectric sensor is used to receive light and convert it into a second electrical signal. Figure 1 , Figure 1 A flow chart of a dual photoelectric sensor signal processing method provided by an embodiment. As shown in the figure, the dual photoelectric sensor signal processing method includes the following steps:
[0048] S11: Acquire the first electrical signal and the second electrical signal, obtain a differential signal between the first electrical signal and the second electrical signal, sample the differential signal, and obtain a data curve, wherein the data curve is formed by arranging sampling point data of the differential signal along a sampling time.
[0049] The dual photoelectric sensor emits light to the outside world, and the light is incident on the object to be measured and reflected by the object to be measured. The first photoelectric sensor and the second photoelectric sensor can receive the light reflected back by the object to be measured. The first photoelectric sensor receives the light and converts it into a first electrical signal, and the second photoelectric sensor receives the light and converts it into a second electrical signal.
[0050] The sampling point data can reflect the differential signal between the first electrical signal and the second electrical signal, and the magnitude of the differential signal value at the corresponding sampling time.
[0051] S12: dividing the data curve into integral intervals in sequence, and for any integral interval of the data curve, performing an integral operation on the integral interval to obtain an integral value of the integral interval.
[0052] The data curve is divided into integral intervals in sequence along the time axis, and the integral value of any integral interval is obtained.
[0053] S13: determining, according to a difference between the integral values of two adjacent integral intervals, whether the sampling point data included in the two integral intervals are data corresponding to the object under test.
[0054] The dual photoelectric sensor signal processing method of the present embodiment obtains a data curve based on the differential signal sampling of the electrical signal generated by the first photoelectric sensor and the electrical signal generated by the second photoelectric sensor, and divides the data curve into integral intervals in turn. According to the difference in the integral values of two adjacent integral intervals on the data curve, it can be determined whether the sampling point data included in the two integral intervals corresponds to the data of the object to be measured or the interference signal generated by interference light. If it is the data corresponding to the object to be measured, it can be retained. If it is the interference signal generated by interference light, it can be removed. Therefore, the dual photoelectric sensor signal processing method of the present embodiment can reduce interference and improve measurement accuracy.
[0055] In this embodiment, the width of the integration interval, that is, the duration corresponding to the integration interval, is not limited, and in practical applications, it can be determined according to the sampling period and the performance of the dual photoelectric sensor.
[0056] In some implementations, for any integral interval of the data curve, performing an integral operation on the integral interval includes: summing the sampling point data included in the integral interval.
[0057] In some embodiments, based on the difference in the integral values of two adjacent integral intervals, determining whether the sampling point data included in the two integral intervals is data corresponding to the object under test includes: for any of the integral intervals, obtaining a first difference between the integral value of the current integral interval and the integral value of the subsequent integral interval, and judging whether the first difference is within a preset range; if the first difference is within the preset range, determining that the sampling point data included in the current integral interval and the subsequent integral interval is data corresponding to the object under test. That is, obtaining the difference in the integral values of two adjacent integral intervals, that is, the first difference; if the first difference is within the preset range, determining that the sampling point data included in the two integral intervals is data corresponding to the object under test. For example, reference may be made to Figure 2 and Figure 3 , Figure 2 The three relatively ideal data curve graphs measured by the dual photoelectric sensor of one embodiment, wherein the left graph is when the object to be measured is within the set distance range, u1>u2, the middle graph is when the object to be measured is outside the set distance range, u2>u1, and the right graph is when there is no object to be measured or the object to be measured is too far away, u2=u1, u1 represents the first electrical signal output by the first photoelectric sensor, and u2 represents the second electrical signal output by the second photoelectric sensor. Figure 3 These are three data curve graphs under interference light conditions measured by a dual photoelectric sensor of an embodiment. The left graph is a curve graph for a test without interference, the middle graph is a curve graph for interference from high-frequency fluorescent lamps, and the right graph is a curve graph for interference from burst light. Figure 2 and Figure 3 The horizontal axis of each curve graph is time t, and the vertical axis is the differential signal Uo between the first electrical signal u1 and the second electrical signal u2. Figure 2 and Figure 3 It can be seen that the data curve measured for the object under test changes regularly in the effective period, while the data curve generated by the interference light changes irregularly, and different interference lights produce different responses. Figure 2 It can be seen from the left and middle figures that the data curve measured for the object under test has peaks and troughs within the effective period, and the waveform is stable. Based on this, in this embodiment, for the data curve obtained by sampling, the difference of the integral values of the two adjacent integral intervals is obtained, that is, the first difference. If the first difference is within the preset range, it is considered that the sampling point data included in the two integral intervals is the data corresponding to the object under test, that is, it is considered that the effective light signal reflected by the object under test is detected. At this time, the first difference is the difference that includes various interference lights offset, which is an effective signal to eliminate interference.
[0058] For reference Figure 4 As shown, Figure 4FIG. 1 is a schematic diagram of two adjacent integral intervals on a data curve measured in an embodiment. For two adjacent integral intervals, the integral interval with a larger integral value can be called a high point integral interval, and the integral interval with a smaller integral value can be called a black level interval. The black level interval is an interval relative to the basic signal, such as reference Figure 4 In the integral interval 2 shown, the curve of this interval is gentle, and its peak value is smaller than the peak value of the integral interval 1 with a signal. The preset range can be expressed as [first threshold, second threshold]. The specific range of the preset range is not limited in this embodiment. In practical applications, it can be set according to the detection distance of the dual photoelectric sensor, and a black object to be measured can be used in advance. The measured value is used as a reference value to set the first threshold and the second threshold. It can also be set accordingly according to the use occasion of the dual photoelectric sensor product.
[0059] In some implementations, according to the difference between the integral values of two adjacent integral intervals, determining whether the sampling point data included in the two integral intervals is data corresponding to the object under test may include the following steps:
[0060] S131: For any of the integral intervals, obtain a first difference between the integral value of the current integral interval and the integral value of the next integral interval, and determine whether the first difference is within a preset range;
[0061] S132: If the first differences corresponding to a continuous preset number of integration intervals are all within the preset range, it is determined that the sampling point data included in the preset number of integration intervals on the data curve is data corresponding to the object under test.
[0062] While sampling the continuously input differential signal electrical signal, the sampling point data obtained by sampling is integrated in real time according to the set integration interval. In addition, for two consecutive integration intervals, the difference of the integral values of the two integration intervals, that is, the first difference, is obtained in real time to determine whether the first difference is within the preset range. If the first differences corresponding to the consecutive preset number of integration intervals are all within the preset range, it is considered that the sampling point data included in the preset number of integration intervals are data corresponding to the object under test, and it is considered that the object under test is detected.
[0063] In this embodiment, there is no limit on the preset number. In actual applications, the configuration tool can be used together with the first threshold value, the second threshold value and the preset number of the preset range to achieve dynamic setting according to the use occasion of the dual photoelectric sensor. For example, the width of the integration interval is 100ms. The current 100ms integration interval data is integrated and judged for the first time. After another 100ms, the newly sampled 100ms integration interval data is integrated and judged for the second time. The judgment can be set 3 to 5 times in sequence. For example, if it is judged that there is a measured object for 3 consecutive times, it is considered that there is a measured object within the detection distance. In this way, through the high-speed and real-time judgment of the integral value difference of the integration interval, the problem of light interference of the dual photoelectric sensor in various scenarios can be effectively avoided. At the same time, the use of high-speed sampling can ensure that its response speed still meets the traditional specifications of this type of product.
[0064] In some embodiments, before the data curve is sequentially divided into integral intervals, the method may further include: for any sampling point of the data curve, taking a plurality of continuous sampling points with the current sampling point as the central sampling point on the data curve, obtaining a first average value of the sampling point data of the plurality of sampling points; obtaining a second difference between the sampling point data of the current sampling point and the first average value, and if the second difference is greater than or equal to a third threshold, obtaining a second average value of the sampling point data of the other sampling points except the current sampling point among the plurality of sampling points, and using the second average value as the sampling point data of the current sampling point. For any sampling point of the data curve, taking a plurality of continuous sampling points on the data curve, making the current sampling point the central sampling point of the plurality of sampling points, and obtaining an average value of the sampling point data of the plurality of sampling points, i.e., the first average value. Further, obtaining a difference between the sampling point data of the current sampling point and the first average value, i.e., a second difference, and if the second difference is greater than or equal to a third threshold, obtaining an average value of the sampling point data of the other sampling points except the current sampling point among the plurality of sampling points, i.e., a second average value, and replacing the second average value as the sampling point data of the current sampling point. If the second difference is less than the third threshold, the data of the current sampling point may not be changed. This embodiment performs bad pixel detection. A bad pixel refers to a sampling point on a data curve that suddenly becomes larger or smaller. Before integrating the data curve, the bad pixel is first detected to remove the bad pixel. This eliminates interference from the bad pixel and can improve measurement accuracy.
[0065] In some embodiments, before the data curve is divided into integration intervals in sequence, the method may further include: dividing the data curve into detection intervals in sequence, and for any of the detection intervals, removing the maximum sampling point data and the minimum sampling point data among the sampling points included in the detection interval. This embodiment also performs bad point detection, and divides the data curve into detection intervals for detection before integrating the data curve, so as to avoid the maximum sampling point data in the detection interval being a sampling point that suddenly increases, and the minimum sampling point data being a sampling point that suddenly decreases. The bad points are detected first to remove the bad points, so as to eliminate the interference of the bad points and improve the measurement accuracy. In this embodiment, there is no limitation on the number of sampling points included in the detection interval, and it can be set according to the operation rate and the sampled data in actual applications.
[0066] In some embodiments, obtaining a differential signal between a first electrical signal and a second electrical signal and sampling the differential signal, and obtaining a data curve includes: obtaining a differential signal between the first electrical signal and the second electrical signal and amplifying the differential signal, sampling the amplified differential signal, and obtaining the data curve.
[0067] This embodiment also provides a dual photoelectric sensor, including:
[0068] a first photoelectric sensor and a second photoelectric sensor, wherein the first photoelectric sensor is used to receive light and convert it into a first electrical signal, and the second photoelectric sensor is used to receive light and convert it into a second electrical signal;
[0069] a signal processing module, connected to the first photoelectric sensor and the second photoelectric sensor respectively, and used to obtain the first electrical signal and the second electrical signal, obtain a differential signal between the first electrical signal and the second electrical signal, sample the differential signal, and obtain a data curve, wherein the data curve is formed by arranging the sampling point data of the differential signal along with the sampling time;
[0070] The data processing module is connected to the signal processing module and is used to divide the data curve into integral intervals in turn, perform an integral operation on any integral interval of the data curve to obtain the integral value of the integral interval, and determine whether the sampling point data included in the two integral intervals corresponds to the data of the object under test based on the difference between the integral values of two adjacent integral intervals.
[0071] The dual photoelectric sensor of the present embodiment obtains a data curve by sampling the differential signal of the electrical signal generated by the first photoelectric sensor and the electrical signal generated by the second photoelectric sensor, and divides the data curve into integral intervals in sequence. According to the difference in integral values of two adjacent integral intervals on the data curve, it can be determined whether the sampling point data included in the two integral intervals corresponds to the data of the object to be measured or the interference signal generated by interference light. If the data corresponds to the data of the object to be measured, it can be retained; if the data is the interference signal generated by interference light, it can be removed. Therefore, the dual photoelectric sensor of the present embodiment can reduce interference and improve measurement accuracy.
[0072] In some embodiments, the signal processing module includes an operational amplifier circuit, the operational amplifier circuit includes a first input terminal, a second input terminal and an output terminal, the first input terminal is connected to the first photoelectric sensor, so that the first electrical signal is input to the operational amplifier circuit through the first input terminal, the second input terminal is connected to the second photoelectric sensor, so that the second electrical signal is input to the operational amplifier circuit through the second input terminal, and the output terminal is connected to the data processing module. Figure 5 , Figure 5 A schematic diagram of an operational amplifier circuit of a dual photoelectric sensor provided by an embodiment is shown in the figure. The operational amplifier circuit includes a first input terminal, a second input terminal and an output terminal. The first electrical signal u1 output by the first photoelectric sensor is input to the operational amplifier circuit through the first input terminal, and the second electrical signal u2 output by the second photoelectric sensor is input to the operational amplifier circuit through the second input terminal. The processing of the electrical signal by the operational amplifier circuit can be expressed as A*(u1-u2), and the output electrical signal Uo is obtained. The operational amplifier circuit performs amplification and filtering functions on the electrical signal.
[0073] In some embodiments, the dual photoelectric sensor may further include: a second lens assembly for acquiring light from the outside and converging the acquired light, and the first photoelectric sensor and the second photoelectric sensor are arranged side by side on the focal plane of the second lens assembly. Figure 6 , Figure 6 This is a schematic diagram of a dual photoelectric sensor provided by an embodiment. The second lens assembly 103 receives light reflected from the outside and converges the acquired light. The light converges onto the first photoelectric sensor 101 and / or the second photoelectric sensor 102 .
[0074] In some embodiments, the dual photoelectric sensor may further include: a signal transmitting module 104, configured to emit light, so that the light is incident on a first lens assembly 105; and a first lens assembly 105, configured to converge the light incident on the first lens assembly 105 and to emit the converged light to the outside. Figure 6 The light emitted by the signal transmitting module 104 is incident on the first lens assembly 105 and then emitted to the outside after passing through the first lens assembly 105 .
[0075] The dual photoelectric sensor can be called a background suppression photoelectric sensor. The principle of background suppression can be referred to Figure 6 As shown, the signal transmitting module 104 emits light, which is reflected by the object to be measured. The returned light passes through the second lens assembly 103 and then the light spot is projected onto the first photoelectric sensor 101 or / and the second photoelectric sensor 102. For example, if the center of mass of the light spot falls on the first photoelectric sensor 101, it can be considered that an object has entered the detection range; if it falls on the second photoelectric sensor 102, it can be considered that an object has entered the detection range, but it is outside the detection range. In actual use, the light received by the dual photoelectric sensor is not only the light reflected by the object to be measured, but also the light from the outside world in the use environment. For reference, Figure 7 As shown, Figure 7 A schematic diagram of a dual photoelectric sensor receiving interference light provided in an embodiment, for example, interference white light includes light of all spectral bands, including light of sensitive wavelengths received by the dual photoelectric sensor, such as 650nm and 940nm wavelength light signals. At a specific angle, the first photoelectric sensor 101 will detect this interference signal. At the same time, reflected light from non-test objects will also be received. After these reflected lights pass through the second lens assembly 103, the first photoelectric sensor 101 and the second photoelectric sensor 102 will also generate or enhance detection signals. These interference signals may cause the dual photoelectric sensor to make misjudgments after being amplified by hardware. This embodiment removes light interference by processing the signals of the dual photoelectric sensor, ensuring the immediacy and effectiveness of the judgment of the dual photoelectric sensor, so that this type of product can operate stably in a complex environment without being interfered by external light. This embodiment is based on software algorithms and hardware control assistance. The algorithm speed is fast and does not affect the working frequency of traditional sensors.
[0076] For example, reference may be made to Figure 8 , Figure 8 A module schematic diagram of a dual photoelectric sensor provided in one embodiment. As shown in the figure, the dual photoelectric sensor includes a signal transmitting module, a signal receiving module, a signal processing module, an MCU algorithm control module, a power supply module, an output module and an output configuration module. The MCU algorithm control module includes the above-mentioned data processing module.
[0077] The above is a detailed introduction to a dual photoelectric sensor and a signal processing method thereof provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A dual photoelectric sensor signal processing method, characterized in that: The dual photoelectric sensor comprises a first photoelectric sensor and a second photoelectric sensor, wherein the first photoelectric sensor is used to receive light and convert it into a first electrical signal, and the second photoelectric sensor is used to receive light and convert it into a second electrical signal; The dual photoelectric sensor signal processing method comprises: Acquire the first electrical signal and the second electrical signal, obtain a differential signal between the first electrical signal and the second electrical signal, sample the differential signal, and obtain a data curve, wherein the data curve is formed by arranging sampling point data of the differential signal along a sampling time; Integral intervals are sequentially drawn for the data curve, and for any integral interval of the data curve, an integral operation is performed on the integral interval to obtain an integral value of the integral interval; According to the difference between the integral values of two adjacent integral intervals, determining whether the sampling point data included in the two integral intervals is data corresponding to the object under test; Before the data curve is divided into integral intervals in sequence, the method further includes: For any sampling point of the data curve, taking a plurality of continuous sampling points with the sampling point as the central sampling point on the data curve, and obtaining a first average value of the sampling point data of the plurality of sampling points; A second difference between the sampling point data of the current sampling point and the first average value is obtained; if the second difference is greater than or equal to a third threshold, a second average value of the sampling point data of other sampling points among the multiple sampling points except the current sampling point is obtained, and the second average value is used as the sampling point data of the current sampling point.
2. The dual photoelectric sensor signal processing method according to claim 1, characterized in that: Determining, according to the difference between the integral values of two adjacent integral intervals, whether the sampling point data included in the two integral intervals is data corresponding to the object under test comprises: For any of the integral intervals, a first difference between the integral value of the current integral interval and the integral value of the subsequent integral interval is obtained, and it is determined whether the first difference is within a preset range. If the first difference is within the preset range, it is determined that the sampling point data included in the current integral interval and the subsequent integral interval are data corresponding to the object under test.
3. The dual photoelectric sensor signal processing method according to claim 1, characterized in that: Determining, according to the difference between the integral values of two adjacent integral intervals, whether the sampling point data included in the two integral intervals is data corresponding to the object under test comprises: For any of the integral intervals, obtaining a first difference between the integral value of the current integral interval and the integral value of the next integral interval, and determining whether the first difference is within a preset range; If the first differences corresponding to a continuous preset number of integration intervals are all within the preset range, it is determined that the sampling point data included in the preset number of integration intervals on the data curve is data corresponding to the object under test.
4. The dual photoelectric sensor signal processing method according to claim 1, characterized in that: Before the data curve is divided into integral intervals in sequence, the method further includes: The data curve is divided into detection intervals in sequence, and for any detection interval, the maximum sampling point data and the minimum sampling point data among the sampling points included in the detection interval are removed.
5. The dual photoelectric sensor signal processing method according to any one of claims 1 to 4, characterized in that: Obtaining a differential signal between the first electrical signal and the second electrical signal and sampling the differential signal to obtain a data curve includes: A differential signal between the first electrical signal and the second electrical signal is obtained, the differential signal is amplified, and the amplified differential signal is sampled to obtain the data curve.
6. A dual photoelectric sensor, characterized in that: include: a first photoelectric sensor and a second photoelectric sensor, wherein the first photoelectric sensor is used to receive light and convert it into a first electrical signal, and the second photoelectric sensor is used to receive light and convert it into a second electrical signal; a signal processing module, connected to the first photoelectric sensor and the second photoelectric sensor respectively, and used to obtain the first electrical signal and the second electrical signal, obtain a differential signal between the first electrical signal and the second electrical signal, sample the differential signal, and obtain a data curve, wherein the data curve is formed by arranging the sampling point data of the differential signal along with the sampling time; A data processing module, connected to the signal processing module, for sequentially dividing the data curve into integral intervals, for any integral interval of the data curve, performing an integral operation on the integral interval to obtain an integral value of the integral interval, and determining whether the sampling point data included in the two integral intervals is data corresponding to the object under test according to the difference between the integral values of two adjacent integral intervals; Before the data processing module is used to sequentially divide the integral intervals of the data curve, it is also used to: For any sampling point of the data curve, taking a plurality of continuous sampling points with the sampling point as the central sampling point on the data curve, and obtaining a first average value of the sampling point data of the plurality of sampling points; A second difference between the sampling point data of the current sampling point and the first average value is obtained; if the second difference is greater than or equal to a third threshold, a second average value of the sampling point data of other sampling points among the multiple sampling points except the current sampling point is obtained, and the second average value is used as the sampling point data of the current sampling point.
7. The dual photoelectric sensor according to claim 6, characterized in that: The signal processing module includes an operational amplifier circuit, which includes a first input terminal, a second input terminal and an output terminal. The first input terminal is connected to the first photoelectric sensor, so that the first electrical signal is input into the operational amplifier circuit through the first input terminal. The second input terminal is connected to the second photoelectric sensor, so that the second electrical signal is input into the operational amplifier circuit through the second input terminal. The output terminal is connected to the data processing module.
8. The dual photoelectric sensor according to claim 6, characterized in that: Also includes: The second lens assembly is used for acquiring light from the outside and converging the acquired light. The first photoelectric sensor and the second photoelectric sensor are arranged side by side on the focal plane of the second lens assembly.
9. The dual photoelectric sensor according to claim 6, characterized in that: Also includes: A signal transmitting module, used for emitting light so that the light is incident on the first lens assembly; The first lens assembly is used to converge the light incident to the first lens assembly and emit the converged light to the outside.
