Anti-interference detection method and device for photodiode type photoelectric sensor

By calculating the time difference of the received light signal within the detection period in the through-beam photoelectric sensor, it is determined whether the light projection period is met, thus solving the problem of low detection accuracy caused by external random light interference and achieving higher detection accuracy and anti-interference capability.

CN116009105BActive Publication Date: 2026-07-03OMRON SHANGHAI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
OMRON SHANGHAI
Filing Date
2022-12-27
Publication Date
2026-07-03

Smart Images

  • Figure CN116009105B_ABST
    Figure CN116009105B_ABST
Patent Text Reader

Abstract

This application provides an anti-interference detection method and apparatus for a through-beam photoelectric sensor. The method includes: acquiring multiple received light signals within a detection period, wherein the detection period is longer than at least two illumination periods; calculating the time difference between any two of the multiple received light signals; determining whether the time difference satisfies the illumination period; and determining that a valid signal exists within the detection period when at least one of the time differences satisfies the illumination period. According to this application embodiment, interference from external stray light on the through-beam photoelectric sensor can be resisted, thereby improving the detection accuracy of the through-beam photoelectric sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to through-beam photoelectric sensors, and more particularly to an anti-interference detection method and apparatus for through-beam photoelectric sensors. Background Technology

[0002] Photoelectric sensors are used to detect the presence of objects in a detection area. A photoelectric sensor has a light-emitting device and a light-receiving device. The light-emitting device illuminates the detection area, and the light-receiving device receives the light transmitted through or reflected from the detection area, generating an electrical signal corresponding to the received light, i.e., a detection signal. This detection signal is amplified into an amplified signal, which is then compared with a threshold value. The result of this comparison indicates the presence of an object in the detection area.

[0003] It should be noted that the above introduction to the technical background is only for the purpose of providing a clear and complete explanation of the technical solutions of this application and facilitating understanding by those skilled in the art. It should not be assumed that these technical solutions are known to those skilled in the art simply because they have been described in the background section of this application. Summary of the Invention

[0004] The inventors of this application have discovered that, since the light emission and light reception of a through-beam photoelectric sensor are separate, the light emission and light reception cannot know each other's operating modes. Therefore, it is impossible to reduce the impact of external stray light on the output by limiting the light reception time, as is the case with a reflective photoelectric sensor.

[0005] Currently, for through-beam photoelectric sensors, the intensity of external stray light entering the light-receiving device can be reduced through methods such as filters and threshold settings to minimize malfunctions caused by external stray light. However, with the rapid development of industrial automation and changes in the sensor's operating environment, the occurrence and frequency of external stray light interference are becoming increasingly frequent and complex. Existing technologies are becoming less and less capable of dealing with external stray light, leading to product malfunctions.

[0006] On the other hand, there is no way to deal with strong external light interference signals in principle. The stronger the signal, the higher the probability of malfunction. In application scenarios, more and more industrial frequency conversion modulation light sources are being used, and the impact of external light on products is becoming increasingly significant.

[0007] To address at least one of the above-mentioned technical problems, this application provides an anti-interference detection method and apparatus for a through-beam photoelectric sensor, thereby solving the problem of low detection accuracy of the through-beam photoelectric sensor due to the influence of external random light.

[0008] According to a first aspect of the embodiments of this application, an anti-interference detection method for a through-beam photoelectric sensor is provided, comprising:

[0009] Acquire multiple light-receiving signals within a detection period, wherein the detection period is longer than at least one light-emission period;

[0010] Calculate the time difference between any two of the plurality of received light signals;

[0011] Determine whether the time difference satisfies the light projection cycle. If at least one of the time differences satisfies the light projection cycle, determine that a valid signal exists within the detection cycle.

[0012] According to a second aspect of the embodiments of this application, an anti-interference detection device for a through-beam photoelectric sensor is provided, comprising:

[0013] An acquisition unit acquires multiple light-receiving signals within a detection period, wherein the detection period is longer than at least one light-emitting period;

[0014] The calculation unit calculates the time difference between any two of the plurality of received light signals;

[0015] The first determining unit determines whether the time difference satisfies the light projection cycle, and when at least one of the time differences satisfies the light projection cycle, it determines that a valid signal exists within the detection cycle.

