Light curtain sensor, detection method and device, receiving end, medium and product

By using a hysteresis comparator and synchronization signal mechanism in the light curtain sensor, the amplitude change and level transition number of the response signal are detected, which solves the accuracy problem of the light curtain sensor caused by electromagnetic interference in the industrial field and improves the accuracy of the detection results.

CN118915180APending Publication Date: 2024-11-08HANGZHOU HIKROBOT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411078465.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In industrial settings, light curtain sensors are susceptible to electromagnetic interference from devices such as motors and relays, which can lead to inaccurate response signals and affect the accuracy of detection results.

Method used

By employing a hysteresis comparator and a synchronization signal mechanism, the presence of interference signals is determined by detecting changes in the amplitude and the number of level transitions of the response signal. If necessary, the transmitter is controlled to re-emit light to ensure that the receiver determines the detection result based on the accurate response signal.

Benefits of technology

This improves the accuracy of the light curtain sensor's detection results, reduces the impact of interference signals on detection, and ensures the accuracy of the response signal and the reliability of the detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118915180A_ABST
    Figure CN118915180A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a light curtain sensor, a detection method, a detection device, a receiving end, a medium and a product, and relates to the technical field of photoelectric sensors, the light curtain sensor comprises a transmitting end comprising a first controller and an emitter, and a receiving end comprising a second controller, a hysteresis comparator and a receiver; the first controller is used for controlling the first emitter which needs to emit light at present to emit light according to the synchronizing signal sent by the second controller; the hysteresis comparator is used for acquiring a response signal obtained by a first receiver corresponding to the first transmitter in response to the received light, and generating a result signal representing a comparison result of the amplitude of the response signal and a preset reference amplitude; the second controller is used for sending a first synchronization signal to the first controller under the condition that the level jump frequency of the result signal is greater than a second threshold value; and determining a detection result based on the response signal under the condition that the detection result is not greater than the second threshold value. Therefore, the accuracy of the detection result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of photoelectric sensors, and in particular to a light curtain sensor, a detection method, a device, a receiving end, a medium and a product. Background Art

[0002] The light curtain sensor is a special photoelectric sensor that includes a transmitter and a receiver that are separated and placed opposite to each other. The transmitter can generate a light array at a fixed interval along the length direction, and the receiver can receive the light emitted by the transmitter to form a light curtain. Each light can correspond to an optical axis. The receiver can obtain a response signal based on the received light and detect whether the optical axis corresponding to each light is blocked based on the response signal. For example, by scanning an object through a light curtain and combining the detection results obtained based on the response signal, the external dimensions of the object can be monitored and measured.

[0003] However, the industrial sites where light curtain sensors are located are often equipped with other equipment such as motors and relays. The response signal is easily interfered by the electromagnetic waves generated by these devices, and the accuracy is not high, which will affect the accuracy of the detection results. Therefore, how to ensure that the receiving end determines the detection result based on the response signal with higher accuracy to improve the accuracy of the detection result has become an urgent problem to be solved. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a light curtain sensor, a detection method, a device, a receiving end, a medium and a product to ensure that the receiving end determines the detection result based on a response signal with higher accuracy to improve the accuracy of the detection result.

[0005] The specific technical solutions are as follows:

[0006] According to a first aspect of an embodiment of the present application, a light curtain sensor is provided, the light curtain sensor comprising: a transmitting end and a receiving end; the transmitting end comprises: a first controller and a plurality of transmitters; the receiving end comprises: a second controller, a hysteresis comparator, and a plurality of receivers; the plurality of transmitters correspond to the plurality of receivers one by one, and the receiver corresponding to one transmitter is used to receive the light emitted by the transmitter;

[0007] The first controller is used to control the first emitter that currently needs to emit light to emit light according to the synchronization signal sent by the second controller;

[0008] The hysteresis comparator is used to obtain a response signal obtained by the first receiver corresponding to the first transmitter in response to the received light, and generate a result signal indicating a comparison result between the amplitude of the current response signal and a preset reference amplitude; wherein the absolute value of the difference between the preset reference amplitude and the specified amplitude is less than a first threshold; and the specified amplitude indicates the amplitude of the signal generated by any receiver when the corresponding transmitter does not transmit light;

[0009] The second controller is used to send a first synchronization signal to the first controller when the number of level jumps of the current result signal is greater than a second threshold; wherein the first synchronization signal is used to instruct the first controller to control the first emitter to re-emit light; and when the number of level jumps of the current result signal is not greater than the second threshold, determine the detection result at the detection position corresponding to the first emitter based on the current response signal.

[0010] Optionally, the second controller is further used to obtain a current result signal from the hysteresis comparator and determine the number of level jumps of the current result signal.

[0011] Optionally, the receiving end further includes: a counter;

[0012] The counter is used to obtain the current result signal from the hysteresis comparator, determine the number of level jumps of the current result signal, and send the number of level jumps of the current result signal to the second controller.

[0013] Optionally, the second controller is also used to send a second synchronization signal to the first controller when the number of level jumps of the current result signal is not greater than the second threshold; wherein the second synchronization signal is used to instruct the first controller to control the next emitter of the first emitter to emit light.

[0014] Optionally, the second controller is further configured to generate an alarm when a specified number of first synchronization signals to the first transmitter are continuously sent.

[0015] Optionally, the preset reference amplitude includes: an upper limit reference amplitude and a lower limit reference amplitude;

[0016] The hysteresis comparator is specifically used to generate a level jump to obtain a result signal when the current response signal changes from higher than the upper limit reference amplitude to lower than the lower limit reference amplitude, and changes from lower than the lower limit reference amplitude to higher than the upper limit reference amplitude.

[0017] Optionally, the transmitting end further includes: at least one first D flip-flop and a plurality of AND gates; in accordance with a first preset order, the first output pin of a previous first D flip-flop is connected to the first input pin of a subsequent first D flip-flop, and the first input pin of the first first D flip-flop is connected to the first controller; the plurality of AND gates correspond one-to-one to the plurality of emitters; among the emitters corresponding to the AND gates connected to the output pins of a first D flip-flop, the emitter corresponding to the AND gate connected to the first output pin of the first D flip-flop is the first to emit light; the first output pin of a first D flip-flop is the output pin corresponding to the first input pin of the first D flip-flop;

[0018] The receiving end further includes: at least one second D flip-flop and a plurality of analog switches; according to a second preset order, the second output pin of the previous second D flip-flop is connected to the second input pin of the next second D flip-flop, and the second input pin of the first second D flip-flop is connected to the second controller; the plurality of analog switches correspond to the plurality of receivers one by one; among the receivers corresponding to the analog switches connected to the output pins of a second D flip-flop, the receiver corresponding to the analog switch connected to the second output pin of the second D flip-flop is the first to receive light; the second output pin of a second D flip-flop is the output pin corresponding to the second input pin of the second D flip-flop;

[0019] The first controller is specifically configured to send a clock signal to the plurality of first D flip-flops according to a synchronization signal sent by the second controller; send a trigger signal to the first first D flip-flop in the first preset sequence; and send an enable signal to the plurality of AND gates;

[0020] Each first D flip-flop is used to send a trigger signal to an AND gate corresponding to a transmitter that currently needs to emit light according to the clock signal and a trigger signal received by its first input pin;

[0021] Each AND gate is used to send a trigger signal to a corresponding transmitter according to the received trigger signal and the enable signal when receiving the trigger signal;

[0022] Each transmitter is used to transmit light to its corresponding receiver when receiving a trigger signal sent by the corresponding AND gate;

[0023] The second controller is used to send a clock signal to the plurality of second D flip-flops according to a synchronization signal, and to send a trigger signal to the first second D flip-flop in the second preset sequence;

[0024] Each second D flip-flop is used to send a trigger signal to an analog switch corresponding to a receiver that currently needs to receive light according to the clock signal and a trigger signal received by its second input pin;

[0025] Each analog switch is used to connect the receiver corresponding to itself and the hysteresis comparator according to the received trigger signal when receiving the trigger signal;

[0026] Each receiver is used to send a response signal obtained in response to the received light to the hysteresis comparator through its corresponding analog switch.

[0027] According to a second aspect of an embodiment of the present application, a detection method is provided, which is applied to a second controller in a receiving end of a light curtain sensor, wherein the receiving end further includes: a hysteresis comparator and multiple receivers; the light curtain sensor further includes: a transmitting end; the transmitting end includes: a first controller and multiple transmitters; the multiple transmitters correspond to the multiple receivers one by one, and the receiver corresponding to one transmitter is used to receive the light emitted by the transmitter; the first controller is used to control the first transmitter that currently needs to emit light to emit light according to the synchronization signal sent by the second controller; the hysteresis comparator is used to obtain a response signal obtained by the first receiver corresponding to the first transmitter in response to the received light, and generate a result signal representing the comparison result of the amplitude of the current response signal with the preset reference amplitude; the absolute value of the difference between the preset reference amplitude and the specified amplitude is less than the first threshold value; the specified amplitude represents the amplitude of the signal generated by any receiver when the corresponding transmitter does not emit light;

[0028] The method comprises:

[0029] Determine whether the number of level jumps of the current result signal is greater than a second threshold;

[0030] When the number of level jumps of the current result signal is greater than the second threshold, sending a first synchronization signal to the first controller; wherein the first synchronization signal is used to instruct the first controller to control the first emitter to re-emit light;

[0031] When the number of level transitions of the current result signal is not greater than the second threshold, the detection result at the detection position corresponding to the first transmitter is determined based on the current response signal.

[0032] Optionally, before determining whether the number of level transitions of the current result signal is greater than a second threshold, the method further includes:

[0033] The current result signal is obtained from the hysteresis comparator, and the number of level jumps of the current result signal is determined.

[0034] Optionally, the receiving end further includes: a counter; the counter is used to obtain the current result signal from the hysteresis comparator, determine the number of level jumps of the current result signal, and send the number of level jumps of the current result signal to the second controller;

[0035] Before determining whether the number of level transitions of the current result signal is greater than a second threshold, the method further includes:

[0036] Receive the number of level transitions of the current result signal sent by the counter.

[0037] Optionally, the method further includes:

[0038] When the number of level jumps of the current result signal is not greater than the second threshold, a second synchronization signal is sent to the first controller; wherein the second synchronization signal is used to instruct the first controller to control the next emitter of the first emitter to emit light.

[0039] Optionally, the method further includes:

[0040] When a specified number of first synchronization signals directed to the first transmitter are continuously sent, an alarm is issued.

[0041] Optionally, the preset reference amplitude includes: an upper limit reference amplitude and a lower limit reference amplitude; the hysteresis comparator is specifically used to generate a level jump to obtain a result signal when the current response signal changes from higher than the upper limit reference amplitude to lower than the lower limit reference amplitude, and changes from lower than the lower limit reference amplitude to higher than the upper limit reference amplitude.

[0042] Optionally, the transmitting end further includes: at least one first D flip-flop and a plurality of AND gates; in accordance with a first preset order, the first output pin of a previous first D flip-flop is connected to the first input pin of a subsequent first D flip-flop, and the first input pin of the first first D flip-flop is connected to the first controller; the plurality of AND gates correspond one-to-one to the plurality of emitters; among the emitters corresponding to the AND gates connected to the output pins of a first D flip-flop, the emitter corresponding to the AND gate connected to the first output pin of the first D flip-flop is the first to emit light; the first output pin of a first D flip-flop is the output pin corresponding to the first input pin of the first D flip-flop;

[0043] The receiving end further includes: at least one second D flip-flop and a plurality of analog switches; according to a second preset order, the second output pin of the previous second D flip-flop is connected to the second input pin of the next second D flip-flop, and the second input pin of the first second D flip-flop is connected to the second controller; the plurality of analog switches correspond to the plurality of receivers one by one; among the receivers corresponding to the analog switches connected to the output pins of a second D flip-flop, the receiver corresponding to the analog switch connected to the second output pin of the second D flip-flop is the first to receive light; the second output pin of a second D flip-flop is the output pin corresponding to the second input pin of the second D flip-flop;

[0044] The first controller is specifically used to send a clock signal to the multiple first D flip-flops according to the synchronization signal sent by the second controller; send a trigger signal to the first first D flip-flop in the first preset order; and send an enable signal to the multiple AND gates; each first D flip-flop is used to send a trigger signal to the AND gate corresponding to the emitter that currently needs to emit light according to the clock signal and the trigger signal received by its own first input pin; each AND gate is used to send a trigger signal to the corresponding emitter according to the received trigger signal and the enable signal when receiving the trigger signal; each emitter is used to emit light to its corresponding receiver when receiving the trigger signal sent by the corresponding AND gate;

[0045] Each second D flip-flop is used to send a trigger signal to an analog switch corresponding to a receiver that currently needs to receive light according to the clock signal and a trigger signal received by its second input pin; each analog switch is used to connect the corresponding receiver to the hysteresis comparator according to the received trigger signal when receiving the trigger signal; each receiver is used to send a response signal obtained in response to the received light to the hysteresis comparator through its corresponding analog switch;

[0046] The method further comprises:

[0047] A clock signal is sent to the plurality of second D flip-flops according to the synchronization signal, and a trigger signal is sent to the first second D flip-flop in the second preset sequence.

[0048] According to a third aspect of an embodiment of the present application, a detection device is provided, which is applied to a second controller in a receiving end of a light curtain sensor, wherein the receiving end further includes: a hysteresis comparator and multiple receivers; the light curtain sensor further includes: a transmitting end; the transmitting end includes: a first controller and multiple transmitters; the multiple transmitters correspond to the multiple receivers one by one, and the receiver corresponding to one transmitter is used to receive the light emitted by the transmitter; the first controller is used to control the first transmitter that currently needs to emit light to emit light according to the synchronization signal sent by the second controller; the hysteresis comparator is used to obtain a response signal obtained by the first receiver corresponding to the first transmitter in response to the received light, and generate a result signal representing the comparison result of the amplitude of the current response signal with the preset reference amplitude; the absolute value of the difference between the preset reference amplitude and the specified amplitude is less than the first threshold value; the specified amplitude represents the amplitude of the signal generated by any receiver when the corresponding transmitter does not emit light;

[0049] The device comprises:

[0050] A first determination module, used to determine whether the number of level jumps of the current result signal is greater than a second threshold;

[0051] A first synchronization signal sending module, configured to send a first synchronization signal to the first controller when the number of level jumps of the current result signal is greater than a second threshold; wherein the first synchronization signal is used to instruct the first controller to control the first emitter to re-emit light;

[0052] The detection result determination module is used to determine the detection result at the detection position corresponding to the first transmitter based on the current response signal when the number of level jumps of the current result signal is not greater than the second threshold.

[0053] Optionally, the device further comprises:

[0054] The result signal acquisition module is used to acquire the current result signal from the hysteresis comparator and determine the level jump number of the current result signal before determining whether the level jump number of the current result signal is greater than the second threshold.

[0055] Optionally, the receiving end further includes: a counter; the counter is used to obtain the current result signal from the hysteresis comparator, determine the number of level jumps of the current result signal, and send the number of level jumps of the current result signal to the second controller;

[0056] The device also includes:

[0057] The number receiving module is used to receive the number of level jumps of the current result signal sent by the counter before determining whether the number of level jumps of the current result signal is greater than the second threshold.

[0058] Optionally, the device further comprises:

[0059] The second synchronization signal sending module is used to send a second synchronization signal to the first controller when the number of level jumps of the current result signal is not greater than the second threshold; wherein the second synchronization signal is used to instruct the first controller to control the next emitter of the first emitter to emit light.

[0060] Optionally, the device further comprises:

[0061] The alarm module is used to generate an alarm when a specified number of first synchronization signals directed to the first transmitter are continuously sent.

[0062] Optionally, the preset reference amplitude includes: an upper limit reference amplitude and a lower limit reference amplitude; the hysteresis comparator is specifically used to generate a level jump to obtain a result signal when the current response signal changes from higher than the upper limit reference amplitude to lower than the lower limit reference amplitude, and changes from lower than the lower limit reference amplitude to higher than the upper limit reference amplitude.

[0063] Optionally, the transmitting end further includes: at least one first D flip-flop and a plurality of AND gates; in accordance with a first preset order, the first output pin of a previous first D flip-flop is connected to the first input pin of a subsequent first D flip-flop, and the first input pin of the first first D flip-flop is connected to the first controller; the plurality of AND gates correspond one-to-one to the plurality of emitters; among the emitters corresponding to the AND gates connected to the output pins of a first D flip-flop, the emitter corresponding to the AND gate connected to the first output pin of the first D flip-flop is the first to emit light; the first output pin of a first D flip-flop is the output pin corresponding to the first input pin of the first D flip-flop;

[0064] The receiving end further includes: at least one second D flip-flop and a plurality of analog switches; according to a second preset order, the second output pin of the previous second D flip-flop is connected to the second input pin of the next second D flip-flop, and the second input pin of the first second D flip-flop is connected to the second controller; the plurality of analog switches correspond to the plurality of receivers one by one; among the receivers corresponding to the analog switches connected to the output pins of a second D flip-flop, the receiver corresponding to the analog switch connected to the second output pin of the second D flip-flop is the first to receive light; the second output pin of a second D flip-flop is the output pin corresponding to the second input pin of the second D flip-flop;

[0065] The first controller is specifically used to send a clock signal to the multiple first D flip-flops according to the synchronization signal sent by the second controller; send a trigger signal to the first first D flip-flop in the first preset order; and send an enable signal to the multiple AND gates; each first D flip-flop is used to send a trigger signal to the AND gate corresponding to the emitter that currently needs to emit light according to the clock signal and the trigger signal received by its own first input pin; each AND gate is used to send a trigger signal to the corresponding emitter according to the received trigger signal and the enable signal when receiving the trigger signal; each emitter is used to emit light to its corresponding receiver when receiving the trigger signal sent by the corresponding AND gate;

[0066] Each second D flip-flop is used to send a trigger signal to an analog switch corresponding to a receiver that currently needs to receive light according to the clock signal and a trigger signal received by its second input pin; each analog switch is used to connect the corresponding receiver to the hysteresis comparator according to the received trigger signal when receiving the trigger signal; each receiver is used to send a response signal obtained in response to the received light to the hysteresis comparator through its corresponding analog switch;

[0067] The device also includes:

[0068] A clock signal sending module is used to send a clock signal to the multiple second D flip-flops according to a synchronization signal, and to send a trigger signal to the first second D flip-flop in the second preset sequence.

[0069] According to a fourth aspect of the embodiment of the present application, a receiving end of a light curtain sensor is further provided, including:

[0070] Memory, used to store computer programs;

[0071] The processor is used to implement any of the above-mentioned detection methods when executing the program stored in the memory.

[0072] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above-mentioned detection methods is implemented.

[0073] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned detection methods.

[0074] A light curtain sensor provided in an embodiment of the present application comprises: a transmitting end and a receiving end; the transmitting end comprises: a first controller and a plurality of transmitters; the receiving end comprises: a second controller, a hysteresis comparator, and a plurality of receivers; the plurality of transmitters correspond to the plurality of receivers one by one, and the receiver corresponding to one transmitter is used to receive the light emitted by the transmitter; the first controller is used to control the first transmitter that currently needs to emit light to emit light according to the synchronization signal sent by the second controller; the hysteresis comparator is used to obtain a response signal obtained by the first receiver corresponding to the first transmitter in response to the received light, and generate a result signal representing the comparison result of the current response signal and the preset reference signal; the second controller is used to send a first synchronization signal to the first controller when the number of level jumps of the current result signal is greater than the second threshold value; wherein the first synchronization signal is used to instruct the first controller to control the first transmitter to re-emit light; and when the number of level jumps of the current result signal is not greater than the second threshold value, determine the detection result at the detection position corresponding to the first transmitter based on the current response signal.

[0075] Based on the light curtain sensor provided in the embodiment of the present application, for any receiver, when the transmitter corresponding to the receiver does not emit light, the amplitude of the signal generated by the receiver can be called the specified amplitude. Since the frequency of the interference signal is often high, that is, the interference signal fluctuates frequently, and the amplitude of the interference signal tends to fluctuate within a certain range above and below the specified amplitude, that is, the amplitude of the interference signal tends to fluctuate within a preset reference amplitude whose absolute value of the difference with the specified amplitude is less than the first threshold. Therefore, if there is an interference signal in the signal (i.e., response signal) obtained by the corresponding receiver (i.e., the first receiver) in response to the received light for the transmitter (i.e., the first transmitter) that currently needs to emit light, the amplitude of the response signal will change multiple times above and below the preset reference amplitude. Correspondingly, the number of level jumps of the result signal representing the comparison result of the amplitude of the response signal and the preset reference amplitude generated by the hysteresis comparator will also be large.

