Method for resisting periodic ambient light interference of photoelectric sensor and photoelectric sensor

By detecting and calculating the period and voltage of the ambient light interference signal, the unilateral interference amplitude after the increase is calculated, and superimposing it on a fixed threshold, and comparing it with the echo signal, the problem of misjudgment of the photoelectric sensor under periodic ambient light interference is solved, and the detection accuracy is improved.

CN120065179APending Publication Date: 2025-05-30OPTEX (DONGGUAN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510158863.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

Existing photoelectric sensors are prone to misjudgment when they are disturbed by periodic ambient light, and the existing method of using fixed threshold comparison is no longer applicable.

Method used

The optical signal receiving module receives the ambient light interference signal, detects its period, calculates the time points and voltages of the peaks and troughs, calculates the unilateral interference amplitude, and then superimposes the fixed threshold value several times, and compares it with the echo signal disturbed by the ambient light to eliminate the influence of light interference.

Benefits of technology

It effectively eliminates the impact of periodic ambient light interference on the echo signal, and improves the detection accuracy of the photoelectric sensor, especially in the case of high-frequency ambient light interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120065179A_ABST
    Figure CN120065179A_ABST
Patent Text Reader

Abstract

The invention discloses a method for resisting periodic ambient light interference of a photoelectric sensor, which is characterized by comprising the following steps of: before an optical signal transmitting module transmits an optical signal, receiving an ambient light interference signal through an optical signal receiving module within a preset time; detecting the period of the ambient light interference signal through a comparator; calculating time points corresponding to the wave crest and the wave trough of the alternating current wave of the ambient light interference signal; calculating the unilateral interference amplitude of the ambient light interference signal according to the voltage of the wave crest and the wave trough; a fixed threshold value is preset, the threshold value changes along with the change of the size of the light interference alternating current wave, the preset fixed threshold value is superposed with the increased unilateral interference amplitude value, and then the superposed unilateral interference amplitude value is compared with the echo signal interfered by the ambient light, so that the influence of the ambient light interference signal on the echo signal is eliminated. The invention further discloses the photoelectric sensor adopting the method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of security, and specifically relates to a method for an optoelectronic sensor to resist high-frequency periodic ambient light interference, and an optoelectronic sensor using this method. Background Art

[0002] Diffuse reflection type optoelectronic sensors detect objects within a set distance range by emitting modulated optical signals and demodulating the optical signals reflected by the objects. The transmitting end and the receiving end are integrated. The transmitting end emits optical signals at a certain frequency. After being diffusely reflected by the object, the receiving end receives the echo signal and demodulates it into an electrical signal, and compares the electrical signal of the echo with a fixed threshold to determine whether there is a detection target. This type of optoelectronic sensor has the characteristics of long detection distance, high accuracy, few restrictions on the detected object, fast response speed, non-contact detection, and easy installation, and is widely used in the field of industrial automation. Due to the complex and diverse usage environments, once the sensor receives periodic ambient light interference such as lights, misjudgment will occur.

[0003] When there is a periodic light source in the actual usage environment, the periodic light interference signal will be superimposed on the echo signal of the sensor, resulting in continuous AC wave interference on the echo signal. The AC wave of the periodic light interference may be superimposed on the normal echo signal at any position, causing the echo signal to fluctuate up and down over time. The fluctuation range is similar to the amplitude of the light interference AC wave, resulting in misjudgment of the sensor. Therefore, the above method of using a fixed threshold for comparison is no longer applicable, and a method to avoid periodic light interference needs to be designed. Summary of the Invention

[0004] The purpose of the present invention is to provide a method for an optoelectronic sensor to resist periodic ambient light interference in view of the deficiencies of the prior art, and to solve the problem that existing optoelectronic sensors are prone to misjudgment after being affected by periodic ambient light interference.

[0005] The technical solution adopted by the present invention to achieve the above purpose is:

[0006] A method for an optoelectronic sensor to resist periodic ambient light interference, which includes the following steps:

[0007] (1) The optoelectronic sensor includes an optical signal transmitting module, an optical signal receiving module, a comparator, a timer, and a digital-to-analog converter;

[0008] (2) Before the optical signal transmitting module emits an optical signal, receive the ambient light interference signal through the optical signal receiving module within a preset time;

[0009] (3) Detect the period of the ambient light interference signal through the comparator according to the ambient light interference signal obtained in step (2);

[0010] (4) Time is measured by a timer, and the time points corresponding to the peaks and valleys of the alternating current wave of the ambient light interference signal are calculated;

[0011] (5) The voltages at the peaks and valleys of the ambient light interference signal are collected, and the unilateral interference amplitude of the ambient light interference signal is calculated based on the voltages at the peaks and valleys;

[0012] (6) The optical signal transmitting module emits an optical signal. After being reflected by the target object, the returned signal is received by the optical signal receiving module and converted into an echo signal by an analog-to-digital converter;

[0013] (7) A preset fixed threshold is set, and this threshold changes with the magnitude of the optical interference alternating current wave. The preset fixed threshold is added to the unilateral interference amplitude increased by a factor greater than or equal to 2 times, and then compared with the echo signal affected by the ambient light interference. When the echo signal is greater than 4 times the unilateral interference amplitude, it is determined that there is a target object and output; when the echo signal is less than 2 times the unilateral interference amplitude, it is determined that there is no target object and no output, thereby eliminating the influence of the ambient light interference signal on the echo signal.

[0014] The specific content of step (3) includes detecting the upper half-wave and lower half-wave of the ambient light interference signal through a comparator, and combining the time readings of the timer to obtain the half-wave period of the ambient light interference signal.

[0015] The specific content of step (4) includes calculating the time points corresponding to the peaks and valleys of the ambient light interference signal according to the coefficient relationship between the half-wave period and the time when the peaks and valleys appear. This coefficient relationship is that the peaks and valleys will appear at the 1 / 2 position of the half-wave period.

[0016] The specific content of step (5) includes collecting voltages at the time points of the corresponding peaks and valleys when a period similar to the previous period of the ambient light interference signal is detected again. Among them, the peak will be greater than the reference level, and the valley will be less than the reference level.

[0017] The reference level is the initial signal level at the time of transmission.

[0018] Subtracting the reference level from the peak voltage or subtracting the valley voltage from the reference level gives the unilateral interference amplitude.

[0019] The specific content of step (7) includes that when the previous half-wave period t0 and the next half-wave period t1 of the ambient light interference signal are detected to be similar, and when a half-wave period t2 similar to t0 and t1 is detected again in the next non-transmission period, the threshold of the superimposed interference is increased.

[0020] The threshold of the superimposed interference is equal to the preset fixed threshold plus the unilateral interference amplitude increased by several times.

[0021] An optoelectronic sensor, which includes an optical signal transmitting module, an optical signal receiving module, a comparator, a timer, a digital-to-analog converter, and an MCU; wherein, the MCU is used to implement the method for the optoelectronic sensor to resist periodic ambient light interference.

[0022] The beneficial effects of the present invention are as follows: detecting the period of the alternating current wave of the periodic ambient light interference signal within a fixed time period; calculating the time points corresponding to the peaks and valleys of the ambient light interference signal; collecting the voltages of the peaks and valleys of the ambient light interference signal; calculating the unilateral interference amplitude of the ambient light interference signal relative to the reference level; adding several times the increased unilateral interference amplitude to a fixed threshold to obtain the threshold of the superimposed interference; comparing the echo signal affected by the periodic ambient light with the threshold of the superimposed interference, so as to achieve the effect of eliminating light interference. Furthermore, the detection accuracy of the optoelectronic sensor is improved. And the present invention mainly eliminates the interference of high-frequency ambient light. Description of the Drawings

[0023] Figure 1 It is a schematic diagram of the scenario where the present invention is not affected by ambient light interference;

[0024] Figure 2 It is a schematic diagram of the scenario where the present invention is affected by ambient light interference;

[0025] Figure 3 It is a schematic diagram of the signal waveform for eliminating the ambient light interference signal. Detailed Embodiments

[0026] Embodiment: Refer to Figures 1 to 3 , this embodiment provides a method for an optoelectronic sensor to resist periodic ambient light interference, which includes the following steps:

[0027] (1) The optoelectronic sensor includes an optical signal transmitting module, an optical signal receiving module, a comparator, a timer, and a digital-to-analog converter;

[0028] (2) Before the optical signal transmitting module emits an optical signal, receiving the ambient light interference signal through the optical signal receiving module within a preset time;

[0029] (3) According to the ambient light interference signal obtained in step (2), detecting the period of the ambient light interference signal through the comparator;

[0030] (4) Timing through the timer, and calculating the time points corresponding to the peaks and valleys of the alternating current wave of the ambient light interference signal;

[0031] (5) Collecting the voltages of the peaks and valleys of the ambient light interference signal, and calculating the unilateral interference amplitude of the ambient light interference signal according to the voltages of the peaks and valleys;

[0032] (6) The optical signal transmitting module emits an optical signal. After being reflected by the target object, the returned signal is received by the optical signal receiving module and converted into an echo signal by the analog-to-digital converter.

[0033] (7) A preset fixed threshold is set, which changes with the magnitude of the optical interference alternating current wave. The preset fixed threshold is superimposed with the increased unilateral interference amplitude, and the increase multiple is greater than or equal to 2 times. Then it is compared with the echo signal affected by ambient light interference. When the echo signal is greater than 4 times the unilateral interference amplitude, it is determined that there is a target object and output; when the echo signal is less than 2 times the unilateral interference amplitude, it is determined that there is no target object and no output, thereby eliminating the influence of the ambient light interference signal on the echo signal.

[0034] The specific content of step (3) includes detecting the upper half-wave and lower half-wave of the ambient light interference signal through a comparator, and combining the time reading of the timer to obtain the half-wave period of the ambient light interference signal.

[0035] The specific content of step (4) includes calculating the time points corresponding to the peak and trough of the ambient light interference signal according to the coefficient relationship between the half-wave period and the time when the peak and trough appear. The coefficient relationship is that the peak and trough will appear at the 1 / 2 position of the half-wave period.

[0036] The specific content of step (5) includes collecting voltages at the time points of the corresponding peak and trough when a period similar to the previous ambient light interference signal period is detected again. Among them, the peak will be greater than the reference level, and the trough will be less than the reference level.

[0037] The reference level is the initial signal level at the time of emission.

[0038] Subtracting the reference level from the peak voltage or subtracting the trough voltage from the reference level will obtain the unilateral interference amplitude.

[0039] The specific content of step (7) includes that when the previous half-wave period t0 of the ambient light interference signal is similar to the next half-wave period t1, and when a half-wave period t2 similar to t0 and t1 is detected again in the next non-emission period, the threshold of the superimposed interference is increased.

[0040] The threshold of the superimposed interference is equal to the preset fixed threshold plus the unilateral interference amplitude increased by several times.

[0041] An optoelectronic sensor includes an optical signal transmitting module, an optical signal receiving module, a comparator, a timer, an analog-to-digital converter, and an MCU. Among them, the MCU is used to implement the method for the optoelectronic sensor to resist periodic ambient light interference.

[0042] The above is only a preferred and feasible embodiment of the present invention, and is not intended to limit the patent scope of the present invention. Therefore, all changes in the method steps made by using the content of the specification of the present invention are included in the protection scope of the present invention.

Claims

1. A method for photoelectric sensor to resist periodic ambient light interference, characterized in that: It includes the following steps: (1) The photoelectric sensor includes an optical signal transmitting module, an optical signal receiving module, a comparator, a timer and a digital-to-analog converter; (2) receiving an ambient light interference signal through the optical signal receiving module within a preset time before the optical signal transmitting module transmits an optical signal; (3) according to the ambient light interference signal obtained in step (2), detecting the period of the ambient light interference signal by a comparator; (4) timing by means of a timer, and calculating the time points corresponding to the peaks and troughs of the AC wave of the ambient light interference signal; (5) collecting the voltages of the peaks and troughs of the ambient light interference signal, and calculating the unilateral interference amplitude of the ambient light interference signal according to the voltages of the peaks and troughs; (6) The optical signal transmitting module transmits an optical signal, which is reflected by the target object, and the optical signal receiving module receives the return signal, which is converted into an echo signal by the digital-to-analog converter; (7) A fixed threshold is preset, which changes with the size of the light interference AC wave. The preset fixed threshold is superimposed with the increased unilateral interference amplitude, which is then compared with the echo signal interfered by the ambient light, thereby eliminating the influence of the ambient light interference signal on the echo signal.

2. The method for photoelectric sensor to resist periodic ambient light interference according to claim 1, characterized in that: The step (3) specifically includes detecting the upper half wave and the lower half wave of the ambient light interference signal by a comparator, and obtaining the half-wave period of the ambient light interference signal in combination with the time reading of a timer.

3. The method for photoelectric sensor to resist periodic ambient light interference according to claim 2, characterized in that: The step (4) specifically includes calculating the time points corresponding to the peaks and troughs of the ambient light interference signal based on the coefficient relationship between the half-wave period and the time when the peaks and troughs appear, where the peaks and troughs appear at the 1 / 2 position of the half-wave period.

4. The method for photoelectric sensor to resist periodic ambient light interference according to claim 3, characterized in that: The step (5) specifically includes, when a cycle similar to the cycle of the previous ambient light interference signal is detected again, collecting voltage at the time points of the corresponding peaks and troughs, wherein the peaks will be greater than the reference level and the troughs will be less than the reference level.

5. The method for photoelectric sensor to resist periodic ambient light interference according to claim 4, characterized in that: The reference level is the initial signal level during transmission.

6. The method for photoelectric sensor to resist periodic ambient light interference according to claim 5, characterized in that: Subtracting the reference level from the peak voltage or the reference level from the valley voltage will give the unilateral interference amplitude.

7. The method for photoelectric sensor to resist periodic ambient light interference according to claim 5, characterized in that: The step (7) specifically includes: when it is detected that the previous half-wave cycle t0 of the ambient light interference signal is similar to the next half-wave cycle t1, when a half-wave cycle t2 similar to t0 and t1 is detected again in the next non-emission cycle, the threshold of the superimposed interference is increased; the increase multiple of the increased unilateral interference amplitude is greater than or equal to 2 times, when the echo signal is greater than 4 times the unilateral interference amplitude, it is determined that there is a target object and output; when the echo signal is less than 2 times the unilateral interference amplitude, it is determined that there is no target object and no output is given.

8. The method for photoelectric sensor to resist periodic ambient light interference according to claim 7, characterized in that: The threshold of the superimposed interference is equal to the preset fixed threshold plus the unilateral interference amplitude after being multiplied by several times.

9. A photoelectric sensor, characterized in that: It comprises an optical signal transmitting module, an optical signal receiving module, a comparator, a timer, a digital-to-analog converter and an MCU; wherein the MCU is used to implement the method for resisting periodic ambient light interference of a photoelectric sensor as claimed in any one of claims 1 to 8.

Citation Information

Cited By

  • Background interference elimination method and device, controller and storage medium

    CN121176871A