Photoelectric sensor and signal processing method thereof

By superimposing the light receiving signal of the photoelectric sensor and the first signal generated by the signal generation circuit, the photoelectric sensor needs to be adjusted before leaving the factory to avoid the problem of mismatch or black and white detection errors, achieving higher detection accuracy and faster adjustment time, and reducing manufacturing costs.

CN120063338APending Publication Date: 2025-05-30OMRON SHANGHAI
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Photoelectric sensors need to be adjusted before leaving the factory to avoid mismatch or black and white detection errors. The existing manual adjustment methods have adjustment deviations and are time-consuming and labor-consuming.

Method used

By superimposing the light receiving signal with the first signal generated by the signal generation circuit, the intensity of the light receiving signal is adjusted, thereby reducing the black and white detection error, improving the detection accuracy, and reducing the adjustment time.

Benefits of technology

It reduces the black and white detection error of the photoelectric sensor, improves the detection accuracy, reduces adjustment time, and reduces manufacturing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120063338A_ABST
    Figure CN120063338A_ABST
Patent Text Reader

Abstract

The invention provides a photoelectric sensor and a signal processing method thereof, and the photoelectric sensor comprises a light projection circuit which emits light based on a received light projection signal; a signal generation circuit that generates a first signal having the same timing as the light projection signal; the light receiving circuit is provided with two detection circuits for detecting light rays, and the two detection circuits respectively generate a first light receiving signal and a second light receiving signal; a difference circuit which performs difference processing on the first light receiving signal and the second light receiving signal to generate a second signal; the superposition circuit is used for carrying out superposition processing on the first signal and the second signal to generate a third signal, so that the intensity of the light receiving signal is adjusted, the black and white detection error of the photoelectric sensor is reduced, the detection precision of the photoelectric sensor is improved, the adjustment time of the photoelectric sensor is shortened, and the manufacturing cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic devices, and particularly to a photoelectric sensor and a signal processing method thereof. Background Art

[0002] Currently, photoelectric sensors are widely used in various fields. A common application is to detect the distance of an object in a photoelectric detection system. For example, the light-emitting part (also called "light-projecting part") of the photoelectric sensor emits a light signal, and the light-receiving part receives the light signal reflected by the detection object to generate a received light signal, and determines the distance between the detection object and the photoelectric sensor according to the received light signal. The detection accuracy of the photoelectric sensor is affected by factors such as the light intensity, temperature, humidity, electromagnetic interference, and the color of the surface of the detection object (for example, black or white, etc.) in the working environment.

[0003] It should be noted that the above introduction to the technical background is only for the convenience of clearly and completely explaining the technical solutions of the present application and facilitating the understanding of those skilled in the art. It cannot be considered that the above technical solutions are well-known to those skilled in the art just because these solutions are described in the background art part of the present application. Summary of the Invention

[0004] The inventors found that: if the photoelectric sensor is not adjusted before leaving the factory, there will be poor performance indicators such as response difference or black-and-white detection error; if an engineer manually adjusts the resistance value of the internal rheostat of the photoelectric sensor to change the threshold value and judges whether the received light signal is adjusted to the target value through the change of the indicator light, this method of manual adjustment and visual confirmation of the adjustment target has adjustment deviation and consumes a lot of time and manpower.

[0005] In view of at least one of the above technical problems, embodiments of the present application provide a photoelectric sensor and a signal processing method thereof. In this photoelectric sensor, the received light signal is superimposed with the first signal generated by the signal generation circuit, the intensity of the received light signal is adjusted, thereby reducing the black-and-white detection error of the photoelectric sensor, improving the detection accuracy of the photoelectric sensor, reducing the adjustment time of the photoelectric sensor, and reducing the manufacturing cost.

[0006] Embodiments of the present application provide a photoelectric sensor, the photoelectric sensor comprising:

[0007] A light-projecting circuit that emits light based on a received light-projecting signal;

[0008] A signal generation circuit that generates a first signal, the timing of the first signal being the same as the timing of the light-projecting signal;

[0009] A light-receiving circuit having two detection circuits for detecting light, the two detection circuits respectively generating a first light-receiving signal and a second light-receiving signal;

[0010] A difference circuit that performs a difference process on the first light-receiving signal and the second light-receiving signal to generate a second signal; and