[0076] That is to say, if the number of level jumps of the result signal is greater than the second threshold, it can indicate that there is an interference signal in the response signal. In this case, the second controller in the receiving end can send a first synchronization signal to the first controller in the transmitting end, so that the first controller can control the first emitter to re-emit light. If the number of level changes of the result signal is not greater than the second threshold, it means that there is no interference signal in the response signal. In this case, the detection result at the detection position corresponding to the first emitter can be determined based on the response signal, and a detection result with higher accuracy can be obtained.

[0077] In this way, it is possible to detect whether there is an interference signal in the response signal obtained by the receiver corresponding to the transmitter that currently needs to emit light in response to the received light. And when the interference signal is detected, the transmitter that currently needs to emit light can re-emit the light. When it is detected that there is no interference signal, the receiving end will determine the detection result based on the obtained response signal, which can ensure that the receiving end determines the detection result based on the response signal with higher accuracy, thereby improving the accuracy of the detection result.

[0078] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0080] Figure 1 A schematic diagram of the structure of the light curtain sensor 10 provided in an embodiment of the present application;

[0081] Figure 2 A waveform diagram of a response signal without interference provided in an embodiment of the present application;

[0082] Figure 3 A waveform diagram of a response signal with interference provided in an embodiment of the present application;

[0083] Figure 4 A waveform diagram of a response signal and a corresponding result signal provided in an embodiment of the present application;

[0084] Figure 5 A schematic diagram of the structure of a light curtain sensor provided in an embodiment of the present application;

[0085] Figure 6 A schematic diagram of the structure of another light curtain sensor provided in an embodiment of the present application;

[0086] Figure 7 A schematic diagram of a detection method provided in an embodiment of the present application;

[0087] Figure 8 A schematic diagram of the structure of a detection device provided in an embodiment of the present application;

[0088] Fig. 9 A schematic diagram of the structure of a receiving end of a light curtain sensor provided in an embodiment of the present application. DETAILED DESCRIPTION

[0089] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0090] The light curtain sensor is a special photoelectric sensor that includes a transmitter and a receiver that are separated and placed opposite to each other. The transmitter can generate a light array at a fixed interval along the length direction, and the receiver can receive the light emitted by the transmitter to form a light curtain. Each light can correspond to an optical axis. The receiver can obtain a response signal (also called an analog signal) based on the received light, and detect whether the optical axis corresponding to each light is blocked based on the response signal. For example, by scanning an object through a light curtain and combining the detection results obtained based on the response signal, the external dimensions of the object can be monitored and measured.

[0091] However, the industrial sites where the light curtain sensors are located are often equipped with other equipment such as motors and relays. The response signal is easily interfered by the electromagnetic waves generated by these devices, and the accuracy is not high, which will affect the accuracy of the detection results. And because the frequency of the interference signal and the frequency of the response signal are of the same order of magnitude, if the interference signal is filtered out by an external filter circuit, part of the response signal will also be filtered out. Therefore, the method of filtering out the interference signal by an external filter circuit will also result in the accuracy of the response signal and the accuracy of the detection results being low.

[0092] In order to ensure that the receiving end determines the detection result based on the response signal with high accuracy, so as to improve the accuracy of the detection result, the embodiment of the present application provides a light curtain sensor. Figure 1 , Figure 1 A schematic diagram of the structure of the light curtain sensor 10 provided in the embodiment of the present application. The light curtain sensor 10 includes: a transmitting end 101 and a receiving end 102; the transmitting end 101 includes: a first controller 1011 and multiple transmitters 1012; the receiving end 102 includes: a second controller 1021, a hysteresis comparator 1022, and multiple receivers 1023; the multiple transmitters 1012 correspond to the multiple receivers 1023 one by one, and the receiver corresponding to one transmitter is used to receive the light emitted by the transmitter.

[0093] The first controller 1011 is used to control the first emitter that currently needs to emit light to emit light according to the synchronization signal sent by the second controller 1021.

[0094] The hysteresis comparator 1022 is used to obtain a response signal obtained by the first receiver corresponding to the first transmitter in response to the received light, and generate a result signal indicating a comparison result between the amplitude of the current response signal and a preset reference amplitude.

[0095] The absolute value of the difference between the preset reference amplitude and the specified amplitude is less than the first threshold; the specified amplitude represents the amplitude of the signal generated by any receiver when the corresponding transmitter does not emit light.

[0096] The second controller 1021 is used for sending a first synchronization signal to the first controller 1011 when the number of level jumps of the current result signal is greater than the second threshold value; wherein the first synchronization signal is used to instruct the first controller 1011 to control the first emitter to re-emit light; and when the number of level jumps of the current result signal is not greater than the second threshold value, determining the detection result at the detection position corresponding to the first emitter based on the current response signal.

[0097] Based on the light curtain sensor 10 provided in the embodiment of the present application, for any receiver, when the transmitter corresponding to the receiver does not emit light, the amplitude of the signal generated by the receiver can be called the specified amplitude. Since the frequency of the interference signal is often high, that is, the interference signal fluctuates frequently, and the amplitude of the interference signal tends to fluctuate within a certain range above and below the specified amplitude, that is, the amplitude of the interference signal tends to fluctuate within a preset reference amplitude whose absolute value of the difference with the specified amplitude is less than the first threshold. Therefore, if there is an interference signal in the signal (i.e., response signal) obtained by the corresponding receiver (i.e., the first receiver) in response to the received light for the transmitter (i.e., the first transmitter) that currently needs to emit light, the amplitude of the response signal will change above and below the preset reference amplitude many times. Correspondingly, the number of level jumps of the result signal representing the comparison result of the amplitude of the response signal and the preset reference amplitude generated by the hysteresis comparator 1022 will also be large.

[0098] That is to say, if the number of level jumps of the result signal is greater than the second threshold, it can indicate that there is an interference signal in the response signal. In this case, the second controller 1021 in the receiving end 102 can send a first synchronization signal to the first controller 1011 in the transmitting end 101, so that the first controller 1011 can control the first emitter to re-emit light. If the number of level changes of the result signal is not greater than the second threshold, it means that there is no interference signal in the response signal. In this case, the detection result at the detection position corresponding to the first emitter can be determined based on the response signal, and a detection result with higher accuracy can be obtained.

[0099] In this way, it is possible to detect whether there is an interference signal in the response signal obtained by the receiver corresponding to the transmitter that currently needs to emit light in response to the received light. And when the interference signal is detected, the transmitter that currently needs to emit light can re-emit the light. When it is detected that there is no interference signal, the receiving end 102 will determine the detection result based on the obtained response signal, which can ensure that the receiving end 102 determines the detection result based on the response signal with higher accuracy, thereby improving the accuracy of the detection result.

[0100] In the embodiment of the present application, the transmitter 1012 corresponds to the receiver 1023 one by one, that is, the number of the transmitters 1012 is the same as the number of the receivers 1023. One transmitter 1012 can transmit light to the corresponding receiver 1023, and accordingly, an optical axis can be obtained between the transmitter 1012 and the corresponding receiver 1023, and the corresponding receiver 1023 can obtain a response signal in response to the received light.

[0101] The second controller 1021 can send a synchronization signal to the first controller 1011. Specifically, the synchronization signal may include the first synchronization signal and the second synchronization signal in the subsequent embodiments. Accordingly, the first controller 1011 can control the emitter (i.e., the first emitter) that currently needs to emit light to emit light according to the received synchronization signal. The receiver corresponding to the first emitter (i.e., the first receiver) can obtain a response signal in response to the received light. Furthermore, the hysteresis comparator 1022 can also obtain the response signal, and compare the amplitude of the obtained response signal with the preset reference amplitude to obtain a comparison result of the response signal and the preset reference amplitude, that is, to obtain a result signal representing the comparison result.

[0102] When the amplitude of the response signal changes once above or below the preset reference amplitude, the result signal representing the comparison result of the amplitude of the response signal and the preset reference amplitude generated by the hysteresis comparator 1022 generates a level jump. When any receiver does not emit light at the corresponding transmitter, the amplitude of the signal generated by the receiver can be called the specified amplitude. Since the frequency of the interference signal is often high, that is, the interference signal fluctuates up and down more frequently, and the amplitude of the interference signal tends to fluctuate within a certain range above and below the specified amplitude, that is, the amplitude of the interference signal tends to fluctuate around the preset reference amplitude whose absolute value of the difference with the specified amplitude is less than the first threshold. Therefore, if there is an interference signal in the response signal, the amplitude of the response signal will change above and below the preset reference amplitude many times. Correspondingly, the number of level jumps of the result signal will also be large.

[0103] Furthermore, if the number of level jumps of the result signal is greater than the second threshold, it can also indicate that there is an interference signal in the response signal. In this case, the second controller 1021 can send a first synchronization signal to the first controller 1011 so that the first controller 1011 can control the first emitter to re-emit light. The second threshold can be set according to actual conditions and is not specifically limited. For example, the second threshold can be 3 or 4. In addition, the sensitivity of detecting interference signals can be adjusted by adjusting the second threshold. The larger the second threshold, the lower the sensitivity of detecting interference signals.

[0104] If the number of level changes of the result signal is not greater than the second threshold, it means that there is no interference signal in the response signal. In this case, the detection result at the detection position corresponding to the first transmitter can be determined based on the response signal with higher accuracy, and a detection result with higher accuracy can be obtained. For example, the detection position corresponding to a transmitter can indicate the position where the optical axis between the transmitter and the corresponding receiver passes, and accordingly, the detection result can indicate whether the optical axis between the transmitter and the corresponding receiver is blocked.

[0105] See also Figure 2 , Figure 2 A waveform diagram of a response signal without interference provided in an embodiment of the present application. Figure 2 The waveform shown includes a plurality of cycles, and the waveform in the frame 20 is one cycle. A waveform of one cycle can represent a response signal obtained by a receiver in response to the received light. Figure 2 The waveform of the response signal when the optical axis is not blocked and the waveform of the response signal when the optical axis is blocked are shown in FIG. When the optical axis is blocked, the peak-to-peak value of the waveform becomes smaller. Figure 3 , Figure 3 A waveform diagram of a response signal with interference provided in an embodiment of the present application. Figure 2 Similarly, a cycle can represent a response signal obtained by a receiver in response to the received light. Figure 3 At the position indicated by the middle arrow, the waveform fluctuates up and down frequently, indicating that there is an interference signal at this position.

