An anti-interference method for an ultrathin light curtain sensor, a sensor, a product and a medium

By using an infrared light-emitting array and bandpass filtering technology, combined with adjusting the emission power based on ambient light intensity, the reliability problem of the light curtain sensor under changing ambient light conditions has been solved, achieving stable optical path status judgment and accurate detection.

CN119805604BActive Publication Date: 2025-11-07SHENZHEN HUAYIFENG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510017521.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-11-07
Estimated Expiration
2045-01-06

AI Technical Summary

Technical Problem

Existing light curtain sensors suffer from reduced reliability of detection results when ambient light changes, making it difficult to adapt to dynamic optical path conditions, and the signal transmission path is easily affected by local environmental factors.

Method used

An infrared light-emitting array is used to emit an infrared beam. The receiver removes ambient light interference signals through bandpass filtering and compares them with standard signal characteristics to record the optical path relationship. The transmitter adjusts the transmission power according to the ambient light intensity to optimize signal transmission.

Benefits of technology

This improves the reliability and accuracy of the light curtain sensor's detection results under environmental changes, reduces signal misjudgment caused by ambient light interference, and ensures accurate judgment of the optical path status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119805604B_ABST
    Figure CN119805604B_ABST
Patent Text Reader

Abstract

An anti-interference method for an ultrathin light curtain sensor, a sensor, a product and a medium, relate to the field of light curtain sensors, and the method comprises the following steps: a transmitter emits infrared light beams in sequence according to an infrared light emitting array to form a detection light curtain; a receiver receives the infrared light beams and converts them into electrical signals to obtain initial detection signals; the receiver removes environmental light interference signals in the initial detection signals through band-pass filtering, compares the initial detection signals after filtering with standard signal characteristics, and regards the initial detection signals that exceed a preset matching threshold as effective detection signals; and when there is a target light path in multiple light paths, the transmitter adjusts the emission power of the emission unit corresponding to the target light path if the environmental light intensity detected by the receiving unit corresponding to the target light path exceeds a preset environmental light threshold. The method can improve the reliability of the detection results of the light curtain sensor.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of light curtain sensors, in particular to an anti-interference method for an ultra-thin light curtain sensor, a sensor, a product and a medium. BACKGROUND

[0002] With the rapid development of modern industrial automation, the demand for safety protection and precision detection is increasing. As an important industrial safety protection device, light curtain sensors play a key role in mechanical equipment, automated production lines and other scenarios. Especially in precision instruments and highly integrated industrial environments, higher requirements are placed on the volume and performance stability of the sensor.

[0003] In related technologies, light curtain sensors mainly use traditional photoelectric devices and fixed threshold signal processing methods. A preset fixed power parameter is used at the light beam emitting end, and the receiving end determines whether the light beam is blocked according to a pre-set threshold.

[0004] However, since the light path conditions change with the change of ambient light, the fixed parameter detection method is difficult to adapt to such dynamic changes, and the signal transmission path is more susceptible to local environmental factors, resulting in reduced reliability of the detection results. SUMMARY

[0005] The present application provides an anti-interference method for an ultra-thin light curtain sensor, a sensor, a product and a medium, for improving the reliability of the detection results of the light curtain sensor.

[0006] In a first aspect, the present application provides an anti-interference method for an ultra-thin light curtain sensor, applied to an ultra-thin light curtain sensor, the anti-interference system comprising a transmitter and a receiver, the method comprising: the transmitter emitting infrared light beams in sequence according to an infrared light emitting array, forming a detection light curtain; the receiver receiving the infrared light beams and converting them into electrical signals, obtaining initial detection signals, the initial detection signals being used to represent the state of the light curtain being blocked; the receiver removes ambient light interference signals in the initial detection signals through band-pass filtering, and compares the initial detection signals after filtering with standard signal characteristics, taking the initial detection signals that exceed a pre-set matching threshold as effective detection signals; the receiver records the correspondence between the effective detection signals and each transmitting unit and each receiving unit, obtaining a plurality of light paths; when there is a target light path in the plurality of light paths, the ambient light intensity detected by the receiving unit corresponding to the target light path exceeds a pre-set ambient light threshold, the transmitter adjusts the transmitting power of the transmitting unit corresponding to the target light path.

[0007] By adopting the technical scheme, the transmitter emits infrared light beams in sequence of infrared light emitting arrays, ensuring uniformity and stability of the detection light curtain, enabling the light curtain to effectively cover the detection area, and the receiver receives and processes the light beams to obtain an initial detection signal, thereby accurately grasping the light curtain shielding state. The band-pass filtering removes ambient light interference signals, and the effective signal is obtained by comparing the standard signal characteristics, effectively eliminating the interference of ambient light factors, and the light path mapping relationship is established based on the effective signal, and the transmitter adjusts the emission power and the acquisition threshold accordingly, enabling the light curtain sensor to better adapt to changes in ambient light, thereby improving the reliability of the detection results of the light curtain sensor under the influence of the environment.

[0008] In combination with some embodiments of the first aspect, in some embodiments, the step of removing, by the receiver, the ambient light interference signal in the initial detection signal by band-pass filtering specifically comprises: detecting, by the receiver, an ambient light intensity value received by each receiving unit in the receiver when the transmitter stops emitting; setting, by the receiver, a filtering parameter of a band-pass filter according to the ambient light intensity value; and performing, by the receiver, band-pass filtering on the initial detection signal according to the filtering parameter to obtain the initial detection signal after filtering.

[0009] By adopting the technical scheme, the receiver detects the ambient light intensity value of each receiving unit when the transmitter stops emitting, and reasonable filtering parameters enable the band-pass filtering to more accurately remove the ambient light interference signal in the initial detection signal. The reduction of ambient light interference enables more accurate identification of effective detection signals when compared with the standard signal characteristics subsequently, improving the accuracy of the effective detection signals, and further improving the accuracy of the light curtain sensor in judging the light curtain shielding state.

[0010] In combination with some embodiments of the first aspect, in some embodiments, the step of recording, by the receiver, the effective detection signal and the corresponding relationship between each transmitting unit and each receiving unit to obtain a plurality of light paths specifically comprises: recording, by the receiver, a number of each transmitting unit and a number of the receiving unit corresponding to each transmitting unit; recording, by the receiver, a signal intensity value of the effective detection signal between each pair of transmitting unit and receiving unit; and composing, by the receiver, a light path information by the transmitting unit number, the receiving unit number, and the signal intensity value to obtain a plurality of light paths.

[0011] By adopting the technical scheme, the receiver records the transmitting unit number, the receiving unit number, and the signal intensity value of the effective detection signal between the two to compose the light path information, and the light path mapping relationship is completely constructed. The detailed light path information helps to accurately analyze the state of each light path, and enables quick positioning when problems occur, for example, when the ambient light intensity of the target light path is abnormal, the transmitter can quickly determine the corresponding transmitting unit for power adjustment.

[0012] In some embodiments of the first aspect, in some embodiments, the step of adjusting the transmission power and the signal collection threshold according to the timing change information of the light path mapping relationship comprises: the transmitter increases the transmission power of the transmission unit corresponding to the target light path to a preset power threshold; and the receiver updates the signal collection threshold of the abnormal light path according to the preset power threshold.

[0013] By adopting the above technical solution, the transmitter increases the transmission power of the transmission unit corresponding to the target light path to a preset power threshold, which can enhance the intensity of the infrared light beam of the light path, so that the signal received by the receiver is clearer and more stable, and the signal misjudgment caused by environmental light and other interference is effectively reduced. The receiver updates the signal collection threshold of the target light path according to the preset power threshold, which can ensure that the collected signal accurately reflects the state of the light path, and timely optimizes the signal transmission and detection of the light path when the environmental light intensity of the target light path is abnormal, thereby improving the detection accuracy of the light curtain sensor for a specific light path.