[0011] A superimposing circuit that performs a superimposing process on the first signal and the second signal to generate a third signal.

[0012] In some embodiments, the photoelectric sensor further includes:

[0013] A feedback circuit that samples the third signal to generate a feedback signal and inputs the feedback signal into the signal generation circuit,

[0014] wherein the signal generation circuit generates an output signal according to the feedback signal and generates the first signal according to the output signal.

[0015] In some embodiments, the signal generation circuit generating an output signal according to the feedback signal includes:

[0016] The signal generation circuit calculates the correspondence between the output signal and the third signal according to at least two of the feedback signals and the output signals respectively corresponding to the feedback signals; and

[0017] Sets the output signal according to the correspondence and a target value.

[0018] In some embodiments, the signal generation circuit generating an output signal according to the feedback signal further includes:

[0019] The signal generation circuit adjusts the output signal to reach the target value according to the magnitude relationship between the feedback signal and the target value.

[0020] In some embodiments, the signal generation circuit includes:

[0021] A micro control unit that outputs a pulse signal;

[0022] A digital-to-analog conversion circuit that generates an output signal according to the pulse signal, the output signal being an analog voltage signal; and

[0023] A switch circuit that conducts and disconnects under the control of the light-projecting signal, thereby converting the output signal into the first signal, the first signal being a pulsed analog signal.

[0024] In some embodiments, the signal generation circuit further includes:

[0025] A buffer circuit that amplifies the output signal, wherein,

[0026] The switch circuit converts the amplified analog voltage signal into the first signal.

[0027] In some embodiments, the two detection circuits include a first detection circuit and a second detection circuit.

[0028] The first detection circuit includes:

[0029] A first light-receiving element that outputs a first light-receiving current signal; and

[0030] A first conversion circuit that converts the first light-receiving current signal into the first light-receiving signal.

[0031] The second detection circuit includes:

[0032] A second light-receiving element that outputs a second light-receiving current signal; and

[0033] A second conversion circuit that converts the second light-receiving current signal into the second light-receiving signal.

[0034] An embodiment of the present application provides a signal processing method for a photoelectric sensor, the method includes:

[0035] The light-emitting circuit of the photoelectric sensor emits light based on the received light-emitting signal;

[0036] The signal generation circuit of the photoelectric sensor generates a first signal, and the timing of the first signal is the same as the timing of the light-emitting signal;

[0037] Two detection circuits of the light-receiving circuit of the photoelectric sensor respectively generate a first light-receiving signal and a second light-receiving signal;

[0038] The difference circuit of the photoelectric sensor performs a difference process on the first light-receiving signal and the second light-receiving signal to generate a second signal; and

[0039] The superimposing circuit superimposes the first signal and the second signal to generate a third signal.

[0040] In some embodiments, the method further includes:

[0041] The feedback circuit of the photoelectric sensor samples the third signal to generate a feedback signal, and inputs the feedback signal into the signal generation circuit; and

[0042] The signal generation circuit generates an output signal according to the feedback signal, and generates the first signal according to the output signal.

[0043] In some embodiments, the signal generation circuit generates an output signal according to the feedback signal, including:

[0044] The signal generation circuit calculates the correspondence between the output signal and the third signal according to at least two of the feedback signals and the output signals respectively corresponding to the feedback signals; and

[0045] Sets the output signal according to the correspondence and the target value.

[0046] One of the beneficial effects of the embodiments of the present application is that in this photoelectric sensor, the received optical signal is superimposed on the first signal generated by the signal generation circuit, the intensity of the received optical signal is adjusted, thereby reducing the black-and-white detection error of the photoelectric sensor, improving the detection accuracy of the photoelectric sensor, reducing the adjustment time of the photoelectric sensor, and reducing the manufacturing cost.

[0047] Referring to the following description and drawings, specific embodiments of the present application are disclosed in detail, indicating the ways in which the principles of the present application can be adopted. It should be understood that the embodiments of the present application are not limited in scope thereby. Within the spirit and terms of the appended claims, the embodiments of the present application include many changes, modifications, and equivalents.

[0048] Features described and / or illustrated for one embodiment can be used in the same or similar way in one or more other embodiments, combined with features in other embodiments, or replace features in other embodiments.

