Photoelectric sensor and correction method thereof
By calibrating the analog-to-digital conversion circuit of the photoelectric sensor, the detection accuracy problem caused by the range variation of the analog-to-digital converter was solved, and high-precision distance detection of the photoelectric sensor was achieved.
Patent Information
- Application Number
- CN202511220054.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-28
- Publication Date
- 2025-11-07
AI Technical Summary
The range of the analog-to-digital converter varies in actual working conditions, which causes the relationship between the amount of light received by the photoelectric sensor and the detection distance to change, affecting the detection accuracy.
By correcting the analog-to-digital conversion value of the received light signal in the photoelectric sensor according to the actual range of the analog-to-digital conversion circuit, the output value of the analog-to-digital converter can cover the original range of the analog-to-digital converter. A unidirectional transmission medium is used to connect the light receiving circuit and the light projection circuit. The signal level is adjusted by combining the light projection control and switching module, and the calculation circuit calculates the corrected value.
This improved the detection accuracy of the photoelectric sensor, suppressed the variation between the amount of light received and the detection distance, and enhanced the accuracy of the detection.
Smart Images

Figure CN120907434A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronic devices, and in particular to a photoelectric sensor and a correction method thereof. BACKGROUND
[0002] At present, 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 referred to as the “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. The light signal is processed by analog-to-digital conversion to generate a light receiving signal, and the distance between the detection object and the photoelectric sensor is determined according to the light receiving signal. Among them, analog-to-digital conversion is the core link of the photoelectric sensor to convert analog light signals into digital electrical signals, which has an important influence on the accuracy of the distance detection of the photoelectric sensor.
[0003] It should be noted that the above introduction to the technical background is only to facilitate the clear and complete description of the technical solutions of the present application, and to facilitate the understanding of those skilled in the art. The above technical solutions cannot be considered as known to those skilled in the art merely because they are described in the background section of the present application. SUMMARY
[0004] The inventors have found that due to the problem of range variation of the analog-to-digital converter in actual working conditions, the relationship between the light receiving amount of the photoelectric sensor and the detection distance changes, which adversely affects the detection accuracy of the photoelectric sensor.
[0005] To solve at least one of the above technical problems, the embodiments of the present application provide a photoelectric sensor and a correction method thereof. In the photoelectric sensor, the analog-to-digital conversion value of the light receiving signal is corrected according to the actual range of the analog-to-digital conversion circuit, so that the output value of the analog-to-digital converter can cover the original range of the analog-to-digital converter, and the degree of change between the light receiving amount of the photoelectric sensor and the detection distance is suppressed, thereby improving the detection accuracy of the photoelectric sensor.
[0006] The embodiments of the present application provide a photoelectric sensor, which comprises:
[0007] A light projecting circuit that emits light rays based on a received light projecting signal;
[0008] A light receiving circuit that detects the light rays and outputs a light receiving signal;
[0009] an analog-digital conversion circuit, in a state that an input end of the analog-digital conversion circuit is shorted with a first reference voltage terminal, the analog-digital conversion circuit outputs a first value, in a state that the light-receiving circuit is connected with the light-throwing circuit, the analog-digital conversion circuit outputs a second value, the light-receiving signal is input to the analog-digital conversion circuit, and the analog-digital conversion circuit outputs a third value; and
[0010] an operation circuit, which calculates a value after correction of the third value according to the first value and the second value.
[0011] In some embodiments, the photoelectric sensor further comprises:
[0012] a unidirectional transmission medium, which is used to connect the light-receiving circuit with the light-throwing circuit, wherein,
[0013] when the light-receiving circuit and the light-throwing circuit are connected through the unidirectional transmission medium, the light-receiving signal reaches full scale.
[0014] In some embodiments, calculating the value after correction of the third value according to the first value and the second value comprises:
[0015] subtracting the second value from the third value, dividing the result by the difference between the first value and the second value, and multiplying the result by (2 n -1) to obtain the value after correction of the third value,
[0016] wherein n is the number of bits of the analog-digital conversion circuit.
[0017] In some embodiments, the photoelectric sensor further comprises:
[0018] a light-throwing control circuit, which adjusts the gear of the light-throwing signal,
[0019] the light-receiving circuit comprises a switch module, which adjusts the gain gear of the light-receiving signal, wherein,
[0020] the analog-digital conversion circuit reads the light-receiving signal in a state that the light-throwing circuit is interrupted in multiple gears of the light-throwing signal and / or multiple gain gears of the light-receiving signal, and takes the value of the read light-receiving signal as a first coefficient set,
[0021] the operation circuit calculates the difference between multiple sets of the light-throwing signal and the corresponding light-receiving signal as a second coefficient, and obtains the value after correction of the third value according to the first value, the second value, the first coefficient set and the second coefficient.
[0022] In some embodiments, the corresponding first coefficient is selected according to the gear of the light-throwing signal and the light-receiving signal.
[0023] subtracting the second coefficient and the second value from the value of the light receiving signal, dividing by the difference between the first value and the second value, and multiplying by (2 n -1) to obtain a corrected value of the third value,
[0024] wherein n is the number of bits of the analog-to-digital conversion circuit.
[0025] In some embodiments, the switch module is further configured to control the connection between the light emitting circuit and the light receiving circuit and / or the short circuit between the analog-to-digital conversion circuit and the first reference voltage terminal.
[0026] In some embodiments, the switch module is configured as a single-pole double-throw analog switch or a single-pole three-way analog switch.
[0027] In some embodiments, the photoelectric sensor further comprises:
[0028] a trigger circuit configured to trigger the analog-to-digital conversion circuit and the operation circuit to correct the third value.
[0029] Embodiments of the present application provide a correction method of a photoelectric sensor, the correction method comprising:
[0030] short-circuiting an input terminal of the analog-to-digital conversion circuit and the first reference voltage terminal to obtain a first value output by the analog-to-digital conversion circuit;
[0031] connecting the light receiving circuit and the light emitting circuit to obtain a second value output by the analog-to-digital conversion circuit;
[0032] inputting a light receiving signal detected by the light receiving circuit into the analog-to-digital conversion circuit to obtain a third value output by the analog-to-digital conversion circuit;
[0033] calculating a corrected value of the third value according to the first value and the second value.
[0034] In some embodiments, when the light receiving circuit and the light emitting circuit are connected through a one-way transmission medium, the light receiving signal reaches full scale.
[0035] One of the beneficial effects of embodiments of the present application is that, in the photoelectric sensor, the analog-to-digital conversion value of the light receiving signal is corrected according to the actual range of the analog-to-digital conversion circuit, so that the output value of the analog-to-digital converter can cover the original range of the analog-to-digital converter, thereby suppressing the degree of change between the light receiving amount and the detection distance of the photoelectric sensor, and improving the detection accuracy of the photoelectric sensor.
[0036] The particular implementations of the application described herein can best be understood by reference to the accompanying drawings, wherein:
[0037] Features described and / or illustrated with respect to one implementation can be used in one or more other implementations in the same or similar manner, in combination with or in place of features in other implementations, or in combination with or in place of other features.
[0038] It should be emphasized that the term "comprises / comprising" when used in this specification is taken to mean the presence of stated features, integers, steps or components but does not preclude the presence or addition of one or more other features, integers, steps, components or groups thereof. BRIEF DESCRIPTION OF DRAWINGS
[0039] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the principles of the application. In the drawings:
[0040] Figure 1 is a schematic diagram of the conversion relationship between an input signal and an output signal of an analog-to-digital converter;
[0041] Figure 2 is a schematic diagram of the relationship between the amount of light received by a light-receiving sensor of an analog-to-digital converter based on Figure 1
[0042] Figure 3 is a schematic diagram of a light-receiving sensor of an embodiment of the application;
[0043] Figure 4 is a schematic diagram of an analog-to-digital conversion circuit of an embodiment of the application;
[0044] Figure 5 is a schematic diagram of an analog-to-digital conversion circuit of an embodiment of the application;
[0045] Figure 6 is a schematic diagram of the conversion relationship between an input signal and an output signal of an analog-to-digital conversion circuit of an embodiment of the application during a correction process;
[0046] Figure 7 is a schematic diagram of the conversion relationship between an input signal and an output signal of an analog-to-digital conversion circuit of an embodiment of the application after completion of a correction process;
[0047] Figure 8 is a schematic diagram of a correction method of the photoelectric sensor of the embodiments of the present application. DETAILED DESCRIPTION
[0048] The foregoing and other features of the present embodiments will become apparent to those skilled in the art upon consideration of the following description of the application with reference to the accompanying drawings. In the drawings, specific embodiments of the application are disclosed with reference to a few specific embodiments thereof, which are indicative of the principles of the present application in which the principles of the present application can be employed. It is to be understood that the application is not limited to the described embodiments, but includes all modifications, variations, and equivalents that fall within the scope of the appended claims.
[0049] In the embodiments of the present application, the terms "first", "second", and the like are used to distinguish different elements from each other, but do not indicate spatial arrangement or time sequence of the elements, and the elements should not be limited by these terms. The term "and / or" includes any one and all combinations of the associated listed terms. The terms "comprise", "include", "have", and the like, refer to the existence 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.
[0050] In the embodiments of the present application, the singular forms "a", "an", and "the" include the plural forms, should be broadly understood as "one" or "one kind" rather than the meaning of "one", and in addition, the term "said" should be understood as including 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.
[0051] Features described and / or illustrated with respect to one implementation can be used in the same or similar manner in one or more other implementations, combined with features in other implementations, or substituted for features in other implementations. The term "comprise / comprising" as used herein indicates the presence of the stated features, integers, steps or components but does not preclude the presence or addition of one or more other features, integers, steps, components, or groups thereof.
[0052] In the photoelectric sensor, the light receiving circuit converts the received light signal into an electrical signal, which is an analog signal, which is converted into a digital signal by an analog-to-digital converter, and subsequent operation circuitry can operate based on the digital signal.
[0053] Figure 1 is a schematic diagram of the conversion relationship between the input signal and the output signal of the analog-to-digital converter. As Figure 1As shown, the horizontal axis represents the value of the analog signal input to the analog-to-digital converter (ADC), ranging from 0 to 1. When the ADC input is grounded, the input signal value is 0; when the ADC input is connected to a power supply, the input signal value is 1. The vertical axis represents the value of the digital signal output by the ADC, ranging from 0 to full scale 0.11 (for example, for a 12-bit ADC, the full scale is 2). 12 -1=4095), curve 101 represents the relationship between the input and output values of the ADC under ideal conditions (e.g., without ADC errors and full-scale range variations). The ADC signal output range O1 is 0 to O11, which can cover the full scale. Curve 102 represents the relationship between the input and output values of the ADC when there are sampling deviations and range variations. The ADC signal output range O2 is O21 to O22, where O21>0, which cannot reach the zero scale, and O22<4095, which cannot reach the full scale. This will cause zero-scale error and full-scale error, interfering with the accuracy of the output signal.
[0054] Figure 2 Based on Figure 1 A schematic diagram illustrating the relationship between the amount of light received by the photoelectric sensor of an analog-to-digital converter and the detection distance. (Example) Figure 2 As shown, the horizontal axis represents the detection distance of the photoelectric sensor, and the vertical axis represents the amount of light received by the photoelectric sensor. Curve 201 shows the relationship between the amount of light received by the photoelectric sensor and the detection distance under ideal conditions (e.g., without ADC errors or full-scale range variations). Curve 202 shows the relationship between the amount of light received by the photoelectric sensor and the detection distance when there are ADC sampling errors and range variations. Within the effective detection range 203 of the photoelectric sensor, the change in the amount of light received under ideal conditions is Q1 when the detection distance changes from D1 to D2. However, when there are ADC sampling errors and range variations, the change in the amount of light received is Q2, where Q2 < Q1. This reduces the detection accuracy of the photoelectric sensor.
[0055] To address the aforementioned issues, this application provides a photoelectric sensor.
[0056] Figure 3 This is a schematic diagram of a photoelectric sensor according to an embodiment of this application. Figure 4 This is a schematic diagram of an analog-to-digital conversion circuit according to an embodiment of this application. Figure 5 This is a schematic diagram of an analog-to-digital conversion circuit according to an embodiment of this application. Figure 3 As shown, the photoelectric sensor 300 includes a light-emitting circuit 301, a light-receiving circuit 302, an analog-to-digital conversion circuit 303, and a processing circuit 304.
[0057] The light projecting circuit 301 emits light based on the received light projecting signal; the light receiving circuit 302 detects the light and outputs a light receiving signal S0; as shown in FIG. 3, in a state where the input end 402 of the analog-digital conversion circuit 303 is short-circuited with the first reference voltage terminal 401, the analog-digital conversion circuit 303 outputs a first value S1, as shown in FIG. 4, in a state where the light receiving circuit 302 is connected with the light projecting circuit 301, i.e., the input end 402 of the analog-digital conversion circuit 303 is connected with the light receiving signal terminal 404, the analog-digital conversion circuit 303 outputs a second value S2, the light receiving signal S1 is input into the analog-digital conversion circuit 303, and the analog-digital conversion circuit 303 outputs a third value S3; the operation circuit 304 calculates a corrected value S4 of the third value S3 according to the first value S1 and the second value S2. Figure 4 Figure 5
[0058] In the photoelectric sensor 300, the input end 402 of the analog-digital conversion circuit 303 is connected with the first reference voltage terminal 401 and the light receiving signal terminal 404 respectively to obtain the first value S1 and the second value S2, the interval between the first value S1 and the second value S2 is the actual range of the analog-digital conversion circuit 303, and the analog-digital conversion value S3 of the light receiving signal S0 is corrected according to the first value S1 and the second value S2, so that the corrected value S4 can cover the original range (e.g., full range) of the analog-digital converter 303, thereby suppressing the change degree between the light receiving amount of the photoelectric sensor and the detection distance and improving the detection precision of the photoelectric sensor.
[0059] In some examples, the first value S1, the second value S2, the third value S3 and the corrected value S4 of the third value are all digital signals.
[0060] In some examples, the first value S1 can be referred to as a maximum (max) coefficient, and the second value S2 can be referred to as a minimum (min) coefficient.
[0061] In some examples, the corrected value S4 of the third value refers to the third value after correction, and the value S4 can cover the original range (e.g., full range) of the analog-digital converter 303.
[0062] As shown in FIG. 3, the photoelectric sensor 300 further includes a one-way transmission medium 305, a light projecting control circuit 306 and a trigger circuit 307. Figure 3 The one-way transmission medium 305 is used to connect the light receiving circuit 302 with the light projecting circuit 301, wherein when the light receiving circuit 302 and the light projecting circuit 301 are connected through the one-way transmission medium 305, the light receiving signal S0 reaches the full range.
[0063]
[0064] In some examples, the full-scale of the received light signal S0 means that the current-carrying electrons inside the received light circuit 302 reach saturation, and the received light signal S0 output by the received light circuit 302 no longer increases with the intensity of the received light.
[0065] In some examples, the unidirectional transmission medium 305 can include a first optical fiber 3051, a second optical fiber 3052, and a switching unit 3053, wherein the switching unit 3053 can adjust the connection state of the first optical fiber 3051 and the second optical fiber 3052:
[0066] For example, the switching unit 3053 can connect the light exit end of the first optical fiber 3051 and the light entrance end of the second optical fiber 3052, so that the light emitted by the light projection circuit 301 can enter the received light circuit 302 through the first optical fiber 3051 and the second optical fiber 3052, and at this time, the received light signal generated by the received light circuit 302 is a full-scale received light signal.
[0067] For another example, the switching unit 3053 can disconnect the light exit end of the first optical fiber 3051 and the light entrance end of the second optical fiber 3052, so that the light projection circuit 301 can emit light to the detection object O through the first optical fiber 3051, and the received light circuit 302 can receive the light reflected by the detection object O through the second optical fiber 3052, and at this time, the received light signal generated by the received light circuit 302 is a received light signal S0 in a detection state.
[0068] In some examples, the switching unit 3053 can be configured as a mechanical optical switch element, an electro-optical optical switch element, or a thermo-optical optical switch element, etc., wherein the mechanical optical switch element realizes light path switching by moving the positions of the first optical fiber 3051 and the second optical fiber 3052, the electro-optical optical switch element realizes transmission and blocking of the optical signal of the first optical fiber 3051 and the second optical fiber 3052 by voltage control, and the thermo-optical optical switch element realizes light path switching of the first optical fiber 3051 and the second optical fiber 3052 by heating control, and the implementation form of the switching unit 3053 is not limited thereto.
[0069] The light projection control circuit 306 adjusts the gear of the light projection signal.
[0070] In some examples, adjusting the gear of the light projection signal includes adjusting the intensity and / or power level of the light signal emitted by the light projection circuit 301 according to the received light power when the detection distance is set, for example, including 2 or more light projection power gears, selecting a gear to emit a light projection signal, so that the amount of light reflected by the detection object O after the emitted light reaches the detection object O and received by the received light circuit 302 is within the effective detection range 203 of the photoelectric sensor 300, and the specific adjustment method can refer to the prior art.
[0071] The trigger circuit 307 is used to trigger the analog-to-digital conversion circuit 303 and the operation circuit 304 to correct the third value.
[0072] In some examples, the trigger circuit 307 is set as a combination of specific keys or an external input signal to trigger the correction function of the photoelectric sensor 300, so as to eliminate the deviation caused by the aging and the working condition of the photoelectric sensor 300.
[0073] As shown in Figure 3 The light receiving circuit 302 includes a switch module 308, which can include a plurality of switch components, each of which is used to adjust the gain level of the light receiving signal S0, and / or control the connection between the light emitting circuit 301 and the light receiving circuit 302, and / or short the analog-digital conversion circuit 303 and the first reference voltage terminal 401.
[0074] In some examples, adjusting the gain level of the light receiving signal S0 includes adjusting the amplification multiple of the light receiving circuit 302 to the received light signal, and the specific adjustment method can refer to the prior art.
[0075] In some embodiments, each switch component in the switch module 308 is set as a single-pole double-throw analog switch or a single-pole three-type analog switch.
[0076] In some examples, the switch module 308 is started after receiving the trigger signal of the trigger circuit 307.
[0077] Figure 6 is a schematic diagram of the conversion relationship between the input signal and the output signal of the analog-digital conversion circuit in the correction process of the embodiment of the present application, Figure 7 is a schematic diagram of the conversion relationship between the input signal and the output signal of the analog-digital conversion circuit after the correction is completed.
[0078] In the present application, the photoelectric sensor 300 (for example, with n bits) calculates the corrected value S4 of the third value S3, including:
[0079] Subtracting the second value S2 from the third value S3, as shown in Figure 1 and Figure 6 As shown in the figure, the relationship between the input value and the output value of the analog-digital conversion circuit 303 is shifted from curve 102 to curve 103, indicating that the signal output range of the analog-digital conversion circuit 303 is converted from O21 to O22 to 0 to O23, thereby reducing the zero-scale error of the analog-digital conversion circuit 303.
[0080] Then, divide the difference between the first value S1 and the second value S2 by (2 n -1), to obtain the corrected value S4 of the third value S3, as shown in Figure 6 and Figure 7As shown, the relationship between the input value and the output value of the analog-digital conversion circuit 303 is stretched from the curve 103 to the curve 104, which coincides with the curve 101 in the ideal state, indicating that the signal output range of the analog-digital conversion circuit 303 is converted from 0 to 023 to 0 to 024, which coincides with the full range covered in the ideal state, thereby reducing the full-scale error of the analog-digital conversion circuit 303.
[0081] In some examples, the difference between the first value and the second value can be referred to as a scaling factor.
[0082] In some embodiments, the analog-digital conversion circuit 303 reads the light receiving signal S0 when the light emitting circuit 301 is in the blocked state in multiple light emitting signal levels and / or gain levels of the light receiving signal S0, takes the value of the read light receiving signal S0 as the first coefficient set, and the operation circuit 304 calculates the difference between multiple groups of light emitting signals and the corresponding light receiving signal S0 as the second coefficient; according to the first value S1, the second value S2, the first coefficient set and the second coefficient, the third value S3 is obtained. The corrected value S4.
[0083] In some examples, the light emitting circuit 301 in the blocked state means that the light receiving circuit 302 does not receive light reflected by the detection object O.
[0084] In some examples, the first coefficient set can be referred to as a calculation coefficient set.
[0085] In some examples, the multiple groups of light emitting signals can be set to 4 groups, 8 groups or other groups.
[0086] In some examples, the second coefficient can be referred to as a difference calculation coefficient.
[0087] In some embodiments, according to the levels of the light emitting signal and the light receiving signal, the corresponding first coefficient is selected;
[0088] The value of the light receiving signal S0 is subtracted by the second coefficient and the second value S2, divided by the difference between the first value S1 and the second value S2, and multiplied by (2 n -1), to obtain the corrected value S4 of the third value S3, wherein n is the number of bits of the analog-digital conversion circuit 303.
[0089] In the present application, when the photoelectric sensor 300 is normally working, the conduction between the light receiving signal S0 and the analog-digital conversion circuit 303 is opened and closed according to the periodic timing of the light projection signal. The way of closing the conduction is to short the input end 402 of the analog-digital conversion circuit 303 with the reference power supply (i.e., the first reference voltage terminal 401). The way of opening the conduction is to connect the input end 402 of the analog-digital conversion circuit 303 with the light receiving signal S0, and because the amount of light reflected back to the light receiving circuit 302 is very large, the light receiving signal is saturated to reach the full scale. After the trigger circuit 307 is set to enter the correction mode, the operation circuit 304 reads the first value S1, the second value S2 and the third value S3 respectively, and calculates the corrected value S4.
[0090] The present application also provides a correction method of a photoelectric sensor.
[0091] Figure 8 is a schematic diagram of the correction method of the photoelectric sensor of the present application. As shown in the figure, the method comprises the following operations: Figure 8
[0092] 801: short the input end 402 of the analog-digital conversion circuit 303 with the first reference voltage terminal 401 to obtain the first value output by the analog-digital conversion circuit 303;
[0093] 802: connect the light receiving circuit 302 with the light projection circuit 301 to obtain the second value output by the analog-digital conversion circuit 303;
[0094] 803: input the light receiving signal detected by the light receiving circuit 302 into the analog-digital conversion circuit 303 to obtain the third value output by the analog-digital conversion circuit 303;
[0095] 804: calculate the corrected value of the third value according to the first value and the second value.
[0096] In operation 802, when the light receiving circuit 302 is connected with the light projection circuit 301 through the one-way transmission medium, the light receiving signal reaches the full scale.
[0097] By the above method, the input end 402 of the analog-digital conversion circuit 303 is connected with the first reference voltage terminal 401 and the light receiving signal terminal 404 respectively to obtain the first value S1 and the second value S2, and the interval between the first value S1 and the second value S2 is the actual range of the analog-digital conversion circuit 303. According to the first value S1 and the second value S2, the analog-digital conversion value S3 of the light receiving signal S0 is corrected, so that the corrected value S4 can cover the original range (e.g., the full scale) of the analog-digital converter 303, thereby suppressing the change degree between the light receiving amount and the detection distance of the photoelectric sensor, and improving the detection accuracy of the photoelectric sensor.
[0098] The preferred embodiments of the application have been described above with reference to the accompanying drawings. Many features and advantages of the embodiments are apparent from the detailed specification, and it is therefore intended by the appended claims to cover all such features and advantages of the embodiments within their true spirit and scope. Further, since numerous modifications and changes can be made to the embodiments by those having ordinary skill in the art without departing from the scope of the application, it is not intended that the application be limited to the exact construction and operation described herein, but rather that the application cover all modifications and equivalents falling within the scope of the claims.
Claims
1. A photosensor, characterized by, The photoelectric sensor comprises: a light emitting circuit, which emits light based on a received light emitting signal; a light receiving circuit, which detects the light and outputs a light receiving signal; an analog-digital conversion circuit, which outputs a first value in a state that an input end of the analog-digital conversion circuit is short-circuited with a first reference voltage terminal, outputs a second value in a state that the light receiving circuit is connected with the light emitting circuit, and outputs a third value in a state that the light receiving signal is input into the analog-digital conversion circuit; and a calculation circuit, which calculates a corrected value of the third value according to the first value and the second value.
2. The photosensor according to claim 1, characterized in that, The photoelectric sensor further comprises: a one-way transmission medium, which is used to connect the light receiving circuit with the light emitting circuit, wherein when the light receiving circuit and the light emitting circuit are connected through the one-way transmission medium, the light receiving signal reaches a full scale.
3. The photoelectric sensor according to claim 1, wherein calculating the corrected value of the third value according to the first value and the second value comprises: subtracting the second value from the third value, dividing by the difference between the first value and the second value, and multiplying by (2 n -1) to obtain a corrected value of the third value, wherein n is a bit number of the analog-digital conversion circuit.
4. The photosensor of claim 1, wherein, The photoelectric sensor further comprises: a light emitting control circuit, which adjusts a gear of the light emitting signal, the light receiving circuit comprises a switch module, which adjusts a gain gear of the light receiving signal, wherein the analog-digital conversion circuit reads the light receiving signal in a state that the light emitting circuit is interrupted in a plurality of gears of the light emitting signal and / or a plurality of gain gears of the light receiving signal, and takes a value of the read light receiving signal as a first coefficient set, the calculation circuit calculates a difference value of a plurality of groups of the light emitting signal and corresponding light receiving signal as a second coefficient, and obtains the corrected value of the third value according to the first value, the second value, the first coefficient set and the second coefficient.
5. The photoelectric sensor according to claim 4, wherein a corresponding first coefficient is selected according to the gears of the light emitting signal and the light receiving signal; subtracting the second coefficient and the second value from the value of the light reception signal, dividing by the difference between the first value and the second value, and multiplying by (2 n -1) to obtain a value of the third value after correction, wherein n is a bit number of the analog-digital conversion circuit.
6. The photoelectric sensor according to claim 4, wherein the switch module is further used to control connection of the light emitting circuit with the light receiving circuit and / or short-circuiting of the analog-digital conversion circuit with the first reference voltage terminal.
7. The photoelectric sensor according to claim 6, wherein the switch module is set as a single-pole double-throw analog switch or a single-pole three-type analog switch.
8. The photosensor of claim 1, wherein, The photoelectric sensor further comprises: a trigger circuit, which is used to trigger the analog-digital conversion circuit and the calculation circuit to correct the third value.
9. A method of calibrating a photosensor, characterized by, The correction method comprises: short-circuiting an input end of the analog-digital conversion circuit with a first reference voltage terminal to obtain a first value output by the analog-digital conversion circuit; connecting the light receiving circuit with the light emitting circuit to obtain a second value output by the analog-digital conversion circuit; inputting a light receiving signal detected by the light receiving circuit into the analog-digital conversion circuit to obtain a third value output by the analog-digital conversion circuit; calculating a corrected value of the third value according to the first value and the second value.
10. The correction method according to claim 9, wherein When the light receiving circuit and the light projecting circuit are connected through a unidirectional transmission medium, the light receiving signal reaches full scale.