[0106] In one embodiment, the preset reference amplitude includes: an upper limit reference amplitude and a lower limit reference amplitude.

[0107] The hysteresis comparator 1022 is specifically used to generate a level jump to obtain a result signal when the current response signal changes from higher than the upper limit reference amplitude to lower than the lower limit reference amplitude, and changes from lower than the lower limit reference amplitude to higher than the upper limit reference amplitude.

[0108] In an embodiment of the present application, the absolute value of the difference between the upper limit reference amplitude (also referred to as VREFH) and the specified amplitude (also referred to as VREF1) is less than the first threshold, and the absolute value of the difference between the lower limit reference amplitude (also referred to as VREFL) and the specified amplitude is also less than the first threshold. For example, the upper limit reference amplitude may be greater than the specified amplitude, and the lower limit reference amplitude may be less than the specified amplitude. The interval formed by the upper limit reference amplitude and the lower limit reference amplitude may be referred to as a hysteresis interval. The sensitivity of the hysteresis comparator to the change in the voltage value of the response signal can be adjusted as needed by adjusting the hysteresis interval. The larger the hysteresis interval, the lower the sensitivity of the hysteresis comparator 1022 to the change in the amplitude of the response signal; the smaller the hysteresis interval, the higher the sensitivity of the hysteresis comparator to the change in the amplitude of the response signal.

[0109] The hysteresis comparator 1022 generates a level jump when the amplitude of the response signal changes from higher than the upper limit reference amplitude to lower than the lower limit reference amplitude, and changes from lower than the lower limit reference amplitude to higher than the upper limit reference amplitude. That is, the resulting signal undergoes a level jump.

[0110] In this way, the change between the specified amplitude and the amplitude of the response signal can be prevented from affecting the number of level jumps of the result signal, and the accuracy of determining whether there is interference based on the number of level jumps of the result signal can be improved. That is, the accuracy of detecting interference can be improved, and it is further ensured that the receiving end 102 can determine the detection result based on the response signal with higher accuracy, thereby improving the accuracy of the detection result.

[0111] See also Figure 4 , Figure 4 A waveform diagram of a response signal and a corresponding result signal provided in an embodiment of the present application. Waveform 41 represents the result signal output by the hysteresis comparator 1022, and waveform 42 represents the response signal. VREF1 is a specified amplitude, VREFH is an upper limit reference amplitude, and VREFL is a lower limit reference amplitude. When the voltage value of the response signal changes from higher than the upper limit reference amplitude to lower than the lower limit reference amplitude, and from lower than the lower limit reference amplitude to higher than the upper limit reference amplitude, the result signal undergoes a level jump. There is an interference signal in part of the response signal within the dotted frame 40, and there is no interference signal in the response signal of other parts. When there is an interference signal in the response signal, the level jump number of the result signal is large.

[0112] In the embodiment of the present application, the method for determining the number of level jumps of the result signal may include the following method 1 and method 2:

[0113] In the first approach, the second controller 1021 is further configured to obtain the current result signal from the hysteresis comparator 1022 and determine the number of level transitions of the current result signal.

[0114] Since the frequency of the result signal is consistent with the frequency of the interference signal, it is often high, for example, it can reach 10MHz (megahertz) ~ 100MHz. In method one, a second controller 1021 with higher performance can be used, that is, the second controller 1021 itself has the ability of high-speed counting. Correspondingly, the second controller 1021 can accurately determine the number of level jumps of the high-frequency result signal. In this way, the accuracy of determining whether there is interference based on the number of level jumps of the result signal can be further guaranteed. That is, the accuracy of detecting interference can be improved, and it can be further guaranteed that the receiving end 102 can determine the detection result based on the response signal with higher accuracy, thereby improving the accuracy of the detection result.

[0115] In the second mode, the receiving end 102 further includes: a counter;

[0116] The counter is used to obtain the current result signal from the hysteresis comparator 1022 , determine the number of level jumps of the current result signal, and send the number of level jumps of the current result signal to the second controller 1021 .

[0117] In this way, a counter (also called a high-speed counter) can be set in the receiving end 102 to determine the number of level jumps of the high-frequency result signal. The second controller 1021 only needs to receive the number of level jumps of the result signal sent by the counter for judgment. In this way, while ensuring that the number of level jumps of the high-frequency result signal can be determined, the influence of the number of level jumps of the result signal on the processing capability of the second controller 1021 can be avoided. And the requirements for the performance of the second controller 1021 can be reduced, and the second controller 1021 with lower cost can be selected.

[0118] In one embodiment, the second controller 1021 is further configured to send a second synchronization signal to the first controller 1011 when the number of level transitions of the current result signal is not greater than a second threshold.

[0119] The second synchronization signal is used to instruct the first controller 1011 to control the next emitter of the first emitter to emit light.

[0120] In the embodiment of the present application, if the number of level changes of the result signal is not greater than the second threshold, it means that there is no interference signal in the response signal. In this case, the second controller 1021 in the receiving end 102 can also send a second synchronization signal to the first controller 1011 in the transmitting end 101, so that the first controller 1011 can control the next transmitter of the first transmitter to emit light. Correspondingly, the receiver corresponding to the next transmitter can obtain a new response signal in response to the received light, and can also detect whether there is an interference signal in the new response signal.

[0121] Based on the above processing, when it is detected that there is no interference signal, it can be ensured that the transmitters emit light in sequence according to the preset order. And the response signal obtained by the receiver corresponding to each transmitter can be detected to ensure that the receiving end 102 can determine the detection result based on the response signal with higher accuracy, thereby improving the accuracy of the detection result.

[0122] In one embodiment, the second controller 1021 is further configured to generate an alarm when a specified number of first synchronization signals directed to the first transmitter are continuously sent.

[0123] In the embodiment of the present application, the second controller 1021 continuously sends a specified number of first synchronization signals to the first transmitter, which means that for the same transmitter, the response signal obtained by the receiver corresponding to the transmitter detects the presence of an interference signal for multiple times in a row. That is, the transmitter re-emitted light for multiple times in a row, but there was still an interference signal. The specified number can be set as needed and is not specifically limited. For example, the specified number can be 3 or 5. In this case, it is not possible to obtain a response signal that there is no interference signal by re-emitting light or the efficiency of obtaining a response signal that there is no interference signal by re-emitting light is low.

[0124] Therefore, the second controller 1021 can sound an alarm when continuously sending a specified number of first synchronization signals to the first transmitter. Correspondingly, when the second controller 1021 sounds an alarm, the management personnel can check the light curtain sensor 10 to determine the cause of the interference signal. In this way, when it is impossible to obtain a response signal indicating that there is no interference signal by re-emitting light or the efficiency of obtaining a response signal indicating that there is no interference signal by re-emitting light is low, the management personnel can be prompted by an alarm to manually investigate the cause of the interference signal. It is further ensured that the receiving end 102 can determine the detection result based on the response signal with higher accuracy, thereby improving the accuracy of the detection result.

[0125] In one embodiment, the transmitting end 101 further includes: at least one first D flip-flop and a plurality of AND gates; in a first preset order, the first output pin of the previous first D flip-flop is connected to the first input pin of the next first D flip-flop, and the first input pin of the first first D flip-flop is connected to the first controller 1011; the plurality of AND gates correspond one to one with the plurality of emitters 1012. Among the emitters corresponding to the AND gates connected to the output pins of a first D flip-flop, the emitter corresponding to the AND gate connected to the first output pin of the first D flip-flop emits light first; the first output pin of a first D flip-flop is the output pin corresponding to the first input pin of the first D flip-flop.

[0126] The receiving end 102 further includes: at least one second D flip-flop and a plurality of analog switches; according to a second preset order, the second output pin of the previous second D flip-flop is connected to the second input pin of the next second D flip-flop, and the second input pin of the first second D flip-flop is connected to the second controller 1021; the plurality of analog switches correspond to the plurality of receivers one by one. Among the receivers corresponding to the analog switches connected to the output pins of a second D flip-flop, the receiver corresponding to the analog switch connected to the second output pin of the second D flip-flop is the first to receive light; the second output pin of a second D flip-flop is the output pin corresponding to the second input pin of the second D flip-flop.

[0127] The first controller 1011 is specifically configured to send a clock signal to a plurality of first D flip-flops according to a synchronization signal sent by the second controller 1021; send a trigger signal to the first first D flip-flop in a first preset sequence; and send an enable signal to a plurality of AND gates.

[0128] Each first D flip-flop is used to send a trigger signal to an AND gate corresponding to a transmitter that currently needs to emit light according to a clock signal and a trigger signal received by its own first input pin.

[0129] Each AND gate is used to send a trigger signal to a corresponding transmitter according to the received trigger signal and an enable signal when receiving the trigger signal.

[0130] Each transmitter 1012 is used to transmit light to its corresponding receiver when receiving a trigger signal sent by the corresponding AND gate.

[0131] The second controller 1021 is configured to send a clock signal to the plurality of second D flip-flops according to the synchronization signal, and send a trigger signal to the first second D flip-flop in a second preset sequence.

[0132] Each second D flip-flop is used to send a trigger signal to an analog switch corresponding to a receiver that currently needs to receive light according to the clock signal and a trigger signal received by its own second input pin.

[0133] Each analog switch is used to connect the corresponding receiver to the hysteresis comparator 1022 according to the received trigger signal when receiving the trigger signal.

[0134] Each receiver is used to send a response signal obtained in response to the received light to the hysteresis comparator through its corresponding analog switch.

[0135] In an embodiment of the present application, the first D flip-flop may be a D flip-flop of a specified number of bits, for example, the specified number of bits may be 1, 4, 8 or 16, such as, the first D flip-flop may be an 8-bit D flip-flop 74HC273 or 74HCT273. The first controller 1011 may send a trigger signal to the first input pin of the first first D flip-flop in the first preset sequence, for example, the trigger signal may be a high level. The first preset sequence may be set according to a preset sequence in which each emitter emits light. The first D flip-flop may control the trigger signal to shift once each time a rising edge of the clock signal arrives, and the corresponding output pin of the first D flip-flop outputs the trigger signal.

