Proximity detection circuit and proximity sensor

By controlling the output voltage signal of the inverting integrator when the state of the transmitting unit switches in the proximity detection circuit, the problem of ambient light interfering with the proximity sensor's judgment of object distance is solved, achieving higher detection accuracy and reliability.

CN115453647BActive Publication Date: 2026-05-26WUHAN JUXIN MICROELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN JUXIN MICROELECTRONICS CO LTD
Filing Date
2022-10-21
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

When existing proximity sensors detect the distance of objects, ambient light can interfere with their judgment of the distance, resulting in low detection accuracy.

Method used

When the state of the transmitting unit is switched, the control unit in the proximity detection circuit controls the output voltage signal of the integrator to be inverted. The photocurrents corresponding to ambient light and reflected light are integrated separately to remove the influence of ambient light and obtain the target voltage signal to determine the proximity of the object.

Benefits of technology

It improves the accuracy of proximity detection, ensures the reliability of the proximity detection circuit, and can accurately determine the proximity of the target object.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115453647B_ABST
    Figure CN115453647B_ABST
Patent Text Reader

Abstract

This application discloses a proximity detection circuit and a proximity sensor. The circuit includes: a receiving unit that receives a first photocurrent in response to received ambient light, and a second photocurrent that receives both reflected light and ambient light; a control unit that controls the operating state of a transmitting unit and, when the transmitting unit switches states, controls the output voltage signal of an integrating unit to invert; and an integrating unit that integrates the first photocurrent and the second photocurrent to obtain corresponding first and second output voltage signals, and, based on the first and second output voltage signals, obtains a target voltage signal for proximity detection. The target voltage signal obtained by the proximity detection circuit of this application is a voltage signal after filtering out the influence of ambient light. Determining the distance to the target object based on this target voltage signal ensures the accuracy of the proximity detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of proximity sensor technology, specifically to a proximity detection circuit and a proximity sensor. Background Technology

[0002] Proximity sensors can detect the presence of an object and its distance from the sensor. Their applications are wide-ranging, including speed detection, hand detection in automatic faucets, automatic counting or inspection of objects on conveyor belts, paper edge detection in printers, and screen-on / off control in electronic products.

[0003] Photoelectric proximity sensors emit a beam of light into the outside world through a light-emitting diode (LED) or a vertical-cavity surface-emitting laser (VCSEL). The light is reflected off an object, and the reflected light is received by a photodiode (PD). The PD converts the reflected light signal into a photocurrent signal. The closer the object is, the stronger the reflected light received by the PD, and the larger the corresponding photocurrent. By quantifying the magnitude of the photocurrent, the distance of the object can be determined.

[0004] However, since there are many different light sources in the environment, such as sunlight and lamps, the PD receives not only reflected light but also ambient light. This means that the photocurrent is related not only to the reflected light but also to the ambient light. The ambient light mixed in with the reflected light can interfere with the judgment of the distance of objects. Summary of the Invention

[0005] This application provides a proximity detection circuit and a proximity sensor, aiming to solve the problem that existing proximity sensors have low detection accuracy because ambient light interferes with their judgment of the distance of objects.

[0006] In a first aspect, this application provides a proximity detection circuit, which includes a receiving unit, a control unit, and an integrating unit. The receiving unit is electrically connected to the integrating unit and the control unit, and the receiving unit is correspondingly configured with a transmitting unit.

[0007] The receiving unit is used to obtain a first photocurrent in response to received ambient light when the transmitting unit is in the off state, and to obtain a second photocurrent in response to received reflected light and ambient light when the transmitting unit is in the emitting state; the reflected light is the light signal formed after the detection light emitted by the transmitting unit in the emitting state is reflected by the target object.

[0008] The control unit is used to control the working state of the transmitting unit and to control the output voltage signal of the integrating unit to be inverted when the transmitting unit switches states.

[0009] The integration unit is used to integrate the first photocurrent and the second photocurrent respectively to obtain the corresponding first output voltage signal and second output voltage signal, and based on the first output voltage signal and the second output voltage signal, to obtain the target voltage signal for proximity detection.

[0010] In one possible implementation of this application, the integration unit includes a first operational amplifier and a first integrating capacitor. The first integrating capacitor is electrically connected between the negative input terminal and the output terminal of the first operational amplifier via a combination switch. The combination switch is configured as follows:

[0011] When the transmitting unit is in the off state, in response to the first drive signal of the control unit, the first plate of the first integrating capacitor is electrically connected to the output terminal of the first operational amplifier and the second plate of the first integrating capacitor is electrically connected to the negative input terminal of the first operational amplifier.

[0012] When the transmitting unit is in the light-emitting state, in response to the second drive signal of the control unit, the first plate of the first integrating capacitor is electrically connected to the negative input terminal of the first operational amplifier, and the second plate of the first integrating capacitor is electrically connected to the output terminal of the first operational amplifier.

[0013] In one possible implementation of this application, the receiving unit includes a first photodiode, the cathode of which is connected to the negative input terminal of a first operational amplifier, and the anode of which is connected to ground. The combination switch is configured as follows:

[0014] In response to the first drive signal, the first main switch and the second main switch are closed, and the first auxiliary switch and the second auxiliary switch are turned off;

[0015] In response to the second drive signal, the first main switch and the second main switch are turned off, and the first auxiliary switch and the second auxiliary switch are closed.

[0016] In one possible implementation of this application, the combination switch includes a first single-pole double-throw switch and a second single-pole double-throw switch. The moving contact of the first single-pole double-throw switch is connected to the second plate of the first integrating capacitor. The first stationary contact of the first single-pole double-throw switch is connected to the negative input terminal of the first operational amplifier. The second stationary contact of the first single-pole double-throw switch is connected to the output terminal of the first operational amplifier.

[0017] The moving contact of the second single-pole double-throw switch is connected to the first plate of the first integrating capacitor, the first stationary contact of the second single-pole double-throw switch is connected to the output terminal of the first operational amplifier, and the second stationary contact of the second single-pole double-throw switch is connected to the negative input terminal of the first operational amplifier.

[0018] In one possible implementation of this application, the receiving unit includes a first photodiode, the cathode of which is connected to the negative input terminal of a first operational amplifier, and the anode of which is connected to ground. The combination switch is configured as follows:

[0019] In response to the first drive signal, the moving contact of the first single-pole double-throw switch is connected to the first stationary contact of the first single-pole double-throw switch, and the moving contact of the second single-pole double-throw switch is connected to the first stationary contact of the second single-pole double-throw switch.

[0020] In response to the second drive signal, the moving contact of the first single-pole double-throw switch is connected to the second stationary contact of the first single-pole double-throw switch, and the moving contact of the second single-pole double-throw switch is connected to the second stationary contact of the second single-pole double-throw switch.

[0021] In one possible implementation of this application, the proximity detection circuit further includes a switched capacitor unit and an analog-to-digital converter unit, wherein the switched capacitor unit is electrically connected to the integration unit and the analog-to-digital converter unit, respectively.

[0022] The switched capacitor unit is used to obtain an analog signal from the target voltage signal output by the integrator and output it to the analog-to-digital converter unit.

[0023] The analog-to-digital converter is used to convert analog signals into digital signals, which are used to characterize the proximity of the target object.

