Photoelectric sensor
By combining control circuits and sampling and holding circuits in the photoelectric sensors, adjusting the light projection power and sampling, the problems of high resource consumption and cost of existing photoelectric sensors are solved, and efficient distance detection and accuracy retention are achieved.
Patent Information
- Application Number
- CN202420042788.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-08
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2034-01-08
AI Technical Summary
When detecting object distances, existing photoelectric sensors consume a large amount of microcontroller unit (MCU) computing resources, a long adjustment period and a large amount of hardware, resulting in an increase in cost.
A photoelectric sensor is designed to adjust the light projection power through the control circuit to prevent the light receiving signal from saturating, and combined with the sampling and maintenance circuit, reduce the number of hardware and reduce costs, while achieving the same sampling accuracy as the two ADC sampling circuits.
Save MCU computing resources, reduce the time to adjust the light projection power, achieve the same sampling accuracy, reduce hardware design costs, and eliminate deviations through constant value sampling deviations.
Smart Images

Figure CN222189475U_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of optoelectronic technology, and in particular, to a photoelectric sensor. Background Art
[0002] At present, photoelectric sensors are widely used in various fields. One common application is to detect the distance of an object in a photoelectric detection system. For example, the light-emitting part of the photoelectric sensor emits a light signal, and the light-receiving part receives the light signal reflected by the detection object, and determines the distance of the detection object based on the parameters of the received light signal.
[0003] It should be noted that the above introduction to the technical background is only for the convenience of providing a clear and complete description of the technical solutions of the utility model and for the convenience of understanding by those skilled in the art. It cannot be considered that the above technical solutions are well known to those skilled in the art simply because these solutions are described in the background technology section of the utility model. Utility Model Content
[0004] The inventors found that most existing photoelectric sensors use software to adjust the light projection power, which consumes a large amount of microcontroller unit (MCU) computing resources and has a long adjustment cycle. In addition, most existing photoelectric sensors have two analog-to-digital converter (ADC) sampling circuits, which increases the amount of hardware and the cost.
[0005] In order to solve at least one of the above problems or other similar problems, the embodiment of the utility model provides a photoelectric sensor that can prevent the saturation of the light-receiving signal, save MCU computing resources, and reduce the time for adjusting the light projection power. At the same time, it can achieve the same sampling accuracy as the two-way ADC sampling circuit, and reduce the number of hardware and the hardware design cost. In addition, since the control circuit is used in combination with the sample-and-hold circuit, the sampling deviation is a constant value, which is easy to eliminate.
[0006] According to one aspect of the embodiment of the utility model, a photoelectric sensor is provided, the photoelectric sensor comprising:
[0007] A light-casting circuit that sends a light-casting signal;
[0008] A light receiving circuit, comprising a position sensitive detector, wherein the position sensitive detector comprises a first light receiving element and a second light receiving element, wherein the first light receiving element outputs a first signal and the second light receiving element outputs a second signal;
[0009] A control circuit, comprising an input interface, the first signal and the second signal are input to the input interface, and the control circuit generates a control signal for negative feedback control of the power of the light projection signal according to the first signal and the second signal;
[0010] a first amplifier circuit, which amplifies the first signal;
[0011] a second amplifying circuit, which amplifies the second signal; and
[0012] A sample-and-hold circuit performs sample-and-hold on the first signal or the second signal.
[0013] In one or more embodiments, the photoelectric sensor further comprises:
[0014] A sampling circuit samples the amplified first signal or the amplified second signal.
[0015] In one or more embodiments, the sampling circuit includes a multiplexer (MUX), and the sampling circuit samples the amplified first signal or the amplified second signal through the multiplexer.
[0016] In one or more embodiments, the input end of the sample-and-hold circuit is connected to the output end of the first amplifier circuit, and the output end of the sample-and-hold circuit is connected to the first input end of the multiplexer.
[0017] The second input terminal of the multiplexer is connected to the output terminal of the second amplifying circuit.
[0018] In one or more embodiments, the input end of the sample and hold circuit is connected to the output end of the second amplifier circuit, and the output end of the sample and hold circuit is connected to the first input end of the multiplexer.
[0019] The second input terminal of the multiplexer is connected to the output terminal of the first amplifying circuit.
[0020] In one or more embodiments, the sample-and-hold circuit includes at least a switch, a sampling capacitor, and a buffer.
[0021] In one or more embodiments, the control circuit comprises:
[0022] an adding circuit, which performs an addition operation on the first signal and the second signal to obtain a sum of a voltage of the first signal and a voltage of the second signal; and
[0023] A feedback loop compares the sum of the voltage of the first signal and the voltage of the second signal with a preset voltage signal, and outputs the control signal to control the power of the light projection signal.
[0024] In one or more embodiments, a sum of a voltage of the first signal and a voltage of the second signal is a constant value, and a sampling deviation is a constant value.
[0025] In one or more embodiments, the photoelectric sensor further comprises:
[0026] A distance detection unit calculates the distance of the detected object based on first sampling information of the first signal and second sampling information of the second signal output by the sampling circuit; wherein the sampling deviation as a constant value is offset.
[0027] One of the beneficial effects of the embodiment of the utility model is that by adjusting the light projection power through the control circuit, the saturation of the light-receiving signal can be prevented, and the MCU computing resources can be saved and the time for adjusting the light projection power can be reduced. At the same time, the sampling of the two-way signal is completed through the sampling and holding circuit, which can achieve the same sampling accuracy as the two-way ADC sampling circuit, and reduce the number of hardware and the hardware design cost. In addition, since the control circuit is used in combination with the sampling and holding circuit, the sampling deviation is a constant value, which is easy to eliminate.
[0028] With reference to the following description and drawings, specific embodiments of the present invention are disclosed in detail, indicating the manner in which the principles of the present invention can be adopted. It should be understood that the embodiments of the present invention are not limited in scope. Within the spirit and scope of the appended claims, the embodiments of the present invention include many changes, modifications and equivalents.
[0029] Features described and / or illustrated with respect to one embodiment may be used in the same or similar manner in one or more other embodiments, combined with features in other embodiments, or substituted for features in other embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The included drawings are used to provide a further understanding of the embodiments of the utility model, which constitute a part of the specification, are used to illustrate the implementation of the utility model, and together with the text description, explain the principle of the utility model. Obviously, the drawings described below are only some embodiments of the utility model. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0031] Figure 1 is a schematic diagram of a photoelectric sensor according to an embodiment of the utility model;
[0032] Figure 2 It is a structural diagram of a photoelectric sensor of an embodiment of the utility model;
[0033] Figure 3 It is a timing diagram of the sample and hold circuit of the embodiment of the utility model;
[0034] Figure 4 It is a schematic diagram of the sampling deviation of an embodiment of the utility model;
[0035] Figure 5 It is another timing diagram of the sample and hold circuit of the embodiment of the utility model. DETAILED DESCRIPTION
[0036] With reference to the accompanying drawings, the above and other features of the utility model will become apparent through the following description. In the description and the accompanying drawings, specific embodiments of the utility model are specifically disclosed, which show some embodiments in which the principles of the utility model can be adopted. It should be understood that the utility model is not limited to the described embodiments, but rather, the utility model includes all modifications, variations and equivalents within the scope of the attached claims.
[0037] In addition, in the various figures used in the following description, since each structural element is made to be a size that can be recognized on the drawing, the scale varies according to each structural element. The present invention is not limited to the number of structural elements recorded in these figures, the shape of the structural elements, the ratio of the size of the structural elements, and the relative positional relationship of the structural elements.
[0038] In the embodiments of the present invention, the terms "comprise", "include", "have" and the like refer to the existence of stated features, elements, components or assemblies, but do not exclude the existence or addition of one or more other features, elements, components or assemblies.
[0039] In the embodiments of the present invention, the singular forms "a", "the", etc. include plural forms and should be broadly understood as "a kind" or "a type" 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 in part according to...", and the term "based on" should be understood as "at least in part based on...", unless the context clearly indicates otherwise.
[0040] The photoelectric sensor of the embodiment of the utility model is described below with reference to the accompanying drawings.
[0041] An embodiment of the utility model provides a photoelectric sensor.
[0042] Figure 1 Schematic diagram of a photoelectric sensor according to an embodiment of the present utility model. Figure 1 As shown, the photoelectric sensor 100 includes: a light projecting circuit 1, a light receiving circuit 2, a control circuit 3, a first amplifier circuit 4, a second amplifier circuit 5 and a sample and hold circuit 6.
[0043] The light emitting circuit 1 sends a light emitting signal.
[0044] The light receiving circuit 2 includes a position sensitive detector 20 . The position sensitive detector 20 includes a first light receiving element 201 and a second light receiving element 202 . The first light receiving element 201 outputs a first signal S1 , and the second light receiving element 202 outputs a second signal S2 .
[0045] The control circuit 3 comprises an input interface 30 , to which the first signal S1 and the second signal S2 are input. The control circuit 3 generates a control signal for performing negative feedback control on the power of the light projection signal according to the first signal S1 and the second signal S2 .
[0046] The first amplifier circuit 4 amplifies the first signal S1, and the second amplifier circuit 5 amplifies the second signal S2.
[0047] The sample-and-hold circuit 6 samples and holds the first signal S1 or the second signal S2.
[0048] According to the above embodiment, by adjusting the light projection power through the control circuit, the light signal saturation can be prevented, and the MCU computing resources can be saved and the time for adjusting the light projection power can be reduced. At the same time, the sampling of the two-way signal is completed through the sampling and holding circuit, which can achieve the same sampling accuracy as the two-way ADC sampling circuit, and reduce the number of hardware and the hardware design cost. In addition, since the control circuit is used in combination with the sampling and holding circuit, the sampling deviation is a constant value, which is easy to eliminate.
[0049] In some embodiments, the photoelectric sensor 100 may be various types of photoelectric sensors, for example, it 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 may be used for various purposes, for example, it may be used for detecting objects, measuring distances and angles, measuring displacements and vibrations, laser centering and alignment, etc.
[0050] In some embodiments, the first signal S1 output by the first light receiving element 201 and the second signal S2 output by the second light receiving element 202 may be a near-end signal (N signal) and a far-end signal (F signal), respectively. For example, the first signal S1 is an N signal, and the second signal S2 is an F signal. Alternatively, the first signal S1 is an F signal, and the second signal S2 is an N signal.
[0051] In some embodiments, the photosensor 100 further includes a sampling circuit 7. The sampling circuit 7 samples the amplified first signal S1 or the amplified second signal S2.
[0052] In some embodiments, the sampling circuit 7 includes at least one multiplexer (MUX), and the sampling circuit 7 samples the amplified first signal S1 or the amplified second signal S2 through the multiplexer.
[0053] In some embodiments, the sample-and-hold circuit 6 samples and holds the first signal S1 or the second signal S2, that is, the sample-and-hold circuit 6 samples and holds any one of the first signal S1 and the second signal S2. The signal sampled and held by the sample-and-hold circuit 6 is called a sample-and-hold signal. The following description is made by taking the sample-and-hold circuit 6 sampling and holding the F signal as an example, that is, the F signal is a sample-and-hold signal, but the present application is not limited thereto.
[0054] For example, in some embodiments, the input end of the sampling and holding circuit 6 is connected to the output end of the first amplifier circuit 4, the output end of the sampling and holding circuit 6 is connected to the first input end of the multiplexer, and the second input end of the multiplexer is connected to the output end of the second amplifier circuit 5. Thus, the sampling circuit 7 samples the second signal S2, and at the same time, the sampling and holding circuit 6 samples and holds the first signal S1, thereby completing the sampling of the two signals.
[0055] For example, in some embodiments, the input end of the sampling and holding circuit 6 is connected to the output end of the second amplifier circuit 5, the output end of the sampling and holding circuit 6 is connected to the first input end of the multiplexer, and the second input end of the multiplexer is connected to the output end of the first amplifier circuit 4. Thus, the sampling circuit 7 samples the first signal S1, and at the same time, the sampling and holding circuit 6 samples and holds the second signal S2, thereby completing the sampling of the two signals.
[0056] In some embodiments, the sample-and-hold circuit 6 at least includes a switch, a sampling capacitor, and a buffer.
[0057] In some embodiments, the control circuit 3 includes an addition circuit 31 and a feedback circuit 32. The addition circuit 31 performs an addition operation on the voltage of the first signal S1 and the voltage of the second signal S2 to obtain the sum V of the voltage of the first signal S1 and the voltage of the second signal S2. S1 +V S2 The feedback loop 32 generates a voltage V of the sum of the voltage of the first signal S1 and the voltage of the second signal S2. S1 +V S2The preset voltage signal Vref1 is compared with the preset voltage signal Vref1, and a control signal is output to control the power of the light projection signal. S1 +V S2 The smaller the difference between the preset voltage Vref1 and V S1 +V S2 The greater the difference, the greater the voltage change of the control signal, and the greater the power change of the light projection signal.
[0058] Thus, the control circuit 3 performs negative feedback control on the power of the light projection signal of the light projection circuit 1, so that the sum of the voltage of the first signal S1 and the voltage of the second signal S2 can be V S1 +V S2 The voltage level is stabilized at a preset voltage signal level, thereby preventing the first signal and the second signal from being saturated.
[0059] In some embodiments, the addition circuit 31 in the control circuit 3 can be replaced by other circuits, that is, the light-receiving voltage signal can be generated in other ways according to the first signal S1 and the second signal S2. The feedback circuit 32 compares the light-receiving voltage signal with the preset voltage signal Vref1 and outputs a control signal to control the power of the light-casting signal. For example, the light-receiving voltage signal can be the sum of the voltages of the first signal S1 and the second signal S2; or, the light-receiving voltage signal can also be the larger of the voltage of the first signal S1 or the voltage of the second signal S2, and so on.
[0060] In some embodiments, the sum S1+S2 of the first signal S1 and the second signal S2 is a constant value, and the sampling deviation is a constant value.
[0061] For example, when the sampling and holding circuit 6 samples and holds the signal, a sampling and holding deviation (referred to as offset, hereinafter referred to as sampling deviation) will be generated. Generally, the sampling deviation offset is caused by the sampling capacitor. The charging deviation of the sampling capacitor when charging leads to the existence of the sampling deviation offset. And the charging deviation of the sampling capacitor, that is, the sampling deviation offset, will change with the change of the amplitude of the light-receiving signal. Since the control circuit 3 performs negative feedback control on the power of the light-receiving signal of the light-projecting circuit 1, the amplitude of the light-receiving signal is constant, then the sampling deviation offset is also a constant value.
[0062] In some embodiments, the photoelectric sensor 100 further includes a distance detection unit 8. The distance detection unit 8 calculates the distance of the detected object according to the first sampling information of the first signal and the second sampling information of the second signal output by the sampling circuit 7, wherein the sampling deviation as a constant value is offset.
[0063] Figure 2 1 is a structural diagram of a photoelectric sensor 100 according to an embodiment of the present utility model. Figure 2 The hardware structure of the photoelectric sensor 100 is shown as an example.
[0064] In some embodiments, Figure 2 As shown, in the light-casting circuit 1, the light-casting circuit 1 may include a light-emitting diode D1 and a transistor TR1, wherein the control signal output by the feedback loop 32 is applied to the base of the transistor TR1 to control the working state of the transistor TR1 (for example, whether the transistor TR1 is turned on, and the magnitude of the on-current, etc.), thereby adjusting the light-casting power of the light-emitting diode D1. In addition, a resistor R12 is connected in series to the emitter of the transistor TR1.
[0065] In some embodiments, Figure 2 As shown, in the light receiving circuit 2, the first light receiving element 201 may be a photodiode PSD 1 / 2, which outputs an F signal (first signal S1), and the second light receiving element 202 may be a photodiode PSD 2 / 2, which outputs an N signal (second signal S2).
[0066] In some embodiments, Figure 2 As shown, the feedback loop 32 includes a first operational amplifier A1, the inverting input terminal of the first operational amplifier A1 inputs the light-induced voltage signal, the non-inverting input terminal of the first operational amplifier A1 inputs the preset voltage signal Vref2, and the output terminal of the first operational amplifier A1 outputs the control signal. Thus, the control signal reflecting the magnitude relationship between the light-induced voltage signal and the preset voltage signal Vref2 can be generated by the first operational amplifier A1, and the circuit structure is simple.
[0067] In some implementations, such as Figure 2 As shown, the feedback loop 32 may also include a first capacitor C4 and a first resistor R11 connected in parallel, wherein the plates at both ends of the first capacitor C4 are respectively connected to the inverting input port and the output port of the first operational amplifier A1. By setting the first capacitor C4 and the first resistor R11, the amplification factor of signals of different frequencies can be adjusted, for example, the amplification factor of the signal of the operating frequency of the photoelectric sensor 100 is maximized. Thus, the reliability of the control signal can be improved.
[0068] In some embodiments, the adding circuit 31 can perform addition calculation and signal amplification on the first signal and the second signal to obtain a light-induced voltage signal. Figure 2As shown, the addition circuit 31 includes a second operational amplifier A2, the voltage signal of the first signal and the voltage signal of the second signal are input to the non-inverting input terminal of the second operational amplifier A2, and the preset voltage signal Vref1 is input to the inverting input terminal of the second operational amplifier A2 via the resistor R9. The output terminal of the second operational amplifier A2 outputs the light-receiving voltage signal. Thus, the light-receiving voltage signal can be generated by the second operational amplifier A2, and the circuit structure is simple. Among them, the preset voltage signal Vref1 can be a ground voltage. However, the present application is not limited to this, and the preset voltage signal Vref1 can also be other values.
[0069] In some embodiments, Figure 2 As shown, the adding circuit 31 also includes a second capacitor C3 and a second resistor R10 connected in parallel, wherein the plates at both ends of the second capacitor C3 are respectively connected to the inverting input port and the output port of the second operational amplifier A2. By setting the second capacitor C3 and the second resistor R10, the amplification factor of signals of different frequencies can be adjusted, thereby improving the reliability of the light-receiving voltage signal.
[0070] In some embodiments, when the light-receiving voltage signal (for example, the sum of the voltages of the N signal and the F signal) is large (for example, the detection object is close to the light-projecting circuit 1, resulting in strong reflected light), the control signal output by the feedback loop 32 becomes smaller through the feedback control of the feedback loop 32, so that the luminous intensity of the light-emitting diode D1 of the light-projecting circuit 1 becomes smaller, so that the reflected light is weakened, thereby reducing the light-receiving voltage signal; and vice versa. In this way, the light-receiving voltage signal can be maintained within a reasonable range.
[0071] In some embodiments, Figure 2 As shown, the control circuit 3 may further include a first switch SW1. The first switch SW1 is disposed between the first operational amplifier A1 and the light projection circuit 1, and the first switch SW1 is turned on or off by the first switch control signal gate1, thereby controlling the light projection circuit 1 to form a light projection pulse.
[0072] In some embodiments, Figure 2 As shown, the control circuit 3 may further include a second switch SW2. The second switch SW2 is arranged between the inverting input port of the first operational amplifier A1 and the adding loop 31, and the second switch control signal gate2 controls the conduction or disconnection of the second switch SW2. For example, the second switch SW2 is turned on when the light-receiving voltage signal exceeds a specified threshold. For example, after the light-receiving voltage signal stabilizes at the highest point, the second switch control signal gate2 turns on the second switch SW2.
[0073] In some implementations, such as Figure 2As shown, the photoelectric sensor 100 may also include a first amplifier circuit 4 and a second amplifier circuit 5. The first amplifier circuit 4 amplifies the F signal, and the second amplifier circuit 5 amplifies the N signal, thereby outputting the detection results of the amplified F signal and the N signal. The first amplifier circuit 4 may include resistors R1, R3, R5, R7, capacitor C1 and a power amplifier, and the second amplifier circuit 5 may also include resistors R2, R4, R4, R6, capacitor C2 and a power amplifier. The first amplifier circuit 4 and the second amplifier circuit 5 amplify the F signal and the N signal, and reference may be made to the relevant technology, and the present application does not limit this.
[0074] In some implementations, such as Figure 2 As shown, the photoelectric sensor 100 may further include a sampling and holding circuit 6. The sampling and holding circuit 6 may include a resistor R14, a capacitor C5 buffer and a third switch SW3, and the third switch control signal gate3 controls the on or off of the third switch SW3. The sampling and holding circuit 6 can sample and hold any one of the N signal or the F signal. Figure 2 As shown, the sample-and-hold circuit 6 samples and holds the F signal, that is, the sample-and-hold circuit 6 is connected to the first amplifier circuit 4, and the first amplifier circuit 4 inputs the amplified F signal to the sample-and-hold circuit 6. The F signal is a sample-and-hold signal.
[0075] In some implementations, such as Figure 2 As shown, the photoelectric sensor 100 may further include an analog-to-digital converter (ADC) sampling circuit 7. The ADC sampling circuit 7 includes at least one multiplexer (MUX). The ADC sampling circuit 7 selects the N signal or the F signal (sample-hold signal) through the MUX, thereby sampling the N signal or the F signal (sample-hold signal). Figure 2 As shown, the two input terminals of the MUX are respectively connected to the output terminal of the second amplifying loop 5 and the output terminal of the sampling and holding circuit 6. The ADC sampling circuit 7 samples the N signal or the F signal with reference to the relevant technology, and the present application does not limit this.
[0076] It is worth noting that Figure 2 The embodiments of the present application are only schematically described, but the present application is not limited thereto. For example, the connection relationship between the various components can be appropriately adjusted, and other components can be added or some of the components can be reduced. Those skilled in the art can make appropriate modifications based on the above content, and are not limited to Figure 2 Records of.
[0077] In the following, in combination with the hardware structure of the above-mentioned photoelectric sensor 100, the sample-hold circuit 6 is used to implement the sample-hold operation. The sample-hold circuit 6 is used to implement the sample-hold operation on the F signal as an example.
[0078] Figure 3 is a timing diagram of the sampling and holding circuit 6. Figure 3 As shown, the first switch control signal gate1 controls the conduction or disconnection of the first switch SW1, thereby controlling the light projection signal. When the first switch SW1 is turned on, the light projection signal is at a high level. When the first switch SW1 is turned off, the light projection signal is at a low level. The third switch control signal gate3 controls the conduction or disconnection of the third switch SW3, thereby controlling the sampling and holding circuit 6. When the third switch SW3 is turned on, the sampling and holding circuit 6 outputs a high level. When the third switch SW3 is turned off, the sampling and holding circuit 6 outputs a low level. When the F signal reaches the highest point, the third switch SW3 is controlled to be turned off by the third switch control signal gate3, so that the F signal is maintained by the sampling capacitor C5. After the highest point of the F signal has passed, the third switch SW3 is turned on, and the sampling and holding circuit 6 continues to output a high level. At the same time, the N signal charges the sampling capacitor C5.
[0079] The sampling deviation and its elimination are exemplarily described below in combination with the hardware structure of the above-mentioned photoelectric sensor 100 .
[0080] Figure 4 It is a schematic diagram of sampling bias. Figure 4 There are two curves in , one curve is the target sampling timing, that is, the actual light-receiving signal or the real light-receiving signal (for example, F signal ①). The other is the actual sampling timing, that is, the sampling signal actually collected by the sampling circuit 7 after being held by the sampling and holding circuit 6 (for example, F signal ②). The sampling deviation is the deviation between the real light-receiving signal and the sampling signal, for example, the deviation between F signal ① and F signal ②.
[0081] Figure 5 is another timing diagram of the sampling and holding circuit 6. Figure 5 As shown, F1 represents the F signal measured without sampling bias. F2 represents the signal after sampling and holding the F signal, the F signal measured without sampling bias, and the sampling bias offset = F1-F2.
[0082] The distance detection sensor designed based on the PSD original component, under the condition of no sampling deviation, the calculation formula of the distance measurement value D is: D = (NF) / (N + F). Among them, N and F represent the N signal and F signal measured under the condition of no sampling deviation, D represents the distance under the condition of no sampling deviation, and the F signal measured under the condition of no sampling deviation is Figure 5 F1 in.
[0083] Assume that there is a sampling deviation. When the F signal is sampled and held, the F signal obtained after sampling and holding (i.e., the sampled and held signal) is a sampled and held signal F with a sampling deviation. ′ ,Right now Figure 5 The F signal in ②. In the case of deviation, the measured value of the distance D ′ The calculation formula is:
[0084]
[0085] Among them, F ′ =F+offset(Formula 2)
[0086] Among them, the sampling deviation offset is a constant value.
[0087] Distance D ′ Make correction, that is, eliminate D ′ The deviation in can be used to obtain the unbiased distance:
[0088]
[0089] Substituting the above formula 2 into formula 3, we can get This can eliminate the sampling deviation. Since the sampling deviation is a constant value, the deviation can be eliminated even when the magnitude of the sampling deviation is unknown.
[0090] It can be seen from the above embodiments that the photoelectric sensor of the embodiment of the present application can prevent the saturation of the light-receiving signal, save MCU computing resources, and reduce the time for adjusting the light projection power. At the same time, it can achieve the same sampling accuracy as the two-way ADC sampling circuit, and reduce the number of hardware and the hardware design cost. In addition, since the control circuit is used in combination with the sample-and-hold circuit, the sampling deviation is a constant value, which is easy to eliminate.
[0091] The present invention is described above in conjunction with specific implementation methods, but it should be clear to those skilled in the art that these descriptions are exemplary and are not intended to limit the scope of protection of the present invention. Those skilled in the art can make various modifications and variations to the present invention based on the spirit and principles of the present invention, and these modifications and variations are also within the scope of the present invention.
Claims
1. A photoelectric sensor, characterized in that: The photoelectric sensor comprises: A light-casting circuit that sends a light-casting signal; A light receiving circuit, comprising a position sensitive detector, wherein the position sensitive detector comprises a first light receiving element and a second light receiving element, wherein the first light receiving element outputs a first signal and the second light receiving element outputs a second signal; A control circuit, comprising an input interface, the first signal and the second signal are input to the input interface, and the control circuit generates a control signal for negative feedback control of the power of the light projection signal according to the first signal and the second signal; a first amplifier circuit, which amplifies the first signal; a second amplifying circuit, which amplifies the second signal; and A sample-and-hold circuit performs sample-and-hold on the first signal or the second signal.
2. The photoelectric sensor according to claim 1, characterized in that: The photoelectric sensor also includes: A sampling circuit samples the amplified first signal or the amplified second signal.
3. The photoelectric sensor according to claim 2, characterized in that: The sampling circuit includes a multiplexer, and the sampling circuit samples the amplified first signal or the amplified second signal through the multiplexer.
4. The photoelectric sensor according to claim 3, characterized in that: The input end of the sampling and holding circuit is connected to the output end of the first amplifying circuit, and the output end of the sampling and holding circuit is connected to the first input end of the multiplexer. The second input terminal of the multiplexer is connected to the output terminal of the second amplifying circuit.
5. The photoelectric sensor according to claim 3, characterized in that: The input end of the sampling and holding circuit is connected to the output end of the second amplifying circuit, and the output end of the sampling and holding circuit is connected to the first input end of the multiplexer. The second input terminal of the multiplexer is connected to the output terminal of the first amplifying circuit.
6. The photoelectric sensor according to claim 1, characterized in that: The sample-and-hold circuit at least includes a switch, a sampling capacitor and a buffer.
7. The photoelectric sensor according to claim 1, characterized in that: The control circuit comprises: an adding circuit, which performs an addition operation on the first signal and the second signal to obtain a sum of a voltage of the first signal and a voltage of the second signal; and A feedback loop compares the sum of the voltage of the first signal and the voltage of the second signal with a preset voltage signal, and outputs the control signal to control the power of the light projection signal.
8. The photoelectric sensor according to claim 7, characterized in that: The sum of the voltage of the first signal and the voltage of the second signal is a constant value, and the sampling deviation is a constant value.
9. The photoelectric sensor according to claim 8, characterized in that: The photoelectric sensor also includes: A distance detection unit calculates the distance of the detected object based on first sampling information of the first signal and second sampling information of the second signal output by the sampling circuit; wherein the sampling deviation as a constant value is offset.