[0136] Each output pin of the first D flip-flop corresponds to an AND gate, and the first output pin of the first D flip-flop corresponds to the AND gate corresponding to the emitter that needs to emit the first light. The other output pins of the first D flip-flop can be set according to the order in which the emitters corresponding to the AND gates connected thereto emit light. For example, the first output pin of the first D flip-flop can be the lowest bit output pin of the first D flip-flop, the lowest bit output pin of the first D flip-flop corresponds to the AND gate corresponding to the emitter that needs to emit the first light, the second lowest bit output pin of the first D flip-flop corresponds to the AND gate corresponding to the emitter that needs to emit the second light, and so on. Alternatively, the first output pin of the first D flip-flop can be the highest bit output pin of the first D flip-flop, the highest bit output pin of the first D flip-flop corresponds to the AND gate corresponding to the emitter that needs to emit the first light, the second highest bit output pin of the first D flip-flop corresponds to the AND gate corresponding to the emitter that needs to emit the second light, and so on.

[0137] In this way, it is possible to send a trigger signal to the AND gate corresponding to each emitter in the order in which each emitter emits light. When each AND gate receives the trigger signal and the enable signal, it can send a trigger signal to the emitter corresponding to itself, so that the emitter corresponding to itself emits light. In other words, each emitter can be controlled to emit light in a preset order.

[0138] The first controller 1011 can send a clock signal to the plurality of first D flip-flops according to the synchronization signal sent by the second controller 1021. For example, when the first controller 1011 receives the first synchronization signal, it interrupts the sending of the clock signal. At this time, the trigger signal will not shift, and the trigger signal can be sent again to the AND gate (which can be called the first AND gate) corresponding to the first emitter that currently needs to emit light. Accordingly, the first AND gate can send a trigger signal to the first emitter when receiving the trigger signal and the enable signal, so that the first emitter re-emits light.

[0139] When the first controller 1011 receives the second synchronization signal, it continues to send the clock signal. At this time, the trigger signal can continue to shift, and the trigger signal can be sent to the AND gate (which can be called the second AND gate) corresponding to the next emitter of the first emitter. Correspondingly, the second AND gate can send a trigger signal to the next emitter of the first emitter when receiving the trigger signal and the enable signal, so that the next emitter of the first emitter emits light.

[0140] The second D flip-flop may also be a D flip-flop with a specified number of bits, for example, the second D flip-flop may be the same as the first D flip-flop, both being 8-bit D flip-flops 74HC273. The second controller 1021 may send a trigger signal to the second input pin of the first second D flip-flop in the second preset sequence. The second preset sequence may be set according to a preset order in which each receiver receives light, and the order in which each receiver receives light is the order in which each emitter emits light. The second D flip-flop may control the trigger signal to shift once each time a rising edge of the clock signal arrives, and the corresponding output pin of the second D flip-flop outputs a trigger signal.

[0141] Each output pin of the second D flip-flop corresponds to an analog switch, and the second output pin of the first second D flip-flop corresponds to the analog switch corresponding to the receiver that needs to receive the light first. The other output pins of the first second D flip-flop can be set according to the order in which the receivers corresponding to the analog switches connected thereto receive the light. For example, the second output pin of the first second D flip-flop can be the lowest output pin of the first second D flip-flop, the lowest output pin of the first second D flip-flop corresponds to the analog switch corresponding to the receiver that needs to receive the light first, the second lowest output pin of the first second D flip-flop corresponds to the analog switch corresponding to the receiver that needs to receive the light second, and so on. Alternatively, the second output pin of the first second D flip-flop can be the highest output pin of the first second D flip-flop, the highest output pin of the first second D flip-flop corresponds to the analog switch corresponding to the receiver that needs to receive the light first, the second highest output pin of the first second D flip-flop corresponds to the analog switch corresponding to the receiver that needs to receive the light second, and so on.

[0142] In this way, it is possible to send a trigger signal to the analog switch corresponding to each receiver in the order in which each receiver receives light. When each analog switch receives a trigger signal, it can conduct the connection between the corresponding receiver and the hysteresis comparator 1022 according to the received trigger signal, so that the corresponding receiver can send a response signal obtained in response to the received light to the hysteresis comparator 1022 through the analog switch. In other words, it is possible to control the hysteresis comparator 1022 to obtain the response signal obtained by each receiver in the order in which each receiver receives light.

[0143] The second controller 1021 can send a clock signal to multiple second D flip-flops according to the synchronization signal. For example, the second controller 1021 can interrupt the sending of the clock signal according to the first synchronization signal. At this time, the trigger signal will not shift, and the trigger signal can be sent again to the analog switch (which can be called the first analog switch) corresponding to the receiver (i.e., the first receiver) that currently needs to receive light. Correspondingly, when the first analog switch receives the trigger signal, it can conduct the connection between the first receiver and the hysteresis comparator 1022 according to the received trigger signal, so that the first receiver can send a response signal obtained in response to the received light to the hysteresis comparator 1022 through the first analog switch.

[0144] The second controller 1021 can continue to send the clock signal according to the second synchronization signal. At this time, the trigger signal can continue to shift, and the trigger signal can be sent to the analog switch (which can be called the second analog switch) corresponding to the next receiver of the first receiver. Correspondingly, when the second analog switch receives the trigger signal, it can conduct the connection between the next receiver of the first receiver and the hysteresis comparator 1022 according to the received trigger signal, so that the next receiver of the first receiver can send a response signal obtained in response to the received light to the hysteresis comparator 1022 through the second analog switch.

[0145] In this way, it can be further ensured that the detection of whether there is an interference signal in the response signal obtained by the receiver corresponding to the transmitter that currently needs to emit light in response to the received light can be performed. And when the presence of an interference signal is detected, the transmitter that currently needs to emit light can re-emit the light. When it is detected that there is no interference signal, the receiving end will determine the detection result based on the obtained response signal, which can ensure that the receiving end determines the detection result based on the response signal with higher accuracy, thereby improving the accuracy of the detection result.

[0146] See also Figure 5 , Figure 5A schematic diagram of the structure of a light curtain sensor provided in an embodiment of the present application. The light curtain sensor includes a transmitting end (also referred to as a transmitting end) and a receiving end, and the transmitting end includes: an MCU (Microcontroller Unit), a clock buffer, a plurality of 8-bit D flip-flops 74HC273, a plurality of AND gates, and a plurality of LED (light-emitting diode) transmitting modules. The MCU at the transmitting end is the first controller 1011 in the above embodiment, the 74HC273 is the first D flip-flop in the above embodiment, and the plurality of LED transmitting modules are the plurality of emitters 1012 in the above embodiment, which can emit infrared light. D0 represents the first input pin of the first first D flip-flop in the first preset sequence, Q0 to Q7 represent the 8-bit output pins of the first D flip-flop, and Q0 represents the first output pin of the first D flip-flop. Clk represents the clock signal, and EN represents the enable signal. The clock buffer can ensure the stability of the clock signal.

[0147] The receiving end includes: MCU, clock buffer, comparator, multiple 8-bit D flip-flops 74HC273, multiple analog switches, and multiple PD (photodiode) receiving processing modules. The MCU of the receiving end is the second controller 1021 in the above embodiment, the comparator is the hysteresis comparator 1022 in the above embodiment, 74HC273 is the second D flip-flop in the above embodiment, and the multiple PD receiving processing modules are the multiple receivers 1023 in the above embodiment. D0 represents the second input pin of the first second D flip-flop in the second preset sequence, Q0~Q7 represent the 8-bit output pins of the second D flip-flop, and Q0 represents the second output pin of the second D flip-flop. Clk represents the clock signal, and the clock buffer can ensure the stability of the clock signal. IN of the analog switch represents the input end, and O represents the output end. ADC represents the response signal. The input end of the comparator is connected to the output end of the analog switch, and the output end of the comparator is connected to the MCU of the receiving end.

[0148] The PD receiving and processing module may also include an amplifying circuit. Each LED transmitting module at the transmitting end may sequentially emit light according to the synchronization signal, and correspondingly, each PD receiving and processing module at the receiving end may sequentially receive light according to the synchronization signal, and generate an analog signal (i.e., the response signal in the above embodiment) through the amplifying circuit. The MCU at the receiving end may sample the analog signal and display the waveform through an oscilloscope.

[0149] See also Figure 6 , Figure 6 A schematic diagram of the structure of another light curtain sensor provided in an embodiment of the present application. Figure 5Based on the light curtain sensor shown, the receiving end may further include: a counter (ie, the counter in the above embodiment). The output end of the comparator is connected to the input end of the counter, and the output end of the counter is connected to the MCU of the receiving end. Figure 5 and Figure 6 In the example, two 8-bit D flip-flops are used for both the transmitter and the receiver. The number of bits of the D flip-flops can be selected as needed, for example, a 1-bit D flip-flop, a 4-bit D flip-flop or a 16-bit D flip-flop can also be selected. The number of D flip-flops can also be set as needed, specifically, the number of D flip-flops can be determined according to the number of transmitters and receivers and the number of bits of the D flip-flops used.

[0150] The comparator outputs high and low levels (i.e., the result signal in the above embodiment), which are passed through a counter to count the number of level changes. The counter can output the number of level changes counted to the MCU at the receiving end for judgment. Furthermore, the MCU at the receiving end can determine whether there is an interference signal based on the number of level jumps of the result signal obtained, and realize interference signal detection. If the number of level changes exceeds the set threshold, that is, the number of level jumps of the result signal is greater than the second threshold, it is determined that there is interference signal interference at the detection position corresponding to the first transmitter. The MCU at the receiving end sends a second synchronization signal to the MCU at the transmitting end to cause the first transmitter in the transmitting end to re-emit light.

[0151] Based on the above processing, when an interference signal is detected on the optical axis corresponding to a transmitter, a retransmission mechanism can be added. The receiving end will resend the second synchronization signal to the transmitting end, and the transmitting end can control the transmitter to re-emit the light according to the second synchronization signal. It will not be retransmitted until the receiving end detects that there is no interference signal, and the normal ADC value (i.e., the response signal value) will be recorded. In this way, the comparator and counter are used to enable the light curtain sensor to have the ability to detect interference signals and determine whether to re-emit light. Thereby, the anti-interference ability of the light curtain sensor is improved, and the accuracy and effectiveness of the collected response signal are guaranteed.