[0016] According to a third aspect of the embodiments of this application, a through-beam photoelectric sensor is provided, comprising:

[0017] The light-receiving circuit receives the light signal;

[0018] An anti-interference detection circuit includes a controller module, which performs anti-interference detection based on the received light signal; and...

[0019] The output circuit outputs the detection results.

[0020] One of the beneficial effects of the embodiments of this application is that, according to the embodiments of this application, it is possible to resist the interference of external random light on the through-beam photoelectric sensor and improve the detection accuracy of the through-beam photoelectric sensor.

[0021] Specific embodiments of this application are disclosed in detail with reference to the following description and accompanying drawings, indicating how the principles of this application can be adopted. It should be understood that the embodiments of this application are not limited in scope. Within the spirit and scope of the appended claims, embodiments of this application include many changes, modifications, and equivalents.

[0022] Features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, combined with features in other embodiments, or substituted for features in other embodiments.

[0023] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, whole, step, or component, but does not exclude the presence or addition of one or more other features, wholes, steps, or components. Attached Figure Description

[0024] The accompanying drawings, which form part of the specification, are used to provide a further understanding of the embodiments of this application and illustrate the implementation methods of this application, together with the textual description, to explain the principles of this application. Obviously, the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any creative effort. In the drawings:

[0025] Figure 1 This is a schematic diagram of an anti-interference detection method for a through-beam photoelectric sensor according to an embodiment of this application;

[0026] Figure 2 This is a schematic diagram of the light signal received by the light receiving device;

[0027] Figure 3 This is another schematic diagram of the anti-interference detection method of the through-beam photoelectric sensor according to an embodiment of this application;

[0028] Figure 4 This is a schematic diagram of an anti-interference detection device for a through-beam photoelectric sensor according to an embodiment of this application;

[0029] Figure 5 This is a schematic diagram of a through-beam photoelectric sensor in this embodiment. Detailed Implementation

[0030] Referring to the accompanying drawings, the foregoing and other features of this application will become apparent from the following description. Specific embodiments of this application are specifically disclosed in the description and drawings, illustrating partial implementations in which the principles of this application may be employed. It should be understood that this application is not limited to the described embodiments; rather, it includes all modifications, variations, and equivalents falling within the scope of the appended claims.

[0031] In the embodiments of this application, the terms "first," "second," etc., are used to distinguish different elements by name, but do not indicate the spatial arrangement or chronological order of these elements, and these elements should not be limited by these terms. The term "and / or" includes any one or more of the terms listed in association and all combinations thereof. The terms "comprising," "including," "having," etc., refer to the presence of the stated features, elements, components, or assemblies, but do not exclude the presence or addition of one or more other features, elements, components, or assemblies.

[0032] In the embodiments of this application, the singular forms "a," "the," etc., including the plural forms, should be broadly understood as "a kind" or "a class" rather than limited to the meaning of "an." Furthermore, the term "the" should be understood to include both the singular and plural forms, unless the context explicitly indicates otherwise. Additionally, the term "according to" should be understood as "at least partially based on…," and the term "based on" should be understood as "at least partially based on…," unless the context explicitly indicates otherwise.

[0033] Features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, combined with features in other embodiments, or substituted for features in other embodiments. The term "comprising / including" as used herein means the presence of a feature, integral, step, or component, but does not exclude the presence or addition of one or more other features, integrals, steps, or components.

[0034] The embodiments of this application will be described below with reference to the accompanying drawings and specific implementation details.

[0035] Example 1

[0036] Embodiment 1 of this application provides an anti-interference detection method for a through-beam photoelectric sensor.

[0037] Figure 1 This is a schematic diagram of an anti-interference detection method for a through-beam photoelectric sensor according to an embodiment of this application. Figure 1 As shown, the anti-interference detection method for a through-beam photoelectric sensor according to an embodiment of this application includes:

[0038] 101: Acquire multiple light-receiving signals within a detection period, which is longer than at least one light-emitting period;

[0039] 102: Calculate the time difference between any two of the plurality of received light signals;

[0040] 103: Determine whether the time difference satisfies the light projection cycle. If at least one of the time differences satisfies the light projection cycle, determine that a valid signal exists within the detection cycle.