[0049] It should be emphasized that the term "including / comprising" when used herein refers to the presence of features, whole things, steps, or components, but does not exclude the presence or addition of one or more other features, whole things, steps, or components. Description of the Drawings

[0050] The included drawings are used to provide a further understanding of the embodiments of the present application, which form a part of the specification, illustrate the embodiments of the present application, and, together with the written description, explain the principles of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts. In the drawings:

[0051] Figure 1 is a schematic diagram of a component of the photoelectric sensor according to an embodiment of the present application;

[0052] Figure 2 is a circuit structure diagram of the photoelectric sensor according to an embodiment of the present application;

[0053] Figure 3 It is a schematic diagram of signal processing of the optoelectronic sensor according to an embodiment of the present application;

[0054] Figure 4 It is a waveform diagram of the output signal B when the existing optoelectronic sensor performs black and white detection;

[0055] Figure 5 It is a waveform diagram of the output signal B when the optoelectronic sensor according to an embodiment of the present application performs black and white detection;

[0056] Figure 6 It is a schematic diagram of signal regulation of the optoelectronic sensor according to an embodiment of the present application;

[0057] Figure 7 It is a schematic diagram of the signal processing method of the optoelectronic sensor according to an embodiment of the present application;

[0058] Figure 8 It is another schematic diagram of the signal processing method of the optoelectronic sensor according to an embodiment of the present application;

[0059] Figure 9 It is a schematic diagram of the signal regulation method of the optoelectronic sensor according to an embodiment of the present application. Detailed implementation manners

[0060] Referring to the accompanying drawings, through the following description, the foregoing and other features of the embodiments of the present application will become apparent. In the description and drawings, specific embodiments of the present application are disclosed, which show some embodiments in which the principles of the embodiments of the present application can be adopted. It should be understood that the present application is not limited to the described embodiments. On the contrary, the embodiments of the present application include all modifications, variations, and equivalents falling within the scope of the appended claims.

[0061] In the embodiments of the present application, terms such as "first" and "second" are used to distinguish different elements in terms of name, but do not represent the spatial arrangement or time sequence of these elements, and these elements should not be limited by these terms. The term "and / or" includes any one and all combinations of one or more of the associated listed terms. Terms such as "comprise", "include", "have", etc. mean the presence of the stated features, elements, components, or assemblies, but do not exclude the presence or addition of one or more other features, elements, components, or assemblies.

[0062] In the embodiments of the present application, singular forms such as "a" and "the" include plural forms and should be broadly understood as "a kind of" or "a class of" rather than being limited to the meaning of "one"; in addition, the term "said" should be understood to include both singular and plural forms unless the context clearly indicates otherwise. In addition, the term "according to" should be understood as "at least partially according to...", and the term "based on" should be understood as "at least partially based on...", unless the context clearly indicates otherwise.

[0063] Features described and / or illustrated for one embodiment can be used in the same or similar manner in one or more other embodiments, combined with features in other embodiments, or replace features in other embodiments. The term "comprising / including" as used herein refers to the presence of features, whole things, steps or components, but does not exclude the presence or addition of one or more other features, whole things, steps or components.

[0064] The embodiments of the present application will be specifically described below with reference to the accompanying drawings.

[0065] The embodiments of the present application provide an optoelectronic sensor.

[0066] Figure 1 It is a schematic composition diagram of the optoelectronic sensor of the embodiments of the present application. Figure 2 It is a circuit structure diagram of the optoelectronic sensor of the embodiments of the present application. As Figure 1 and Figure 2 shown, the optoelectronic sensor 100 includes: a light emitting circuit 1, a signal generating circuit 2, a light receiving circuit 3, a difference circuit 4, and a superimposing circuit 5.

[0067] In the present application, the light emitting circuit 1 emits light based on the received light emitting signal. The signal generating circuit 2 generates a first signal (for example, signal A), and the timing of the first signal is the same as the timing of the light emitting signal. The light receiving circuit 3 has two detection circuits for detecting light (for example, the light is the reflected light formed by the detection object reflecting the light emitted by the light emitting circuit 1). For example, the two detection circuits include a first detection circuit 31 and a second detection circuit 32, and the first detection circuit 31 and the second detection circuit 32 respectively generate a first light receiving signal S1 and a second light receiving signal S2. The difference circuit 4 performs a difference process on the first light receiving signal S1 and the second light receiving signal S2 (for example, the first light receiving signal S1 minus the second light receiving signal S2) to generate a second signal (for example, signal B). The superimposing circuit 5 performs a superimposing process on the first signal and the second signal to generate a third signal (for example, signal C).