[0014] In some embodiments of the first aspect, after the step of the transmitter adjusting the transmission power of the transmission unit corresponding to the target light path and the transmitter sequentially emitting infrared light beams according to the order of the infrared light-emitting array to form a detection light curtain, the method further comprises: the transmitter collects real-time environmental light data of the current environment; the transmitter divides the infrared light-emitting array into a plurality of transmission groups according to the real-time environmental light data, and assigns different transmission timing and power parameters to each transmission group; when the real-time environmental light intensity is greater than a first preset threshold, the transmitter increases the transmission power of the transmission group to a preset first power threshold and reduces the transmission frequency to a preset first frequency threshold; when the real-time environmental light intensity is less than a second preset threshold, the transmitter reduces the transmission power of the transmission group to a preset second power threshold and increases the transmission frequency to a preset second frequency threshold, the first preset threshold being greater than the second preset threshold, the preset first power threshold being greater than the preset second power threshold, and the preset first frequency threshold being less than the preset second frequency threshold.

[0015] By adopting the above technical solution, the transmitter collects real-time environmental light data, divides the infrared light-emitting array into transmission groups according to the data, and assigns different parameters, so that the transmission is more targeted. When the environmental light intensity changes, the transmission power and frequency are adjusted. In strong light, the power is increased and the frequency is reduced to enhance the penetration. In weak light, the power is reduced and the frequency is increased to save energy and stabilize detection. This can effectively cope with different environmental light interference, optimize the transmission effect, ensure that the light curtain works stably under various lighting conditions, improve the environmental adaptability of the light curtain sensor, and ensure that the detection accuracy and stability are not affected by the change of environmental light.

[0016] In some embodiments of the first aspect, after the step of adjusting the transmission power of the transmission unit corresponding to the target light path by the transmitter, the method further comprises: the transmitter counting the number of occlusions of the detection curtain within a preset time window, and determining that the frequent occlusion state exists when the number of occlusions is greater than a preset occlusion frequency threshold; in the frequent occlusion state, the transmitter divides the detection curtain into a plurality of detection regions; the transmitter counts the occlusion frequency of each detection region and determines a high-frequency occlusion region; the transmitter increases the signal sampling frequency of the high-frequency occlusion region to a preset sampling frequency threshold and reduces the signal judgment sensitivity of the high-frequency occlusion region to a preset sensitivity threshold.

[0017] By adopting the above technical solution, the transmitter counts the number of occlusions of the detection curtain to determine the frequent occlusion state, so as to timely grasp the change of the working state of the curtain. In the frequent occlusion state, the detection region is divided and the occlusion frequency of each region is counted to determine the high-frequency occlusion region, so as to realize the partition management. The signal sampling frequency of the high-frequency occlusion region is increased, so as to obtain more signal details and facilitate accurate judgment. The signal judgment sensitivity is reduced to avoid false judgment due to frequent occlusion.

[0018] In some embodiments of the first aspect, after the step of adjusting the transmission power of the transmission unit corresponding to the target light path by the transmitter, the method further comprises: the transmitter scans the detection curtain according to a preset frame scanning period, and triggers the infrared light emitting unit of each transmission group to emit an infrared light beam in each frame scanning period; the receiver collects the signal intensity value at a preset sampling time, and determines that the light path is in the light transmission state when the signal intensity value is greater than a signal collection threshold, and determines that the light path is in the light blocking state when the signal intensity value is less than the signal collection threshold.

[0019] By adopting the above technical solution, the transmitter scans the curtain according to the preset frame scanning period, triggers the transmission group to emit the infrared light beam in an orderly manner, and the receiver collects the signal intensity value at a specific sampling time. The light path can be determined to be in the light transmission state or the light blocking state according to the comparison with the signal collection threshold, so as to realize accurate detection.

[0020] In the second aspect, the embodiments of the present application provide an ultrathin curtain sensor, which comprises one or more processors and a memory. The memory is coupled to the one or more processors, and the memory is used to store computer program codes, the computer program codes comprising computer instructions. The one or more processors invoke the computer instructions to enable the ultrathin curtain sensor to perform the method described in the first aspect and any possible implementation manner of the first aspect.

[0021] In a third aspect, an embodiment of the present application provides a computer program product comprising instructions which, when executed on the ultra-thin light curtain sensor, cause the ultra-thin light curtain sensor to carry out the method according to the first aspect and any possible implementation of the first aspect.

[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium comprising instructions which, when executed on the ultra-thin light curtain sensor, cause the ultra-thin light curtain sensor to carry out the method according to the first aspect and any possible implementation of the first aspect.

[0023] It can be understood that the ultra-thin light curtain sensor provided by the second aspect, the computer program product provided by the third aspect, and the computer storage medium provided by the fourth aspect are all used to execute the method provided by the embodiments of the present application. Therefore, the beneficial effects that can be achieved are referred to the beneficial effects in the corresponding method, which will not be described here.

[0024] The one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0025] 1. In the present application, the emitter emits infrared light beams in the order of the infrared light emitting array, ensuring the uniformity and stability of the detection light curtain, so that the light curtain can effectively cover the detection area, and the receiver receives and processes the light beams to obtain an initial detection signal, thereby accurately mastering the light curtain shielding state. The band-pass filter removes the environmental light interference signal, and the effective signal is obtained by comparing the standard signal characteristics, effectively eliminating the interference of environmental factors, and the light path mapping relationship is established based on the effective signal. The emitter adjusts the emission power and the acquisition threshold value accordingly, so that the light curtain sensor can better adapt to environmental changes, and the reliability of the detection result of the light curtain sensor under the influence of the environment is improved.

[0026] 2. In the present application, the emitter increases the emission power of the target light path to a preset power threshold, which can enhance the intensity of the infrared light beam of the light path, so that the signal received by the receiver is clearer and more stable, effectively reducing the signal misjudgment caused by environmental light interference. The receiver updates the signal acquisition threshold of the target light path according to the preset power threshold, which can ensure that the acquired signal accurately reflects the state of the light path. When the environmental light intensity of the target light path is abnormal, the signal transmission and detection of the light path are optimized in time, and the detection accuracy of the light curtain sensor for the specific light path is improved.

[0027] 3. In the present application, the emitter counts the number of times of detecting the light curtain shielding to determine the frequent shielding state, which can timely master the change of the working state of the light curtain. When the light curtain is frequently shielded, the detection area is divided and the shielding frequency of each area is counted to determine the high-frequency shielding area, so that the partition management is realized. The signal sampling frequency of the high-frequency shielding area is increased, more signal details can be obtained to facilitate accurate judgment, the signal judgment sensitivity is reduced, and misjudgment caused by frequent shielding is avoided. BRIEF DESCRIPTION OF DRAWINGS

[0028] Figure 1 is a flowchart of an anti-interference method for a super-thin light curtain sensor in an embodiment of the present application;

[0029] Figure 2 is another flowchart of an anti-interference method for a super-thin light curtain sensor in an embodiment of the present application;

[0030] Figure 3 is another flowchart of an anti-interference method for a super-thin light curtain sensor in an embodiment of the present application;

[0031] Figure 4 is a schematic diagram of a physical device structure of a super-thin light curtain sensor in an embodiment of the present application. DETAILED DESCRIPTION

[0032] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "and / or," as used herein, refers to

[0033] Hereinafter, the terms "first" and "second" are only for the purpose of description and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.

[0034] For ease of understanding, the method provided by the present embodiment is described in the flow. Please refer to Figure 1 is a flowchart of an anti-interference method for a super-thin light curtain sensor in an embodiment of the present application.

[0035] S101, the transmitter emits infrared beams in sequence according to the infrared light emitting array, forming a detection light curtain.

[0036] Among them, the infrared light emitting array represents a group of emitting units composed of a plurality of infrared light emitting diodes according to a specific spacing and arrangement. Sequential emission refers to sequentially emitting light beams by light emitting units one by one or in groups according to a preset timing control scheme. The detection light curtain is used to represent a continuous detection area formed by a plurality of parallel or intersecting infrared light beams.

[0037] This step is executed after the system is started and the initialization configuration is completed. Specifically, the transmitter first performs initial configuration on the infrared light-emitting array, sets the basic transmission power (usually 5-20 mW) and transmission timing (such as 100 μs transmission interval) of each light-emitting unit. Then, in the order from left to right or from top to bottom, the light-emitting units are triggered one by one to emit infrared light beams. The transmission time interval of adjacent light-emitting units needs to be precisely controlled to ensure the continuity of detection and avoid interference between adjacent beams.