[0024] In one possible implementation of this application, the switched capacitor unit includes a second operational amplifier, a second capacitor, a third capacitor, a second switch, a third switch, and a fourth switch;

[0025] The second switch and the second capacitor are connected in series between the output of the integrator and the negative input of the second operational amplifier. The second capacitor is also connected to a reference voltage source through the third switch.

[0026] The third capacitor and the fourth switch are connected in series between the negative input terminal and the output terminal of the second operational amplifier;

[0027] The output of the second operational amplifier is connected to the input of the analog-to-digital converter.

[0028] Secondly, this application also provides a proximity sensor, which includes a proximity detection circuit of the first aspect or any possible implementation of the first aspect.

[0029] From the above, it can be concluded that this application has the following beneficial effects:

[0030] In this application, when the transmitting unit switches states, the control unit controls the output voltage signal of the integrating unit to be inverted, which can invert either the first or second output voltage signal. Then, after the transmitting unit switches its working state, the integrating unit integrates the second or first photocurrent based on the inverted first or second output voltage signal. Thus, the target voltage signal finally output by the integrating unit is the voltage signal after removing the voltage corresponding to the ambient light. This voltage signal can accurately determine the proximity of the target object, improve the accuracy of proximity detection, and ensure the reliability of the proximity detection circuit. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of this application will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0032] Figure 1 This is a schematic diagram of a functional module of the proximity detection circuit provided in the embodiments of this application;

[0033] Figure 2 This is a schematic diagram of the circuit principle of an integration unit provided in the embodiments of this application;

[0034] Figure 3 This is a schematic diagram of the circuit principle of the integrating unit when the transmitting unit is in the cutoff state, provided in the embodiments of this application;

[0035] Figure 4 This is a schematic diagram of the circuit principle of the integrating unit when the emitting unit is in the light-emitting state, provided in the embodiments of this application;

[0036] Figure 5 This is a schematic diagram of one embodiment of the combination switch provided in this application;

[0037] Figure 6 This is a schematic diagram of the state of the combination switch when the transmitting unit is in the off state according to the embodiment of this application;

[0038] Figure 7 This is a schematic diagram of a combination switch when the transmitting unit is in the light-emitting state according to an embodiment of this application;

[0039] Figure 8 This is a timing diagram of the target voltage signal provided in the embodiments of this application;

[0040] Figure 9 This is a schematic diagram of another embodiment of the combination switch provided in this application;

[0041] Figure 10 This is another schematic diagram of the combination switch when the transmitting unit is in the off state according to the embodiments of this application;

[0042] Figure 11 This is another schematic diagram of the combination switch when the transmitting unit is in the light-emitting state according to the embodiments of this application;

[0043] Figure 12 This is a schematic diagram of another functional module of the proximity detection circuit provided in the embodiments of this application;

[0044] Figure 13 This is a schematic diagram of a switched capacitor unit provided in an embodiment of this application;

[0045] Figure 14 This is a timing diagram of the target voltage signal provided in the embodiments of this application;

[0046] Figure 15 This is another timing diagram of the target voltage signal provided in the embodiments of this application;

[0047] Figure 16 This is a schematic diagram of the proximity sensor provided in an embodiment of this application;

[0048] Figure 17 This is another structural schematic diagram of the proximity sensor provided in the embodiments of this application. Detailed Implementation

[0049] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0050] In the description of this application, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.

[0051] It should be noted that in the embodiments of this application, "connection" can be understood as electrical connection. The connection between two electrical components can be a direct or indirect connection between the two electrical components. For example, the connection between A and B can be a direct connection between A and B, or an indirect connection between A and B through one or more other electrical components.

[0052] In this application, the term "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use this application. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be made without using these specific details. In other instances, well-known structures and processes are not described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.

[0053] This application provides a proximity detection circuit and a proximity sensor, which will be described in detail below.

[0054] First, this application provides a proximity detection circuit; please refer to [link to relevant documentation]. Figure 1 , Figure 1 This is a schematic diagram of a functional module of the proximity detection circuit provided in the embodiment of this application. The proximity detection circuit includes a receiving unit 102, a control unit (not shown in the figure), and an integrating unit 103. The receiving unit 102 is electrically connected to the integrating unit 103 and the control unit, respectively. The receiving unit 102 is correspondingly configured with a transmitting unit 101.

[0055] The receiving unit 102 can be used to obtain a first photocurrent in response to the received ambient light when the transmitting unit 101 is in the off state, and to obtain a second photocurrent in response to the received reflected light and ambient light when the transmitting unit 101 is in the light-emitting state; the reflected light is the light signal formed by the reflection of the detection light emitted by the transmitting unit 101 in the light-emitting state by the target object.

[0056] The control unit can be used to control the working state of the transmitting unit 101 and to control the output voltage signal of the integrating unit 103 to be inverted when the transmitting unit 101 switches states.

[0057] The integration unit 103 can be used to integrate the first photocurrent and the second photocurrent respectively to obtain the corresponding first output voltage signal and second output voltage signal, and based on the first output voltage signal and the second output voltage signal, obtain the target voltage signal for proximity detection.

[0058] In this embodiment of the application, the emitting unit 101 can be configured with two working states, namely the emitting state and the cut-off state. It can be understood that when the emitting unit 101 is in the emitting state, the emitting unit 101 can emit detection light, while when the emitting unit 101 is in the cut-off state, the emitting unit 101 does not emit light, that is, no detection light is emitted at this time.

[0059] Understandably, the wavelength of the detection light emitted by the transmitting unit 101 can match the wavelength of the light that the receiving unit 102 can sense. For example, if the detection light emitted by the transmitting unit 101 is visible light or a certain visible light range, then the reflected light that the receiving unit 102 can sense is also the corresponding visible light or a certain visible light range; if the detection light emitted by the transmitting unit 101 is infrared light or a certain invisible light range, then the reflected light that the receiving unit 102 can sense is also the corresponding infrared light or a certain invisible light range.

[0060] The control unit can control the emission of detection light by controlling the working state of the emitting unit 101. For example, when the control unit sends a trigger signal to the emitting unit 101, the emitting unit 101 can respond to the trigger signal and enter the emission state, thereby emitting detection light based on a certain emission frequency; when the control unit stops sending the trigger signal to the emitting unit 101, the emitting unit 101 changes from the emission state to the cut-off state, thereby stopping the emission of detection light; when the control unit sends the trigger signal to the emitting unit 101 again, the emitting unit 101 responds to the trigger signal and changes from the cut-off state to the emission state, emitting detection light again.

[0061] In this embodiment, the emitting unit 101 can be a light source with light-emitting function, such as a light-emitting diode (LED) or a vertical cavity surface-emitting laser (VCSEL). The specific device configuration of the emitting unit 101 may be different in different application scenarios, and no specific limitation is made here.

[0062] The detection light emitted by the transmitting unit 101 can be reflected by the target object to form reflected light that is directed to the receiving unit 102. The receiving unit 102 can generate a corresponding photocurrent based on the received reflected light. Based on the photocurrent, the proximity of the target object can be determined. The proximity can be the distance of the target object relative to the proximity detection circuit, the transmitting unit 101, the receiving unit 102, or a pre-set reference point.