[0068] According to the above embodiments, the photoelectric sensor 100 performs a difference process on the first received light signal S1 and the second received light signal S2 to generate a second signal, and performs a superimposition process on the second signal and the first signal, which can adjust the intensity of the received light signal, thereby reducing the black-and-white detection error of the photoelectric sensor 100, improving the detection accuracy of the photoelectric sensor 100, reducing the adjustment time of the photoelectric sensor, and reducing the manufacturing cost.

[0069] In some examples, the photoelectric sensor 100 may be a one-dimensional PSD (Position Sensitive Detector) sensor, a two-dimensional PSD sensor, a BGS (Background Suppression) sensor, etc. In addition, the photoelectric sensor 100 can be used for detecting objects, measuring distances and angles, measuring displacements and vibrations, laser alignment and collimation, and other uses or other purposes.

[0070] In some embodiments, the light projecting circuit 1 may include a light emitting diode D1 and a triode TR1. A light projecting signal (for example, a Gate signal) is applied to the base of the triode TR1 to control the operating state of the triode TR1 (for example, whether the triode TR1 is turned on and the magnitude of the conduction current, etc.), thereby adjusting the light projecting power (i.e., the light emitting power) of the light emitting diode D1. The light emitting diode D1 is connected between the power supply terminal Vcc and the collector of the triode TR1. In addition, in some examples, as Figure 2 shown, a resistor R10 for current limiting may be connected in series with the emitter of the triode TR1.

[0071] In some examples of the light receiving circuit 3, the first received light signal S1 generated by the first detection circuit 31 and the second received light signal S2 generated by the second detection circuit 32 may be a proximal signal (for example, represented as an N signal) and a distal signal (for example, represented as an F signal), respectively. For example, the first signal S1 is an N signal and the second signal S2 is an F signal; or, the first signal S1 is an F signal and the second signal S2 is an N signal.

[0072] In some embodiments, the first detection circuit 31 includes: a first light receiving element 311 and a first conversion circuit 312. The first light receiving element 311 outputs a first received light current signal, and the first conversion circuit 312 converts the first received light current signal into a first received light signal S1 as a voltage.

[0073] The second detection circuit 32 includes: a second light receiving element 321 and a second conversion circuit 322. The second light receiving element 321 outputs a second received light current signal, and the second conversion circuit 322 converts the second received light current signal into a second received light signal S2 as a voltage.

[0074] In the light-receiving circuit 3, the first light-receiving element 311 can be a photodiode 2PD 1 / 2, which outputs an N signal (first light-receiving signal S1), and the second light-receiving element 321 can be a photodiode 2PD 1 / 2, which outputs an F signal (second light-receiving signal S2). The photodiode 2PD 1 / 2 and the photodiode 2PD 1 / 2 can be connected in series with resistors R7 and R6 respectively.

[0075] The first conversion circuit 312 can include a capacitor C6 and a resistor R9 connected in series. The second conversion circuit 322 can include a capacitor C5 and a resistor R8 connected in series.

[0076] As Figure 2 shown, in some examples, the difference circuit 4 includes a first operational amplifier A1 and a capacitor C4 and a resistor R5 connected in parallel between the inverting input terminal and the output terminal of the first operational amplifier A1.

[0077] As Figure 2 shown, in some examples, the superposition circuit 5 includes a capacitor C2 and a resistor R3 connected in series, and a capacitor C3 and a resistor R4 connected in series. Among them, the capacitors C2 and C3 can block the low-frequency components in the second signal and the third signal and allow the high-frequency components to pass through; at the connection terminal of the resistors R3 and R4, the second signal and the third signal are added to form a third signal. In some embodiments, the signal generation circuit 2 includes: a micro control unit 21, a digital-to-analog conversion circuit 22, and a switch circuit 24. The micro control unit 21 outputs a pulse signal. The digital-to-analog conversion circuit 22 generates an output signal according to the pulse signal, and the output signal is an analog voltage signal. Among them, the digital-to-analog conversion circuit 22 is, for example, a digital-to-analog converter (DAC). The switch circuit 24 is turned on and off under the control of the light-emitting signal, so as to convert the output signal into a first signal, and the first signal is an analog signal of a pulse. Among them, the switch circuit 24 can include an analog switch SW2, a resistor R2, and a capacitor C1.