[0038] The light beam emission and light curtain formation can be realized in the following ways: optionally, a shift register control scheme is adopted, a transmission control chain is formed by connecting 8-bit shift registers in series, and each bit is shifted by one every clock cycle to light up the corresponding light-emitting unit in turn, and the initial value is reloaded after completing a scan; optionally, a multiplexer scheme is adopted, the light-emitting units are grouped and connected to the output end of the multiplexer, and the transmission timing of each group of units is controlled by polling the control signal to realize orderly emission. It can be understood that other emission control methods can also be used to realize orderly light beam emission and light curtain formation.

[0039] S102, the receiver receives the infrared light beam and converts it into an electrical signal to obtain an initial detection signal, which is used to represent the state of the light curtain being blocked.

[0040] Among them, receiving an infrared light beam means sensing the incident infrared light signal through a photodetector. Converting into an electrical signal means that the optical signal is converted into a corresponding voltage or current signal through photoelectric conversion. The initial detection signal is used to represent the raw electrical signal without processing. The blocked state represents whether the light beam is blocked by an object.

[0041] This step is executed immediately after the transmitter emits the light beam. Specifically, the photodetector in the receiver monitors the incident light beam in real time, and when a light signal is detected, it is converted into a current signal through the photoelectric effect. The current signal is converted into a voltage signal through a transimpedance amplifier, and then amplified and filtered through a signal conditioning circuit, and finally converted into a digital initial detection signal through an analog-to-digital converter. The amplitude of the signal reflects the on-off state of the light beam.

[0042] The photoelectric signal conversion and processing can be realized in the following ways: optionally, a high-speed PIN photodiode is used to receive the light beam, and a high-gain transimpedance amplifier is used to convert the light signal into a voltage signal, which is then amplified and filtered through an operational amplifier; optionally, a phototransistor array is used to receive the light beam, and a current amplification effect is used to directly generate a larger current signal, which is converted into a voltage signal after current-voltage conversion. It can be understood that other photoelectric conversion methods can also be used to realize the conversion of optical signals to electrical signals.

[0043] S103, the receiver removes the ambient light interference signal in the initial detection signal by band-pass filtering, and compares the initial detection signal after filtering with a standard signal feature, and takes the initial detection signal exceeding a preset matching threshold from the standard signal feature as an effective detection signal.

[0044] Wherein, the band-pass filtering refers to a filtering method for retaining signal components in a specific frequency range and attenuating other frequency components outside the range, the ambient light interference signal represents a light signal affecting detection from a natural light source or an artificial light source, the standard signal feature refers to a typical characteristic parameter of an ideal light curtain signal set in advance, the preset matching threshold is used to represent a standard value for judging signal effectiveness, and the effective detection signal represents a signal confirmed as reliable after filtering and matching.

[0045] This step is performed immediately after obtaining the initial detection signal. Specifically, the receiver first processes the initial detection signal through a band-pass filter, the center frequency of the filter is set to the modulation frequency of the transmitted signal (usually 38 kHz), and the bandwidth range is ±2 kHz. The filtered signal is then correlated with the stored standard signal feature, including signal amplitude, waveform and phase, etc. When the correlation exceeds the preset matching threshold (typical value is 85%), the signal is determined as an effective detection signal.

[0046] In some embodiments, signal filtering and feature matching can be achieved in various ways: optionally, a digital band-pass filtering scheme is adopted, the initial signal is first converted to digital, then filtered in digital domain through a FIR filter, then the correlation coefficient of the filtered signal and the standard feature is calculated, and finally the signal effectiveness is judged according to the correlation threshold; optionally, an analog band-pass filtering scheme is adopted, a multi-stage active filter is used to filter the signal in analog domain, then a peak detection circuit is used to extract the signal feature, and finally a comparator is used for threshold judgment. It can be understood that other signal processing methods can also be used to remove interference and judge effectiveness, which are not limited here.

[0047] It should be noted that the standard signal characteristics refer to the characteristic parameter set of the standard infrared signal collected by the light curtain sensor under ideal working conditions (no interference, no shielding). Specifically, it includes signal amplitude (signal peak-to-peak value under ideal conditions, usually 3.3V), waveform characteristics (envelope shape of 38kHz square wave modulation), phase relationship (phase difference of signal rising edge and system clock), duty cycle (high-to-low time ratio of standard signal, set to 50%), modulation depth (ratio of signal maximum value to minimum value, standard value is 0.9), etc. The purpose of comparison with standard signal characteristics is to distinguish between effective infrared detection signals and other interference signals. Because environmental light interference usually does not have 38kHz modulation characteristics, electromagnetic interference signals have obvious differences in waveform characteristics from standard signals, crosstalk signals have inconsistent phase relationships with expectations, and reflected signals have significantly lower amplitude and modulation depth than standard values.

[0048] The comparison process is implemented using a multi-step strategy: first, sample the filtered signal at a 2MHz sampling rate, collect 1024 points of data each time; then perform feature extraction, including calculating signal amplitude (peak-to-peak value detection), measuring modulation frequency (zero-crossing detection), calculating duty cycle (high-to-low time statistics), and measuring phase difference (system clock synchronization); then calculate the similarity of each dimension, including amplitude similarity Sa = min (measured value, standard value) / max (measured value, standard value), frequency similarity Sf = |1 - |measured frequency - 38kHz| / 38kHz|, phase similarity Sp = cos (phase difference), and duty cycle similarity Sd = |1 - |measured duty cycle - 50%| / 50%|; finally, make a comprehensive judgment, total similarity S = 0.4 × Sa + 0.3 × Sf + 0.2 × Sp + 0.1 × Sd, when S ≥ 0.85, it is determined as an effective signal.

[0049] S104, the receiver records the effective detection signal and the corresponding relationship between each transmitting unit and each receiving unit, obtaining a plurality of light paths.

[0050] Among them, the transmitting unit refers to a single light-emitting diode in the infrared light-emitting array. The receiving unit represents a single photodetector in the photodetector array. The effective detection signal and the corresponding relationship refer to the signal transmission state between a specific transmitting-receiving unit pair. The light path is used to represent the optical signal propagation path from the transmitting unit to the receiving unit.

[0051] This step is executed after confirming the valid detection signal. Specifically, the receiver assigns a unique identification number to each transmitting unit and receiving unit, and then establishes a mapping table to record the correspondence between the transmitting-receiving unit pairs. For each pair of units, the key parameters of the valid detection signal are recorded, including signal strength, timing information, and stability indicators, etc. These information combinations form a complete optical path description, and ultimately obtain multiple optical path information covering the entire detection area.

[0052] In some embodiments, the recording and management of optical path information can be achieved in various ways: optionally, a matrix storage scheme is adopted to construct an NxM storage matrix (N is the number of transmitting units, and M is the number of receiving units), and the matrix elements store the signal parameters of the corresponding unit pairs, so that the specific optical path information can be quickly accessed through row and column indexes; optionally, a linked list storage scheme is adopted to create a data node for each optical path, and the node contains fields such as transmitting unit number, receiving unit number, and signal parameters, and the complete optical path information linked list is formed through the pointer. It can be understood that other data structures can also be used to organize and manage the optical path information, which is not limited here.

[0053] S105、When the target optical path corresponding to the target optical path exists in the multiple optical paths, the environmental light intensity detected by the receiving unit corresponding to the target optical path exceeds the preset environmental light threshold value, the transmitter adjusts the transmission power of the transmitting unit corresponding to the target optical path.

[0054] Among them, the target optical path refers to the optical signal transmission path between the specific transmitting-receiving unit pair that needs special attention or processing. The environmental light intensity represents the background light intensity value at the location of the receiving unit. The preset environmental light threshold value is a reference value for judging the degree of environmental light interference, which is used to trigger power adjustment. The transmission power adjustment means dynamically changing the output power size of the transmitting unit according to the actual situation.

[0055] This step is triggered and executed when the environmental light interference is detected to be beyond the normal range. Specifically, the receiver continuously monitors the environmental light intensity at the location of each receiving unit, and when the environmental light intensity detected by the receiving unit corresponding to a certain optical path exceeds the preset threshold value (a typical value is 50000 lux), the system marks this optical path as a target optical path. The transmitter then adjusts the power of the transmitting unit corresponding to the target optical path, and the adjustment strategy takes into account the current environmental light intensity value, signal stability requirements, and power consumption limitations. The power adjustment range is usually between 50% and 200% of the original power, and the adjustment step is 10% of the original power.