[0063] In addition to the transmitting unit 101, there may be other light sources in the environment, such as the sun and incandescent lamps. If the wavelength of the light emitted by these light sources, i.e., ambient light, is within the light range that the receiving unit 102 can perceive, it will also be perceived by the receiving unit 102, thus forming a corresponding photocurrent. The photocurrent of ambient light will affect the judgment of the proximity of the target object. Therefore, when judging the proximity of the target object, the interference of this part of the photocurrent needs to be eliminated.

[0064] In this embodiment, when the transmitting unit 101 is in the off state, the receiving unit 102 can obtain a first photocurrent in response to ambient light, and the integrating unit 103 can integrate the first photocurrent to obtain a first output voltage signal; while when the transmitting unit 101 is in the light-emitting state, the receiving unit 102 can obtain a second photocurrent in response to reflected light and ambient light, and the integrating unit 103 can integrate the second photocurrent to obtain a second output voltage signal.

[0065] When the transmitting unit 101 switches states, such as from a light-emitting state to a cut-off state or from a cut-off state to a light-emitting state, the control unit can control the output voltage signal of the integrating unit 103 to be inverted.

[0066] For example, if the transmitting unit 101 changes from the cut-off state to the emitting state, since the integrating unit 103 can obtain the first output voltage signal based on the first photocurrent when the transmitting unit 101 is in the cut-off state, the output voltage signal of the integrating unit 103 at this time is the first output voltage signal. When the control unit controls the transmitting unit 101 to switch states, the control unit can also control the output voltage signal of the integrating unit 103, i.e., the first output voltage signal at this time, to be inverted.

[0067] It is understood that the inversion here is relative to the reference voltage. If the reference voltage is 0V and the amplitude of the first output voltage signal is 5V, then the amplitude of the output voltage signal of the inverted integration unit 103 is -5V; if the reference voltage is 2V and the amplitude of the first output voltage signal is 5V, then the amplitude of the output voltage signal of the inverted integration unit 103 is -1V. The value of the reference voltage can be determined according to the actual application scenario, and no specific limitation is made here.

[0068] After the output voltage signal of the integrator 103, i.e. the first output voltage signal, is inverted, since the emitting unit 101 is in the light-emitting state at this time, the integrator 103 can continue to integrate the second photocurrent based on the inverted first output voltage signal.

[0069] It is understandable that the first photocurrent is the photocurrent corresponding to the light intensity of the ambient light, while the second photocurrent is the photocurrent corresponding to the light intensity of both the reflected light and the ambient light. Since the environment near the detection circuit does not change or changes very little during the detection process, the intensity of the ambient light remains unchanged or changes within a controllable detection error range. Therefore, the intensity of the ambient light corresponding to the emitting unit 101 in the emitting state and the cut-off state can be considered to be the same. Furthermore, it can be known that the amplitude of the first output voltage signal corresponding to the first photocurrent is less than the amplitude of the second output voltage signal corresponding to the second photocurrent.

[0070] In this embodiment, the integration unit 103 continues to integrate the second photocurrent based on the first output voltage signal after inversion. Since the amplitude of the second output voltage signal is greater than the amplitude of the first output voltage signal, the final target voltage signal output by the integration unit is the difference between the second output voltage signal and the first output voltage signal, and the amplitude of the target voltage signal will be greater than the reference voltage.

[0071] It can be understood that the difference between the second output voltage signal and the first output voltage signal is the voltage signal obtained by removing the integrated voltage corresponding to the ambient light from the integrated voltage corresponding to the reflected light and the ambient light. Therefore, the proximity of the target object can be accurately determined based on the target voltage signal.

[0072] It should be noted that in some other application scenarios, if the transmitting unit 101 changes from the light-emitting state to the cut-off state, since the integrating unit 103 can obtain the second output voltage signal based on the second photocurrent when the transmitting unit 101 is in the light-emitting state, the output voltage signal of the integrating unit 103 at this time is the second output voltage signal. When the control unit controls the transmitting unit 101 to switch states, the control unit can also control the output voltage signal of the integrating unit 103, i.e., the second output voltage signal at this time, to be inverted.

[0073] After the output voltage signal of the integrator 103, i.e. the second output voltage signal, is inverted, since the transmitting unit 101 is in the off state at this time, the integrator 103 can continue to integrate the first photocurrent based on the inverted second output voltage signal.

[0074] At this time, the output voltage signal of the integration unit 103 is also the difference between the second output voltage signal and the first output voltage signal. Since the amplitude of the second output voltage signal is greater than the amplitude of the first output voltage signal, the target voltage signal output by the integration unit 103 in this application scenario is negative. This target voltage signal is also the voltage signal obtained after removing the integrated voltage corresponding to the ambient light. Therefore, the proximity of the target object can also be accurately determined based on the target voltage signal.

[0075] In other words, in this embodiment of the application, the control unit can first control the transmitting unit 101 to be in the light-emitting state, and then control the transmitting unit 101 to switch from the light-emitting state to the cut-off state; or, the control unit can first control the transmitting unit 101 to be in the cut-off state, and then control the transmitting unit 101 to switch from the cut-off state to the light-emitting state. The specific order of the working states of the transmitting unit 101 can be determined according to the actual application scenario, and is not limited here.

[0076] It is worth noting that, in this embodiment of the application, regardless of whether the emitting unit 101 switches from a light-emitting state to a cut-off state or from a cut-off state to a light-emitting state, when the emitting unit 101 switches states, the output voltage signal of the integrator 103 is synchronously controlled to be inverted. The target voltage signal finally output by the integrator 103 is the voltage signal obtained after removing the integrated voltage corresponding to the ambient light. Based on the target voltage signal, the proximity of the target object can be determined.

[0077] In this embodiment, when the transmitting unit 101 switches states, the control unit controls the output voltage signal of the integrating unit 103 to be inverted, which can invert either the first or second output voltage signal. Then, after the transmitting unit 101 switches its working state, the integrating unit 103 integrates the second or first photocurrent based on the inverted first or second output voltage signal. Thus, the target voltage signal finally output by the integrating unit 103 is the voltage signal after removing the voltage corresponding to the ambient light. This voltage signal can accurately determine the proximity of the target object, improve the accuracy of proximity detection, and ensure the reliability of the proximity detection circuit.

[0078] Next, continue with Figure 1 The various units of the proximity detection circuit shown, as well as the specific implementation methods that may be used in practical applications, are described in detail.

[0079] In some embodiments of this application, the control unit may be specifically used to control the duration of the emitting unit 101 in the emitting state to be the same as the duration of the cut-off state within a preset detection period.

[0080] It is understood that the detection period can be any preset duration, such as 20ms, 45ms, etc. Since the interference of ambient light on the determination of the proximity of the target object needs to be removed, the difference between the second output voltage signal and the first output voltage signal must completely cancel the integrated voltage corresponding to the ambient light. Therefore, the integration time of the integration unit 103 for the photocurrent corresponding to the ambient light should be the same when the emitting unit 101 is in the cut-off state and the emitting state. Therefore, after integrating the second photocurrent and the first photocurrent within the same duration, the difference between the second output voltage signal and the first output voltage signal is the ideal target voltage signal.