[0078] In some examples, the micro control unit 21 is, for example, a micro controller (MCU). As Figure 2 shown, the micro control unit 21 sends a light-emitting signal (for example, a Gate signal) to the light-emitting circuit 1 and the switch circuit 24 through a first general-purpose input / output (GPIO, General Purpose Input / Output) port (for example, the GPIO1 port), and the micro control unit 21 sends a pulse signal to the digital-to-analog conversion circuit 22 through a second general-purpose input / output port (for example, GPIO2), and the pulse signal is, for example, a pulse width modulation signal, etc. In some embodiments, the light-emitting signal sent through GPIO1 and the pulse signal sent through GPIO2 can have the same waveform.

[0079] In some embodiments, the signal generation circuit 2 further includes: a buffer circuit 23. The buffer circuit 23 amplifies the output signal. Thus, the voltage amplitude of the output signal is amplified, and the driving and load-carrying capacity of the signal can be enhanced. In the case of having the buffer circuit 23, the analog voltage signal amplified by the buffer circuit 23 is transmitted to the switch circuit 24. Thus, the switch circuit 24 is turned on and off under the control of the light projection signal, so as to convert the amplified analog voltage signal into a first signal.

[0080] As Figure 2 shown, the buffer circuit 23 may include a second operational amplifier A2 and a resistor R1. Among them, the resistor R1 is connected between the inverting input terminal and the output terminal of the second operational amplifier.

[0081] As Figure 1 and Figure 2 shown, the photoelectric sensor 100 may further include: a feedback circuit 6. The feedback circuit 6 samples the third signal to generate a feedback signal, and inputs the feedback signal into the microcontroller unit 21 in the signal generation circuit 2. Thus, the signal generation circuit 2 generates an output signal according to the feedback signal, and generates a first signal according to the output signal.

[0082] In Figure 2 the example shown, the feedback circuit 6 may include an analog-to-digital converter (ADC). The analog-to-digital converter converts the third signal in the form of an analog signal into a digital signal, and uses it as a feedback signal, so as to realize the sampling of the third signal. The feedback signal generated by the feedback circuit 6 may be input into the third general-purpose input / output port (for example, GPIO3) of the microcontroller unit 21.

[0083] Next, the working principle of signal processing of the photoelectric sensor will be described in conjunction with the circuit structure of the photoelectric sensor. Figure 3 is a schematic diagram of signal processing of the photoelectric sensor according to an embodiment of the present application.

[0084] In the embodiment of the present application, the generation process of signal A includes: the microcontroller unit 21 sends a pulse signal to the digital-to-analog conversion circuit 22 through the second general-purpose input / output port GPIO2. The digital-to-analog conversion circuit 22 performs digital-to-analog conversion on the pulse signal to generate an output signal, and the output signal is an analog voltage signal. The buffer circuit 23 amplifies the output signal. Thus, the voltage amplitude of the output signal is amplified, and the driving and load-carrying capacity of the digital-to-analog conversion circuit 22 can be enhanced. The switch circuit 24 converts the amplified output signal into signal A, and the timing of signal A is the same as that of the light projection signal. As Figure 3 shown, signal A may be a pulse analog, the pulse width of signal A is the same as the pulse width of the light projection signal, and the pulse amplitude of signal A can be adjusted.

[0085] When the optoelectronic sensor 100 includes the feedback circuit 6, the generation process of the signal A may further include: the feedback circuit 6 samples and processes the third signal to generate a feedback signal, inputs the feedback signal into the micro control unit 21 in the signal generation circuit 2, the micro control unit 21 outputs a pulse signal according to the feedback signal, and then generates the signal A through the digital-to-analog conversion circuit 22, the buffer circuit 23 and the switch circuit 24.