[0056] In some embodiments, adaptive adjustment of transmit power can be achieved in several ways: Optionally, a graded adjustment scheme can be adopted. First, the ambient light intensity value is read and compared with multiple preset thresholds. Then, the current ambient light level is determined based on the comparison results. Next, the standard power value corresponding to this level is found. Finally, the transmit power is gradually adjusted to the target value through PWM modulation, while continuously monitoring signal quality indicators. Optionally, a proportional adjustment scheme can be adopted. First, the deviation ratio between the ambient light intensity and the reference value is calculated. Then, the power adjustment amount is determined based on this ratio. Next, a power gradient curve is designed to avoid abrupt changes. Finally, a constant current source circuit is used to achieve smooth power adjustment, and the adjustment effect is tracked in real time. It is understood that other control strategies can also be used to achieve dynamic adjustment of transmit power, which are not limited here.

[0057] It should be noted that the power adjustment is implemented using a closed-loop control strategy. When the receiving unit detects that the ambient light intensity exceeds 50,000 lux, the power boosting program is started. First, the current optical path is marked as the target optical path, and the initial power value of its transmitting unit (standard value 20mW) is read. Then, the required power increment ΔP = (measured light intensity - 50,000) / 1000 is calculated based on the ambient light intensity, in mW. Next, the power is gradually increased by 2mW each time through the PWM control circuit until any of the following conditions are met: (1) the signal quality is restored to the standard level (signal strength > 3000, signal-to-noise ratio > 40dB); (2) the power reaches the maximum limit of 40mW; (3) the junction temperature of the light-emitting diode exceeds 85℃. While increasing the power, the operating current of the transmitting unit is monitored in real time through the constant current source circuit to ensure that it does not exceed 100mA. When the ambient light intensity drops below 30,000 lux, the power recovery program is started: the power is reduced by 1mW every second until the standard power value of 20mW is returned. Throughout the process, the system continuously monitors signal quality indicators (signal strength, signal-to-noise ratio) to ensure stable detection performance. Simultaneously, the system tracks the cumulative operating time of each transmitting unit, and if it exceeds 8 hours, a forced power reset is executed to prevent prolonged high-power operation.

[0058] The following provides a more detailed description of the process of the method provided in this implementation. Please refer to [link / reference]. Figure 2 This is another flowchart illustrating the anti-interference method for the ultra-thin light curtain sensor in this application embodiment.

[0059] S201. The transmitter emits infrared beams sequentially according to the infrared light-emitting array to form a detection light curtain.

[0060] The infrared light-emitting array is a light-emitting unit group composed of a plurality of infrared light-emitting diodes (LEDs) arranged at a specific pitch. Each light-emitting unit can emit an infrared light beam of a specific wavelength. The detection curtain is a continuous detection area formed by a plurality of parallel or intersecting infrared light beams, used to detect objects passing through the area. Sequential emission refers to controlling the light-emitting units to emit light beams in order according to a preset timing control scheme.

[0061] In the implementation process, the transmitter controller first initializes and configures the infrared light-emitting array, sets the basic emission power (e.g. 5-20 mW) and emission timing (e.g. 100 μs emission interval) of each light-emitting unit. Then, in order from left to right or from top to bottom, the light-emitting units are triggered to emit infrared light beams in sequence. The emission time interval of adjacent light-emitting units needs to be precisely controlled to ensure the continuity of detection and avoid interference between adjacent light beams. Through this orderly emission process, a stable detection curtain is finally formed between the transmitter and the receiver.

[0062] S202, the receiver receives the infrared light beam and converts it into an electrical signal to obtain an initial detection signal, which is used to represent the state of the light curtain being blocked.

[0063] The receiver is a photoelectric conversion device composed of a photodiode array, and each photodiode can convert incident infrared light into a current signal. The infrared light beam is an invisible light signal with a wavelength of about 850 nm, emitted by the infrared light-emitting diode of the transmitter. The electrical signal includes the photocurrent generated by the photodiode and the voltage signal after amplification and conversion. The initial detection signal refers to the original electrical signal without filtering and other processing, which contains valid signals and various interference signals. The state of the light curtain being blocked indicates whether there is an object blocking the transmission of the infrared light beam in the detection area.

[0064] In the implementation process, the receiver uses a high-sensitivity PIN photodiode array as the detection element, and the response time of each diode is less than 100 ns, and the response wavelength range is 800-900 nm. The photodiode converts the received infrared light into a weak current (typical value: 10-100 μA), which is converted into a voltage signal (1-10 V) by a transimpedance amplifier (gain: 100 kΩ). The converted voltage signal is amplified by an operational amplifier with a bandwidth of 2 MHz, and then digitized by a 12-bit ADC with a sampling rate of 2 MSPS. The digital signal is processed in real time by an FPGA, and the light curtain is determined to be blocked by comparing the signal amplitude with a preset threshold (usually 30% of the full scale).

[0065] S203, the receiver detects the ambient light intensity value received by each receiving unit in the receiver when the transmitter stops emitting.

[0066] The receiving unit refers to a single photoelectric detection device in the receiver, including a photodiode and related signal conditioning circuit. The transmitter stopping emitting refers to the working state of temporarily closing all infrared light-emitting diodes. The ambient light intensity value refers to the background light intensity generated by natural light sources or artificial lighting without active emission light sources, with units of lux.

[0067] In practical applications, the receiver uses a 16-bit high-precision ADC (such as AD7606) to sample the output of each receiving unit. The system first sends a stop emitting command to the transmitter and waits for 100 μs to ensure that all light-emitting units are completely closed. Then, within a 1 ms time window, 16 samples are taken for each receiving unit with a sampling interval of 62.5 μs. After digital filtering processing (8-point mean filtering), stable ambient light intensity values are obtained. These intensity values are stored in a 32-bit data register, with the upper 16 bits storing the receiving unit number and the lower 16 bits storing the corresponding ambient light intensity value.

[0068] S204, the receiver sets the filtering parameters of the band-pass filter according to the ambient light intensity value.

[0069] The band-pass filter is a filter that only allows signals within a specific frequency range to pass through, composed of cascaded high-pass and low-pass filters. The filtering parameters include center frequency, bandwidth, gain, etc., which determine the frequency response characteristics of the filter. The ambient light intensity value is used to dynamically adjust the filtering parameters, enabling the filter to more effectively suppress interference signals.

[0070] The filter parameter setting adopts an adaptive algorithm: first, divide the ambient light intensity into three levels (weak light <1000 lux, medium light 1000-10000 lux, strong light >10000 lux). For each level, the system sets different filtering parameters: in weak light environment, the center frequency is set to 38 kHz, the bandwidth is ±2 kHz, and the gain is 20 dB; in medium light environment, the center frequency is 38 kHz, the bandwidth is ±1.5 kHz, and the gain is 15 dB; in strong light environment, the center frequency is 38 kHz, the bandwidth is ±1 kHz, and the gain is 10 dB. The filter is implemented using a second-order Butterworth structure, and parameter configuration is completed by updating the filter coefficient register. The signal-to-noise ratio of the filtered signal is improved by 15-20 dB, effectively suppressing ambient light interference.

[0071] S205, the receiver performs band-pass filtering on the initial detection signal according to the filtering parameters, obtains the filtered initial detection signal, and compares the filtered initial detection signal with the standard signal feature, and takes the initial detection signal that exceeds the preset matching threshold as the effective detection signal.

[0072] Filter parameters refer to the core characteristic parameters of the band-pass filter, including center frequency, bandwidth, gain, etc. The initial detection signal is the original electrical signal after photoelectric conversion without processing. Band-pass filtering is a signal processing method used to extract signal components within a specific frequency range. Standard signal features include signal waveform, amplitude, phase, and other characteristic parameters in ideal conditions. The preset matching threshold is the standard value for judging signal effectiveness, usually set to 85% similarity. The effective detection signal refers to the reliable detection signal confirmed after filtering and feature matching.

[0073] In specific implementation, the receiver uses a digital signal processor (DSP) to perform filtering and matching processes. The filter uses an FIR structure with a 32 order and a sampling frequency of 2MHz. The filtering process first sends the 12-bit digital signal collected by the ADC into the FIR filter, and obtains a clean signal after band-pass filtering. Then the correlation coefficient between the filtered signal and the pre-stored standard feature is calculated, the calculation formula is R=∑(Xi×Yi) / √(∑(Xi²)×∑(Yi²)), where Xi is the filtered signal and Yi is the standard feature. When the correlation coefficient R is greater than 0.85, the signal is marked as an effective detection signal. The filtering and matching results are stored in a dual-port RAM for subsequent processing.