[0041] It is worth noting that the above appendix Figure 1 The methods described in this application are merely illustrative and are not limited thereto. For example, the execution order of various operations can be appropriately adjusted, and additional operations can be added or some operations can be removed. Those skilled in the art can make appropriate modifications based on the above description, and are not limited to the above-described embodiments. Figure 1 The records.

[0042] In the above embodiments, the detection period is a pre-set fixed period, which can be greater than at least one light emission period, for example, greater than two light emission periods.

[0043] In the above embodiments, since the light emission signal emitted by the light emission device satisfies the light emission period, the corresponding light received signal should also satisfy the light emission period. Therefore, this application determines whether a valid signal exists within the detection period based on the relationship between the time difference between multiple light received signals within the detection period and the light emission period. If at least one time difference satisfies the light emission period, a valid signal is considered to exist. This can resist interference from external stray light on the through-beam photoelectric sensor and improve the detection accuracy of the through-beam photoelectric sensor.

[0044] by Figure 2 The projected light signal and external chaotic light signal are shown as examples.

[0045] like Figure 2 As shown, there are two light-emitting signals, which satisfy the light-emitting period T_L1. Their corresponding light-receiving signals are ① and ③. There is only one external random light signal, and its corresponding light-receiving signal is ②.

[0046] In the above example, for a through-beam sensor, it is impossible to know whether the received light signal comes from the light emitted by the light projector or from interfering light. Therefore, this application determines whether the received light signal is normal by calculating the time difference between the received light signals to determine whether the period of the received light signal is consistent with the light emitted by the light projector.

[0047] like Figure 2 As shown, by timing all acquired light signals within a detection period (GATE) and then calculating the time differences between them, it is possible to determine whether these signals meet the projection period of the transmitter. Figure 2 In the process, an external random light signal is interspersed between the normal light projection signals. Therefore, signals ① and ③ are normal signals, while signal ② is an interference signal. This application calculates the time from signal ① to signal ② (i.e., the time difference between signal ① and signal ②), the time from signal ② to signal ③ (i.e., the time difference between signal ② and signal ③), and the time from signal ① to signal ③ (i.e., the time difference between signal ① and signal ③). It can then determine that only the time from signal ① to signal ③ is the correct light projection cycle time. Therefore, this time is determined to be ON, meaning that a valid signal exists within this detection cycle.

[0048] In the above embodiments, when none of the time differences satisfy the projection cycle, it means that the projected signals are all interference signals, and it is determined that there is no valid signal within the detection cycle. For example, if the time from signal ① to signal ②, the time from signal ② to signal ③, and the time from signal ① to signal ③ all fail to satisfy the projection cycle, it is considered that there is no valid signal within the detection cycle, and at this time, the through-beam photoelectric sensor can output OFF.

[0049] In the above embodiments, the order in which the time differences are calculated is not limited. For example, the time difference between signal ① and signal ② can be calculated first, then the time difference between signal ② and signal ③, and finally the time difference between signal ① and signal ③. Other orders are also possible. Furthermore, in the above embodiments, when a time difference satisfies the aforementioned light-emitting cycle, the calculation of time differences between other received signals can be stopped. For example, if the time difference between signal ① and signal ③ is calculated first, since this time difference satisfies the light-emitting cycle, it is unnecessary to calculate the time differences between signal ① and signal ②, and between signal ② and signal ③. This saves computational resources and improves detection efficiency.

[0050] In the above embodiments, the time difference satisfying the projection period means that the time difference and the projection period are the same. In practical application scenarios of through-beam photoelectric sensors, due to factors such as distance limitations between the projection device and the receiving device or accuracy limitations of the through-beam photoelectric sensor, the time difference and the projection period may not be exactly the same. Therefore, in some embodiments, the time difference satisfying the projection period can also mean that the difference between the time difference and the projection period is within a preset range.

[0051] In some embodiments, such as Figure 1 As shown, the method also includes:

[0052] 104: Determine whether the number of light-receiving signals within the detection period is greater than a first threshold. If the number of light-receiving signals within the detection period exceeds the first threshold, determine that there is no valid signal within the detection period.