[0086] The generation process of the signal B includes: the first detection circuit 31 detects the light emitted by the light projecting circuit 1 to generate a first light receiving signal S1, the second detection circuit 32 detects the light emitted by the light projecting circuit 1 to generate a second light receiving signal S2, and the difference circuit 4 performs a difference process on the first light receiving signal S1 and the second light receiving signal S2, for example, subtracting the second light receiving signal S2 from the first light receiving signal S1 (for example, the N-F signal), to generate the signal B.

[0087] The generation process of the signal C includes: the superimposing circuit 5 superimposes the signal A and the signal B to generate the signal C. As Figure 3 shown, the amplitude of the signal C can be adjusted and approaches the target value.

[0088] By superimposing the light receiving signal and the first signal generated by the signal generation circuit through the above signal processing process, the intensity of the light receiving signal is adjusted, thereby reducing the black and white detection error of the optoelectronic sensor 100.

[0089] Next, the principle of reducing the black and white detection error of the optoelectronic sensor will be further described. Figure 4 is a waveform diagram of the output signal B when the existing optoelectronic sensor performs black and white detection, showing the situation where the existing optoelectronic sensor has a black and white detection error. Figure 5 is a waveform diagram of the output signal B when the optoelectronic sensor of the embodiment of the present application performs black and white detection, showing the situation where the optoelectronic sensor of the embodiment of the present application can reduce the black and white detection error.

[0090] In Figure 4 and Figure 5 the vertical axis represents the amplitude of the signal B, and the horizontal axis represents time.

[0091] As Figure 4As shown, when the existing photoelectric sensor detects an object with a black surface, such as black paper (i.e., corresponding to the case of detecting a workpiece with a low reflectivity in the actual operation of the photoelectric sensor), the waveform of the output signal B is as shown by the dotted line 41. When the amplitude of the signal B reaches the threshold value, the ON point of the signal B is located at ON1. When the existing photoelectric sensor detects an object with a white surface, such as white paper (i.e., corresponding to the case of detecting a workpiece with a high reflectivity in the actual operation), the waveform of the output signal B is as shown by the solid line 42. When the amplitude of the signal B reaches the threshold value, the ON point of the signal B is located at ON2, and the distance between ON1 and ON2 is d1. The distance d1 reflects the black-and-white detection error. Among them, the larger the value of d1, the greater the black-and-white detection error.

[0092] As Figure 5 shown, the photoelectric sensor 100 adjusts the signal B. After adjustment, when the photoelectric sensor 100 detects black paper, the waveform of the output signal B is as shown by the dotted line 51, and when it detects white paper, the waveform of the output signal B is as shown by the solid line 52. Due to the superposition processing of the signal B, compared with the waveforms 41 and 42 of the output signal B detected by the existing sensor for black paper and white paper, the amplitude of the signal is increased. When the amplitude of the signal B reaches the threshold value, the ON point of the signal B for detecting black paper is located at ON1', and the ON point of the signal B for detecting white paper is located at ON2'. The distance between ON1' and ON2' is d2, and d2 < d1. Therefore, when Figure 5 and Figure 4 the thresholds remain the same, Figure 5 relative to Figure 4 it is possible to reduce the black-and-white detection error.

[0093] Next, the principle of signal adjustment of the photoelectric sensor will be further described. Figure 6 This is a schematic diagram of signal adjustment of the photoelectric sensor according to an embodiment of the present application.

[0094] In some embodiments, the signal generation circuit 2 generates an output signal according to the feedback signal, including:

[0095] The first adjustment process, that is: the signal generation circuit 2 calculates the correspondence between the output signal and the third signal according to at least two feedback signals and the output signals corresponding to the respective feedback signals. Furthermore, according to the correspondence and the target value, the output signal is set.

[0096] The above first adjustment process is, for example, a rough adjustment process, as Figure 6As shown in the figure, the coarse adjustment process includes: setting the photoelectric sensor to the stable light-shielding state, setting the output signals to the maximum value DAC max and the minimum value DAC min respectively, sampling the received light signals through the feedback circuit 6 to obtain the corresponding received light signals C max and C min. Based on the loop principle, the received light signals and the output signals are basically in a linear state. The coefficients k and b of the linear function y = kx + b of the received light signals and the output signals can be calculated from DAC max and DAC min as well as C max and C min. Then, the target value of the signal C is substituted into this function to obtain the set value for the coarse adjustment of the output signal. The coarse adjustment process quickly adjusts the output signal to near the target value, improving the adjustment efficiency.