[0152] Based on the same inventive concept, the present application also provides a detection method, see Figure 7 , Figure 7A flow chart of a detection method provided in an embodiment of the present application. The method is applied to the second controller (i.e., the second controller 1021 in the above embodiment) in the receiving end (i.e., the receiving end 102 in the above embodiment) of the light curtain sensor (i.e., the light curtain sensor 10 in the above embodiment), and the receiving end also includes: a hysteresis comparator (i.e., the hysteresis comparator 1022 in the above embodiment) and multiple receivers (i.e., multiple receivers 1023 in the above embodiment). The light curtain sensor also includes: a transmitting end (i.e., the transmitting end 101 in the above embodiment); the transmitting end includes: a first controller (i.e., the first controller 1011 in the above embodiment) and multiple transmitters (i.e., multiple transmitters 1012 in the above embodiment). Multiple transmitters correspond one-to-one to multiple receivers, and the receiver corresponding to one transmitter is used to receive the light emitted by the transmitter.

[0153] The first controller is used to control the first transmitter that currently needs to emit light to emit light according to the synchronization signal sent by the second controller; the hysteresis comparator is used to obtain the response signal obtained by the first receiver corresponding to the first transmitter in response to the received light, and generate a result signal representing the comparison result between the amplitude of the current response signal and the preset reference amplitude; wherein the absolute value of the difference between the preset reference amplitude and the specified amplitude is less than the first threshold value; the specified amplitude represents the amplitude of the signal generated by any receiver when the corresponding transmitter does not emit light.

[0154] Methods include:

[0155] Step S701: Determine whether the number of level jumps of the current result signal is greater than a second threshold.

[0156] Step S702: When the number of level transitions of the current result signal is greater than a second threshold, a first synchronization signal is sent to the first controller.

[0157] The first synchronization signal is used to instruct the first controller to control the first emitter to re-emit light.

[0158] Step S703: when the number of level transitions of the current result signal is not greater than the second threshold, determining the detection result at the detection position corresponding to the first transmitter based on the current response signal.

[0159] Based on the above processing, for any receiver, when the transmitter corresponding to the receiver does not emit light, the amplitude of the signal generated by the receiver can be called the specified amplitude. Since the frequency of the interference signal is often high, that is, the interference signal fluctuates frequently, and the amplitude of the interference signal tends to fluctuate within a certain range above and below the specified amplitude, that is, the amplitude of the interference signal tends to fluctuate within a preset reference amplitude whose absolute value of the difference with the specified amplitude is less than the first threshold. Therefore, if there is an interference signal in the signal (i.e., response signal) obtained by the corresponding receiver (i.e., the first receiver) in response to the received light for the transmitter (i.e., the first transmitter) that currently needs to emit light, the amplitude of the response signal will change above and below the preset reference amplitude for many times. Correspondingly, the number of level jumps of the result signal representing the comparison result of the amplitude of the response signal with the preset reference amplitude generated by the hysteresis comparator will also be large.

[0160] That is to say, if the number of level jumps of the result signal is greater than the second threshold, it can indicate that there is an interference signal in the response signal. In this case, the second controller in the receiving end can send a first synchronization signal to the first controller in the transmitting end, so that the first controller can control the first emitter to re-emit light. If the number of level changes of the result signal is not greater than the second threshold, it means that there is no interference signal in the response signal. In this case, the detection result at the detection position corresponding to the first emitter can be determined based on the response signal, and a detection result with higher accuracy can be obtained.

[0161] In this way, it is possible to detect whether there is an interference signal in the response signal obtained by the receiver corresponding to the transmitter that currently needs to emit light in response to the received light. And when the interference signal is detected, the transmitter that currently needs to emit light can re-emit the light. When it is detected that there is no interference signal, the receiving end will determine the detection result based on the obtained response signal, which can ensure that the receiving end determines the detection result based on the response signal with higher accuracy, thereby improving the accuracy of the detection result.

[0162] In one embodiment, before step S701, the method further includes:

[0163] The current result signal is obtained from the hysteresis comparator, and the number of level jumps of the current result signal is determined.

[0164] In one embodiment, the receiving end further includes: a counter; the counter is used to obtain the current result signal from the hysteresis comparator, determine the number of level jumps of the current result signal, and send the number of level jumps of the current result signal to the second controller;

[0165] Before determining whether the number of level transitions of the current result signal is greater than a second threshold, the method further includes:

[0166] Receive the number of level transitions of the current result signal sent by the counter.

[0167] In one embodiment, the method further comprises:

[0168] When the number of level jumps of the current result signal is not greater than the second threshold, a second synchronization signal is sent to the first controller; wherein the second synchronization signal is used to instruct the first controller to control the next emitter of the first emitter to emit light.

[0169] In one embodiment, the method further comprises:

[0170] When a specified number of first synchronization signals directed to the first transmitter are continuously sent, an alarm is issued.

[0171] In one embodiment, the preset reference amplitude includes: an upper limit reference amplitude and a lower limit reference amplitude; the hysteresis comparator is specifically used to generate a level jump when the current response signal changes from higher than the upper limit reference amplitude to lower than the lower limit reference amplitude, and changes from lower than the lower limit reference amplitude to higher than the upper limit reference amplitude, so as to obtain a result signal.

[0172] In one embodiment, the transmitting end further includes: at least one first D flip-flop and a plurality of AND gates; according to a first preset order, the first output pin of the previous first D flip-flop is connected to the first input pin of the next first D flip-flop, and the first input pin of the first first D flip-flop is connected to the first controller; the plurality of AND gates correspond one-to-one to the plurality of emitters; among the emitters corresponding to the AND gates connected to the output pins of a first D flip-flop, the emitter corresponding to the AND gate connected to the first output pin of the first D flip-flop is the first to emit light; the first output pin of a first D flip-flop is the output pin corresponding to the first input pin of the first D flip-flop;

[0173] The receiving end further includes: at least one second D flip-flop and a plurality of analog switches; according to a second preset order, the second output pin of the previous second D flip-flop is connected to the second input pin of the next second D flip-flop, and the second input pin of the first second D flip-flop is connected to the second controller; the plurality of analog switches correspond to the plurality of receivers one by one; among the receivers corresponding to the analog switches connected to the output pins of a second D flip-flop, the receiver corresponding to the analog switch connected to the second output pin of the second D flip-flop is the first to receive light; the second output pin of a second D flip-flop is the output pin corresponding to the second input pin of the second D flip-flop;

[0174] The first controller is specifically used to send a clock signal to the multiple first D flip-flops according to the synchronization signal sent by the second controller; send a trigger signal to the first first D flip-flop in the first preset order; and send an enable signal to the multiple AND gates; each first D flip-flop is used to send a trigger signal to the AND gate corresponding to the emitter that currently needs to emit light according to the clock signal and the trigger signal received by its own first input pin; each AND gate is used to send a trigger signal to the corresponding emitter according to the received trigger signal and the enable signal when receiving the trigger signal; each emitter is used to emit light to its corresponding receiver when receiving the trigger signal sent by the corresponding AND gate;

[0175] Each second D flip-flop is used to send a trigger signal to an analog switch corresponding to a receiver that currently needs to receive light according to the clock signal and a trigger signal received by its second input pin; each analog switch is used to connect the corresponding receiver to the hysteresis comparator according to the received trigger signal when receiving the trigger signal; each receiver is used to send a response signal obtained in response to the received light to the hysteresis comparator through its corresponding analog switch;

[0176] The method further comprises:

[0177] A clock signal is sent to the plurality of second D flip-flops according to the synchronization signal, and a trigger signal is sent to the first second D flip-flop in the second preset sequence.

[0178] Based on the same inventive concept, the present application also provides a detection device, see Figure 8 , Figure 8 A structural schematic diagram of a detection device provided in an embodiment of the present application. The device is applied to the second controller in the receiving end of the light curtain sensor, and the receiving end also includes: a hysteresis comparator and multiple receivers; the light curtain sensor also includes: a transmitting end; the transmitting end includes: a first controller and multiple transmitters; the multiple transmitters correspond to the multiple receivers one by one, and the receiver corresponding to one transmitter is used to receive the light emitted by the transmitter; the first controller is used to control the first transmitter that currently needs to emit light to emit light according to the synchronization signal sent by the second controller; the hysteresis comparator is used to obtain the response signal obtained by the first receiver corresponding to the first transmitter in response to the received light, and generate a result signal representing the comparison result of the amplitude of the current response signal and the preset reference amplitude; the absolute value of the difference between the preset reference amplitude and the specified amplitude is less than the first threshold; the specified amplitude represents the amplitude of the signal generated by any receiver when the corresponding transmitter does not emit light;

[0179] The device comprises:

[0180] The first determination module 801 is used to determine whether the number of level jumps of the current result signal is greater than a second threshold.

[0181] The first synchronization signal sending module 802 is used to send a first synchronization signal to the first controller when the number of level jumps of the current result signal is greater than a second threshold.

[0182] The first synchronization signal is used to instruct the first controller to control the first emitter to re-emit light.

[0183] The detection result determination module 803 is used to determine the detection result at the detection position corresponding to the first transmitter based on the current response signal when the number of level jumps of the current result signal is not greater than the second threshold.

[0184] Based on the detection device provided by the embodiment of the present application, for any receiver, when the transmitter corresponding to the receiver does not emit light, the amplitude of the signal generated by the receiver can be called the specified amplitude. Since the frequency of the interference signal is often high, that is, the interference signal fluctuates frequently, and the amplitude of the interference signal tends to fluctuate within a certain range above and below the specified amplitude, that is, the amplitude of the interference signal tends to fluctuate within a preset reference amplitude whose absolute value of the difference with the specified amplitude is less than the first threshold. Therefore, if there is an interference signal in the signal (i.e., response signal) obtained by the corresponding receiver (i.e., the first receiver) in response to the received light for the transmitter (i.e., the first transmitter) that currently needs to emit light, the amplitude of the response signal will change up and down the preset reference amplitude many times. Correspondingly, the level jump number of the result signal representing the comparison result of the amplitude of the response signal and the preset reference amplitude generated by the hysteresis comparator will also be more.

[0185] That is to say, if the number of level jumps of the result signal is greater than the second threshold, it can indicate that there is an interference signal in the response signal. In this case, the second controller in the receiving end can send a first synchronization signal to the first controller in the transmitting end, so that the first controller can control the first emitter to re-emit light. If the number of level changes of the result signal is not greater than the second threshold, it means that there is no interference signal in the response signal. In this case, the detection result at the detection position corresponding to the first emitter can be determined based on the response signal, and a detection result with higher accuracy can be obtained.