[0074] S206, the receiver records the number of each transmitting unit and the number of the receiving unit corresponding to each transmitting unit.

[0075] The transmitting unit is a single light-emitting diode in the infrared light-emitting array, responsible for emitting a modulated infrared light beam. The transmitting unit number is a digital code used to uniquely identify each light-emitting diode, represented by an 8-bit binary number. The receiving unit is a single photodiode in the photodetection array, responsible for receiving the corresponding infrared light beam. The receiving unit number also uses an 8-bit binary number as a unique identifier. The correspondence represents a one-to-one mapping relationship between a specific transmitting unit and a receiving unit.

[0076] The number recording process uses a table storage structure to implement. First, a 256x16-bit mapping table is established in the EEPROM, with the upper 8 bits storing the transmitting unit number and the lower 8 bits storing the corresponding receiving unit number. The transmitting units are numbered from top to bottom (0x00-0x7F) according to physical location, and the receiving units are numbered in the same way. During system initialization, the correspondence between the numbers is established by automatic scanning: the controller triggers each transmitting unit in turn, while detecting which receiving unit receives the strongest signal, and writes this pair of numbers into the corresponding position of the mapping table. The complete mapping table is verified by CRC to ensure data integrity.

[0077] S207, the receiver records the signal strength value of the effective detection signal between each pair of transmitting unit and receiving unit.

[0078] An effective detection signal is a signal confirmed to be reliable after filtering and feature matching. The signal strength value represents the intensity of the optical signal received by the receiving unit, which is converted to a 12-bit digital quantity after ADC conversion, ranging from 0 to 4095. The transmitter-receiver pair refers to the corresponding transmitter and receiver combination determined by the mapping table.

[0079] The intensity value record adopts a real-time updated data structure. The system allocates 512 KB of space in the Flash memory to establish an intensity value database, with each record occupying 32 bits: bits 31-24 store the transmitter number, bits 23-16 store the receiver number, bits 15-12 are reserved, and bits 11-0 store the signal strength value. In each scanning period (2 ms), the system reads the intensity values of all effective detection signals and updates the database through DMA. At the same time, the average and standard deviation of the last 16 intensity values are calculated to evaluate the stability of the signal. The database supports fast retrieval by number, facilitating real-time acquisition of the signal state of any optical path.

[0080] S208, the receiver groups the transmitter number, receiver number and signal strength value into an optical path information, obtaining multiple optical paths.

[0081] The optical path information is a data structure that completely describes a transmission path of an optical signal, including the identification of the transmitting end and the receiving end and the transmission quality parameter. The transmitter number uses an 8-bit binary number (0x00-0x7F) to identify the position of the light-emitting diode. The receiver number also uses an 8-bit binary number to identify the position of the photodiode. The signal strength value is a 12-bit digital quantity (0-4095) representing the intensity of the received optical signal. Multiple optical paths refer to a set of optical signal transmission channels composed of multiple transmitter-receiver pairs.

[0082] In actual application, the optical path information is packaged in a 32-bit data format: the high 8 bits store the transmitter number, the next 8 bits store the receiver number, the low 12 bits store the signal strength value, and the middle 4 bits store the status flag. The system establishes an optical path information table in RAM with a capacity of 1024x32 bits, supporting a maximum of 1024 optical paths to be recorded simultaneously. Each time a scanning period (2 ms) is completed, new optical path information is written into the table. The information table uses a double-buffering structure, and the writing process does not affect the reading operation. Each optical path information is quickly assembled through bit operations: (transmitter number «<24) | (receiver number «<16) | (status flag «<12) | signal strength value.

[0083] S209, the transmitter increases the transmission power of the transmitter corresponding to the target optical path to a preset power threshold.

[0084] Target optical path refers to the specific optical signal transmission path that needs to be adjusted in power at present. The emission power is the output optical power of the light-emitting diode, which is controlled by adjusting the driving current, and the range is 5-50mW. The preset power threshold is the maximum value allowed for the emission power, which is set to 40mW, and is used to prevent the light-emitting diode from being damaged by overheating. The emission unit is a light-emitting diode that generates an infrared beam, and its emission power is controlled by a PWM signal.

[0085] The power adjustment process is realized by a dedicated current control circuit. The controller first reads the emission unit number of the target optical path, and then outputs a control voltage through an 8-bit DAC (such as DAC8831), which generates a driving current in the range of 0-100mA through a V / I conversion circuit. The power adjustment adopts a step-by-step incremental mode: each time 2mW is increased, the adjustment interval is 100us, and the working temperature is ensured not to exceed 85℃ by detecting the junction temperature of the light-emitting diode (using an NTC thermistor). When the power reaches 40mW, the increase is stopped, and the new power value is written into the EEPROM for saving as the working parameter of the emission unit.

[0086] S210, the receiver updates the signal collection threshold of the target optical path according to the preset power threshold.

[0087] The signal collection threshold is a reference value for judging the on-off state of the optical path, represented by 12-bit digital quantity. The target optical path is the optical signal transmission path whose emission power is adjusted at present. The preset power threshold is the maximum allowed value of the emission power, which is 40mW. The updating process refers to dynamically adjusting the signal judgment standard according to the new emission power.

[0088] The collection threshold updating adopts a linear mapping algorithm. First, the original collection threshold (a typical value is 30% of the full scale, i.e. 1229) is read, and then the new threshold is calculated according to the power change ratio: new threshold = original threshold x (new power / standard power), where the standard power is 20mW. For example, when the emission power increases to 40mW, the new collection threshold will be adjusted to 2458. The threshold updating is realized by modifying the comparator reference voltage of the ADC, and a 12-bit DAC (such as DAC7811) is used to output a reference voltage of 0-3.3V. The updated threshold is stored in the Flash memory, and the controller is notified through the CAN bus to complete the threshold adjustment. The system uses the new threshold for signal judgment in subsequent detection.

[0089] The method provided by the embodiment will be further described in a more specific flow. Please refer to Figure 3 , another flowchart of the anti-interference method of the ultra-thin optical curtain sensor in the embodiment of the present application.

[0090] S301, the emitter collects real-time ambient light data of the current environment.

[0091] Real-time ambient light data refers to the ambient light intensity information collected by the photosensitive sensor, including visible light and infrared light components. Ambient light data is represented by 16-bit digital quantity, covering a measurement range of 0-100,000 lux. The current environment refers to the light environment within a 10cm range around the emitter.

[0092] In a specific implementation, the emitter uses a high-precision ambient light sensor array for data collection. The sensor model is BH1750FVI, which has high measurement accuracy (1 lux) and fast response characteristics (response time <180ms). Eight photosensitive sensors are evenly distributed around the emitter shell, and the sampling period of each sensor is set to 50ms. The collected data is converted by a 16-bit ADC and transmitted to the main controller through an I2C bus. The controller performs weighted average calculation on the data of the eight sensors, and the weight coefficients are determined according to the sensor positions (the weight of the front sensor is 1.5, and the weight of the other positions is 1.0). Finally, a comprehensive ambient light intensity value is obtained.

[0093] S302, the emitter divides the infrared light-emitting array into multiple emission groups according to the real-time ambient light data, and assigns different emission timing and power parameters to each emission group.

[0094] An emission group refers to a collection of infrared light-emitting units with the same operating parameters. The emission timing is a timing signal that controls the on-time of the light-emitting unit. The power parameter includes configuration information of the emission power size and modulation method.

[0095] An adaptive partitioning algorithm is used to divide the emission groups: first, the emission array is divided into three level regions (high, medium, and low interference regions) according to the ambient light intensity. Each level region is further divided into several emission groups according to the physical position, and each group contains 4-8 adjacent light-emitting units. The emission group in the high interference region (ambient light >50,000 lux) uses 40mW emission power, and the emission timing interval is set to 200μs; the medium interference region (10,000-50,000 lux) uses 30mW emission power, and the emission timing interval is 150μs; the low interference region (<10,000 lux) uses 20mW emission power, and the emission timing interval is 100μs. The parameters of each emission group are configured by a 32-bit control word, which includes: power level (8 bits), timing interval (8 bits), PWM frequency (8 bits), and modulation method (8 bits).