[0053] In the above embodiments, if the frequency of external stray light is high, according to the embodiments of this application, continuous external stray light may be mistaken for a small amount of external stray light mixed in with normal light projection signals, leading to false alarms. To address this problem, this application judges the number of received light signals obtained within the detection period. If the number of received light signals exceeds a certain threshold (called the first threshold), it is considered that there is no valid signal within the detection period, that is, the data under the current condition is unreliable. In this case, the previous state can be output to prevent false alarms.

[0054] In the above embodiments, the value of the first threshold is not limited. In some embodiments, the region of the first threshold is related to the detection period. For example, if the detection period is relatively long, since the probability of receiving a large number of light signals within the time range of the detection period is relatively high, the first threshold can be set to a relatively large value; as another example, if the detection period is relatively short, since the probability of receiving a large number of light signals within the time range of the detection period is relatively low, the first threshold can be set to a relatively small value.

[0055] In this embodiment of the application, in order to further filter out light signals with a relatively low probability, another threshold (called the second threshold) can be set to filter light signals with a relatively small amplitude.

[0056] For example, in step 101, the amplitudes of multiple light-receiving signals within the acquired detection period can be compared with a second threshold, and signals with amplitudes less than the second threshold can be filtered out. Thus, in step 102, the time difference between any two light-receiving signals among the multiple light-receiving signals with amplitudes greater than the second threshold is calculated only.

[0057] In the above example, since the amplitude of the received signal corresponding to the light emitted by the light-emitting device is fixed, if the amplitude of the received signal is small, the possibility of the received signal being a valid signal is not high. This application reduces the amount of calculation and improves the detection efficiency of the through-beam photoelectric sensor by first filtering out signals with low probability.

[0058] For example, in step 103, the amplitude or average of the two received signals that satisfy the time difference of the light emission period can be compared with the second threshold. If the amplitudes are both greater than the second threshold or the average of the amplitudes is greater than the second threshold, it can be determined that there is a valid signal within the detection period.

[0059] In the example above, after finding the light-receiving signal that satisfies the time difference of the light-emitting period, the light-receiving signal can be filtered by a second threshold to avoid it being an invalid signal, thereby improving the detection accuracy of the through-beam photoelectric sensor.

[0060] In the above embodiments, the value of the second threshold is not limited and can be set arbitrarily based on experience. In some embodiments, the second threshold is related to the amplitude of the emitted light signal.

[0061] Figure 3 This is another schematic diagram of the anti-interference detection method of the through-beam photoelectric sensor according to an embodiment of this application, as shown below. Figure 3 As shown, the method includes:

[0062] 301: Perform light reception monitoring;

[0063] 302: Determine whether a signal has been captured. If yes, continue to step 303; otherwise, return to step 301.

[0064] 303: Measure the time difference of the received light signal;

[0065] 304: Measures the amplitude of the received light signal;

[0066] 305: Record the corresponding data;

[0067] 306: Determine whether the detection period has arrived. If the determination is yes (that is, the time of the detection period has arrived), proceed to step 307; otherwise (that is, the time of the detection period has not arrived), continue with step 306.

[0068] 307: Acquire sampling data within the detection period;

[0069] 308: Determine if the signal quantity is sufficient. If yes (i.e., the signal quantity does not exceed the limit), proceed to step 309. Otherwise (i.e., the signal quantity exceeds the limit), it is determined that there is no normal signal, and OFF can be output.

[0070] 309: Determine whether the projection cycle is met (i.e., whether the time difference meets the projection cycle). If the determination is yes (i.e., the time difference meets the projection cycle), proceed to step 310. Otherwise (i.e., the time difference does not meet the projection cycle), it is determined that there is no normal signal and OFF can be output.

[0071] 310: Determine whether the signal amplitude (i.e., whether the amplitude or average amplitude of the received signal corresponding to the time difference of the light projection cycle is greater than the threshold) is satisfied. If the determination is yes (i.e., the amplitude or average amplitude of the received signal corresponding to the time difference of the light projection cycle is greater than the threshold), it is determined that there is a normal signal and ON can be output; otherwise (i.e., the amplitude or average amplitude of the received signal corresponding to the time difference of the light projection cycle is not greater than the threshold), it is determined that there is no normal signal and OFF can be output.