[0081] As can be seen from the foregoing description, by integrating the second photocurrent and the first photocurrent within the same time period, it can be determined that the duration during which the emitting unit 101 does not emit detection light is the same as the duration during which it emits detection light, that is, the duration during which the emitting unit 101 is in the cutoff state and the duration during which it emits light is the same.

[0082] In one specific implementation, the duration of the emitting unit 101 in the emitting state and the cut-off state can be evenly divided into the total duration of the detection period. For example, if the detection period is 20ms, the duration of the emitting unit 101 in the emitting state and the cut-off state can be 10ms each. For instance, the emitting unit 101 can be in the cut-off state for the first 10ms of the detection period and in the emitting state for the last 10ms of the detection period; or, the emitting unit 101 can be in the emitting state for the first 10ms of the detection period and in the cut-off state for the last 10ms of the detection period.

[0083] In another specific implementation, the duration of the emitting unit 101 in the emitting state and the cut-off state can be the first part of the detection cycle. For example, if the detection cycle is 50ms, the duration of the emitting unit 101 in the cut-off state can be the first 15ms of the 50ms, and the duration of the emitting unit 101 in the emitting state can be the next 15ms adjacent to the first 15ms. After the 15ms of the emitting unit 101 in the emitting state ends, the proximity of the target object can be determined directly based on the target voltage signal currently output by the integration unit 103.

[0084] It is understandable that the value of the target voltage signal obtained in a detection cycle may be small and not convenient for subsequent quantization. Therefore, in some embodiments of this application, the transmitting unit 101 can be controlled to switch between the cut-off state and the light-emitting state in multiple consecutive detection cycles, thereby accumulating the target voltage signals obtained in multiple detection cycles to obtain a larger voltage signal that is convenient for subsequent quantization.

[0085] Please see Figure 2 , Figure 2 This is a schematic diagram of a circuit principle of an integrating unit provided in an embodiment of this application. In some embodiments of this application, the integrating unit 103 may include a first operational amplifier U1 and a first integrating capacitor C1. The first integrating capacitor C1 can be electrically connected between the negative input terminal and the output terminal of the first operational amplifier U1 through a combination switch 104. The combination switch 104 can be configured as follows:

[0086] When the transmitting unit 101 is in the off state, in response to the first drive signal of the control unit, the first plate of the first integrating capacitor C1 is electrically connected to the output terminal of the first operational amplifier U1 and the second plate of the first integrating capacitor C1 is electrically connected to the negative input terminal of the first operational amplifier U1.

[0087] When the emitting unit 101 is in the light-emitting state, in response to the second drive signal of the control unit, the first plate of the first integrating capacitor C1 is electrically connected to the negative input terminal of the first operational amplifier U1 and the second plate of the first integrating capacitor C1 is electrically connected to the output terminal of the first operational amplifier U1.

[0088] In this embodiment, the connection between the first integrating capacitor C1 and the first operational amplifier U1 can be adjusted by the combination switch 104. Since the voltage across the first integrating capacitor C1 cannot change abruptly, when the transmitting unit 101 switches states, the control unit adjusts the connection between the first integrating capacitor C1 and the first operational amplifier U1 by controlling the switching state of the combination switch 104. This allows the output voltage signal of the first operational amplifier U1 to be inverted when the transmitting unit 101 switches states.

[0089] like Figure 3 As shown in the embodiment of this application, the first plate of the first integrating capacitor C1 is its right plate, and the second plate of the first integrating capacitor C1 is its left plate. When the transmitting unit 101 is in the off state, the combination switch 104 responds to the first driving signal and can connect the left plate of the first integrating capacitor C1 to the negative input terminal of the first operational amplifier U1 and connect the right plate of the first integrating capacitor C1 to the output terminal of the first operational amplifier U1.

[0090] like Figure 4As shown, when the transmitting unit 101 is in the light-emitting state, the combination switch responds to the second driving signal and can connect the left plate of the first integrating capacitor C1 to the output terminal of the first operational amplifier U1, and connect the right plate of the first integrating capacitor C1 to the negative input terminal of the first operational amplifier U1.

[0091] Since the integrator 103 integrates the first photocurrent to obtain the first output voltage signal when the transmitting unit 101 is in the off state, the voltage difference across the first integrating capacitor C1 is the amplitude of the first output voltage signal. When the transmitting unit 101 switches from the off state to the light-emitting state, the left plate of the first integrating capacitor C1 changes from being connected to the negative input terminal of the first operational amplifier U1 to being connected to the output terminal of the first operational amplifier U1, and the right plate of the first integrating capacitor C1 changes from being connected to the output terminal of the first operational amplifier U1 to being connected to the negative input terminal of the first operational amplifier U1. Since the voltage across the first integrating capacitor C1 cannot change abruptly, the charge on the first integrating capacitor C1 remains unchanged. At this time, the output voltage signal of the first operational amplifier U1 is the voltage signal after the first output voltage signal is inverted.

[0092] Then, when the emitting unit 101 is in the light-emitting state, the integrating unit 103 continues to integrate the second photocurrent to obtain the second output voltage signal. After one detection cycle, the output voltage signal of the first operational amplifier U1 is the difference between the second output voltage signal and the first output voltage signal.

[0093] Please see Figure 5 , Figure 5 This is a schematic diagram of an embodiment of the combination switch provided in this application. In some embodiments of this application, the combination switch 104 may include a main switch pair and a secondary switch pair. The main switch pair and the secondary switch pair are in opposite states, and the first main switch S1a and the second main switch S1a' of the main switch pair are synchronized, and the first secondary switch S1b and the second secondary switch S1b' of the secondary switch pair are synchronized.

[0094] One end of the first main switch S1a is connected to the second plate of the first integrating capacitor C1, and the other end is connected to the negative input terminal of the first operational amplifier U1. One end of the second main switch S1a' is connected to the first plate of the first integrating capacitor C1, and the other end is connected to the output terminal of the first operational amplifier U1.

[0095] One end of the first auxiliary switch S1b is connected to the second plate of the first integrating capacitor C1, and the other end is connected to the output terminal of the first operational amplifier U1. One end of the second auxiliary switch S1b' is connected to the first plate of the first integrating capacitor C1, and the other end is connected to the negative input terminal of the first operational amplifier U1.

[0096] In this embodiment, the receiving unit 102 may include a first photodiode D1, the cathode of the first photodiode D1 is connected to the negative input terminal of the first operational amplifier U1, and the anode of the first photodiode D1 is connected to the ground GND. The combination switch 104 is configured as follows:

[0097] In response to the first drive signal, the first main switch S1a and the second main switch S1a' are closed, and the first auxiliary switch S1b and the second auxiliary switch S1b' are turned off.

[0098] In response to the second drive signal, the first main switch S1a and the second main switch S1a' are turned off, and the first auxiliary switch S1b and the second auxiliary switch S1b' are closed.

[0099] Since the current inside the first photodiode D1 flows from the cathode to the anode, in this embodiment, the first photocurrent and the second photocurrent both flow from the output terminal of the first operational amplifier through the first integrating capacitor C1 and the first photodiode D1 to the ground terminal GND. Therefore, the voltage of the right plate of the first integrating capacitor C1 gradually increases, that is, the integration processing of the first photocurrent and the second photocurrent by the first operational amplifier U1 is both upward integration.