[0186] In this way, it is possible to detect whether there is an interference signal in the response signal obtained by the receiver corresponding to the transmitter that currently needs to emit light in response to the received light. And when the interference signal is detected, the transmitter that currently needs to emit light can re-emit the light. When it is detected that there is no interference signal, the receiving end will determine the detection result based on the obtained response signal, which can ensure that the receiving end determines the detection result based on the response signal with higher accuracy, thereby improving the accuracy of the detection result.

[0187] In one embodiment, the apparatus further comprises:

[0188] The result signal acquisition module is used to acquire the current result signal from the hysteresis comparator and determine the level jump number of the current result signal before determining whether the level jump number of the current result signal is greater than the second threshold.

[0189] In one embodiment, the receiving end further includes: a counter; the counter is used to obtain the current result signal from the hysteresis comparator, determine the number of level jumps of the current result signal, and send the number of level jumps of the current result signal to the second controller;

[0190] The device also includes:

[0191] The number receiving module is used to receive the number of level jumps of the current result signal sent by the counter before determining whether the number of level jumps of the current result signal is greater than the second threshold.

[0192] In one embodiment, the apparatus further comprises:

[0193] The second synchronization signal sending module is used to send a second synchronization signal to the first controller when the number of level jumps of the current result signal is not greater than the second threshold; wherein the second synchronization signal is used to instruct the first controller to control the next emitter of the first emitter to emit light.

[0194] In one embodiment, the apparatus further comprises:

[0195] The alarm module is used to generate an alarm when a specified number of first synchronization signals directed to the first transmitter are continuously sent.

[0196] In one embodiment, the preset reference amplitude includes: an upper limit reference amplitude and a lower limit reference amplitude; the hysteresis comparator is specifically used to generate a level jump when the current response signal changes from higher than the upper limit reference amplitude to lower than the lower limit reference amplitude, and changes from lower than the lower limit reference amplitude to higher than the upper limit reference amplitude, so as to obtain a result signal.

[0197] In one embodiment, the transmitting end further includes: at least one first D flip-flop and a plurality of AND gates; according to a first preset order, the first output pin of the previous first D flip-flop is connected to the first input pin of the next first D flip-flop, and the first input pin of the first first D flip-flop is connected to the first controller; the plurality of AND gates correspond one-to-one to the plurality of emitters; among the emitters corresponding to the AND gates connected to the output pins of a first D flip-flop, the emitter corresponding to the AND gate connected to the first output pin of the first D flip-flop is the first to emit light; the first output pin of a first D flip-flop is the output pin corresponding to the first input pin of the first D flip-flop;

[0198] The receiving end further includes: at least one second D flip-flop and a plurality of analog switches; according to a second preset order, the second output pin of the previous second D flip-flop is connected to the second input pin of the next second D flip-flop, and the second input pin of the first second D flip-flop is connected to the second controller; the plurality of analog switches correspond to the plurality of receivers one by one; among the receivers corresponding to the analog switches connected to the output pins of a second D flip-flop, the receiver corresponding to the analog switch connected to the second output pin of the second D flip-flop is the first to receive light; the second output pin of a second D flip-flop is the output pin corresponding to the second input pin of the second D flip-flop;

[0199] The first controller is specifically used to send a clock signal to the multiple first D flip-flops according to the synchronization signal sent by the second controller; send a trigger signal to the first first D flip-flop in the first preset order; and send an enable signal to the multiple AND gates; each first D flip-flop is used to send a trigger signal to the AND gate corresponding to the emitter that currently needs to emit light according to the clock signal and the trigger signal received by its own first input pin; each AND gate is used to send a trigger signal to the corresponding emitter according to the received trigger signal and the enable signal when receiving the trigger signal; each emitter is used to emit light to its corresponding receiver when receiving the trigger signal sent by the corresponding AND gate;

[0200] Each second D flip-flop is used to send a trigger signal to an analog switch corresponding to a receiver that currently needs to receive light according to the clock signal and a trigger signal received by its second input pin; each analog switch is used to connect the corresponding receiver to the hysteresis comparator according to the received trigger signal when receiving the trigger signal; each receiver is used to send a response signal obtained in response to the received light to the hysteresis comparator through its corresponding analog switch;

[0201] The device also includes:

[0202] A clock signal sending module is used to send a clock signal to the multiple second D flip-flops according to a synchronization signal, and to send a trigger signal to the first second D flip-flop in the second preset sequence.

[0203] The present application also provides a receiving end of a light curtain sensor, such as Fig. 9 As shown, including:

[0204] Memory 901, used for storing computer programs;

[0205] The processor 902 is used to implement any detection method in the above embodiments when executing the program stored in the memory 901.

[0206] Furthermore, the electronic device may further include a communication bus and / or a communication interface, and the processor 902, the communication interface, and the memory 901 communicate with each other via the communication bus.

[0207] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0208] The communication interface is used for communication between the above electronic device and other devices.

[0209] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0210] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0211] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above detection methods are implemented.

[0212] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any detection method in the above embodiments.

[0213] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.

[0214] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0215] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the detection method, device, receiving end, medium and product embodiments, since they are basically similar to the light curtain sensor embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the light curtain sensor embodiment.

[0216] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A light curtain sensor, characterized in that: The light curtain sensor comprises: a transmitting end and a receiving end; the transmitting end comprises: a first controller and a plurality of transmitters; the receiving end comprises: a second controller, a hysteresis comparator, and a plurality of receivers; the plurality of transmitters correspond to the plurality of receivers one by one, and the receiver corresponding to one transmitter is used to receive the light emitted by the transmitter; The first controller is used to control the first emitter that currently needs to emit light to emit light according to the synchronization signal sent by the second controller; The hysteresis comparator is used to obtain a response signal obtained by the first receiver corresponding to the first transmitter in response to the received light, and generate a result signal indicating a comparison result between the amplitude of the current response signal and a preset reference amplitude; wherein the absolute value of the difference between the preset reference amplitude and the specified amplitude is less than a first threshold; and the specified amplitude indicates the amplitude of the signal generated by any receiver when the corresponding transmitter does not transmit light; The second controller is used to send a first synchronization signal to the first controller when the number of level jumps of the current result signal is greater than a second threshold; wherein the first synchronization signal is used to instruct the first controller to control the first emitter to re-emit light; and when the number of level jumps of the current result signal is not greater than the second threshold, determine the detection result at the detection position corresponding to the first emitter based on the current response signal.

2. The light curtain sensor according to claim 1, characterized in that: The second controller is further used to obtain the current result signal from the hysteresis comparator and determine the number of level jumps of the current result signal.

3. The light curtain sensor according to claim 1, characterized in that: The receiving end also includes: a counter; The counter is used to obtain the current result signal from the hysteresis comparator, determine the number of level jumps of the current result signal, and send the number of level jumps of the current result signal to the second controller.

4. The light curtain sensor according to claim 1, characterized in that: The second controller is also used to send a second synchronization signal to the first controller when the number of level jumps of the current result signal is not greater than the second threshold; wherein the second synchronization signal is used to instruct the first controller to control the next emitter of the first emitter to emit light.

5. The light curtain sensor according to claim 1, characterized in that: The second controller is further configured to generate an alarm when a specified number of first synchronization signals directed to the first transmitter are continuously sent.

6. The light curtain sensor according to claim 1, characterized in that: The preset reference amplitude includes: an upper limit reference amplitude and a lower limit reference amplitude; The hysteresis comparator is specifically used to generate a level jump to obtain a result signal when the current response signal changes from higher than the upper limit reference amplitude to lower than the lower limit reference amplitude, and changes from lower than the lower limit reference amplitude to higher than the upper limit reference amplitude.

7. The light curtain sensor according to any one of claims 1 to 6, characterized in that: The transmitting end further includes: at least one first D flip-flop and a plurality of AND gates; according to a first preset order, the first output pin of a previous first D flip-flop is connected to the first input pin of a subsequent first D flip-flop, and the first input pin of the first first D flip-flop is connected to the first controller; the plurality of AND gates correspond to the plurality of emitters one by one; among the emitters corresponding to the AND gates connected to the output pins of a first D flip-flop, the emitter corresponding to the AND gate connected to the first output pin of the first D flip-flop is the first to emit light; the first output pin of a first D flip-flop is the output pin corresponding to the first input pin of the first D flip-flop; The receiving end further includes: at least one second D flip-flop and a plurality of analog switches; according to a second preset order, the second output pin of the previous second D flip-flop is connected to the second input pin of the next second D flip-flop, and the second input pin of the first second D flip-flop is connected to the second controller; the plurality of analog switches correspond to the plurality of receivers one by one; among the receivers corresponding to the analog switches connected to the output pins of a second D flip-flop, the receiver corresponding to the analog switch connected to the second output pin of the second D flip-flop is the first to receive light; the second output pin of a second D flip-flop is the output pin corresponding to the second input pin of the second D flip-flop; The first controller is specifically configured to send a clock signal to the plurality of first D flip-flops according to a synchronization signal sent by the second controller; send a trigger signal to the first first D flip-flop in the first preset sequence; and send an enable signal to the plurality of AND gates; Each first D flip-flop is used to send a trigger signal to an AND gate corresponding to a transmitter that currently needs to emit light according to the clock signal and a trigger signal received by its first input pin; Each AND gate is used to send a trigger signal to a corresponding transmitter according to the received trigger signal and the enable signal when receiving the trigger signal; Each transmitter is used to transmit light to its corresponding receiver when receiving a trigger signal sent by the corresponding AND gate; The second controller is used to send a clock signal to the plurality of second D flip-flops according to a synchronization signal, and to send a trigger signal to the first second D flip-flop in the second preset sequence; Each second D flip-flop is used to send a trigger signal to an analog switch corresponding to a receiver that currently needs to receive light according to the clock signal and a trigger signal received by its second input pin; Each analog switch is used to connect the receiver corresponding to itself and the hysteresis comparator according to the received trigger signal when receiving the trigger signal; Each receiver is used to send a response signal obtained in response to the received light to the hysteresis comparator through its corresponding analog switch.