[0072] It is worth noting that the above appendix Figure 3 The method described in this application is merely illustrative and is not limited thereto. For example, the execution order of the various operations can be appropriately adjusted; for instance, step 310 can precede step 303 or step 308, etc. Furthermore, other operations can be added or some operations can be removed. Those skilled in the art can make appropriate modifications based on the above description, and are not limited to the above-described embodiments. Figure 3 The records.

[0073] The above embodiments are merely illustrative examples of embodiments of this application, but this application is not limited thereto, and appropriate modifications can be made based on the above embodiments. For example, the above embodiments can be used alone, or one or more of the above embodiments can be combined.

[0074] According to the embodiments of this application, the existence of a valid signal within a detection period is determined based on the relationship between the time difference between multiple light-receiving signals and the light projection period. A valid signal is considered to exist if at least one time difference satisfies the light projection period requirement. This allows for resistance to interference from external stray light on the through-beam photoelectric sensor, improving its detection accuracy.

[0075] Example 2

[0076] Embodiment 2 of this application provides an anti-interference detection device for a through-beam photoelectric sensor. The principle of this device in solving the problem is similar to that of the embodiment in the first aspect, and the similarities will not be repeated.

[0077] Figure 4 This is a schematic diagram of an anti-interference detection device for a through-beam photoelectric sensor according to an embodiment of this application. Figure 4 As shown, the anti-interference detection device 40 for a through-beam photoelectric sensor in this embodiment includes: an acquisition unit 41, a calculation unit 42, and a first determination unit 43.

[0078] In this embodiment of the application, the acquisition unit 41 is used to acquire multiple light-receiving signals within a detection period, wherein the detection period is greater than at least one light-projection period; the calculation unit 42 is used to calculate the time difference between any two light-receiving signals among the multiple light-receiving signals; and the first determination unit is used to determine whether the time difference satisfies the light-projection period, and when at least one of the time differences satisfies the light-projection period, it is determined that there is a valid signal within the detection period.

[0079] In some embodiments, the first determining unit 43 determines that there is no valid signal within the detection period when none of the time differences satisfy the light projection period.

[0080] In some embodiments, when a time difference satisfies the light emission period, the calculation unit 42 stops calculating the time difference between other light-receiving signals.

[0081] In some embodiments, the time difference satisfying the projection cycle means:

[0082] The time difference is the same as the light projection period, or the difference between the time difference and the light projection period is within a preset range.

[0083] In some embodiments, such as Figure 4As shown, the anti-interference detection device 40 also includes:

[0084] The second determining unit 44 determines whether the number of light-receiving signals within the detection period is greater than a first threshold. If the number of light-receiving signals within the detection period exceeds the first threshold, it determines that there is no valid signal within the detection period.

[0085] In some embodiments, the value of the first threshold is related to the detection period.

[0086] In some embodiments, the average amplitude of the two received signals that satisfy the time difference of the light emission period is greater than a second threshold.

[0087] The above embodiments are merely illustrative examples of embodiments of this application, but this application is not limited thereto, and appropriate modifications can be made based on the above embodiments. For example, the above embodiments can be used alone, or one or more of the above embodiments can be combined.

[0088] It is worth noting that the above description only covers the components or modules relevant to this application, but this application is not limited thereto. The anti-interference detection device 40 for the through-beam photoelectric sensor may also include other components or modules, and for details regarding these components or modules, please refer to relevant technologies.

[0089] For the sake of simplicity, Figure 4 The diagram only exemplifies the connection relationships or signal flow between various components or modules; however, those skilled in the art should understand that various related technologies, such as bus connections, can be employed. The aforementioned components or modules can be implemented using hardware facilities such as processors and / or memory; this application does not limit the scope of the embodiments.

[0090] According to the anti-interference detection device of this application embodiment, the existence of a valid signal within the detection period is determined based on the relationship between the time difference between multiple received signals and the light emission period. If at least one time difference satisfies the light emission period, a valid signal is considered to exist. Therefore, it can resist interference from external stray light on the through-beam photoelectric sensor and improve the detection accuracy of the through-beam photoelectric sensor.

[0091] Example 3

[0092] Embodiment 3 of this application provides a through-beam photoelectric sensor, which uses the method of Embodiment 1 for anti-interference detection. The contents that are the same as in Embodiment 1 will not be repeated.