[0100] It is understood that a control switch S6 can also be connected between the first photodiode D1 and the negative input terminal of the first operational amplifier U1. When the control switch S6 is open, no matter what state the transmitting unit 101 is in, the first operational amplifier U1 will not generate an output signal because the first photodiode D1 and the first operational amplifier U1 are disconnected. The first operational amplifier U1 will generate an output signal when the control switch S6 is closed.

[0101] like Figure 6 As shown in the embodiment of this application, when the transmitting unit 101 is in the off state, the first main switch S1a and the second main switch S1a' close in response to the first drive signal of the control unit. Since the main switch pair and the auxiliary switch pair are in opposite states, the first auxiliary switch S1b and the second auxiliary switch S1b' are open. At this time, the first operational amplifier U1 integrates the first photocurrent upward during the time when the transmitting unit 101 is in the off state to obtain the first output voltage signal.

[0102] Then the control unit controls the transmitting unit 101 to switch from the cut-off state to the emitting state, and at the same time, as Figure 7 As shown, the first auxiliary switch S1b and the second auxiliary switch S1b' close in response to the second drive signal of the control unit, and the first main switch S1a and the second main switch S1a' disconnect from their original connection. At the moment of state switching, since the charge on the first integrating capacitor C1 remains unchanged, the output voltage signal of the first operational amplifier U1 is the inverted signal of the first output voltage signal.

[0103] The first operational amplifier U1 continues to integrate the second photocurrent upwards during the period when the transmitting unit 101 is in the light-emitting state, and the starting point value of the upward integration is the amplitude of the first output voltage signal after inversion. After one detection cycle, the output voltage signal of the first operational amplifier U1 is the target voltage signal.

[0104] like Figure 8 As shown, Figure 8 This is a timing diagram of the target voltage signal provided in the embodiment of this application. In this embodiment, the first integrating capacitor C1 is connected in parallel with the first reset switch RST1. Before starting to detect the proximity of the target object, the first reset switch RST1 and the control switch S6 can be controlled to close. The closed first reset switch RST1 consumes the electrical energy originally stored on the first integrating capacitor C1. Then, the first reset switch RST1 is controlled to open. Since the control switch S6 is closed, a path is formed between the first photodiode D1 and the first operational amplifier U1. The proximity detection begins at the falling edge of the first reset switch RST1.

[0105] The duration of the emitting unit 101 in both the emitting and cut-off states is set to ΔT, the reflected light is I_c, and the ambient light is I_a.

[0106] First, if the control unit does not send a trigger signal to the transmitting unit 101, the transmitting unit 101 will not emit detection light such as infrared light IR. At the same time, the control unit sends a first drive signal to control the first main switch S1a and the second main switch S1a' to close, and the first auxiliary switch S1b and the second auxiliary switch S1b' to open. At this time, the left plate of the first integrating capacitor C1 is connected to the negative input terminal of the first operational amplifier U1, and the right plate of the first integrating capacitor C1 is connected to the output terminal of the first operational amplifier U1. When the transmitting unit 101 is in the off state, i.e., IR_OFF, the first photodiode D1 only receives ambient light I_a. According to the above description, the integrating unit 103 performs upward integration of the first photocurrent. At this time, the voltage of the first integrating capacitor C1 can increase from 0 based on the slope Slop_OFF to ΔV1 within the integration time ΔT. Here, the slope Slop_OFF = I_a / C1. The first output voltage signal, i.e., the integrated value ΔV1 = I_a*ΔT / C1, means that the target voltage signal VOUT increases from 0 based on the slope Slop_OFF to ΔV1.

[0107] When the duration of the IR_OFF state of the transmitting unit 101 reaches the preset duration ΔT, the control unit starts to send a trigger signal to the transmitting unit 101 to drive the transmitting unit 101 to emit detection light toward the target. At the same time, the control unit sends a second drive signal to control the first auxiliary switch S1b and the second auxiliary switch S1b' to close, and the first main switch S1a and the second main switch S1a' to open. At this time, the left plate of the first integrating capacitor C1 is connected to the output terminal of the first operational amplifier U1, and the right plate of the first integrating capacitor C1 is connected to the negative input terminal of the first operational amplifier U1. Since the charge on the first integrating capacitor C1 remains unchanged, the output voltage signal of the output terminal of the first operational amplifier U1 is -ΔV1 at this time.

[0108] When the emitting unit 101 is in the light-emitting state, i.e., IR_ON, the first photodiode D1 receives reflected light I_c and ambient light I_a. The integrator 103 performs upward integration of the second photocurrent. At this time, the charge of the first integrating capacitor C1 can increase by ΔV2 from -ΔV1 based on the slope Slop_ON within the integration time ΔT. Here, the slope Slop_ON = (I_c + I_a) / C1, and the integral value ΔV2 = (I_c + I_a) * ΔT / C1. Since the light intensity of the ambient light and reflected light received by the first photodiode D1 is greater than the light intensity when only ambient light is received within the same integration time, ΔV2 is greater than ΔV1. At this time, the output voltage signal ΔV2 - ΔV1 of the first operational amplifier U1 is the amplitude of the target voltage signal VOUT after removing the influence of ambient light.

[0109] Based on the target voltage signal VOUT amplitude of ΔV2-ΔV1, if the transmitting unit 101 is further controlled to be in the light-emitting state IR_ON and the cut-off state IR_OFF according to the above method, after two detection cycles, the control unit drives the control switch S6 to open, thereby ending the proximity detection. The target voltage signal VOUT output by the first operational amplifier U1 has an amplitude of 2*(ΔV2-ΔV1). By quantizing this 2*(ΔV2-ΔV1), the proximity of the target object to the proximity detection circuit can be determined.

[0110] It can be understood that after N detection cycles, the amplitude of the target voltage signal VOUT output by the first operational amplifier U1 will be N*(ΔV2-ΔV1). By quantizing this N*(ΔV2-ΔV1), the proximity of the target object to the proximity detection circuit can also be determined.

[0111] Please see Figure 9 , Figure 9This is a schematic diagram of another embodiment of the combination switch provided in this application. In some embodiments of this application, the combination switch 104 may include a first single-pole double-throw switch SW1 and a second single-pole double-throw switch SW2. The moving contact of the first single-pole double-throw switch SW1 is connected to the second plate of the first integrating capacitor C1. The first stationary contact of the first single-pole double-throw switch SW1 is connected to the negative input terminal of the first operational amplifier U1. The second stationary contact of the first single-pole double-throw switch SW1 is connected to the output terminal of the first operational amplifier U1.

[0112] The moving contact of the second single-pole double-throw switch SW2 is connected to the first plate of the first integrating capacitor C1, the first stationary contact of the second single-pole double-throw switch SW2 is connected to the output terminal of the first operational amplifier U1, and the second stationary contact of the second single-pole double-throw switch SW2 is connected to the negative input terminal of the first operational amplifier U1.

[0113] In this embodiment, the receiving unit 102 may include a first photodiode D1, the cathode of the first photodiode D1 is connected to the negative input terminal of the first operational amplifier U1, and the anode of the first photodiode D1 is connected to the ground GND. The combination switch 104 is configured as follows:

[0114] In response to the first drive signal, the moving contact of the first single-pole double-throw switch SW1 is connected to the first stationary contact of the first single-pole double-throw switch SW1, and the moving contact of the second single-pole double-throw switch SW2 is connected to the first stationary contact of the second single-pole double-throw switch SW2.