[0096] S303, when the real-time ambient light intensity is greater than a first preset threshold, the emitter increases the emission power of the emission group to a first preset power threshold and reduces the emission frequency to a first preset frequency threshold.

[0097] The first preset threshold is the standard value for judging the severity of ambient light interference, set at 80,000 lux. The first power threshold is the maximum allowable transmit power, set at 50mW. The first frequency threshold is the minimum allowable transmit frequency, set at 2kHz.

[0098] When the ambient light sensor detects a light intensity exceeding 80,000 lux, a strong interference mitigation strategy is activated: the transmission power of all transmitting groups is uniformly increased to 50mW, using PWM modulation with a duty cycle of 80%. Simultaneously, the transmission frequency is reduced from the standard 5kHz to 2kHz, and the duration of a single transmission is increased from 100μs to 250μs. Power increases and frequency adjustments are performed gradually, with each adjustment step being 5mW and 0.5kHz, and an adjustment interval of 100μs, to avoid sudden parameter changes that could lead to system instability. Over-temperature protection monitoring is also activated; when the temperature of the light-emitting unit exceeds 85℃, the power is immediately reduced to 30mW to ensure reliable system operation.

[0099] S304. When the real-time ambient light intensity is less than the second preset threshold, the transmitter reduces the transmission power of the transmission group to the preset second power threshold and increases the transmission frequency to the preset second frequency threshold. The first preset threshold is greater than the second preset threshold, the preset first power threshold is greater than the preset second power threshold, and the preset first frequency threshold is less than the preset second frequency threshold.

[0100] The second preset threshold is the low threshold for ambient light intensity, set to 5,000 lux. The preset second power threshold is the minimum operating value for transmit power, set to 15mW. The preset second frequency threshold is the maximum operating value for transmit frequency, set to 8kHz. The first preset threshold (80,000 lux), the preset first power threshold (50mW), and the preset first frequency threshold (2kHz), together with the second preset threshold, the preset second power threshold, and the preset second frequency threshold, respectively, constitute the upper and lower limits of the system parameters.

[0101] When the ambient light sensor detects a light intensity below 5,000 lux, a weak interference operating mode is activated: the transmission power of all transmitting groups is uniformly reduced to 15mW, PWM modulation is used, and the duty cycle is set to 40%. Simultaneously, the transmission frequency is increased from the standard 5kHz to 8kHz, and the duration of a single transmission is shortened from 100μs to 62.5μs. Parameter adjustments are made in steps, with power decreasing by 2mW and frequency increasing by 0.5kHz each time, at 50μs intervals. The junction temperature of the light-emitting unit is monitored in real time by the PWM controller to ensure operation within the range of 15-35℃. In this operating mode, system power consumption is reduced by approximately 60% while maintaining stable detection performance.

[0102] S305, the transmitter statistics detects the number of shielding of the light curtain in the preset time window, when the number of shielding is greater than the preset shielding frequency threshold, it is determined that the frequent shielding state.

[0103] The preset time window is the time range for counting the shielding events, which is set to 1000 ms. The number of shielding refers to the cumulative number of times the light beam is blocked. The preset shielding frequency threshold is a standard value for determining whether to enter the frequent shielding state, which is set to 50 times / s. The frequent shielding state refers to the working state in which the system detects high-frequency shielding events.

[0104] The specific implementation adopts a 32-bit counter to count the shielding events in real time. Each time the receiver detects a signal interruption of more than 2 ms, it is counted as a shielding event. The counter is cleared every 1000 ms, constituting a sliding time window. Within the time window, the shielding events are recorded by the interrupt service program, and when the count value exceeds 50, the frequent shielding flag of the system status register is set to 1. The structure of the status register is: bit31-16 stores the shielding count value, bit15-8 stores the time window number, and bit7-0 stores the system status flag.

[0105] S306, in the frequent shielding state, the transmitter divides the detection light curtain into multiple detection regions.

[0106] The detection region refers to the spatial partition of the light curtain, and each region contains multiple adjacent light beams. The region division in the frequent shielding state is to realize the partition management and targeted protection.

[0107] In the frequent shielding state, the system adopts an adaptive partitioning algorithm to divide the light curtain. First, the light curtain is divided into 4 basic regions according to the physical coordinates, and the size of each region is 1 / 4 of the total height of the light curtain. Then, according to the shielding frequency of each region, the region is further divided: the region with a shielding frequency of more than 80 times / s is further divided into 2 sub-regions. Each detection region is configured with an independent parameter control word (32 bits), which includes: region number (8 bits), transmission power level (8 bits), sampling frequency (8 bits), and detection threshold (8 bits). The region information is stored in the Flash memory and supports dynamic updating. This partitioning mechanism enables the system to adopt differentiated detection strategies for different regions.

[0108] S307, the transmitter respectively counts the shielding frequency of each detection region to determine the high-frequency shielding region.

[0109] The shielding frequency refers to the number of shielding events in a detection region per unit time, which is recorded by a 32-bit counter. The high-frequency shielding region refers to a detection region with a shielding frequency of more than 100 times / s. The spatial range of a detection region is determined by its start and end coordinates, and each region contains 16-32 transmitter-receiver unit pairs.

[0110] The distributed counter array is used in the statistical process, and each detection area is configured with an independent counting unit. The counting unit includes a 32-bit main counter (records the number of occlusions), a 16-bit timestamp (records the counting period), and an 8-bit state register (records the area state). The system reads the counting value every 10 ms, calculates the occlusion frequency f = count x 100 / time, where count is the counting value and time is the timestamp value (unit: 10 ms). When f>100, the state flag of the area is set to 1, marking it as a high-frequency occlusion area. The counting result is transmitted to the main controller through DMA to ensure real-time performance.

[0111] S308, the transmitter increases the signal sampling frequency of the high-frequency occlusion area to a preset sampling frequency threshold, and reduces the signal judgment sensitivity of the high-frequency occlusion area to a preset sensitivity threshold.

[0112] The signal sampling frequency refers to the rate of analog-to-digital conversion of the photoelectric signal. The preset sampling frequency threshold is set to 2MHz. The signal judgment sensitivity refers to the degree of response of the system to signal changes, and the preset sensitivity threshold is set to 50% of the standard sensitivity.

[0113] The following strategies are used for parameter adjustment of the high-frequency occlusion area: First, the ADC sampling frequency of the area is increased from the standard 1MHz to 2MHz, and more signal details are obtained by increasing the sampling rate. At the same time, the signal processing parameters are modified, and the signal judgment threshold is increased from 20% of the standard value to 50%, that is, the signal amplitude change exceeding 50% triggers the occlusion judgment. These parameters are set through 32-bit configuration registers, and the structure is: bit31-24 is the area ID, bit23-16 is the sampling frequency gear, bit15-8 is the judgment threshold, and bit7-0 is the control flag. The new parameter configuration is transmitted to each signal processing unit in real time through the SPI bus.

[0114] S309, the transmitter scans the detection light curtain according to a preset frame scanning period, and triggers the infrared light emitting unit of each transmitter group to emit an infrared light beam in each frame scanning period.

[0115] The frame scanning period is the time required to complete one full light curtain scan, and the standard value is 2ms. The transmitter group is the smallest control unit composed of multiple infrared light emitting units, and each group contains 4-8 light emitting units. The infrared light beam is the modulated infrared signal emitted by the light emitting unit.

[0116] The scanning process adopts time division multiplexing: the frame period of 2ms is divided into 32 slots, each slot length is 62.5μs. Each transmitting group occupies a slot, and triggers the light emitting units in the group in turn within its slot. The trigger signal is generated by FPGA, and precise timing control is adopted: the opening time of a single light emitting unit is 10μs, and the unit interval is 2μs. The transmitting power is modulated by PWM, and the PWM frequency is 100kHz. The scanning sequence is stored in the program memory, and can be dynamically modified by configuration registers. When an abnormal state of a certain transmitting group is detected, the system will automatically adjust the trigger timing of the group to ensure the reliability of detection.

[0117] S310, the receiver collects the signal strength value at the preset sampling time, when the signal strength value is greater than the signal collection threshold, it is determined as the light passing state, when the signal strength value is less than the signal collection threshold, it is determined as the light blocking state.