[0093] Figure 5 This is a schematic diagram of a through-beam photoelectric sensor according to this embodiment, as shown below. Figure 5As shown, the through-beam photoelectric sensor 50 includes:

[0094] The light-receiving circuit 51 receives the light signal;

[0095] Anti-interference detection loop 52 includes a controller module 521, which performs anti-interference detection based on the received light signal; and

[0096] Output circuit 53 outputs the detection results.

[0097] The above description only covers the components relevant to this application, but this application is not limited thereto. The through-beam photoelectric sensor in the embodiments of this application may also include other components, such as a light projection circuit, a power supply circuit, etc. For details regarding these components, please refer to related technologies.

[0098] In some embodiments, the light-receiving circuit 51 consists of a photodiode PD, an I / V sampling resistor, and an amplifier circuit. This application is not limited to this; additional or fewer components may be added.

[0099] In some embodiments, the output circuit 53 may be composed of an output transistor. This application is not limited to this; additional or fewer components may be added.

[0100] In some embodiments, such as Figure 5 As shown, the through-beam photoelectric sensor 50 also includes:

[0101] The display circuit 54 displays the detection results of the anti-interference detection circuit 52, for example, by displaying characters or by displaying indicator lights, etc.

[0102] In the above embodiments, the display circuit 54 may consist of a display LED and an external circuit, but this application is not limited thereto.

[0103] In some embodiments, such as Figure 5 As shown, the anti-interference detection circuit 52 also includes:

[0104] Signal triggering module 522 acquires multiple light-receiving signals within a detection period, wherein the detection period is greater than at least one light-emitting period; and

[0105] The timing module 523 calculates the time difference between any two of the plurality of light-receiving signals.

[0106] In the above embodiment, the controller module 521 determines whether the time difference meets the light emission cycle based on the signals from the signal triggering module 522 and the timing module 523. When at least one time difference meets the light emission cycle, it is determined that there is a valid signal within the detection cycle.

[0107] In some embodiments, such as Figure 5 As shown, the anti-interference detection circuit 52 also includes:

[0108] The analog-to-digital conversion module 524, connected to the signal triggering module 522, is used to convert the plurality of received light signals into digital signals and provide them to the controller module 521. This allows the controller module 521 to perform corresponding control using the digital signals.

[0109] In the above embodiments, the signal triggering module 522 is used to capture changes in the external light-receiving signal, which can be implemented by a comparator. The specific implementation process can refer to step 101 of Embodiment 1; the timing module 523 is used to calculate the triggering time interval of the light-receiving signal (i.e., the time difference between light-receiving signals). The specific implementation process can refer to step 102 of Embodiment 1; the analog-to-digital converter (ADC) module 524 is used to sample the analog signal into a digital signal; the controller module 521 is used to receive instructions from the signal triggering module 522, control the ADC module 524 and the timing module 523, and determine the validity of the signal through algorithm processing. The specific implementation process can refer to steps 103 and 104 of Embodiment 1. Since each step has been described in detail in Embodiment 1, its content is incorporated here and will not be repeated here.

[0110] In the above embodiments, the controller module 521 can be implemented using an MCU (microcontroller). Thus, by combining the hardware implementation principle with the resources of the MCU and its peripherals, the basic anti-interference principle of hardware and software integration is achieved. This not only solves problems that existing technologies can address, but also utilizes the flexibility of software to solve problems that existing technologies cannot.

[0111] The following is combined with Figure 3 The working principle of the through-beam photoelectric sensor according to the embodiments of this application will be explained. In the following description, it is taken as an example that the light-receiving monitoring part (steps 301 to 305) and the data judgment part (steps 306 to 310) are started simultaneously and processed in parallel within one detection cycle.

[0112] Regarding the light-receiving monitoring section:

[0113] First, after the light receiving monitoring section is started, the comparator (signal trigger module 522) is turned on. At this time, the detected interference light and the signal of its own light projection device will enter the signal trigger module 522 through the light receiving circuit 51.

[0114] Next, the signal triggering module 522 first performs the initial filtering. When the voltage of the signal reaches the threshold of the comparator, it triggers the ADC module 524 and the timing module 523.