[0115] In response to the second drive signal, the moving contact of the first single-pole double-throw switch SW1 is connected to the second stationary contact of the first single-pole double-throw switch SW1, and the moving contact of the second single-pole double-throw switch SW2 is connected to the second stationary contact of the second single-pole double-throw switch SW2.

[0116] Since the current inside the first photodiode D1 flows from the cathode to the anode, in this embodiment, the first photocurrent and the second photocurrent both flow from the negative input terminal of the first operational amplifier U1 through the first photodiode D1 to the ground terminal GND. Therefore, the voltage of the right plate of the first integrating capacitor C1 gradually increases, that is, the integration processing of the first photocurrent and the second photocurrent by the first operational amplifier U1 is both upward integration.

[0117] like Figure 10As shown in the embodiment of this application, when the transmitting unit 101 is in the off state, the first single-pole double-throw switch SW1 responds to the first driving signal and connects its moving contact with its first stationary contact. The second single-pole double-throw switch SW2 also responds to the first driving signal and connects its moving contact with its first stationary contact. At this time, the left plate of the first integrating capacitor C1 is connected to the negative input terminal of the first operational amplifier U1, and the right plate of the first integrating capacitor C1 is connected to the output terminal of the first operational amplifier U1. The first operational amplifier U1 integrates the first photocurrent upward during the time when the transmitting unit 101 is in the off state to obtain the first output voltage signal.

[0118] Then the control unit controls the transmitting unit 101 to switch from the cut-off state to the emitting state, and at the same time, as Figure 11 As shown, the first single-pole double-throw switch SW1 responds to the second drive signal, connecting its moving contact to its second stationary contact. The second single-pole double-throw switch SW2 also responds to the second drive signal, connecting its moving contact to its second stationary contact. At this time, the left plate of the first integrating capacitor C1 is connected to the output terminal of the first operational amplifier U1, and the right plate of the first integrating capacitor C1 is connected to the negative input terminal of the first operational amplifier U1. At the instant of state switching, since the charge on the first integrating capacitor C1 remains unchanged, the output voltage signal of the first operational amplifier U1 is the inverted signal of the first output voltage signal.

[0119] The first operational amplifier U1 continues to integrate the second photocurrent upwards during the period when the transmitting unit 101 is in the light-emitting state, and the starting point value of the upward integration is the amplitude of the first output voltage signal after inversion. After one detection cycle, the output voltage signal of the first operational amplifier U1 is the target voltage signal.

[0120] It is understandable that when controlling the combination switch 104 using the control principles described above for the first single-pole double-throw switch SW1 and the second single-pole double-throw switch SW2, the timing of the target voltage signal output by the first operational amplifier U1 can be referenced. Figure 8 The timing diagram shown is not repeated here.

[0121] Please see Figure 12 , Figure 12This is a schematic diagram of another functional module of the proximity detection circuit provided in the embodiments of this application. In some embodiments of this application, the proximity detection circuit may further include a switched capacitor unit 105 and an analog-to-digital converter unit 106. The switched capacitor unit 105 may be electrically connected to the integration unit 103 and the analog-to-digital converter unit 106, respectively. The switched capacitor unit 105 may be used to obtain an analog signal based on the target voltage signal output by the integration unit 103 and output it to the analog-to-digital converter unit 106. The analog-to-digital converter unit 106 may be used to convert the analog signal into a digital signal, and the digital signal may be used to characterize the proximity of the target object.

[0122] In this embodiment, the switched capacitor unit 105 can operate by moving charge into and out of the capacitor when the switch is turned on and off. That is, by turning the switch off and closing the switch of the switched capacitor unit 105, the target voltage signal of the integration unit 103 can be moved into the switched capacitor unit 105 and out of the switched capacitor unit 105 to the analog-to-digital conversion unit 106, so that the analog-to-digital conversion unit 106 can perform analog-to-digital conversion on the signal.

[0123] like Figure 13 As shown, Figure 13 This is a schematic diagram of a switched capacitor unit provided in an embodiment of this application. In some embodiments of this application, the switched capacitor unit 105 may include a second operational amplifier U2, a second capacitor C2, a third capacitor C3, a second switch S2, a third switch S3, and a fourth switch S4.

[0124] The second switch S2 and the second capacitor C2 are connected in series between the output terminal of the integrator unit 103 and the negative input terminal of the second operational amplifier U2. The second capacitor C2 is also connected to a reference voltage source through the third switch S3. The third capacitor C3 and the fourth switch S4 are connected in series between the negative input terminal of the second operational amplifier U2 and the output terminal of the second operational amplifier U2. The output terminal of the second operational amplifier U2 is connected to the input terminal of the analog-to-digital converter unit 106.

[0125] In this embodiment, the reference voltage source can be a separate voltage source or the same voltage source as the reference voltage source connected to the positive input terminal of the integration unit 103. The reference voltage source can output a first reference voltage signal VREF1. It can be understood that a voltage source can also be connected to the positive input terminal of the second operational amplifier U2. The voltage source can output a second reference voltage signal VREF2. The first reference voltage signal VREF1 and the second reference voltage signal VREF2 can be the same or different, and can be determined according to the actual application scenario.

[0126] Please combine Figure 13 and Figure 14In this embodiment, the first integrating capacitor C1 is connected in parallel with the first reset switch RST1. Before starting to detect the proximity of the target object, the first reset switch RST1 and the control switch S6 can be controlled to close. The closed first reset switch RST1 consumes the electrical energy originally stored in the first integrating capacitor C1. Then, the first reset switch RST1 is controlled to open. Since the control switch S6 is closed, a path is formed between the first photodiode D1 and the first operational amplifier U1. Proximity detection begins at the falling edge of the first reset switch RST1.

[0127] First, if the control unit does not send a trigger signal to the transmitting unit 101, the transmitting unit 101 will not emit detection light such as infrared light IR. At the same time, the control unit sends a first drive signal, and the combination switch 104 responds to the first drive signal and acts. At this time, the left plate of the first integrating capacitor C1 is connected to the negative input terminal of the first operational amplifier U1, and the right plate of the first integrating capacitor C1 is connected to the output terminal of the first operational amplifier U1. When the transmitting unit 101 is in the cut-off state, i.e., IR_OFF, the first operational amplifier U1 performs upward integration of the first photocurrent. At this time, the voltage of the first integrating capacitor C1 can increase from 0 to ΔV1 within the integration time ΔT, i.e., the target voltage signal VOUT1 increases from 0 to ΔV1.

[0128] When the duration of the IR_OFF state of the transmitting unit 101 reaches the preset duration ΔT, the control unit starts to send a trigger signal to the transmitting unit 101 to drive the transmitting unit 101 to emit detection light toward the target. At the same time, the control unit sends a second drive signal, and the combination switch 104 responds to the second drive signal. At this time, the right plate of the first integrating capacitor C1 is connected to the negative input terminal of the first operational amplifier U1, and the left plate of the first integrating capacitor C1 is connected to the output terminal of the first operational amplifier U1. Since the charge on the first integrating capacitor C1 remains unchanged, the output voltage signal of the first operational amplifier U1, i.e. the target voltage signal VOUT1, is flipped from ΔV1 to -ΔV1.