[0118] The preset sampling time refers to the specified time point of the intensity sampling of the received signal, which is usually set at 1-2μs after the transmitting signal is stable. The signal strength value is the amplitude of the electric signal converted from the optical signal received by the photodetector, which is represented by 12-bit digital quantity, and the range is 0-4095. The signal collection threshold is the decision threshold for distinguishing the light passing state and the light blocking state, and the standard value is set as 30% of the full scale (i.e. 1229). The light passing state indicates that the light path is not blocked, and the light blocking state indicates that the light path is blocked.

[0119] In a specific implementation, the receiver employs a high-speed photodiode array and a dedicated signal processing circuit. Each receiving unit contains a PIN photodiode (response time < 100 ns), a transimpedance amplifier (gain 100 kΩ, bandwidth 2 MHz), a signal conditioning circuit, and a 12-bit ADC (sampling rate 2 MSPS). The system clock is provided by the FPGA, and the selection of the sampling moment is realized by a programmable delay generator with a delay precision of 20 ns. When the transmitting unit emits a light beam, the delay generator generates a sampling trigger pulse, and the ADC samples at the rising edge of the pulse. After 8-point average filtering, the sampled data are compared with a threshold value: if the filtered signal value V > 1229, the light-on flag (1) is output; if V ≤ 1229, the light-off flag (0) is output. The comparison result is cached through a 16-bit shift register, which is updated once every frame period. At the same time, the system records 16 consecutive sampling results for signal stability analysis. To improve the anti-interference ability, a hysteresis comparison method is used: a 30% threshold (1229) is used in the transition from light-on to light-off, and a 35% threshold (1434) is used in the transition from light-off to light-on, to avoid misjudgment caused by signal jitter near the threshold. When a signal fluctuation is detected (the difference between two adjacent samples exceeds 20%), the system will start 50 fast samplings, and the light path state is determined through statistical analysis. All the judgment results are processed by a state machine and reported to the main controller through the CAN bus.

[0120] In some embodiments, steps S301 to S310 can be performed after step S210, or can be performed after step S106, which is not limited here.

[0121] It should be noted that in actual industrial production lines, the ultra-thin light curtain sensor is designed to be extremely compact, and a high-efficiency microcontroller STC8H1K08-36I is used to manage the entire signal flow. In the transmitter part, through the careful design of the shift register control, the infrared light-emitting diode is lit in turn in each frame scanning period, emitting accurate positioning infrared rays, while the receiver monitors the feedback signal in real time. Once an interrupt signal is received, the signal processing process is immediately started to ensure that whether the light condition changes or electromagnetic noise interference, the presence or absence of an object can be accurately determined, thereby triggering corresponding actions such as pausing the machine operation or alarming.

[0122] It should be noted that the hardware of the ultra-thin light curtain sensor is mainly composed of an infrared emitter A and an infrared receiver B. The infrared emitter A includes a first power module A1 for providing power, a transmission driving circuit A4 for driving an infrared emission lamp array A5 to emit an infrared light beam, a transmitter MCU A2 as a core control unit for coordinating the work of each module, a transmission signal processing circuit A3 for processing transmission signals, a working state indication circuit A8 for displaying the working state, and a synchronization signal input detection circuit A7 for detecting synchronization signals. The infrared receiver B has a power module B1 for power supply, an infrared receiving and collecting circuit B5 for collecting infrared signals, a receiver MCU B4 for controlling each module, a receiving signal processing circuit B2 for processing receiving signals, an output control circuit B3 for controlling external devices, a periodic scanning module B7 for periodic scanning, a working state indication circuit B8 for indicating the state, and a synchronization signal output circuit B9 for ensuring synchronization. The two are connected through the synchronization signal input detection circuit A7 and the synchronization signal output circuit B9, and work together to realize the light curtain detection function.

[0123] In the normal state, when the light curtain is in the light passing state (OSSD-ON), the indicator lights of the transmitter and the receiver are both green constant light, indicating that the light curtain is working normally and there is no obstruction; when the light curtain is in the light shielding state (OSSD-OFF), the indicator lights of the transmitter and the receiver are both red constant light, indicating that the light curtain is obstructed but the system is still running normally. In the abnormal state, if there is no Link signal, the indicator light of the transmitter will appear red and green flashing, and the receiver will have no corresponding display.

[0124] Among them, the working state of the transmitter is crucial to whether the whole system can accurately detect the obstruction of the object. At the beginning, the transmitter waits for a synchronization pulse, which ensures synchronization with the system timing. After receiving it, the selected infrared emission tube is lit to emit an 8us light beam, and then it is turned off. After each emission, the synchronization timer breakdown is increased by 1, and the shift register is shifted by 1 to select the next emission tube. When breakdown is greater than 50, the indicator light flashes according to the light passing condition and the timer6 value (when passing light, the indicator light is controlled according to the timer6 value, such as green constant light indicating normal; when shielding light, red constant light). During this process, timer0 (1ms interrupt) is used for indicating light flashing time control, which records time information by increasing timer6 by 1 through interrupt counting, provides basis for indicator light state control, and helps to monitor the working state of the transmitter;

[0125] Timer 0 and timer 1 cooperate to ensure the normal operation of the transmitter: Timer 0 (1ms) interrupt function is significant to the transmitter. It is configured as 1ms interrupt, mainly to accurately time the number of interrupts, and record it with a variable (such as timer6), and the variable is increased by 1 each time the interrupt occurs. At the same time, when timer6 is greater than 1000, it is judged whether to start the no synchronization signal indicator light blinking. If the synchronization signal is abnormal, the indicator light blinks according to the rules to alert the user to troubleshoot and repair, ensuring the stability of the transmitter and the system, and when timer 1 interrupts, it means that a frame of scanning will be completed, at which time the function reinitializes the shift register value and points to the first infrared transmitting tube, preparing for the next frame of scanning. This ensures that the transmitting tubes are sequentially cycled and stably scanned.

[0126] The PWM input interrupt process measures the synchronization signal period T by detecting the falling edge of the PWM signal. When the falling edge is detected, the measurement is started. The working state of the light curtain is judged according to the length of the period T, and different period values correspond to different states (such as 240us±20us, which may represent "light on and 1 frame scanning end", etc.). After judgment, the falling interrupt flag is cleared, the period value T is read and the flag bit (shading, receiving synchronization signal, etc.) is set, and finally the timer 1 initial value (140us) is reloaded.

[0127] The receiver in the light curtain sensor needs to monitor abnormalities, and external interrupt 0 is configured for the overcurrent signal. According to the circuit schematic, the GPIO is set as a falling edge interrupt, which is triggered when the level changes from high to low, responding quickly to overcurrent changes. At the same time, the interrupt priority is set to the highest, and when triggered, the processing program can be executed quickly, such as stopping dangerous operations and recording abnormal information.

[0128] The receiver timer 0 is initialized to 1000 microseconds, with a 24.000MHz clock, automatic reload mode, and careful configuration of the clock mode (1T mode) and the initial value. The 1T mode improves response speed and timing accuracy, and the initial value is set to generate an interrupt every 1000 microseconds. In actual operation, the timer 0 interrupt is used for overcurrent debouncing and protection removal. When overcurrent is detected, debouncing is controlled through timing and interrupt control to avoid false positives, and protection measures are taken after multiple detections are confirmed; after the overcurrent is removed, the removal time is controlled.

[0129] The receiver timer 1 sends synchronization pulses in timing mode (1T clock), with input capture function disabled, and the initial value is carefully set, the digital filter length is configured, and the falling edge capture mode is selected. The initial value sets the synchronization pulse period, the filter filters noise, and the falling edge capture accurately triggers the sending. In an infinite loop, when the timing interrupt flag is 1, the synchronization pulse is sent according to the program, ensuring synchronization between transmission and reception.

[0130] The ultrathin light curtain sensor in the embodiment of the present application will be described from the perspective of hardware processing. Please refer to Figure 4Fig. 1 is a schematic diagram of an embodiment of the present application.

[0131] It should be noted that, Figure 4 The structure of the ultra-thin light curtain sensor shown is only an example and should not limit the function and use range of the embodiment of the present application.