[0115] Then, after the ADC module 524 is started, the signal flows from the signal triggering module 522 to the ADC module 524. The ADC module 524 captures the signal through analog-to-digital conversion and then sends it to the controller module 521 (MCU) for calculation.

[0116] Finally, after the timing module 523 starts, it records the time when the signal trigger module 522 triggers the timing module 523 and sends it to the controller module 521 (MCU) for calculation.

[0117] Regarding the data judgment part:

[0118] After the data judgment section starts, it waits for one cycle to allow the light receiving monitoring section to obtain sufficient data for judgment. When one cycle is completed, the data judgment section acquires the data obtained by the light receiving monitoring section and makes a judgment.

[0119] First, the controller module 521 needs to confirm whether the data obtained within a cycle exceeds the limit value (the number of times the signal triggering module 522 is triggered). If the limit is exceeded, the current judgment maintains the previous output state.

[0120] Next, the controller module 521 calculates the time intervals (time differences) between the triggered signals by permuting and combining them to confirm whether the design value (light emission period) is met. If no signal meets the requirement, the current judgment is OFF; if a signal meets the requirement, the ADC values ​​corresponding to the group of signals are averaged and compared with a threshold (second threshold). If the average value meets the threshold requirement, the current judgment is ON; otherwise, the current judgment is OFF.

[0121] After this assessment is completed, a new assessment cycle will be restarted.

[0122] The above embodiments are merely illustrative examples of embodiments of this application, but this application is not limited thereto, and appropriate modifications can be made based on the above embodiments. For example, the above embodiments can be used alone, or one or more of the above embodiments can be combined.

[0123] It is worth noting that the above description only covers the components or modules relevant to this application, but this application is not limited thereto. The through-beam photoelectric sensor 50 may also include other components or modules, and for details regarding these components or modules, please refer to relevant technologies.

[0124] For the sake of simplicity, Figure 5The diagram only exemplifies the connection relationships or signal flow between various components or modules; however, those skilled in the art should understand that various related technologies, such as bus connections, can be employed. The aforementioned components or modules can be implemented using hardware facilities such as processors and / or memory; this application does not limit the scope of the embodiments.

[0125] According to the through-beam photoelectric sensor of this application embodiment, the existence of a valid signal within the detection period is determined based on the relationship between the time difference between multiple received signals within the detection period and the projection period. A valid signal is considered to exist if at least one time difference satisfies the projection period. Therefore, interference from external stray light on the through-beam photoelectric sensor can be resisted, improving the detection accuracy of the through-beam photoelectric sensor.

[0126] This application also provides a computer-readable program, wherein when the program is executed in a processor, the program causes the computer to perform the method described in embodiment 1 in the processor.

[0127] This application also provides a storage medium storing a computer-readable program, wherein the computer-readable program causes a computer to execute the method described in embodiment 1 in a processor.

[0128] This application also provides a controller, which includes a memory and a processor, the processor being configured to implement the method described in embodiment 1.

[0129] The oversampling device or data compression device described in conjunction with the embodiments of this application can be directly embodied in hardware, a software module executed by a processor, or a combination of both. These hardware modules can be implemented, for example, by using a field-programmable gate array (FPGA) to embed these software modules.

[0130] The software module can reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. A storage medium can be coupled to the processor, enabling the processor to read information from and write information to the storage medium; or the storage medium can be an integral part of the processor. The processor and storage medium can reside in an ASIC. The software module can be stored in the memory of a mobile terminal or in a memory card that can be inserted into the mobile terminal. For example, if the electronic device uses a high-capacity MEGA-SIM card or a high-capacity flash memory device, the software module can be stored in the MEGA-SIM card or the high-capacity flash memory device.

[0131] The oversampling device or data compression device described in this embodiment can be implemented as a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or any suitable combination thereof for performing the functions described in this application. It can also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors communicating with a DSP, or any other such configuration.

[0132] The present application has been described above with reference to specific embodiments. However, those skilled in the art should understand that these descriptions are exemplary and not intended to limit the scope of protection of the present application. Those skilled in the art can make various modifications and variations to the present application based on its spirit and principles, and these modifications and variations are also within the scope of the present application.

[0133] Regarding the above-described embodiments disclosed in this example, the following notes are also disclosed:

[0134] 1. An anti-interference detection method for a through-beam photoelectric sensor, comprising:

[0135] Acquire multiple light-receiving signals within a detection period, wherein the detection period is longer than at least one light-emission period;

[0136] Calculate the time difference between any two of the plurality of received light signals;

[0137] Determine whether the time difference meets the light projection cycle. If at least one of the time differences meets the light projection cycle, determine that there is a valid signal within the detection cycle.

[0138] 2. The method according to Appendix 1, wherein the method further comprises:

[0139] Determine whether the number of light-receiving signals within the detection period exceeds a first threshold. If the number of light-receiving signals within the detection period exceeds the first threshold, determine that there is no valid signal within the detection period.

[0140] 3. According to the method described in Appendix 1, wherein,

[0141] When none of the time differences satisfy the light projection period, it is determined that there is no valid signal within the detection period.

[0142] 4. According to the method described in Appendix 1, wherein,

[0143] When one of the time differences satisfies the light projection cycle, the calculation of the time difference between other light-receiving signals is stopped.

[0144] 5. According to the method described in Appendix 1, the time difference satisfying the projection cycle means:

[0145] The time difference is the same as the light projection period, or the difference between the time difference and the light projection period is within a preset range.

[0146] 6. According to the method described in Appendix 2, wherein,

[0147] The value of the first threshold is related to the detection period.

[0148] 7. The method according to any one of Appendix 1 to 6, wherein,

[0149] The average amplitude of the two received signals that satisfy the time difference of the light projection cycle is greater than the second threshold.

Claims

1. An anti-interference detection device for a photodiode sensor, characterized in that, The device includes: An acquisition unit acquires multiple light-receiving signals within a detection period, wherein the detection period is longer than at least one light-emitting period; The calculation unit calculates the time difference between any two light-receiving signals whose amplitudes are greater than the second threshold when the amplitude of the light-receiving signal is greater than the second threshold. The first determining unit determines whether the time difference satisfies the light projection cycle. When at least one of the time differences satisfies the light projection cycle, it determines that a valid signal exists within the detection cycle. When none of the time differences satisfy the light projection cycle, it determines that no valid signal exists within the detection cycle. The calculation unit stops calculating the time difference between other light-receiving signals when one of the time differences satisfies the light projection cycle. Wherein, the average amplitude of the two received signals that satisfy the time difference of the light projection cycle is greater than the second threshold.

2. The apparatus according to claim 1, wherein, The device further includes: The second determining unit determines whether the number of light-receiving signals within the detection period is greater than a first threshold. If the number of light-receiving signals within the detection period exceeds the first threshold, it determines that there is no valid signal within the detection period.

3. The apparatus according to claim 1, wherein, The time difference satisfying the light projection cycle means: The time difference is the same as the light projection period, or the difference between the time difference and the light projection period is within a preset range.

4. The apparatus according to claim 2, wherein, The value of the first threshold is related to the detection period.

5. A through-beam photoelectric sensor, characterized in that, The through-beam photoelectric sensor includes: The light-receiving circuit receives the light signal; An anti-interference detection circuit includes a controller module, which performs anti-interference detection based on the received light signal. The output circuit outputs the detection result. The anti-interference detection circuit also includes: A signal triggering module acquires multiple light-receiving signals within a detection period, wherein the detection period is longer than at least one light-emitting period. The timing module calculates the time difference between any two light-receiving signals whose amplitudes are greater than the second threshold when the amplitude of the light-receiving signal is greater than the second threshold. The controller module determines whether the time difference meets the light projection cycle based on signals from the signal triggering module and the timing module. If at least one time difference meets the light projection cycle, it determines that a valid signal exists within the detection cycle. If none of the time differences meet the light projection cycle, it determines that no valid signal exists within the detection cycle. The timing module stops calculating the time difference between other light-receiving signals when one of the time differences meets the light projection cycle. Wherein, the average amplitude of the two received signals that satisfy the time difference of the light projection cycle is greater than the second threshold.

6. The through-beam photoelectric sensor according to claim 5, wherein, The anti-interference detection circuit also includes: An analog-to-digital converter module converts the plurality of received light signals into digital signals and provides them to the controller module.