[0129] When the transmitting unit 101 is in the light-emitting state, i.e., IR_ON, the first operational amplifier U1 performs upward integration of the second photocurrent. At this time, the charge of the first integrating capacitor C1 can increase from -ΔV1 to ΔV2 within the integration time ΔT. Since the light intensity of the ambient light and reflected light received by the first photodiode D1 is greater than the light intensity when only ambient light is received within the same integration time, the output voltage signal ΔV2-ΔV1 of the first operational amplifier U1 is the amplitude of the target voltage signal VOUT1 after removing the influence of ambient light.

[0130] Based on the amplitude of the target voltage signal VOUT being ΔV2-ΔV1, and by continuing to control the transmitting unit 101 to be in the cutoff state IR_OFF and the light-emitting state IR_ON according to the above method, after two detection cycles, the control unit drives the control switch S6 to open, thereby ending the proximity detection. At this time, the amplitude of the target voltage signal VOUT1 output by the first operational amplifier U1 is 2*(ΔV2-ΔV1).

[0131] Then the control unit controls the fourth switch S4 and the fifth switch S5 to close, so as to consume the electrical energy originally stored in the third capacitor C3, and then controls the fifth switch S5 to open, keeping the fourth switch S4 closed.

[0132] Next, the control unit controls the second switch S2 to close, and the left plate of the second capacitor C2 samples the voltage on the first integrating capacitor C1. The voltage on the right plate of the second capacitor C2 is the second reference voltage signal VREF2. The voltage on the first integrating capacitor C1 is transferred to the second capacitor C2. At the same time as the second switch S2 is opened, the third switch S3 is controlled to close. At this time, the left plate of the second capacitor C2 samples the second reference voltage signal VREF2, which is different from the voltage on the first integrating capacitor C1. Since the voltage on the second capacitor C2 cannot change abruptly, at the same time as the second switch S2 is opened and the third switch S3 is closed, based on the potential change of the second capacitor C2 and the continuously closed fourth switch S4, the voltage on the second capacitor C2 can gradually transfer to the third capacitor C3. Thus, the voltage signal VOUT2 output by the second operational amplifier U2 is an analog signal. By quantizing this analog signal, the proximity of the target object to the proximity detection circuit can be determined.

[0133] according to Figure 14 As can be seen, this embodiment can detect the proximity of the target object in N detection cycles. The target voltage signal VOUT1 obtained in each detection cycle is accumulated on the first integrating capacitor C1. At the end of N detection cycles, the control unit drives the control switch S6 to open, thereby ending the proximity detection. The target voltage signal VOUT1 accumulated on the first integrating capacitor C1 can be transferred to the third capacitor C3 through the switching capacitor unit 105. Therefore, if N detection cycles are performed, the amplitude of the final analog signal VOUT2 is N times the amplitude of the analog signal VOUT2 in a single detection cycle.

[0134] Please combine Figure 13 and Figure 15In this embodiment, before proximity detection begins, the control unit can control the fourth switch S4 and the fifth switch S5 to close, so as to consume the electrical energy originally stored in the third capacitor C3. Then, the control unit controls the fourth switch S4 to open, while keeping the fifth switch S5 closed. Next, the control unit controls the first reset switch RST1 and the control switch S6 to close. The closed first reset switch RST1 consumes the electrical energy originally stored in the first integrating capacitor C1. Then, the control unit controls the first reset switch RST1 to open. Since the control switch S6 is closed, a path is formed between the first photodiode D1 and the first operational amplifier U1. Proximity detection begins at the falling edge of the first reset switch RST1.

[0135] First, if the control unit does not send a trigger signal to the transmitting unit 101, the transmitting unit 101 will not emit detection light such as infrared light IR. At the same time, the control unit sends a first drive signal, and the combination switch 104 responds to the first drive signal and operates. At this time, the left plate of the first integrating capacitor C1 is connected to the negative input terminal of the first operational amplifier U1, and the right plate of the first integrating capacitor C1 is connected to the output terminal of the first operational amplifier U1. When the transmitting unit 101 is in the off state, i.e., IR_OFF, the first operational amplifier U1 performs upward integration processing on the first photocurrent. At this time, the voltage of the first integrating capacitor C1 can increase from 0 to ΔV1 within the integration time ΔT, i.e., the target voltage signal VOUT1 increases from 0 to ΔV1.

[0136] When the duration of the IR_OFF state of the transmitting unit 101 reaches the preset duration ΔT, the control unit starts to send a trigger signal to the transmitting unit 101 to drive the transmitting unit 101 to emit detection light toward the target. At the same time, the control unit sends a second drive signal, and the combination switch 104 responds to the second drive signal. At this time, the right plate of the first integrating capacitor C1 is connected to the negative input terminal of the first operational amplifier U1, and the left plate of the first integrating capacitor C1 is connected to the output terminal of the first operational amplifier U1. Since the charge on the first integrating capacitor C1 remains unchanged, the output voltage signal of the first operational amplifier U1, i.e. the target voltage signal VOUT1, is flipped from ΔV1 to -ΔV1.

[0137] When the transmitting unit 101 is in the light-emitting state, i.e., IR_ON, the first operational amplifier U1 performs upward integration of the second photocurrent. At this time, the charge of the first integrating capacitor C1 can increase from -ΔV1 to ΔV2 within the integration time ΔT. Since the light intensity of the ambient light and reflected light received by the first photodiode D1 is greater than the light intensity when only ambient light is received within the same integration time, the output voltage signal ΔV2-ΔV1 of the first operational amplifier U1 is the amplitude of the target voltage signal VOUT1 after removing the influence of ambient light.

[0138] At this point, a detection cycle ends. The control unit controls the control switch S6 to open and the second switch S2 to close, transferring the voltage on the first integrating capacitor C1 to the second capacitor C2. Then, it controls the second switch S2 to open, and simultaneously controls the third switch S3, the fourth switch S4 to close and the fifth switch S5 to open. This provides a trigger condition for voltage transfer through the potential change of the second capacitor C2, allowing the voltage transferred to the second capacitor C2 to gradually transfer to the third capacitor C3. Thus, the voltage signal VOUT2 output by the second operational amplifier U2 is an analog signal. By quantizing this analog signal, the proximity of the target object to the proximity detection circuit can be determined.

[0139] according to Figure 15 It can be seen that after the voltage on the first integrating capacitor C1 is transferred to the third capacitor C3 in one detection cycle, the detection can continue for the next detection cycle. In this way, the voltage on the first integrating capacitor C1 will be transferred to the third capacitor C3 again in the next detection cycle. As a result, the amplitude of the analog signal VOUT2 at this time is twice the amplitude of the analog signal VOUT2 in the previous detection cycle. And so on, the voltage on the first integrating capacitor C1 will be transferred to the third capacitor C3 at the end of each detection cycle. Therefore, if N detection cycles are performed, the final amplitude of the analog signal VOUT2 will be N times the amplitude of the analog signal VOUT2 in a single detection cycle.

[0140] Understandably, in different application scenarios, the number of detection cycles can be selected according to the actual situation to ensure that the proximity of the target object can be accurately determined based on the target voltage signal.