[0097] In some embodiments, the signal generation circuit 2 generates an output signal according to the feedback signal, and further includes:

[0098] The second adjustment process, that is: the signal generation circuit 2 adjusts the output signal to reach the target value according to the magnitude relationship between the feedback signal and the target value.

[0099] The above process of generating the output signal is, for example, the fine adjustment process. The fine adjustment process includes: adjusting the output signal by one least significant bit (LSB, Least Significant Bit) magnitude, and performing feedback control through the feedback circuit 6. For example, if it exceeds the target value, the output signal is adjusted downward by one LSB; if it does not reach the target value, the output signal is adjusted upward by one LSB until it is adjusted within the target range. The fine adjustment process makes the output signal more precisely adjusted to the target value, that is, the threshold set by the product. This threshold is, for example, Figure 5 the threshold shown in the figure.

[0100] In the photoelectric sensor 100, the received light signal is superimposed with the first signal generated by the signal generation circuit, adjusting the relative magnitude between the intensity of the received light signal and the threshold, thereby reducing the black and white detection error of the photoelectric sensor, improving the detection accuracy of the photoelectric sensor, and reducing the adjustment time of the photoelectric sensor and the manufacturing cost.

[0101] The embodiment of the present application provides a signal processing method for a photoelectric sensor.

[0102] Figure 7 is a schematic diagram of the signal processing method of the photoelectric sensor in the embodiment of the present application. As Figure 7 shown, the signal processing method of the photoelectric sensor includes:

[0103] Operation 701: The light projection circuit 1 of the photoelectric sensor 100 emits light based on the received light projection signal;

[0104] Operation 702: The signal generation circuit 2 of the photoelectric sensor 100 generates a first signal (Signal A), and the timing of the first signal is the same as that of the light projection signal;

[0105] Operation 703: The two detection circuits 31 and 32 for detecting light in the light receiving circuit 3 of the photoelectric sensor 100 respectively generate a first light receiving signal S1 and a second light receiving signal S2;

[0106] Operation 704: The difference circuit 4 of the photoelectric sensor 100 performs a difference process on the first light receiving signal S1 and the second light receiving signal S2 to generate a second signal (Signal B);

[0107] Operation 705: The superposition circuit 5 performs a superposition process on the first signal and the second signal to generate a third signal (Signal C).

[0108] Figure 8 It is another schematic diagram of the signal processing method of the photoelectric sensor according to the embodiment of the present application. As Figure 8 shown, the signal processing method of the photoelectric sensor includes operations 701, 703 to 705 as Figure 7 shown, and in addition, it further includes:

[0109] Operation 801: The feedback circuit 6 of the photoelectric sensor 100 samples the third signal to generate a feedback signal, and inputs the feedback signal into the signal generation circuit 2;

[0110] Operation 802: The signal generation circuit 2 generates an output signal according to the feedback signal, and generates a first signal according to the output signal.

[0111] Figure 9 It is a schematic diagram of the signal adjustment method of the photoelectric sensor according to the embodiment of the present application. As Figure 9 shown, in operation 802, the method for the signal generation circuit 2 to generate an output signal according to the feedback signal includes:

[0112] Operation 901: The signal generation circuit 2 calculates the corresponding relationship between the output signal and the third signal according to at least two feedback signals and the output signals corresponding to the respective feedback signals;

[0113] Operation 902: Set the output signal according to the corresponding relationship and the target value.

[0114] The method for the signal generation circuit 2 to generate an output signal according to the feedback signal may further include:

[0115] Operation 903: The signal generation circuit 2 adjusts the output signal to reach the target value according to the magnitude relationship between the feedback signal and the target value.

[0116] Through the above method, the photoelectric sensor 100 superimposes the received light signal and the first signal generated by the signal generation circuit, adjusts the relative magnitude between the intensity of the received light signal and the threshold value, thereby reducing the black and white detection error of the photoelectric sensor, improving the detection accuracy of the photoelectric sensor, reducing the adjustment time of the photoelectric sensor, and lowering the manufacturing cost.