[0132] As Figure 4 shown, the ultra-thin light curtain sensor includes a central processing unit (CPU) 401 which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage portion 408 into a random access memory (RAM) 403, such as performing the method described in the above embodiment. In the RAM 403, various programs and data required for system operation are also stored. The CPU 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0133] The following components are connected to the I / O interface 405: an input portion 406 including an audio input device, a push button switch, and the like; an output portion 407 including a liquid crystal display (LCD), an audio output device, an indicator, and the like; a storage portion 408 including a hard disk and the like; and a communication portion 409 including a network interface card such as a LAN (Local Area Network) card, a modem, and the like. The communication portion 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as necessary. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is attached to the drive 410 as necessary, so that a computer program read therefrom is installed into the storage portion 408 as necessary.

[0134] In particular, according to the embodiment of the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, the embodiment of the present application includes a computer program product including a computer program carried on a computer-readable medium, the computer program containing a computer program for executing the method shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network by the communication portion 409 and / or installed from the removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, various functions defined in the present application are performed.

[0135] Note that specific examples of computer readable storage media can include but are not limited to an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, computer readable storage media can be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.

[0136] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functional processes, and operational processes, according to various embodiments of the present disclosure. Each block in the flow diagrams and the block diagrams can represent a module, a procedure, or a part of code that comprises one or more executable instructions for implementing the specific logical functions specified for the block. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures.

[0137] Specifically, the ultra-thin light curtain sensor of the embodiment includes a processor and a memory, and the memory stores a computer program. When the computer program is executed by the processor, the anti-interference method of the ultra-thin light curtain sensor is realized.

[0138] As another aspect, the present disclosure also provides a computer readable storage medium. The storage medium can be included in the ultra-thin light curtain sensor described in the above embodiments, or can exist independently without being assembled into the ultra-thin light curtain sensor. The storage medium carries one or more computer programs. When the one or more computer programs are executed by a processor of the ultra-thin light curtain sensor, the ultra-thin light curtain sensor realizes the anti-interference method of the ultra-thin light curtain sensor provided in the above embodiments.

[0139] The above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than limit them. Although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still make modifications to the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present disclosure.

[0140] In the above embodiments, the term "when" can be interpreted to mean "if" or "after" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "on determining" or "if detecting (a stated condition or event)" can be interpreted to mean "if determining" or "in response to determining" or "on detecting (a stated condition or event)" or "in response to detecting (a stated condition or event)" depending on the context.

[0141] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by a computer program instructing the relevant hardware to complete, and the program can be stored in a computer readable storage medium. When the program is executed, the processes of the above-mentioned embodiments can be included. The aforementioned storage medium includes ROM, random access memory (RAM), magnetic disk or optical disk, and various storage media that can store program codes.

Claims

1. An anti-interference method for an ultra-thin light curtain sensor, characterized in that, The method is applied to an ultra-thin light curtain sensor, and comprises the following steps: The emitter emits infrared light beams in sequence according to an infrared light emitting array to form a detection light curtain; The receiver receives the infrared light beams and converts them into electrical signals to obtain initial detection signals, which are used to represent a state in which the light curtain is blocked; The receiver removes environmental light interference signals in the initial detection signals through band-pass filtering, compares the initial detection signals after filtering with standard signal characteristics, and regards the initial detection signals with a correlation with the standard signal characteristics exceeding a preset matching threshold as effective detection signals, wherein the standard signal characteristics refer to a set of characteristic parameters of standard infrared light signals collected by the light curtain sensor under ideal working conditions, i.e., working conditions without interference and blocking; The receiver records the effective detection signals and corresponding relationships between each emitting unit and each receiving unit, establishes a light path mapping relationship based on the effective detection signals, and obtains a plurality of light paths, wherein the emitting unit refers to a single light emitting diode in the infrared light emitting array, and the receiving unit refers to a single photoelectric detection device in the receiver; The receiver continuously monitors environmental light intensities at positions of each receiving unit, marks a light path as a target light path when an environmental light intensity detected by a receiving unit corresponding to the light path exceeds a preset threshold, and adjusts an emission power of an emitting unit corresponding to the target light path by the emitter when there is a target light path in the plurality of light paths.

2. The method of claim 1, wherein, The step of removing environmental light interference signals in the initial detection signals by the receiver through band-pass filtering specifically comprises the following steps: The receiver detects environmental light intensity values received by each receiving unit in the receiver when the emitter stops emitting; The receiver sets filtering parameters of a band-pass filter according to the environmental light intensity values; The receiver performs band-pass filtering on the initial detection signals according to the filtering parameters to obtain the initial detection signals after filtering.

3. The method of claim 1, wherein, The step of recording the effective detection signals and corresponding relationships between each emitting unit and each receiving unit by the receiver and establishing a light path mapping relationship based on the effective detection signals to obtain a plurality of light paths specifically comprises the following steps: The receiver records numbers of each emitting unit and numbers of receiving units corresponding to each emitting unit; The receiver records signal intensity values of the effective detection signals between each pair of emitting unit and receiving unit; The receiver forms a light path information by combining the numbers of the emitting units, the numbers of the receiving units and the signal intensity values to obtain the plurality of light paths.

4. The method of claim 1, wherein, The step of adjusting the emission power of the emitting unit corresponding to the target light path by the emitter specifically comprises the following steps: The emitter increases the emission power of the emitting unit corresponding to the target light path to a preset power threshold; The receiver updates a signal collection threshold of the target light path according to the preset power threshold.

5. The method of claim 1, wherein, After the step of emitting infrared light beams in sequence according to an infrared light emitting array by the emitter to form a detection light curtain, the method further comprises the following steps: The emitter collects real-time environmental light data of a current environment; The emitter divides the infrared light emitting array into multiple emission groups according to the real-time ambient light data, and assigns different emission timing and power parameters to each emission group; When the real-time ambient light intensity is greater than a first preset threshold, the emitter increases the emission power of the emission group to a preset first power threshold and reduces the emission frequency to a preset first frequency threshold; When the real-time ambient light intensity is less than a second preset threshold, the emitter reduces the emission power of the emission group to a preset second power threshold and increases the emission frequency to a preset second frequency threshold, the first preset threshold is greater than the second preset threshold, the preset first power threshold is greater than the preset second power threshold, and the preset first frequency threshold is less than the preset second frequency threshold.

6. The method of claim 1, wherein, After the step of adjusting the emission power of the emission unit corresponding to the target light path by the emitter, the method further comprises: The emitter counts the number of occlusions of the detection light curtain within a preset time window, and determines that it is in a frequent occlusion state when the number of occlusions is greater than a preset occlusion frequency threshold; In the frequent occlusion state, the emitter divides the detection light curtain into multiple detection regions; The emitter respectively counts the occlusion frequency of each detection region to determine a high-frequency occlusion region; The emitter increases the signal sampling frequency of the high-frequency occlusion region to a preset sampling frequency threshold and reduces the signal judgment sensitivity of the high-frequency occlusion region to a preset sensitivity threshold.

7. The method of claim 5, wherein, After the step of adjusting the emission power of the emission unit corresponding to the target light path by the emitter, the method further comprises: The emitter scans the detection light curtain according to a preset frame scanning period, and triggers the emission unit of each emission group to emit an infrared light beam in turn within each frame scanning period; The receiver collects the signal intensity value at a preset sampling time, and determines that it is in a light passing state when the signal intensity value is greater than a signal collection threshold, and determines that it is in a light blocking state when the signal intensity value is less than the signal collection threshold.

8. An ultra-thin light curtain sensor, characterized by, The ultra-thin light curtain sensor comprises one or more processors and a memory; the memory is coupled with the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors invoke the computer instructions to make the ultra-thin light curtain sensor execute the method in any one of claims 1-7.

9. A computer-readable storage medium comprising instructions, characterized in that, When the instructions run on the ultra-thin light curtain sensor, the ultra-thin light curtain sensor executes the method in any one of claims 1-7.

10. A computer program product, characterised in that, When the computer program product runs on the ultra-thin light curtain sensor, the ultra-thin light curtain sensor executes the method in any one of claims 1-7.

Citation Information

Patent Citations

  • System and method for bidirectional detecting anti-light-inference elevator light screen

    CN101274726A

  • Photoelectric sensor anti-interference method, system and device and storage medium

    CN116793394A