[0141] like Figure 16 As shown, Figure 16 This is a schematic diagram of a proximity sensor provided in an embodiment of this application. Based on the above-described proximity detection circuit, this embodiment of the application also provides a proximity sensor 1600, which may include, for example: Figures 1 to 15 Corresponding to the proximity detection circuit in any embodiment, the specific implementation of the proximity sensor 1600 can be referred to in this application as follows. Figures 1 to 15 The present application can be implemented as described in the description of the proximity detection circuit in any embodiment. Figures 1 to 15 For details on the beneficial effects that the proximity detection circuit can achieve in any embodiment, please refer to the preceding description, which will not be repeated here.

[0142] like Figure 17As shown, in some embodiments of this application, the proximity sensor 1600 may include a main control unit 1601 and a drive unit 1602. The main control unit 1601 can control the working state of the transmitting unit 101 by controlling the drive unit 1602. The main control unit 1601 may be the same module as the control unit in the aforementioned embodiments, or it may be another unit module different from the control unit in the aforementioned embodiments. The specific configuration can be determined according to the actual application scenario.

[0143] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed descriptions of other embodiments above, which will not be repeated here.

[0144] In practice, each of the above units or structures can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For specific implementation of each of the above units or structures, please refer to the previous embodiments, which will not be repeated here.

[0145] The above provides a detailed description of a proximity detection circuit and proximity sensor provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The above description is only for the purpose of helping to understand the circuit and its core ideas. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A proximity detection circuit, characterized in that, The proximity detection circuit includes a receiving unit, a control unit, and an integrating unit. The receiving unit is electrically connected to the integrating unit and the control unit, and the receiving unit is correspondingly configured with a transmitting unit. The receiving unit is configured to receive a first photocurrent in response to received ambient light when the transmitting unit is in a cutoff state, and to receive a second photocurrent in response to received reflected light and the ambient light when the transmitting unit is in a light-emitting state; the reflected light is a light signal formed by the reflection of the detection light emitted by the transmitting unit in the light-emitting state by the target object. The control unit is used to control the working state of the transmitting unit and, when the transmitting unit switches states, to control the output voltage signal of the integrating unit to be inverted. The integration unit is used to integrate the first photocurrent and the second photocurrent respectively to obtain the corresponding first output voltage signal and second output voltage signal, and to obtain the target voltage signal for proximity detection based on the first output voltage signal and the second output voltage signal; the integration unit includes a first operational amplifier and a first integrating capacitor, the first integrating capacitor being electrically connected between the negative input terminal and the output terminal of the first operational amplifier through a combination switch.

2. The proximity detection circuit according to claim 1, characterized in that, The control unit is used to: control the duration of the emitting unit in the emitting state to be the same as the duration of the emitting unit in the cut-off state within a preset detection period.

3. The proximity detection circuit according to claim 1, characterized in that, The combination switch is configured as follows: When the transmitting unit is in the off state, in response to the first drive signal of the control unit, the first plate of the first integrating capacitor is electrically connected to the output terminal of the first operational amplifier and the second plate of the first integrating capacitor is electrically connected to the negative input terminal of the first operational amplifier. When the emitting unit is in the light-emitting state, in response to the second drive signal of the control unit, the first plate of the first integrating capacitor is electrically connected to the negative input terminal of the first operational amplifier, and the second plate of the first integrating capacitor is electrically connected to the output terminal of the first operational amplifier.

4. The proximity detection circuit according to claim 3, characterized in that, The combination switch includes a main switch pair and an auxiliary switch pair. The main switch pair and the auxiliary switch pair are in opposite states. The first main switch and the second main switch of the main switch pair are synchronized, and the first auxiliary switch and the second auxiliary switch of the auxiliary switch pair are synchronized. One end of the first main switch is connected to the second plate of the first integrating capacitor, and the other end is connected to the negative input terminal of the first operational amplifier. One end of the second main switch is connected to the first plate of the first integrating capacitor, and the other end is connected to the output terminal of the first operational amplifier. One end of the first auxiliary switch is connected to the second plate of the first integrating capacitor, and the other end is connected to the output terminal of the first operational amplifier. One end of the second auxiliary switch is connected to the first plate of the first integrating capacitor, and the other end is connected to the negative input terminal of the first operational amplifier.

5. The proximity detection circuit according to claim 4, characterized in that, The receiving unit includes a first photodiode, the cathode of which is connected to the negative input terminal of the first operational amplifier, and the anode of which is connected to ground. The combination switch is configured as follows: In response to the first drive signal, the first main switch and the second main switch are closed, and the first auxiliary switch and the second auxiliary switch are turned off; In response to the second drive signal, the first main switch and the second main switch are turned off, and the first auxiliary switch and the second auxiliary switch are closed.

6. The proximity detection circuit according to claim 3, characterized in that, The combination switch includes a first single-pole double-throw switch and a second single-pole double-throw switch. The moving contact of the first single-pole double-throw switch is connected to the second plate of the first integrating capacitor. The first stationary contact of the first single-pole double-throw switch is connected to the negative input terminal of the first operational amplifier. The second stationary contact of the first single-pole double-throw switch is connected to the output terminal of the first operational amplifier. The moving contact of the second single-pole double-throw switch is connected to the first plate of the first integrating capacitor, the first stationary contact of the second single-pole double-throw switch is connected to the output terminal of the first operational amplifier, and the second stationary contact of the second single-pole double-throw switch is connected to the negative input terminal of the first operational amplifier.

7. The proximity detection circuit according to claim 6, characterized in that, The receiving unit includes a first photodiode, the cathode of which is connected to the negative input terminal of the first operational amplifier, and the anode of which is connected to ground. The combination switch is configured as follows: In response to the first drive signal, the moving contact of the first single-pole double-throw switch is connected to the first stationary contact of the first single-pole double-throw switch, and the moving contact of the second single-pole double-throw switch is connected to the first stationary contact of the second single-pole double-throw switch. In response to the second drive signal, the moving contact of the first single-pole double-throw switch is connected to the second stationary contact of the first single-pole double-throw switch, and the moving contact of the second single-pole double-throw switch is connected to the second stationary contact of the second single-pole double-throw switch.

8. The proximity detection circuit according to any one of claims 1-7, characterized in that, The proximity detection circuit further includes a switched capacitor unit and an analog-to-digital converter unit, wherein the switched capacitor unit is electrically connected to the integration unit and the analog-to-digital converter unit, respectively; The switched capacitor unit is used to obtain an analog signal based on the target voltage signal output by the integrator unit and output it to the analog-to-digital converter unit. The analog-to-digital conversion unit is used to convert the analog signal into a digital signal, and the digital signal is used to characterize the proximity of the target object.

9. The proximity detection circuit according to claim 8, characterized in that, The switched capacitor unit includes a second operational amplifier, a second capacitor, a third capacitor, a second switch, a third switch, and a fourth switch; The second switch and the second capacitor are connected in series between the output terminal of the integrator and the negative input terminal of the second operational amplifier. The second capacitor is also connected to a reference voltage source through the third switch. The third capacitor and the fourth switch are connected in series between the negative input terminal and the output terminal of the second operational amplifier; The output of the second operational amplifier is connected to the input of the analog-to-digital converter.

10. A proximity sensor, characterized in that, The proximity sensor includes the proximity detection circuit according to any one of claims 1-9.