[0117] The preferred embodiments of the present application have been described above with reference to the accompanying drawings. Many features and advantages of these embodiments are apparent from this detailed description, and thus the appended claims are intended to cover all such features and advantages that fall within the true spirit and scope of these embodiments. In addition, since many modifications and changes are readily envisioned by those skilled in the art, the embodiments of the present application are not to be limited to the exact structures and operations illustrated and described, but may cover all suitable modifications and equivalents that fall within their scope.

Claims

1. A photoelectric sensor, characterized in that: The photoelectric sensor comprises: a light-casting circuit that emits light based on a received light-casting signal; A signal generating circuit, which generates a first signal, wherein the timing of the first signal is the same as the timing of the light projection signal; A light receiving circuit, comprising two detection circuits for detecting light, wherein the two detection circuits respectively generate a first light receiving signal and a second light receiving signal; a difference circuit, which performs difference processing on the first light-receiving signal and the second light-receiving signal to generate a second signal; and A superposition circuit performs superposition processing on the first signal and the second signal to generate a third signal.

2. The photoelectric sensor according to claim 1, characterized in that: The photoelectric sensor also includes: a feedback circuit that samples the third signal to generate a feedback signal, and inputs the feedback signal into the signal generating circuit, The signal generating circuit generates an output signal according to the feedback signal, and generates the first signal according to the output signal.

3. The photoelectric sensor according to claim 2, characterized in that: The signal generating circuit generates an output signal according to the feedback signal, comprising: The signal generating circuit calculates a corresponding relationship between the output signal and the third signal according to at least two of the feedback signals and the output signal corresponding to each of the feedback signals; and The output signal is set according to the corresponding relationship and the target value.

4. The photoelectric sensor according to claim 3, characterized in that: The signal generating circuit generates an output signal according to the feedback signal, and further comprises: The signal generating circuit adjusts the output signal to reach the target value according to the magnitude relationship between the feedback signal and the target value.

5. The photoelectric sensor according to claim 1, characterized in that: The signal generating circuit comprises: A micro control unit, which outputs a pulse signal; a digital-to-analog conversion circuit, which generates an output signal according to the pulse signal, wherein the output signal is an analog voltage signal; and A switch circuit is turned on and off under the control of the light projection signal, thereby converting the output signal into the first signal, which is a pulse analog signal.

6. The photoelectric sensor according to claim 5, characterized in that: The signal generating circuit further comprises: A buffer circuit is used to amplify the output signal, wherein: The switch circuit converts the amplified analog voltage signal into the first signal.

7. The photoelectric sensor according to claim 1, characterized in that: The two detection circuits include a first detection circuit and a second detection circuit, The first detection circuit comprises: A first light receiving element, which outputs a first light receiving current signal; and a first conversion circuit, which converts the first light-receiving current signal into the first light-receiving signal, The second detection circuit comprises: A second light receiving element outputting a second light receiving current signal; and The second conversion circuit converts the second photoreception current signal into the second photoreception signal.

8. A signal processing method for a photoelectric sensor, characterized in that: The method comprises: The light-casting circuit of the photoelectric sensor emits light based on the received light-casting signal; The signal generating circuit of the photoelectric sensor generates a first signal (signal A), the timing of the first signal being the same as the timing of the light projection signal; The two detection circuits for detecting light of the light receiving circuit of the photoelectric sensor respectively generate a first light receiving signal and a second light receiving signal; The difference circuit of the photoelectric sensor performs difference processing on the first light receiving signal and the second light receiving signal to generate a second signal (signal B); and The superimposition circuit performs superimposition processing on the first signal and the second signal to generate a third signal (signal C).

9. The signal processing method according to claim 8, characterized in that: The method further comprises: The feedback circuit of the photoelectric sensor samples the third signal to generate a feedback signal, and inputs the feedback signal into the signal generating circuit; and The signal generating circuit generates an output signal according to the feedback signal, and generates the first signal according to the output signal.

10. The signal processing method according to claim 9, characterized in that: The signal generating circuit generates an output signal according to the feedback signal, comprising: The signal generating circuit calculates a corresponding relationship between the output signal and the third signal according to at least two of the feedback signals and the output signal corresponding to each of the feedback signals; and The output signal is set according to the corresponding relationship and the target value.