8. A detection method, characterized in that: A second controller applied to a receiving end of a light curtain sensor, the receiving end further comprising: a hysteresis comparator and a plurality of receivers; the light curtain sensor further comprising: a transmitting end; the transmitting end comprising: a first controller and a plurality of transmitters; the plurality of transmitters correspond one-to-one to the plurality of receivers, and the receiver corresponding to one transmitter is used to receive the light emitted by the transmitter; the first controller is used to control the first transmitter that currently needs to emit light to emit light according to the synchronization signal sent by the second controller; the hysteresis comparator is used to obtain a response signal obtained by the first receiver corresponding to the first transmitter in response to the received light, and generate a result signal representing the comparison result of the amplitude of the current response signal with the preset reference amplitude; the absolute value of the difference between the preset reference amplitude and the specified amplitude is less than the first threshold value; the specified amplitude represents the amplitude of the signal generated by any receiver when the corresponding transmitter does not emit light; The method comprises: Determine whether the number of level jumps of the current result signal is greater than a second threshold; When the number of level jumps of the current result signal is greater than the second threshold, sending a first synchronization signal to the first controller; wherein the first synchronization signal is used to instruct the first controller to control the first emitter to re-emit light; When the number of level transitions of the current result signal is not greater than the second threshold, the detection result at the detection position corresponding to the first transmitter is determined based on the current response signal.

9. The method according to claim 8, characterized in that Before determining whether the number of level transitions of the current result signal is greater than a second threshold, the method further includes: A current result signal is obtained from the hysteresis comparator, and the number of level jumps of the current result signal is determined.

10. The method according to claim 8, characterized in that The receiving end further includes: a counter; the counter is used to obtain the current result signal from the hysteresis comparator, determine the number of level jumps of the current result signal, and send the number of level jumps of the current result signal to the second controller; Before determining whether the number of level transitions of the current result signal is greater than a second threshold, the method further includes: Receive the number of level transitions of the current result signal sent by the counter.

11. The method according to claim 8, characterized in that The method further comprises: When the number of level jumps of the current result signal is not greater than the second threshold, a second synchronization signal is sent to the first controller; wherein the second synchronization signal is used to instruct the first controller to control the next emitter of the first emitter to emit light.

12. The method according to claim 8, characterized in that The method further comprises: When a specified number of first synchronization signals directed to the first transmitter are continuously sent, an alarm is issued.

13. The method according to claim 8, characterized in that The preset reference amplitude includes: an upper limit reference amplitude and a lower limit reference amplitude; the hysteresis comparator is specifically used to generate a level jump to obtain a result signal when the current response signal changes from higher than the upper limit reference amplitude to lower than the lower limit reference amplitude, and changes from lower than the lower limit reference amplitude to higher than the upper limit reference amplitude.

14. The method according to any one of claims 8 to 13, characterized in that: The transmitting end further includes: at least one first D flip-flop and a plurality of AND gates; according to a first preset order, the first output pin of a previous first D flip-flop is connected to the first input pin of a subsequent first D flip-flop, and the first input pin of the first first D flip-flop is connected to the first controller; the plurality of AND gates correspond to the plurality of emitters one by one; among the emitters corresponding to the AND gates connected to the output pins of a first D flip-flop, the emitter corresponding to the AND gate connected to the first output pin of the first D flip-flop is the first to emit light; the first output pin of a first D flip-flop is the output pin corresponding to the first input pin of the first D flip-flop; The receiving end further includes: at least one second D flip-flop and a plurality of analog switches; according to a second preset order, the second output pin of the previous second D flip-flop is connected to the second input pin of the next second D flip-flop, and the second input pin of the first second D flip-flop is connected to the second controller; the plurality of analog switches correspond to the plurality of receivers one by one; among the receivers corresponding to the analog switches connected to the output pins of a second D flip-flop, the receiver corresponding to the analog switch connected to the second output pin of the second D flip-flop is the first to receive light; the second output pin of a second D flip-flop is the output pin corresponding to the second input pin of the second D flip-flop; The first controller is specifically used to send a clock signal to the multiple first D flip-flops according to the synchronization signal sent by the second controller; send a trigger signal to the first first D flip-flop in the first preset order; and send an enable signal to the multiple AND gates; each first D flip-flop is used to send a trigger signal to the AND gate corresponding to the emitter that currently needs to emit light according to the clock signal and the trigger signal received by its own first input pin; each AND gate is used to send a trigger signal to the corresponding emitter according to the received trigger signal and the enable signal when receiving the trigger signal; each emitter is used to emit light to its corresponding receiver when receiving the trigger signal sent by the corresponding AND gate; Each second D flip-flop is used to send a trigger signal to an analog switch corresponding to a receiver that currently needs to receive light according to the clock signal and a trigger signal received by its second input pin; each analog switch is used to connect the corresponding receiver to the hysteresis comparator according to the received trigger signal when receiving the trigger signal; each receiver is used to send a response signal obtained in response to the received light to the hysteresis comparator through its corresponding analog switch; The method further comprises: A clock signal is sent to the plurality of second D flip-flops according to the synchronization signal, and a trigger signal is sent to the first second D flip-flop in the second preset sequence.

15. A detection device, characterized in that: A second controller applied to a receiving end of a light curtain sensor, the receiving end further comprising: a hysteresis comparator and a plurality of receivers; the light curtain sensor further comprising: a transmitting end; the transmitting end comprising: a first controller and a plurality of transmitters; the plurality of transmitters correspond one-to-one to the plurality of receivers, and the receiver corresponding to one transmitter is used to receive the light emitted by the transmitter; the first controller is used to control the first transmitter that currently needs to emit light to emit light according to the synchronization signal sent by the second controller; the hysteresis comparator is used to obtain a response signal obtained by the first receiver corresponding to the first transmitter in response to the received light, and generate a result signal representing the comparison result of the amplitude of the current response signal with the preset reference amplitude; the absolute value of the difference between the preset reference amplitude and the specified amplitude is less than the first threshold value; the specified amplitude represents the amplitude of the signal generated by any receiver when the corresponding transmitter does not emit light; The device comprises: A first determination module, used to determine whether the number of level jumps of the current result signal is greater than a second threshold; A first synchronization signal sending module, configured to send a first synchronization signal to the first controller when the number of level jumps of the current result signal is greater than a second threshold; wherein the first synchronization signal is used to instruct the first controller to control the first emitter to re-emit light; The detection result determination module is used to determine the detection result at the detection position corresponding to the first transmitter based on the current response signal when the number of level jumps of the current result signal is not greater than the second threshold.

16. The device according to claim 15, characterized in that The device also includes: A result signal acquisition module, used for acquiring the current result signal from the hysteresis comparator and determining the number of level jumps of the current result signal before determining whether the number of level jumps of the current result signal is greater than the second threshold; and / or, The receiving end further includes: a counter; the counter is used to obtain the current result signal from the hysteresis comparator, determine the number of level jumps of the current result signal, and send the number of level jumps of the current result signal to the second controller; The device also includes: A times receiving module, used for receiving the number of level jumps of the current result signal sent by the counter before determining whether the number of level jumps of the current result signal is greater than the second threshold; and / or, The device also includes: A second synchronization signal sending module, configured to send a second synchronization signal to the first controller when the number of level jumps of the current result signal is not greater than the second threshold; wherein the second synchronization signal is used to instruct the first controller to control the next emitter of the first emitter to emit light; and / or, The device also includes: An alarm module, configured to generate an alarm when a specified number of first synchronization signals directed to the first transmitter are continuously sent; and / or, The preset reference amplitude includes: an upper limit reference amplitude and a lower limit reference amplitude; the hysteresis comparator is specifically used to generate a level jump when the current response signal changes from being higher than the upper limit reference amplitude to being lower than the lower limit reference amplitude, and from being lower than the lower limit reference amplitude to being higher than the upper limit reference amplitude, so as to obtain a result signal; and / or, The transmitting end further includes: at least one first D flip-flop and a plurality of AND gates; according to a first preset order, the first output pin of a previous first D flip-flop is connected to the first input pin of a subsequent first D flip-flop, and the first input pin of the first first D flip-flop is connected to the first controller; the plurality of AND gates correspond to the plurality of emitters one by one; among the emitters corresponding to the AND gates connected to the output pins of a first D flip-flop, the emitter corresponding to the AND gate connected to the first output pin of the first D flip-flop is the first to emit light; the first output pin of a first D flip-flop is the output pin corresponding to the first input pin of the first D flip-flop; The receiving end further includes: at least one second D flip-flop and a plurality of analog switches; according to a second preset order, the second output pin of the previous second D flip-flop is connected to the second input pin of the next second D flip-flop, and the second input pin of the first second D flip-flop is connected to the second controller; the plurality of analog switches correspond to the plurality of receivers one by one; among the receivers corresponding to the analog switches connected to the output pins of a second D flip-flop, the receiver corresponding to the analog switch connected to the second output pin of the second D flip-flop is the first to receive light; the second output pin of a second D flip-flop is the output pin corresponding to the second input pin of the second D flip-flop; The first controller is specifically used to send a clock signal to the multiple first D flip-flops according to the synchronization signal sent by the second controller; send a trigger signal to the first first D flip-flop in the first preset order; and send an enable signal to the multiple AND gates; each first D flip-flop is used to send a trigger signal to the AND gate corresponding to the emitter that currently needs to emit light according to the clock signal and the trigger signal received by its own first input pin; each AND gate is used to send a trigger signal to the corresponding emitter according to the received trigger signal and the enable signal when receiving the trigger signal; each emitter is used to emit light to its corresponding receiver when receiving the trigger signal sent by the corresponding AND gate; Each second D flip-flop is used to send a trigger signal to an analog switch corresponding to a receiver that currently needs to receive light according to the clock signal and a trigger signal received by its second input pin; each analog switch is used to connect the corresponding receiver to the hysteresis comparator according to the received trigger signal when receiving the trigger signal; each receiver is used to send a response signal obtained in response to the received light to the hysteresis comparator through its corresponding analog switch; The device also includes: A clock signal sending module is used to send a clock signal to the multiple second D flip-flops according to a synchronization signal, and to send a trigger signal to the first second D flip-flop in the second preset sequence.

17. A receiving end of a light curtain sensor, characterized in that: include: Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 8-14 when executing a program stored in a memory.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 8 to 14 is implemented.

19. A computer program product, characterized in that When the computer program product is run on a computer, the computer is enabled to execute the method according to any one of claims 8 to 14.

Citation Information

Cited By

  • Shading judgment method and device for safety grating, computer equipment and storage medium

    CN121611842A