WO2024082599A1 - 接近检测电路及接近传感器 - Google Patents
接近检测电路及接近传感器 Download PDFInfo
- Publication number
- WO2024082599A1 WO2024082599A1 PCT/CN2023/091206 CN2023091206W WO2024082599A1 WO 2024082599 A1 WO2024082599 A1 WO 2024082599A1 CN 2023091206 W CN2023091206 W CN 2023091206W WO 2024082599 A1 WO2024082599 A1 WO 2024082599A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- unit
- operational amplifier
- switch
- integration
- photocurrent
- Prior art date
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 171
- 230000010354 integration Effects 0.000 claims abstract description 197
- 239000003990 capacitor Substances 0.000 claims description 206
- 230000005669 field effect Effects 0.000 claims description 45
- 238000006243 chemical reaction Methods 0.000 claims description 21
- 238000010586 diagram Methods 0.000 description 52
- 238000000034 method Methods 0.000 description 22
- 101100041125 Arabidopsis thaliana RST1 gene Proteins 0.000 description 20
- 101100443250 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) DIG1 gene Proteins 0.000 description 20
- 230000003068 static effect Effects 0.000 description 14
- 230000007423 decrease Effects 0.000 description 8
- 230000001360 synchronised effect Effects 0.000 description 5
- 238000011002 quantification Methods 0.000 description 4
- 101100443251 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) DIG2 gene Proteins 0.000 description 3
- 101100041128 Schizosaccharomyces pombe (strain 972 / ATCC 24843) rst2 gene Proteins 0.000 description 3
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 2
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01V—GEOPHYSICS; GRAVITATIONAL MEASUREMENTS; DETECTING MASSES OR OBJECTS; TAGS
- G01V8/00—Prospecting or detecting by optical means
- G01V8/10—Detecting, e.g. by using light barriers
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S17/00—Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
- G01S17/02—Systems using the reflection of electromagnetic waves other than radio waves
- G01S17/06—Systems determining position data of a target
- G01S17/08—Systems determining position data of a target for measuring distance only
Definitions
- the present application relates to the technical field of proximity sensors, and in particular to a proximity detection circuit and a proximity sensor.
- Proximity sensors can detect the presence of an object and the distance of the object from the proximity sensor. Proximity sensors are used in a wide range of applications, such as speed detection, hand detection in automatic faucets, automatic counting or checking of objects on conveyor belts, paper edge detection in printers, and screen-off/on control in electronic products.
- Photoelectric proximity sensors emit a beam of light to the outside world through a light-emitting diode (LED) or a vertical cavity surface emitting laser (VCSEL).
- the light is reflected on the object and the reflected light is received by a photodiode (PD).
- PD photodiode
- the reflected light signal is converted into a photocurrent signal. The closer the object is, the stronger the reflected light received by the PD, and the larger the corresponding photocurrent.
- the distance of the object can be determined.
- PD receives not only reflected light but also ambient light, so the photocurrent is not only related to the reflected light, but also to the ambient light.
- the ambient light mixed in the reflected light will interfere with the judgment of the distance of the object.
- the present application provides a proximity detection circuit and a proximity sensor, aiming to solve the problem that when the existing proximity sensor detects the distance of an object, ambient light interferes with its judgment of the distance of the object, resulting in low detection accuracy.
- the present application provides a proximity detection circuit, which includes a receiving unit, a control unit, and an integration unit, wherein the receiving unit is electrically connected to the integration unit and the control unit, and the receiving unit is correspondingly configured with a transmitting unit.
- the receiving unit is used to, when the transmitting unit is in a light-emitting state, A first photocurrent is obtained in response to the received reflected light and ambient light, and a second photocurrent is obtained in response to the received ambient light when the transmitting unit is in a cut-off state, wherein the reflected light is a light signal formed by the detection light emitted by the transmitting unit in the luminous state after being reflected by the target object.
- the control unit is used to control the working state of the transmitting unit and control the first photocurrent and the second photocurrent to flow in opposite directions relative to the integration unit.
- the integration unit is used to integrate the first photocurrent and the second photocurrent respectively to obtain the corresponding first integration voltage and second integration voltage, and obtain a target voltage signal for proximity detection based on the first integration voltage and the second integration voltage.
- control unit is used to control the duration of the emission unit being in the light-emitting state and the duration of the emission unit being in the cut-off state to be the same within a preset detection period.
- the integration unit includes a first operational amplifier and a first integration capacitor
- the first integration capacitor is electrically connected between the negative input terminal and the output terminal of the first operational amplifier
- the proximity detection circuit also includes a current reversing unit electrically connected to the control unit
- the receiving unit is electrically connected to the negative input terminal of the first operational amplifier through the current reversing unit.
- the current reversing unit is configured to: when the transmitting unit is in a light-emitting state, in response to a first driving signal of the control unit, control the flow direction of the first photocurrent to flow out from the output terminal of the first operational amplifier through the first integration capacitor and the receiving unit; when the transmitting unit is in a cut-off state, in response to a second driving signal of the control unit, control the flow direction of the second photocurrent to flow from the receiving unit through the first integration capacitor to the output terminal of the first operational amplifier.
- the receiving unit includes a first photodiode
- the current reversing unit is configured to: in response to a first driving signal, control the cathode of the first photodiode to be electrically connected to the negative input terminal of the first operational amplifier and the anode of the first photodiode to be connected to the ground; in response to a second driving signal, control the anode of the first photodiode to be electrically connected to the negative input terminal of the first operational amplifier and the cathode of the first photodiode to be connected to the ground.
- the receiving unit includes a first photodiode
- the current reversing unit includes a first switch, a second switch, a third switch and a mirror circuit
- the first output end of the mirror circuit is connected to the cathode of the first photodiode through the second switch
- the second output end of the mirror circuit is connected to the negative input end of the first operational amplifier through the third switch
- the cathode of the first photodiode is connected to the negative input end of the first operational amplifier through the first switch
- the anode of the first photodiode is connected to the ground electrode
- the control unit is configured to: when the transmitting unit is in a light-emitting state, output a first drive signal to control the first switch to be closed and the second switch and the third switch to be turned off; when the transmitting unit is in a cutoff state, output a first drive signal to control the first switch to be closed and the second switch and the third switch to be turned off; when the transmitting unit is in a cut
- the mirror circuit includes a first field effect transistor and a second field effect transistor, the gate of the first field effect transistor is connected to the gate of the second field effect transistor, the source of the first field effect transistor and the source of the second field effect transistor are respectively connected to a voltage source, the gate of the first field effect transistor and the drain of the first field effect transistor are also connected to the second switch, and the drain of the second field effect transistor is connected to the third switch.
- the mirror circuit also includes a second operational amplifier, the positive input terminal of the second operational amplifier is respectively connected to the second switch and the drain of the first field effect transistor, the negative input terminal of the second operational amplifier is respectively connected to the third switch and the drain of the second field effect transistor, and the output terminal of the second operational amplifier is respectively connected to the gate of the first field effect transistor and the gate of the second field effect transistor.
- the integration unit includes a third operational amplifier, a second integration capacitor and a third integration capacitor
- the second integration capacitor is electrically connected between the positive input terminal and the negative output terminal of the third operational amplifier
- the third integration capacitor is electrically connected between the negative input terminal and the positive output terminal of the third operational amplifier
- the proximity detection circuit also includes a current reversing unit electrically connected to the control unit
- the receiving unit is electrically connected to the positive input terminal and the negative input terminal of the third operational amplifier through the current reversing unit;
- the current reversing unit is configured as follows: when the transmitting unit is in a light-emitting state, in response to a first drive signal of the control unit, the direction of the first photocurrent is controlled to flow from the negative output terminal of the third operational amplifier through the second integration capacitor and the receiving unit to the negative input terminal of the third operational amplifier and the third integration capacitor; when the transmitting unit is in a cut-off state, in response to a second drive signal of the control unit, the direction of the second photocurrent
- the receiving unit includes a second photodiode
- the current reversing unit is configured to: in response to a first drive signal, control the cathode of the second photodiode to be electrically connected to the positive input terminal of the first operational amplifier and the anode of the second photodiode to be electrically connected to the negative input terminal of the first operational amplifier; in response to a second drive signal, control the anode of the second photodiode to be electrically connected to the positive input terminal of the first operational amplifier and the cathode of the second photodiode to be electrically connected to the negative input terminal of the first operational amplifier.
- the proximity detection circuit also includes an analog-to-digital conversion unit electrically connected to the integration unit, and the analog-to-digital conversion unit is used to convert the target voltage signal output by the integration unit into a digital signal, and the digital signal is used to characterize the proximity degree of the target object.
- the first aspect of the present application and its various possible implementation methods have the following beneficial technical effects: when the transmitting unit is in a light-emitting state, the receiving unit obtains a first photocurrent in response to the emitted light and the ambient light; when the transmitting unit is in a cut-off state, the receiving unit obtains a second photocurrent in response to the ambient light; by controlling the first photocurrent and the second photocurrent to flow in opposite directions relative to the integration unit, the integration unit can reverse the integration processing of the first photocurrent and the second photocurrent; thus, the target voltage signal finally output by the integration unit is a voltage signal after the voltage corresponding to the ambient light is removed; the voltage signal can be used to accurately judge the proximity of the target object, thereby improving the accuracy of proximity detection and ensuring the reliability of the proximity detection circuit.
- the present application provides a proximity detection circuit, which includes a receiving unit, a control unit and an integration unit, wherein the receiving unit is electrically connected to the integration unit and the control unit, respectively, and the receiving unit is correspondingly configured with a transmitting unit.
- the receiving unit is used to obtain a first photocurrent in response to the received ambient light when the transmitting unit is in a cut-off state, and to obtain a second photocurrent in response to the received reflected light and ambient light when the transmitting unit is in a light-emitting state; the reflected light is a light signal formed by the detection light emitted by the transmitting unit in the light-emitting state after being reflected by the target object.
- the control unit is used to control the working state of the transmitting unit and to control the output voltage signal of the integration unit to be inverted when the transmitting unit switches its state.
- the integration unit is used to integrate the first photocurrent and the second photocurrent, respectively, to obtain the corresponding first output voltage signal and the second output voltage signal, and to obtain a target voltage signal for proximity detection based on the first output voltage signal and the second output voltage signal.
- control unit is used to: within a preset detection period, control the duration of the emission unit being in the light-emitting state and the duration of the emission unit being in the cut-off state to be the same.
- 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 through a combination switch, and the combination switch is configured as follows: when the transmitting unit is in a cut-off state, in response to a first drive signal of a control unit, the first plate of the first integrating capacitor is controlled to be 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 transmitting unit is in a light-emitting state, in response to a second drive signal of the control unit, the first plate of the first integrating capacitor is controlled to be 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.
- 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, and the first main switch and the second main switch of the main switch pair are synchronized.
- the first sub-switch and the second sub-switch of the sub-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 sub-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 sub-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.
- the receiving unit includes a first photodiode, a cathode of the first photodiode is connected to the negative input terminal of the first operational amplifier, an anode of the first photodiode is connected to the ground electrode, and the combination switch is configured as follows: in response to a 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 a 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.
- 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 static contact of the first single-pole double-throw switch is connected to the negative input terminal of the first operational amplifier, and the second static 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 static contact of the second single-pole double-throw switch is connected to the output terminal of the first operational amplifier, and the second static contact of the second single-pole double-throw switch is connected to the negative input terminal of the first operational amplifier.
- the receiving unit includes a first photodiode, the cathode of the first photodiode is connected to the negative input terminal of the first operational amplifier, the anode of the first photodiode is connected to the ground electrode, and the combination switch is configured as follows: in response to a first drive signal, the moving contact of the first single-pole double-throw switch is connected to the first static 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 static contact of the second single-pole double-throw switch; in response to a second drive signal, the moving contact of the first single-pole double-throw switch is connected to the second static 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 static contact of the second single-pole double-throw switch.
- the proximity detection circuit also includes a switching capacitor unit and an analog-to-digital conversion unit, and the switching capacitor unit is electrically connected to the integration unit and the analog-to-digital conversion unit, respectively; the switching capacitor unit is used to obtain an analog signal according to a target voltage signal output by the integration unit and output it to the analog-to-digital conversion 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.
- 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 end of the integration unit and the negative input end of the second operational amplifier, and 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 end of the second operational amplifier and the output end of the second operational amplifier; and the output end of the second operational amplifier is connected to the input end of the analog-to-digital conversion unit.
- the second aspect of the present application and its various possible implementation methods have the following beneficial technical effects: by controlling the output voltage signal of the integration unit to be inverted when the state of the transmitting unit is switched through the control unit, the first output voltage signal or the second output voltage signal can be inverted, and then after the working state of the transmitting unit is switched, the integration unit integrates the second photocurrent or the first photocurrent based on the inverted first output voltage signal or the second output voltage signal.
- the target voltage signal finally output by the integration unit is a voltage signal after the voltage corresponding to the ambient light is removed.
- the voltage signal can be used to accurately judge the proximity of the target object, thereby improving the accuracy of proximity detection and ensuring the reliability of the proximity detection circuit.
- the present application further provides a proximity sensor, which comprises the proximity detection circuit of the first aspect, the second aspect, or any possible implementation manner thereof.
- FIG1 is a schematic diagram of functional modules of a proximity detection circuit provided in an embodiment of the present application.
- FIG2 is a schematic diagram of a circuit principle of an integration unit provided in an embodiment of the present application.
- FIG3 is a schematic diagram of the flow direction of a first photocurrent provided in an embodiment of the present application.
- FIG4 is a schematic diagram of the flow direction of a second photocurrent provided in an embodiment of the present application.
- FIG5 is a timing diagram of a target voltage signal provided in an embodiment of the present application.
- FIG6 is a schematic diagram of the structure of a current reversal unit provided in an embodiment of the present application.
- FIG7 is a schematic diagram of a circuit principle corresponding to a first photocurrent provided in an embodiment of the present application.
- FIG8 is a schematic diagram of a circuit principle corresponding to a second photocurrent provided in an embodiment of the present application.
- FIG9 is a schematic diagram of a circuit principle of a mirror circuit provided in an embodiment of the present application.
- FIG10 is another schematic diagram of a circuit principle of a mirror circuit provided in an embodiment of the present application.
- FIG11 is another schematic diagram of a circuit principle corresponding to a second photocurrent provided in an embodiment of the present application.
- FIG12 is another timing diagram of a target voltage signal provided in an embodiment of the present application.
- FIG13 is another schematic diagram of a circuit principle of an integration unit provided in an embodiment of the present application.
- FIG14 is a schematic diagram of another circuit principle corresponding to the first photocurrent provided in an embodiment of the present application.
- FIG15 is another schematic diagram of a circuit principle corresponding to a second photocurrent provided in an embodiment of the present application.
- FIG16 is another timing diagram of a target voltage signal provided in an embodiment of the present application.
- FIG17 is another schematic diagram of a circuit principle of an integration unit provided in an embodiment of the present application.
- FIG18 is a schematic diagram of the circuit principle of the integration unit when the transmitting unit is in the cut-off state provided in an embodiment of the present application;
- FIG19 is a schematic diagram of the circuit principle of the integration unit when the emission unit is in the light-emitting state provided in one embodiment of the present application;
- FIG20 is a schematic diagram of an implementation of a combination switch provided in an embodiment of the present application.
- FIG21 is a schematic diagram of the state of the combination switch when the transmitting unit is in the cut-off state provided in an embodiment of the present application;
- FIG22 is a schematic diagram of the state of the combination switch when the emitting unit is in a light-emitting state provided in an embodiment of the present application;
- FIG23 is a timing diagram of a target voltage signal provided in an embodiment of the present application.
- FIG24 is a schematic diagram of another implementation of a combination switch provided in an embodiment of the present application.
- FIG25 is a schematic diagram of the state of the combination switch when the transmitting unit is in the cut-off state provided in an embodiment of the present application;
- FIG26 is a schematic diagram of the state of the combination switch when the emitting unit is in the luminous state provided in one embodiment of the present application;
- FIG27 is a schematic diagram of functional modules of a proximity detection circuit provided in an embodiment of the present application.
- FIG28 is a schematic diagram of functional modules of a proximity detection circuit provided in an embodiment of the present application.
- FIG29 is a schematic diagram of a circuit principle of a switched capacitor unit provided in an embodiment of the present application.
- FIG30 is a timing diagram of a target voltage signal provided in an embodiment of the present application.
- FIG31 is a timing diagram of a target voltage signal provided in an embodiment of the present application.
- FIG32 is a structural block diagram of a proximity sensor provided in an embodiment of the present application.
- FIG. 33 is a schematic diagram of a proximity sensor provided in an embodiment of the present application.
- first and second are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more features. In the description of the present application, the meaning of “multiple” is two or more, unless otherwise clearly and specifically defined.
- connection can be understood as electrical connection, and the connection between two electrical components can be a direct or indirect connection between the two electrical components.
- connection between A and B can be either a direct connection between A and B or an indirect connection between A and B through one or more other electrical components.
- the embodiments of the present application provide a proximity detection circuit and a proximity sensor, which are described in detail below.
- the present application provides a proximity detection circuit, please refer to Figure 1, which is a functional module schematic diagram of the proximity detection circuit provided in an embodiment of the present application, and the proximity detection circuit includes a receiving unit 102, a control unit (not shown in the figure) and an integration unit 103, and the receiving unit 102 is electrically connected to the integration unit 103 and the control unit, respectively, and the receiving unit 102 is correspondingly configured with a transmitting unit 101.
- the receiving unit 102 can be used to obtain a first photocurrent in response to the received reflected light and ambient light when the transmitting unit 101 is in a light-emitting state, and to obtain a second photocurrent in response to the received ambient light when the transmitting unit 101 is in a cut-off state;
- the reflected light is a light signal formed after the detection light emitted by the transmitting unit 101 in the light-emitting state is reflected by the target object.
- the control unit can be used to control the working state of the emitting unit 101 and control the first photocurrent and the second photocurrent to flow in opposite directions relative to the integration unit 103.
- the integration unit 103 can be used to integrate the first photocurrent and the second photocurrent respectively to obtain the corresponding first integral voltage and second integral voltage, and based on the first integral voltage and the second integral voltage, obtain a target voltage signal for proximity detection.
- the transmitting unit 101 can be configured with two working states, namely, a light-emitting state and a cut-off state. It can be understood that when the transmitting unit 101 is in the light-emitting state, the transmitting unit 101 can emit detection light, and when the transmitting unit 101 is in the cut-off state, the transmitting unit 101 does not emit light, that is, no detection light is emitted at this time.
- the wavelength of the detection light emitted by the transmitting unit 101 and the wavelength of the light that can be sensed by the receiving unit 102 can be matched. For example, if the detection light emitted by the transmitting unit 101 is visible light or a certain visible light domain, then the reflected light that can be sensed by the receiving unit 102 is also the corresponding visible light or a certain visible light domain; if the detection light emitted by the transmitting unit 101 is infrared light or a certain invisible light domain, then the reflected light that can be sensed by the receiving unit 102 is also the corresponding infrared light or a certain invisible light domain.
- the control unit can control the emission of the detection light by controlling the working state of the emission unit 101. For example, when the control unit sends a trigger signal to the emission unit 101, the emission unit 101 can be in the emission state in response to the trigger signal, thereby emitting the detection light based on a certain light emission frequency; and when the control unit stops sending the trigger signal to the emission unit 101, the emission unit 101 changes from the emission state to the emission state. It switches to the off state, thereby stopping the emission of detection light.
- the emitting unit 101 can be a light source with a light-emitting function such as a light-emitting diode (Light-Emitting Diode, LED) or a vertical cavity surface emitting laser (Vertical Cavity Surface Emitting Laser, VCSEL).
- a light-emitting diode Light-Emitting Diode, LED
- a vertical cavity surface emitting laser Very Cavity Surface Emitting Laser, VCSEL
- the specific device composition of the light-emitting unit 101 may be different, which is not specifically limited here.
- the detection light emitted by the transmitting unit 101 can form reflected light after being reflected by the target object and be emitted to the receiving unit 102.
- the receiving unit 102 can form a corresponding photocurrent according to the received reflected light.
- the proximity of the target object can be judged based on the photocurrent.
- the proximity here 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.
- the transmitting unit 101 there may be other light sources such as the sun and incandescent lamps in the environment. If the wavelength of the light emitted by these light sources, i.e., the ambient light, is within the light range perceivable by the receiving unit 102, it will also be sensed by the receiving unit 102 to form a corresponding photocurrent. The photocurrent of the 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.
- these light sources i.e., the ambient light
- the receiving unit 102 can obtain a first photocurrent in response to reflected light and ambient light when the transmitting unit 101 is in a light-emitting state, and obtain a second photocurrent in response to ambient light when the transmitting unit 101 is in a cut-off state.
- the control unit can be used to control the first photocurrent and the second photocurrent to flow in opposite directions relative to the integration unit 103. In this way, the integration unit 103 can perform different integration processing on the first photocurrent and the second photocurrent.
- the first photocurrent is the photocurrent corresponding to the light intensity of both the reflected light and the ambient light
- the second photocurrent is the photocurrent corresponding to the light intensity of the ambient light. Since the environment in which the proximity detection circuit is located will not change or will change very little during the detection process, the intensity of the ambient light will remain unchanged or the range of change is within a controllable detection error range. Therefore, the intensity of the ambient light corresponding to the emitting unit 101 in the luminous state and the cut-off state can be considered to be the same.
- the integration unit 103 performs an upward integration process on the first photocurrent to obtain a first integrated voltage; correspondingly, the second photocurrent flows into the integration unit 103. At this time, the integration unit 103 performs an upward integration process on the second photocurrent. A downward integration process is performed to obtain a second integrated voltage.
- the output signal of the integration unit 103 can be the difference between the first integration voltage and the second integration voltage. Since the first integration voltage is a voltage obtained by integrating the first photocurrent upward, and the second integration voltage is a voltage obtained by integrating the second photocurrent downward, and the first photocurrent is a current signal obtained in response to the sum of the light intensities of the reflected light and the ambient light when the emission unit 101 is in a light-emitting state, and the second photocurrent is a current signal obtained in response to the light intensity of the ambient light when the emission unit 101 is in a cut-off state, therefore, the difference between the first integration voltage and the second integration voltage is a voltage signal obtained after removing the integration voltage corresponding to the ambient light on the basis of the integration voltages corresponding to the reflected light and the ambient light, i.e., a target voltage signal. The proximity of the target object can be determined based on the target voltage signal.
- the flow direction of the first photocurrent may also be to flow to the integration unit 103.
- the integration unit 103 can perform downward integration processing on the first photocurrent to obtain a first integrated voltage; correspondingly, the second photocurrent may flow out of the integration unit 103.
- the integration unit 103 performs upward integration processing on the second photocurrent to obtain a second integrated voltage.
- the difference between the first integrated voltage and the second integrated voltage is also the voltage signal obtained after removing the integrated voltage corresponding to the ambient light, namely, the target voltage signal.
- the target voltage signal at this time is a negative value.
- the absolute value of the negative target voltage signal can be taken to judge the proximity of the target object, or the negative target voltage signal can be directly quantified to determine the proximity of the target object.
- control unit 101 can first control the transmitting unit 101 to be in a light-emitting state, and then control the transmitting unit 101 to be converted 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 be converted from the cut-off state to the light-emitting state.
- the order of the specific working states of the transmitting unit 101 can be determined according to the actual application scenario, and is not limited here.
- the receiving unit 102 when the transmitting unit 101 is in the luminous state, the receiving unit 102 obtains the first photocurrent in response to the emitted light and the ambient light. When the transmitting unit 101 is in the cut-off state, the receiving unit 102 obtains the second photocurrent in response to the ambient light.
- the integrating unit 103 can perform the integration processing of the first photocurrent and the second photocurrent in the opposite direction. In this way, the target voltage signal finally output by the integrating unit 103 is the voltage signal after removing the voltage corresponding to the ambient light.
- the voltage signal can be used to accurately judge the target object.
- the degree of proximity is improved, the accuracy of proximity detection is improved, and the reliability of the proximity detection circuit is ensured.
- control unit may be specifically configured to control the duration of the emission unit 101 being in the light-emitting state and the duration of the emission unit 101 being in the cut-off state to be the same within a preset detection period.
- the detection period can be any pre-set duration, such as 20ms, 45ms, etc. Since it is necessary to eliminate the interference of ambient light on judging the proximity of the target object, the difference between the first integral voltage and the second integral voltage must completely offset the integral voltage corresponding to the ambient light. Since the first photocurrent and the second photocurrent have opposite directions relative to the integration unit 103, after the first photocurrent and the second photocurrent are integrated respectively within the same time, the difference between the first integral voltage and the second integral voltage is the ideal target voltage signal.
- the time when the emitting unit 101 emits the detection light is the same as the time when it does not emit the detection light, that is, the time when the emitting unit 101 is in the light-emitting state and the cut-off state is the same.
- the duration that the transmitting unit 101 is in the light-emitting state and the cut-off state can evenly divide the total duration of the detection period. For example, if the detection period is 20ms, the duration that the transmitting unit 101 is in the light-emitting state and the cut-off state can be 10ms respectively.
- the transmitting unit 101 can be in the light-emitting state within the first 10ms of the detection period, and in the cut-off state within the last 10ms of the detection period; or, the transmitting unit 101 can be in the cut-off state within the first 10ms of the detection period, and in the light-emitting state within the last 10ms of the detection period.
- the duration that the transmitting unit 101 is in the light-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 that the transmitting unit 101 is in the light-emitting state can be the first 15ms of 50ms, and the duration that the transmitting unit 101 is in the cut-off state can be the next 15ms adjacent to the first 15ms. After the transmitting unit 101 is in the cut-off state for 15ms, the proximity of the target object can be determined directly based on the target voltage signal currently output by the integration unit 103.
- the emission unit 101 can be controlled to switch between the light-emitting state and the cut-off state within multiple consecutive detection cycles, so that the target voltage signal obtained in each detection cycle is accumulated to obtain a larger voltage signal that is convenient for subsequent quantification.
- the integration unit 103 may include a first operational amplifier U1 and a first integration capacitor C1, and the first integration capacitor C1 is electrically connected between the negative input terminal and the output terminal of the first operational amplifier U1.
- the proximity detection circuit may also include a current reversing unit 104 electrically connected to the control unit, and the receiving unit 102 is electrically connected to the negative input terminal of the first operational amplifier U1 through the current reversing unit 104; the current reversing unit 104 may be configured as follows:
- the direction of the first photocurrent is controlled to flow from the output end of the first operational amplifier U1 through the first integrating capacitor C1 and the receiving unit 102;
- the second photocurrent is controlled to flow from the receiving unit 102 to the output end of the first operational amplifier U1 through the first integrating capacitor C1 .
- the receiving unit 102 may include a first photodiode D1.
- the current reversing unit 104 can control the cathode of the first photodiode D1 to be electrically connected to the negative input terminal of the first operational amplifier U1 and control the anode of the first photodiode D1 to be connected to the ground electrode GND. Since the internal current of the first photodiode D1 flows from the cathode to the anode, the first photocurrent at this time flows from the output terminal of the first operational amplifier U1 through the first integrating capacitor C1 and the first photodiode D1 to the ground electrode GND.
- the voltage of the right plate of the first integrating capacitor C1 gradually increases. Since the right plate of the first integrating capacitor C1 is at the same potential as the output end of the first operational amplifier U1, the target voltage signal gradually increases. It can be understood that the size of the target voltage signal is related to the integration time, that is, the luminous duration of the transmitting unit 101, the capacitance of the first integrating capacitor C1, and the light intensity of the reflected light and ambient light received by the receiving unit 102.
- the current reversing unit 104 can control the anode of the first photodiode D1 to be electrically connected to the negative input terminal of the first operational amplifier U1 and control the cathode of the first photodiode D1 to be connected to the ground GND.
- the voltage of the right plate of the first integrating capacitor C1 gradually decreases, that is, the target voltage signal gradually decreases.
- the size of the target voltage signal at this time is related to the integration time, that is, the length of time that the transmitting unit 101 is in the cut-off state, that is, not emitting light, the capacitance of the first integrating capacitor C1, and the light intensity of the ambient light received by the receiving unit 102.
- the non-luminous duration of the emitting unit 101 is also ⁇ T and the ambient light is I_a
- FIG5 is a timing diagram of a target voltage signal provided in an embodiment of the present application.
- the first integral capacitor C1 is connected in parallel with a first reset switch RST1.
- the first reset switch RST1 can be controlled to close first to consume the electrical energy originally stored on the first integral capacitor C1, and then the first reset switch RST1 is controlled to open to start proximity detection.
- a control switch (not shown in the figure) can also be connected between the first photodiode D1 and the negative input terminal of the first operational amplifier U1. When the control switch is closed, proximity detection is started.
- the control unit sends a trigger signal to the transmitting unit 101 to drive the transmitting unit 101 to emit detection light such as infrared light IR to the target object.
- the transmitting unit 101 is in the light-emitting state, i.e., IR_ON
- the first photodiode D1 receives reflected light and ambient light.
- the integration unit 103 performs upward integration processing on the first photocurrent. At this time, the charge of the first integration capacitor C1 can increase from 0 based on the slope Slop_on to ⁇ V1, that is, the target voltage signal VOUT increases from 0 based on the slope Slop to ⁇ V1.
- the control unit stops sending a trigger signal to the emitting unit 101. Since the emitting unit 101 is not driven by the trigger signal, it stops emitting the detection light to the target object.
- the emitting unit 101 is in the cut-off state, i.e., IR_OFF, the first photodiode D1 only receives ambient light, and the integration unit 103 performs downward integration processing on the second photocurrent. At this time, the charge of the first integration capacitor C1 can be reduced by ⁇ V1 by ⁇ V2 based on the slope Slop_OFF.
- the light intensity of the ambient light and the reflected light received by the first photodiode D1 is greater than the light intensity when only the ambient light is received, therefore, ⁇ V1 is greater than ⁇ V2, and ⁇ V1- ⁇ V2 is the amplitude of the target voltage signal VOUT after removing the influence of ambient light.
- the amplitude of the target voltage signal VOUT is ⁇ V1- ⁇ V2
- the emission unit 101 is controlled to be in the light-emitting state IR_ON and the cut-off state IR_OFF based on the above method, after two detection cycles, the amplitude of the target voltage signal VOUT output by the first operational amplifier U1 is 2*( ⁇ V1- ⁇ V2).
- the proximity of the target object to the proximity detection circuit can be determined.
- FIG. 6 is a schematic diagram of a structure of a current reversal unit provided in an embodiment of the present application.
- the receiving unit 102 may include a first photodiode D1
- the current reversal unit 104 may include a first switch S1, a second switch S2, a third switch S3, and a mirror circuit 105.
- the first output end of the mirror circuit 105 is connected to the cathode of the first photodiode D1 through the second switch S2, the second output end of the mirror circuit 105 is connected to the negative input end of the first operational amplifier U1 through the third switch S3, the cathode of the first photodiode D1 is connected to the negative input end of the first operational amplifier U1 through the first switch S1, and the anode of the first photodiode D1 is connected to the ground electrode GND.
- the control unit may be configured as follows:
- a first driving signal is output to control the first switch S1 to be closed and the second switch S2 and the third switch S3 to be turned off;
- the second driving signal is output to control the first switch S1 to be turned off and the second switch S2 and the third switch S3 to be turned on.
- the control unit controls the first switch S1 to close and the second switch S2 and the third switch S3 to open through a first driving signal, and the circuit structure is shown in Figure 7.
- the direction of the first photocurrent is from the output end of the first operational amplifier U1 through the first integral capacitor C1 and the first photodiode D1 to the ground electrode GND, and the integral unit 102 performs upward integration processing on the first photocurrent.
- the control unit controls the first switch S1 to be disconnected and the second switch S2 and the third switch S3 to be closed through the second driving signal, and the circuit structure is shown in FIG8 . Since the current of the first photodiode D1 always flows from the cathode to the anode, the second photocurrent flows out from the first output end of the mirror circuit 105. Due to the working principle of the mirror circuit 105, the second output end of the mirror circuit 105 will also output a current signal equal to the second photocurrent. The current signal flows to the first operational amplifier U1 and the first integral capacitor C1 through the closed third switch S3. At this time, the integral unit 102 performs downward integration processing on the current signal.
- the mirror circuit 105 in the embodiment of the present application can be any existing circuit structure or device with a mirror function, such as a mirror current source, a bandgap reference source circuit, etc., as shown in FIG. 9, which is a circuit principle schematic diagram of a mirror circuit provided in the embodiment of the present application.
- It may include a first field effect transistor M1 and a second field effect transistor M2, wherein the gate of the first field effect transistor M1 is connected to the gate of the second field effect transistor M2, the source of the first field effect transistor M1 and the source of the second field effect transistor M2 are respectively connected to a voltage source VDD, the gate of the first field effect transistor M1 and the drain of the first field effect transistor M1 are also connected to a second switch S2, and the drain of the second field effect transistor M2 is connected to a third switch S3.
- the first switch S1 when the emitting unit 101 is in the light-emitting state, the first switch S1 is closed, the second switch S2 and the third switch S3 are disconnected, and the mirror circuit 105 is not connected to the loop.
- the first photodiode D1 senses the reflected light and the ambient light
- the first photocurrent flows from the output end of the first operational amplifier U1 through the first integrating capacitor C1 and the closed first switch S1 to the first photodiode D1.
- the right plate voltage of the first integrating capacitor C1 increases. Therefore, the target voltage signal output from the output end of the first operational amplifier U1 gradually increases, that is, the integrating unit 102 performs an upward integration process on the first photocurrent.
- the first switch S1 When the emission unit 101 is in the cut-off state, the first switch S1 is disconnected, and the second switch S2 and the third switch S3 are closed. Since the current of the first photodiode D1 always flows from the cathode to the anode, the second photocurrent flows from the drain of the first field effect transistor M1 to the first photodiode D1 through the closed second switch S2. Based on the circuit structure, it can be known that the drain of the second field effect transistor M2 will also have a current signal equal to the second photocurrent flowing through the closed third switch S3 to the negative input terminal of the first operational amplifier U1 and the first integrating capacitor C1. At this time, the right plate voltage of the first integrating capacitor C1 drops, so the target voltage signal output from the output terminal of the first operational amplifier U1 gradually decreases, that is, the integrating unit 102 performs downward integration processing on the second photocurrent.
- the mirror circuit 105 may include a second operational amplifier U2, a first field effect transistor M1 and a second field effect transistor M2.
- the positive input terminal of the second operational amplifier U2 is respectively connected to the second switch S2 and the drain of the first field effect transistor M1, the negative input terminal of the second operational amplifier U2 is respectively connected to the third switch S3 and the drain of the second field effect transistor M2, the output terminal of the second operational amplifier U2 is respectively connected to the gate of the first field effect transistor M1 and the gate of the second field effect transistor M2, and the source of the first field effect transistor M1 and the source of the second field effect transistor M2 are respectively connected to the voltage source VDD.
- the first switch S1 when the emitting unit 101 is in the light-emitting state, the first switch S1 is closed, the second switch S2 and the third switch S3 are disconnected, and the mirror circuit 105 is not connected to the loop.
- the first photodiode D1 senses the reflected light and the ambient light
- the first photocurrent flows from the output end of the first operational amplifier U1 through the first integrating capacitor C1 and the closed first switch S1 to the first photodiode D1.
- the first photocurrent flows from the output end of the first operational amplifier U1 to the first photodiode D1 through the first integrating capacitor C1 and the closed first switch S1.
- the voltage of the right plate of an integrating capacitor C1 increases, so the target voltage signal outputted from the output terminal of the first operational amplifier U1 gradually increases, that is, the integrating unit 102 performs an upward integration process on the first photocurrent.
- the first switch S1 When the emission unit 101 is in the cut-off state, the first switch S1 is disconnected, and the second switch S2 and the third switch S3 are closed.
- the circuit structure is shown in FIG11. Since the current of the first photodiode D1 always flows from the cathode to the anode, the second photocurrent flows from the positive input terminal of the second operational amplifier U2 to the first photodiode D1 through the closed second switch S2. Based on the circuit structure, it can be known that a current signal equal to the second photocurrent will also flow from the negative input terminal of the second operational amplifier U2 through the closed third switch S3 to the negative input terminal of the first operational amplifier U1 and the first integrating capacitor C1. At this time, the right plate voltage of the first integrating capacitor C1 drops. Therefore, the target voltage signal output from the output terminal of the first operational amplifier U1 gradually decreases, that is, the integrating unit 102 performs downward integration processing on the second photocurrent.
- FIG 12 is another timing diagram of the target voltage signal provided in the embodiment of the present application.
- the first integral capacitor C1 is connected in parallel with the first reset switch RST1.
- the first reset switch RST1 Before starting to detect the proximity of the target object, the first reset switch RST1 can be controlled to close first to consume the electrical energy originally stored on the first integral capacitor C1, and then the first reset switch RST1 can be controlled to open.
- the control unit sends a trigger signal to the transmitting unit 101 to drive the transmitting unit 101 to emit detection light to the target object.
- the control unit sends a first drive signal to control the first switch S1 to close, and the second switch S2 and the third switch S3 to open.
- the transmitting unit 101 is in the light-emitting state, i.e., IR_ON
- the first photodiode D1 receives reflected light and ambient light.
- the integration unit 103 performs upward integration processing on the first photocurrent.
- the charge of the first integration capacitor C1 can increase from 0 based on the slope Slop_on to ⁇ V1, that is, the target voltage signal VOUT increases from 0 based on the slope Slop to ⁇ V1.
- the control unit stops sending a trigger signal to the emitting unit 101. Since the emitting unit 101 is not driven by the trigger signal, it stops emitting the detection light to the target. At the same time, the control unit sends a second drive signal to control the first switch S1 to be disconnected, and the second switch S2 and the third switch S3 to be closed.
- the emitting unit 101 is in the cut-off state, i.e., IR_OFF, the first photodiode D1 only receives ambient light, and the integration unit 103 performs downward integration processing on the second photocurrent.
- the charge of the first integration capacitor C1 can be reduced by ⁇ V1 based on the slope Slop_OFF by ⁇ V2. Since the light intensity of the ambient light and the reflected light received by the first photodiode D1 is greater than the light intensity when only the ambient light is received within the same integration duration, therefore, ⁇ V1 is greater than ⁇ V2, and ⁇ V1- ⁇ V2 is the amplitude of the target voltage signal VOUT after removing the influence of ambient light.
- the amplitude of the target voltage signal VOUT is ⁇ V1- ⁇ V2
- the emission unit 101 is further controlled to be in the light-emitting state IR_ON and the cut-off state IR_OFF based on the above method, then after N detection cycles, the amplitude of the target voltage signal VOUT output by the first operational amplifier U1 is N*( ⁇ V1- ⁇ V2).
- the proximity of the target object to the proximity detection circuit can be determined.
- FIG. 13 is another circuit principle schematic diagram of the integration unit provided in the embodiment of the present application.
- the integration unit 103 may include a third operational amplifier U3, a second integration capacitor C2 and a third integration capacitor C3, the second integration capacitor C2 is electrically connected between the positive input terminal and the negative output terminal of the third operational amplifier U3, and the third integration capacitor C3 is electrically connected between the negative input terminal and the positive output terminal of the third operational amplifier U3.
- the proximity detection circuit may also include a current reversing unit 104 electrically connected to the control unit, and the receiving unit 102 is electrically connected to the positive input terminal and the negative input terminal of the third operational amplifier U3 respectively through the current reversing unit 104; the current reversing unit 104 may be configured as follows:
- the first photocurrent is controlled to flow from the negative output terminal of the third operational amplifier U3 through the second integral capacitor C2 and the receiving unit 102 to the negative input terminal of the third operational amplifier U3 and the third integral capacitor C3;
- the flow direction of the second photocurrent is controlled to flow from the positive output terminal of the third operational amplifier U3 through the third integrating capacitor C3 and the receiving unit 102 to the positive input terminal of the third operational amplifier U3 and the second integrating capacitor C2.
- the receiving unit 102 may include a second photodiode D2.
- the current reversing unit 104 can control the cathode of the second photodiode D2 to be electrically connected to the positive input terminal of the first operational amplifier U1 and control the anode of the second photodiode D2 to be electrically connected to the negative input terminal of the first operational amplifier U1.
- the first photocurrent flows out from the negative output terminal of the first operational amplifier U1 at this time, and flows to the negative input terminal of the first operational amplifier U1 and the third integrating capacitor C3 through the second integrating capacitor C2 and the second photodiode D2.
- the voltage of the right plate of the second integrating capacitor C2 gradually increases, and the third operational amplifier U3
- the voltage signal output from the negative output terminal gradually increases, that is, it is integrated upward, while the voltage of the right plate of the third integrating capacitor C3 gradually decreases, and the voltage signal output from the positive output terminal of the third operational amplifier U3 gradually decreases, that is, it is integrated downward.
- the final output voltage of the third operational amplifier U3 is the sum of the absolute values of the output voltage of the positive output terminal and the output voltage of the negative output terminal.
- the current reversing unit 104 can control the anode of the second photodiode D2 to be electrically connected to the positive input terminal of the first operational amplifier U1 and control the cathode of the second photodiode D2 to be electrically connected to the negative input terminal of the first operational amplifier U1.
- the second photocurrent flows out from the positive output terminal of the first operational amplifier U1 and flows to the positive input terminal of the first operational amplifier U1 and the second integrating capacitor C2 through the third integrating capacitor C3 and the second photodiode D2.
- the voltage of the right plate of the second integrating capacitor C2 gradually decreases, and the voltage signal output from the negative output terminal of the third operational amplifier U3 gradually decreases, that is, it is integrated downward, while the voltage of the right plate of the third integrating capacitor C3 gradually increases, and the voltage signal output from the positive output terminal of the third operational amplifier U3 gradually increases, that is, it is integrated upward.
- the final output voltage of the third operational amplifier U3 is the sum of the absolute value of the output voltage of the positive output terminal and the output voltage of the negative output terminal.
- the capacitance of the second integrating capacitor C2 and the third integrating capacitor C3 are set to be equal, the duration of non-luminous time of the emitting unit 101 is also ⁇ T, and the ambient light is I_a.
- FIG. 16 is another timing diagram of the target voltage signal provided in the embodiment of the present application.
- the second integral capacitor C2 is connected in parallel with the second reset switch RST2
- the third integral capacitor C3 is connected in parallel with the third reset switch RST3.
- the second reset switch RST2 and the third reset switch RST3 can be controlled to close first to consume the electrical energy originally stored in the second integral capacitor C2 and the third integral capacitor C3, and then the second reset switch RST2 and the third reset switch RST3 are controlled to open to start proximity detection.
- the control unit sends a trigger signal to the transmitting unit 101 to drive the transmitting unit 101 to emit detection light to the target object.
- the transmitting unit 101 is in the light-emitting state, i.e., IR_ON
- the second photodiode D2 receives the reflected light and the ambient light.
- the control unit stops sending a trigger signal to the emitting unit 101. Since the emitting unit 101 is not driven by the trigger signal, it stops emitting the detection light to the target object.
- the target voltage signal Vout finally output by the third operational amplifier U3 is 2( ⁇ V1- ⁇ V2), and ⁇ V1- ⁇ V2 is the amplitude of the target voltage signal VOUT after removing the influence of ambient light.
- the amplitude of the target voltage signal VOUT is 2( ⁇ V1- ⁇ V2)
- the emission unit 101 is further controlled to be in the light-emitting state IR_ON and the cut-off state IR_OFF based on the above method, then after two detection cycles, the amplitude of the target voltage signal VOUT output by the third operational amplifier U3 is 4*( ⁇ V1- ⁇ V2).
- the proximity of the target object to the proximity detection circuit can be determined.
- the number of detection cycles can be selected according to actual conditions to ensure that the proximity of the target object can be accurately determined based on the target voltage signal.
- control unit may be used to control the working state of the transmitting unit 101 and control the output voltage signal of the integration unit 103 to be inverted when the transmitting unit 101 switches between states.
- the receiving unit 102 may obtain a first photocurrent in response to the received ambient light when the transmitting unit 101 is in the cut-off state, and obtain a second photocurrent in response to the received reflected light and ambient light when the transmitting unit 101 is in the luminous state.
- the reflected light is a light signal formed by the detection light emitted by the transmitting unit 101 in the luminous state after being reflected by the target object.
- the integration unit 103 may be used to integrate the first photocurrent and the second photocurrent respectively to obtain the corresponding first output voltage signal and the second output voltage signal, and obtain the target voltage signal for proximity detection based on the first output voltage signal and the second output voltage signal.
- the control unit may control the output voltage signal of the integration unit 103 to be inverted. For example, when the transmitting unit 101 switches from the luminous state to the cut-off state, or from the cut-off state to the luminous state, the control unit may control the output voltage signal of the integration unit 103 to be inverted.
- the output voltage signal of the integration unit 103 at this time is the first output voltage signal.
- the control unit controls the emitting unit 101 to switch the state, the control unit can also control the output voltage signal of the integration unit 103, that is, the first output voltage signal at this time, to be inverted.
- 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, 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, 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 is not specifically limited here.
- the integration unit 103 After the output voltage signal of the integration unit 103, ie, the first output voltage signal, is inverted, since the emission unit 101 is in a light-emitting state at this time, the integration unit 103 can continue to integrate the second photocurrent based on the inverted first output voltage signal.
- the first photocurrent is the photocurrent corresponding to the light intensity of the ambient light
- the second photocurrent is the photocurrent corresponding to the light intensity of both the reflected light and the ambient light. Since the environment in which the proximity detection circuit is located does not change or changes very little during the detection process, the intensity of the ambient light remains unchanged or the range of change is within the controllable detection error range. Therefore, the intensity of the ambient light corresponding to the emitting unit 101 in the light-emitting state and the cut-off state can be considered to be the same, and it can be known that the first photocurrent The amplitude of the first output voltage signal corresponding to the first photocurrent is smaller than the amplitude of the second output voltage signal corresponding to the second photocurrent.
- the integration unit 103 continues to integrate the second photocurrent based on the inverted 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 finally 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.
- the difference between the second output voltage signal and the first output voltage signal is a voltage signal obtained by removing the integrated voltage corresponding to the ambient light based on 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.
- the output voltage signal of the integration unit 103 at this time is the second output voltage signal.
- the control unit controls the emitting unit 101 to switch the state, the control unit can also control the output voltage signal of the integration unit 103, that is, the second output voltage signal at this time, to be inverted.
- the integration unit 103 After the output voltage signal of the integration unit 103, ie, the second output voltage signal, is inverted, since the emission unit 101 is in the cut-off state at this time, the integration unit 103 can continue to integrate the first photocurrent based on the inverted second output voltage signal.
- 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 a negative value.
- the target voltage signal is also the voltage signal obtained by removing the integral voltage corresponding to the ambient light. Therefore, the proximity of the target object can also be accurately determined based on the target voltage signal.
- control unit 101 may first control the transmitting unit 101 to be in a light-emitting state, and then control the transmitting unit 101 to be converted from the light-emitting state to the cut-off state; or, the control unit may first control the transmitting unit 101 to be in the cut-off state, and then control the transmitting unit 101 to be converted from the cut-off state to the light-emitting state.
- the order of the specific working states of the transmitting unit 101 may be determined according to the actual application scenario, and is not specifically limited here.
- the state switching of the emitting unit 101 is When switching, the output voltage signal of the synchronous control integration unit 103 is inverted, and the target voltage signal finally output by the integration unit 103 is the voltage signal obtained after removing the integration voltage corresponding to the ambient light.
- the proximity of the target object can be determined based on the target voltage signal.
- the control unit controls the output voltage signal of the integration unit 103 to be inverted when the state of the transmitting unit 101 is switched.
- the first output voltage signal or the second output voltage signal can be inverted.
- the integration unit 103 integrates the second photocurrent or the first photocurrent based on the inverted first output voltage signal or the second output voltage signal.
- the target voltage signal finally output by the integration unit 103 is a voltage signal after the voltage corresponding to the ambient light is removed.
- the voltage signal can be used to accurately judge the proximity of the target object, thereby improving the accuracy of proximity detection and ensuring the reliability of the proximity detection circuit.
- control unit may be specifically configured to control the duration of the emission unit 101 being in the light-emitting state and the duration of the emission unit 101 being in the cut-off state to be the same within a preset detection period.
- the detection period can be any pre-set duration, such as 20ms, 45ms, etc. Since it is necessary to eliminate the interference of ambient light on the judgment of the proximity of the target object, the difference between the second output voltage signal and the first output voltage signal must completely offset the integrated voltage corresponding to the ambient light. Therefore, when the transmitting unit 101 is in the cut-off state and the luminous state, the integration unit 103 should have the same integration duration for the photocurrent corresponding to the ambient light. Therefore, after the second photocurrent and the first photocurrent are integrated within the same duration, the difference between the second output voltage signal and the first output voltage signal is the ideal target voltage signal.
- the time when the emitting unit 101 does not emit the detection light is the same as the time when it emits the detection light, that is, the time when the emitting unit 101 is in the cut-off state and the light-emitting state is the same.
- the duration that the transmitting unit 101 is in the light-emitting state and the cut-off state can evenly divide the total duration of the detection period. For example, if the detection period is 20ms, the duration that the transmitting unit 101 is in the light-emitting state and the cut-off state can be 10ms respectively.
- the transmitting unit 101 can be in the cut-off state within the first 10ms of the detection period, and in the light-emitting state within the last 10ms of the detection period; or, the transmitting unit 101 can be in the light-emitting state within the first 10ms of the detection period, and in the cut-off state within the last 10ms of the detection period.
- the duration that the transmitting unit 101 is in the light-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 that the transmitting unit 101 is in the cut-off state can be the first 15ms of 50ms, and the duration that the transmitting unit 101 is in the light-emitting state can be the next 15ms adjacent to the first 15ms. After the transmitting unit 101 is in the light-emitting state for 15ms, the proximity of the target object can be determined directly based on the target voltage signal currently output by the integration unit 103.
- the integration unit 103 may include a first operational amplifier U1 and a first integration capacitor C1.
- the first integration capacitor C1 may be electrically connected between the negative input terminal and the output terminal of the first operational amplifier U1 through a combination switch 204.
- the combination switch 204 may be configured as follows:
- the transmitting unit 101 In response to the first driving signal of the control unit, the first plate of the first integrating capacitor C1 is controlled to be electrically connected to the output terminal of the first operational amplifier U1, and the second plate of the first integrating capacitor C1 is controlled to be electrically connected to the negative input terminal of the first operational amplifier U1;
- the first plate of the first integrating capacitor C1 is controlled to be electrically connected to the negative input terminal of the first operational amplifier U1
- the second plate of the first integrating capacitor C1 is controlled to be electrically connected to the output terminal of the first operational amplifier U1.
- connection relationship between the first integral capacitor C1 and the first operational amplifier U1 can be adjusted through the combination switch 204. Since the voltage across the first integral capacitor C1 cannot change suddenly, when the transmitting unit 101 switches its state, the control unit adjusts the connection relationship between the first integral capacitor C1 and the first operational amplifier U1 by controlling the switching state of the combination switch 204. When the transmitting unit 101 switches its state, the output voltage signal of the first operational amplifier U1 can be inverted.
- the first plate of the first integrating capacitor C1 is its right plate
- the second plate of the first integrating capacitor C1 is its left plate.
- the combination switch 204 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.
- the combination switch 204 responds to the second driving signal to connect the left plate of the first integrating capacitor C1 to the output terminal of the first operational amplifier U1 and to connect the right plate of the first integrating capacitor C1 to the negative input terminal of the first operational amplifier U1.
- the integration unit 103 integrates the first photocurrent to obtain the first output voltage signal when the emitting unit 101 is in the cut-off state
- the voltage difference across the first integration capacitor C1 is the amplitude of the first output voltage signal.
- the integrating unit 103 continues to integrate the second photocurrent to obtain a second output voltage signal.
- 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.
- the combination switch 204 may include a main switch pair and a sub-switch pair.
- the main switch pair and the sub-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 sub-switch S1b and the second sub-switch S1b' of the sub-switch pair are synchronized.
- 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.
- One end of the first sub-switch S1b is connected to the second plate of the first integrating capacitor C1, and the other end is connected to the output end of the first operational amplifier U1; one end of the second sub-switch S1b' is connected to the first plate of the first integrating capacitor C1, and the other end is connected to the negative input end of the first operational amplifier U1.
- the receiving unit 101 may include a first photodiode D1, a cathode of the first photodiode D1 is connected to the negative input terminal of the first operational amplifier U1, an anode of the first photodiode D1 is connected to the ground GND, and the combination switch 204 is configured as follows:
- the first main switch S1a and the second main switch S1a' are closed, and the first sub-switch S1b and the second sub-switch S1b' are turned off;
- the first main switch S1a and the second main switch S1a' are turned off, and the first subsidiary switch S1b and the second subsidiary switch S1b' are turned on.
- the first photocurrent and the second photocurrent both flow from the output end of the first operational amplifier through the first integrating capacitor C1 and the first photodiode D1 to the ground electrode GND. Therefore, the voltage of the right plate of the first integrating capacitor C1 gradually increases, that is, the first operational amplifier U1 performs upward integration on the first photocurrent and the second photocurrent.
- a control switch S6 can also be connected between the first photodiode D1 and the negative input terminal of the first operational amplifier U1.
- the first operational amplifier U1 When the control switch S6 is disconnected, no matter what state the emitting unit 101 is in, the first operational amplifier U1 will not generate an output signal due to the open circuit between the first photodiode D1 and the first operational amplifier U1; the first operational amplifier U1 will generate an output signal only when the control switch S6 is closed.
- the first main switch S1a and the second main switch S1a' are closed in response to the first driving signal of the control unit. Since the states of the main switch pair and the auxiliary switch pair are opposite, the first auxiliary switch S1b and the second auxiliary switch S1b' are disconnected. At this time, the first operational amplifier U1 integrates the first photocurrent upward during the time when the transmitting unit 101 is in the cut-off state to obtain a first output voltage signal.
- the control unit controls the emitting unit 101 to switch from the cut-off state to the luminous state.
- the first sub-switch S1b and the second sub-switch S1b' are closed in response to the second driving signal of the control unit, and the first main switch S1a and the second main switch S1a' are disconnected.
- the output voltage signal of the first operational amplifier U1 is an inverted signal of the first output voltage signal.
- the first operational amplifier U1 continues to integrate the second photocurrent upward during the time when the emitting unit 101 is in the light-emitting state, and the starting value of the upward integration is the amplitude of the inverted first output voltage signal. After one detection cycle ends, the output voltage signal of the first operational amplifier U1 is the target voltage signal.
- FIG. 23 is a timing diagram of a target voltage signal provided in an embodiment of the present application.
- the first integral capacitor C1 is connected in parallel with a first reset switch RST1.
- the first reset switch RST1 and the control switch S6 can be controlled to close.
- the closed first reset switch RST1 consumes the voltage originally stored on the first integral capacitor C1.
- the first reset switch RST1 is then controlled to be disconnected. Since the control switch S6 is closed, a path is formed between the first photodiode D1 and the first operational amplifier U1, and proximity detection begins at the falling edge of the first reset switch RST1.
- the duration of the emitting unit 101 being in the light-emitting state and the cut-off state is ⁇ T
- the reflected light is I_c
- the ambient light is I_a.
- 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.
- the control unit sends a first driving signal to control the first main switch S1a and the second main switch S1a' to be closed, and the first sub-switch S1b and the second sub-switch S1b' to be disconnected.
- the left plate of the first integrating capacitor C1 is connected to the negative input terminal of the first operational amplifier U1
- the right plate of the first integrating capacitor C1 is connected to the output terminal of the first operational amplifier U1.
- the transmitting unit 101 When the transmitting unit 101 is in the cut-off state, i.e., IR_OFF, the first photodiode D1 only receives the ambient light I_a.
- the integrating unit 103 performs an upward integration process on the first photocurrent.
- the control unit When the transmitting unit 101 is in the cut-off state, that is, the duration of IR_OFF 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 to the target object. At the same time, the control unit sends a second drive signal to control the first sub-switch S1b and the second sub-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 end of the first operational amplifier U1, and the right plate of the first integrating capacitor C1 is connected to the negative input end of the first operational amplifier U1. Since the charge on the first integrating capacitor C1 remains unchanged, the output voltage signal of the output end of the first operational amplifier U1 is - ⁇ V1 at this time.
- the first photodiode D1 receives the reflected light I_c and the ambient light I_a, and the integration unit 103 performs an upward integration process on the second photocurrent.
- the output voltage signal ⁇ V2- ⁇ V1 of the first operational amplifier U1 is the amplitude of the target voltage signal VOUT without the influence of the ambient light.
- the control unit drives the control switch S6 to be disconnected, thereby ending the proximity detection, and the amplitude of the target voltage signal VOUT output by the first operational amplifier U1 is 2*( ⁇ V2- ⁇ V1).
- the amplitude of the target voltage signal VOUT output by the first operational amplifier U1 is N*( ⁇ V2- ⁇ V1).
- the combination switch 204 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 static contact of the first single-pole double-throw switch SW1 is connected to the negative input terminal of the first operational amplifier U1, and the second static contact of the first single-pole double-throw switch SW1 is connected to the output terminal of the first operational amplifier U1.
- 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 end of the first operational amplifier U1
- the second stationary contact of the second single-pole double-throw switch SW2 is connected to the negative input end of the first operational amplifier U1.
- the receiving unit 101 may include a first photodiode D1, a cathode of the first photodiode D1 is connected to the negative input terminal of the first operational amplifier U1, an anode of the first photodiode D1 is connected to the ground GND, and the combination switch 204 is configured as follows:
- 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
- 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;
- the moving contact of the first SPDT switch SW1 is connected to the second stationary contact of the first SPDT switch SW1
- the moving contact of the second SPDT switch SW2 is connected to the second stationary contact of the second SPDT switch SW2.
- 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 electrode GND. Therefore, the first integral capacitor C1 The voltage of the right plate gradually increases, that is, the first operational amplifier U1 performs upward integration on the first photocurrent and the second photocurrent.
- the first single-pole double-throw switch SW1 when the transmitting unit 101 is in the cut-off state, the first single-pole double-throw switch SW1 responds to the first drive signal to connect its moving contact with its first static contact, and the second single-pole double-throw switch SW2 also responds to the first drive signal to connect its moving contact with its first static contact.
- the left plate of the first integrating capacitor C1 is connected to the negative input terminal of the first operational amplifier U1
- 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 period when the transmitting unit 101 is in the cut-off state to obtain a first output voltage signal.
- the control unit controls the emitting unit 101 to switch from the cut-off state to the luminous state.
- the first single-pole double-throw switch SW1 responds to the second drive signal to connect its moving contact with its second static contact.
- the second single-pole double-throw switch SW2 also responds to the second drive signal to connect its moving contact with its second static contact.
- the left plate of the first integrating capacitor C1 is connected to the output end of the first operational amplifier U1
- the right plate of the first integrating capacitor C1 is connected to the negative input end of the first operational amplifier U1.
- the output voltage signal of the first operational amplifier U1 is the signal after the first output voltage signal is inverted.
- the first operational amplifier U1 continues to integrate the second photocurrent upward during the time when the emitting unit 101 is in the light-emitting state, and the starting value of the upward integration is the amplitude of the inverted first output voltage signal. After one detection cycle ends, the output voltage signal of the first operational amplifier U1 is the target voltage signal.
- the timing of the target voltage signal output by the first operational amplifier U1 can refer to the timing diagram shown in Figure 23, which will not be repeated here.
- FIG27 is a functional module diagram of a proximity detection circuit provided in an embodiment of the present application.
- the proximity detection circuit may further include an analog-to-digital conversion unit 106 electrically connected to the integration unit 103, and the analog-to-digital conversion unit 106 may be used to convert the target voltage signal output by the integration unit 103 into a digital signal, and the digital signal may be used to characterize the proximity degree of the target object.
- the analog-to-digital conversion unit 106 can adopt any existing analog-to-digital converter, and the analog-to-digital conversion unit 106 can quantize the target voltage signal of the analog quantity to convert the target voltage signal into a quantized value.
- the target voltage signal is converted into a digital signal representing the proximity of the target object.
- FIG28 is a functional module diagram of a proximity detection circuit provided in an embodiment of the present application.
- the proximity detection circuit may further include a switch capacitor unit 205 and an analog-to-digital conversion unit 106, wherein the switch capacitor unit 205 may be electrically connected to the integration unit 103 and the analog-to-digital conversion unit 106, respectively; the switch capacitor unit 205 may be used to obtain an analog signal according to the target voltage signal output by the integration unit 103 and output it to the analog-to-digital conversion unit 106; the analog-to-digital conversion unit 106 may be used to convert the analog signal into a digital signal, and the digital signal is used to characterize the proximity of the target object.
- the switching capacitor unit 205 can work by moving charge into and out of the capacitor when the switch is opened and closed, that is, the target voltage signal of the integration unit 103 can be moved into the switching capacitor unit 205 and moved out from the switching capacitor unit 205 to the analog-to-digital conversion unit 106 by turning the switch of the switching capacitor unit 205 on and off, so that the analog-to-digital conversion unit 106 can perform analog-to-digital conversion on the signal.
- Figure 29 is a circuit principle diagram of a switching capacitor unit provided in an embodiment of the present application.
- the switching capacitor unit 205 may include a fourth operational amplifier U4, a fourth capacitor C4, a fifth capacitor C5, a seventh switch S7, an eighth switch S8, a ninth switch S9 and a tenth switch S10.
- the seventh switch S7 and the fourth capacitor C4 are connected in series between the output terminal VOUT1 of the integration unit 103 and the negative input terminal of the fourth operational amplifier U4, and the fourth capacitor C4 is also connected to a reference voltage source through the eighth switch S8; the fifth capacitor C5 and the ninth switch S9 are connected in series between the negative input terminal of the fourth operational amplifier U4 and the output terminal VOUT2 of the fourth operational amplifier U4; the tenth switch S10 is connected in parallel with the fifth capacitor C5 and the ninth switch S9 between the negative input terminal of the fourth operational amplifier U4 and the output terminal VOUT2 of the fourth operational amplifier U4; the output terminal of the fourth operational amplifier U4 is connected to the input terminal of the analog-to-digital conversion unit 106.
- 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, and the reference voltage source can output a first reference voltage signal VREF1; it can be understood that the positive input terminal of the second operational amplifier U2 can also be connected to a voltage source, and 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, which can be determined according to the actual application scenario.
- the first integral capacitor C1 is connected in parallel with a first reset capacitor C2.
- Switch RST1 before starting to detect the proximity of the target object, can first control the first reset switch RST1 and the control switch S6 to be closed, and the closed first reset switch RST1 consumes the electric energy originally stored on the first integral capacitor C1, and then the first reset switch RST1 is controlled to be disconnected. Since the control switch S6 is closed, a path is formed between the first photodiode D1 and the first operational amplifier U1, and the proximity detection begins at the falling edge of the first reset switch RST1.
- 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.
- the control unit sends a first drive signal, and the combination switch 204 responds to the first drive signal to operate, so that 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, so that 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.
- the control unit When the emitting unit 101 is in the cut-off state, i.e., the duration of IR_OFF reaches the preset duration ⁇ T, the control unit starts to send a trigger signal to the emitting unit 101 to drive the emitting unit 101 to emit detection light to the target object. At the same time, the control unit sends a second drive signal, and the combination switch 204 responds to the second drive signal to operate, so that 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 at the output terminal of the first operational amplifier U1, i.e., the target voltage signal VOUT1, is flipped from ⁇ V1 to - ⁇ V1.
- the first operational amplifier U1 When the emitting unit 101 is in the light-emitting state, i.e., IR_ON, the first operational amplifier U1 integrates the second photocurrent upward. At this time, the charge of the first integrating capacitor C1 can increase from - ⁇ V1 to ⁇ V2 within the integration time ⁇ T. Because within the same integration time, the light intensity of the ambient light and reflected light received by the first photodiode D1 is greater than the light intensity when only the ambient light is received, the output voltage signal ⁇ V2- ⁇ V1 of the first operational amplifier U1 at this time is the amplitude of the target voltage signal VOUT1 without the influence of the ambient light.
- the emitting unit 101 On the basis that the amplitude of the target voltage signal VOUT1 is ⁇ V2- ⁇ V1, the emitting unit 101 is continued to be controlled in the cut-off state IR_OFF and the luminous state IR_ON based on the above method. Then, after two detection cycles, the control unit drives the control switch S6 to be disconnected, 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).
- the control unit controls the ninth switch S9 and the tenth switch S10 to close, so as to consume the energy of the fifth capacitor C5.
- the electric energy originally stored on the first capacitor C1 is then controlled to be disconnected, and the ninth switch S9 is kept closed.
- the control unit controls the seventh switch S7 to be closed, and the left plate of the fourth capacitor C4 samples the voltage on the first integrating capacitor C1, and the right plate voltage of the fourth capacitor C4 is the second reference voltage signal VREF2.
- the voltage on the first integrating capacitor C1 is transferred to the fourth capacitor C4.
- the eighth switch S8 is controlled to be closed.
- the left plate of the fourth capacitor C4 samples the first reference voltage signal VREF1 which is different from the voltage on the first integrating capacitor C1.
- the voltage on the fourth capacitor C4 cannot change suddenly, when the seventh switch S7 is disconnected and the eighth switch S8 is closed, based on the potential change of the fourth capacitor C4 and the ninth switch S9 which is continuously closed, the voltage on the fourth capacitor C4 can be gradually transferred to the fifth capacitor C5, so that the voltage signal VOUT2 output by the fourth operational amplifier U4 is an analog signal.
- the proximity degree of the target object to the proximity detection circuit can be determined.
- the present embodiment can detect the proximity of the target object in N detection cycles, and the target voltage signal VOUT1 obtained in each detection cycle will be accumulated on the first integrating capacitor C1.
- the control unit drives the control switch S6 to disconnect, thereby ending the proximity detection.
- the target voltage signal VOUT1 accumulated on the first integrating capacitor C1 can be transferred to the fifth capacitor C5 through the switching capacitor unit 205. Therefore, if N detection cycles are performed, the amplitude of the final analog signal VOUT2 is N times the amplitude of the analog signal of a single detection cycle.
- the control unit before starting the proximity detection, can control the ninth switch S9 and the tenth switch S10 to close to consume the electric energy originally stored on the fifth capacitor C5, and then control the ninth switch S9 to open and maintain the tenth switch S10 closed; then the control unit controls the first reset switch RST1 and the control switch S6 to close, and consumes the electric energy originally stored on the first integration capacitor C1 through the closed first reset switch RST1, and then 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, and the proximity detection starts at the falling edge of the first reset switch RST1.
- the control unit does not send a trigger signal to the transmitting unit 101, and the transmitting unit 101 will not emit detection light such as infrared light IR.
- the control unit sends a first drive signal, and the combination switch 204 responds to the first drive signal.
- the left plate of the first integrating capacitor C1 is connected to the negative input terminal of the first operational amplifier U1
- 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.
- the voltage of the first integrating capacitor C1 can be increased from 0 to 1 within the integration time ⁇ T. ⁇ V1, that is, the target voltage signal VOUT1 increases from 0 to ⁇ V1.
- the control unit When the emitting unit 101 is in the cut-off state, i.e., the duration of IR_OFF reaches the preset duration ⁇ T, the control unit starts to send a trigger signal to the emitting unit 101 to drive the emitting unit 101 to emit detection light to the target object. At the same time, the control unit sends a second drive signal, and the combination switch 204 responds to the second drive signal to operate, so that 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 at the output terminal of the first operational amplifier U1, i.e., the target voltage signal VOUT1, is flipped from ⁇ V1 to - ⁇ V1.
- the first operational amplifier U1 When the emitting unit 101 is in the light-emitting state, i.e., IR_ON, the first operational amplifier U1 integrates the second photocurrent upward. At this time, the charge of the first integrating capacitor C1 can increase from - ⁇ V1 to ⁇ V2 within the integration time ⁇ T. Because within the same integration time, the light intensity of the ambient light and reflected light received by the first photodiode D1 is greater than the light intensity when only the ambient light is received, the output voltage signal ⁇ V2- ⁇ V1 of the first operational amplifier U1 at this time is the amplitude of the target voltage signal VOUT1 without the influence of the ambient light.
- the control unit controls the control switch S6 to be disconnected, and the seventh switch S7 to be closed, the voltage on the first integral capacitor C1 is transferred to the fourth capacitor C4, and then the seventh switch S7 is controlled to be disconnected, and when the seventh switch S7 is disconnected, the eighth switch S8 and the ninth switch S9 are controlled to be closed and the tenth switch S10 is disconnected, so that the potential change of the fourth capacitor C4 also provides a trigger condition for the voltage transfer, so that the voltage transferred to the fourth capacitor C4 can be gradually transferred to the fifth capacitor C5, so that the voltage signal VOUT2 output by the second operational amplifier U2 is an analog signal.
- the control unit controls the control switch S6 to be disconnected, and the seventh switch S7 to be closed, the voltage on the first integral capacitor C1 is transferred to the fourth capacitor C4, and then the seventh switch S7 is controlled to be disconnected, and when the seventh switch S7 is disconnected, the eighth switch S8 and the ninth switch S9 are controlled to be closed and the tenth switch S10 is disconnected, so that the potential change of the fourth
- the detection of the next detection cycle can be continued, so that the voltage on the first integrating capacitor C1 in the next detection cycle is transferred to the fifth capacitor C5 again, so that the amplitude of the analog signal VOUT2 at this time is twice the amplitude of the analog signal VOUT2 of the previous detection cycle, and so on.
- the voltage on the first integrating capacitor C1 will be transferred to the fifth capacitor C5 at the end of the detection cycle. 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 of a single detection cycle.
- the number of detection cycles can be selected according to actual conditions to ensure that the proximity of the target object can be accurately determined based on the target voltage signal.
- FIG32 is a schematic diagram of the structure of a proximity sensor provided in an embodiment of the present application.
- an embodiment of the present application further provides a proximity sensor 1800, which may include the proximity detection circuit in any of the embodiments described above with reference to FIGS. 1 to 31. Therefore, the specific implementation of the proximity sensor 1800 may refer to the description of the embodiments of any proximity detection circuit in combination with FIGS. 1 to 31 above, and will not be repeated here.
- the proximity sensor 1800 may include a main control unit 1801 and a driving unit 1802.
- the main control unit 1801 can control the working state of the transmitting unit 101 by controlling the driving unit 1802.
- the main control unit 1801 may be the same module as the control unit in the aforementioned embodiment, or may be another unit module different from the control unit in the aforementioned embodiment, which can be determined according to the actual application scenario.
- the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities.
- the specific implementation of the above units or structures can refer to the previous embodiments and will not be repeated here.
Landscapes
- Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Life Sciences & Earth Sciences (AREA)
- General Physics & Mathematics (AREA)
- Geophysics (AREA)
- Electronic Switches (AREA)
Abstract
一种接近检测电路,包括:接收单元(102)用于响应于接收到的反射光和环境光得到第一光电流,响应于接收到的环境光得到第二光电流;控制单元用于控制发射单元(101)的工作状态以及控制第一光电流和第二光电流相对于积分单元(103)流向相反;积分单元(103)用于分别对第一光电流和第二光电流进行积分处理,得到对应的第一积分电压和第二积分电压,并基于第一积分电压和第二积分电压,得到用于接近检测的目标电压信号。其所得到目标电压信号是将环境光的影响过滤后的电压信号,用于确定目标物的远近程度,可以提高检测结果的准确性。还提供一种接近传感器,包括该接近检测电路。
Description
本申请涉及接近传感器技术领域,具体涉及一种接近检测电路及接近传感器。
接近传感器可以检测物体的存在以及该物体距离接近传感器的距离。接近传感器的应用领域十分广泛,例如速度探测、自动水龙头的人手探测、传送带上物体的自动计数或检查、打印机的纸边缘检测以及电子产品的息屏/亮屏控制等。
光电式接近传感器通过发光二极管(Light-Emitting Diode,LED)或垂直腔面发射激光器(Vertical Cavity Surface Emitting Laser,VCSEL)向外界发射一束光,光在物体上发生反射,反射回来的光被光电二极管(Photo Diode,PD)接收到之后,将反射光信号转化成光电流信号,物体越靠近,PD接收到的反射光越强,对应的光电流越大,通过量化光电流的大小便能判断物体的远近程度。
但是,由于环境中存在多种不同的光源,例如太阳光、灯光等,PD接收到的不单单只有反射光,还会有环境光,使得光电流不仅与反射光相关,还与环境光相关,混杂在反射光中的环境光会干扰对物体远近程度的判断。
发明内容
本申请提供一种接近检测电路及接近传感器,旨在解决现有的接近传感器在检测物体距离时,环境光会干扰其对物体远近程度的判断,导致检测精准度低的问题。
第一方面,本申请提供一种接近检测电路,该接近检测电路包括接收单元、控制单元以及积分单元,接收单元分别与积分单元和控制单元电性连接,接收单元对应配置有发射单元。接收单元用于在发射单元处于发光状态时,
响应于接收到的反射光和环境光得到第一光电流,以及在发射单元处于截止状态时,响应于接收到的环境光得到第二光电流,其中反射光是发射单元在发光状态时发出的检测光经目标物反射后所形成的光信号。控制单元用于控制发射单元的工作状态以及控制第一光电流和第二光电流相对于积分单元流向相反。积分单元用于分别对第一光电流和第二光电流进行积分处理,得到对应的第一积分电压和第二积分电压,并基于第一积分电压和第二积分电压,得到用于接近检测的目标电压信号。
在本申请一种可能的实现方式中,控制单元用于在预设的检测周期内,控制发射单元处于发光状态的时长和处于截止状态的时长相同。
在本申请一种可能的实现方式中,积分单元包括第一运算放大器和第一积分电容,第一积分电容电性连接于第一运算放大器的负输入端与输出端之间,接近检测电路还包括与控制单元电性连接的电流反向单元,接收单元通过电流反向单元与第一运算放大器的负输入端电性连接。电流反向单元被配置为:在发射单元处于发光状态时,响应于控制单元的第一驱动信号,控制第一光电流的流向为由第一运算放大器的输出端通过第一积分电容和接收单元流出;在发射单元处于截止状态时,响应于控制单元的第二驱动信号,控制第二光电流的流向为由接收单元通过第一积分电容流向第一运算放大器的输出端。
在本申请一种可能的实现方式中,接收单元包括第一光电二极管,电流反向单元被配置为:响应于第一驱动信号,控制第一光电二极管的阴极与第一运算放大器的负输入端电性连接以及第一光电二级管的阳极连接接地极;响应于第二驱动信号,控制第一光电二极管的阳极与第一运算放大器的负输入端电性连接以及第一光电二极管的阴极连接接地极。
在本申请一种可能的实现方式中,接收单元包括第一光电二极管,电流反向单元包括第一开关、第二开关、第三开关以及镜像电路,镜像电路的第一输出端通过第二开关与第一光电二极管的阴极连接,镜像电路的第二输出端通过第三开关与第一运算放大器的负输入端连接,第一光电二极管的阴极通过第一开关与第一运算放大器的负输入端连接,第一光电二极管的阳极连接接地极,控制单元被配置为:在发射单元处于发光状态时,输出第一驱动信号以控制第一开关闭合以及第二开关和第三开关关断;在发射单元处于截
止状态时,输出第二驱动信号以控制第一开关关断以及第二开关和第三开关闭合。
在本申请一种可能的实现方式中,镜像电路包括第一场效应管以及第二场效应管,第一场效应管的栅极和第二场效应管的栅极连接,第一场效应管的源极和第二场效应管的源极分别连接电压源,第一场效应管的栅极和第一场效应管的漏极还与第二开关连接,第二场效应管的漏极与第三开关连接。
在本申请一种可能的实现方式中,镜像电路还包括第二运算放大器,第二运算放大器的正输入端分别与第二开关和第一场效应管的漏极连接,第二运算放大器的负输入端分别与第三开关和第二场效应管的漏极连接,第二运算放大器的输出端分别与第一场效应管的栅极和第二场效应管的栅极连接。
在本申请一种可能的实现方式中,积分单元包括第三运算放大器、第二积分电容和第三积分电容,第二积分电容电性连接于第三运算放大器的正输入端与负输出端之间,第三积分电容电性连接于第三运算放大器的负输入端与正输出端之间,接近检测电路还包括与控制单元电性连接的电流反向单元,接收单元通过电流反向单元分别与第三运算放大器的正输入端和负输入端电性连接;电流反向单元被配置为:在发射单元处于发光状态时,响应于控制单元的第一驱动信号,控制第一光电流的流向为由第三运算放大器的负输出端通过第二积分电容和接收单元流向第三运算放大器的负输入端以及第三积分电容;在发射单元处于截止状态时,响应于控制单元的第二驱动信号,控制第二光电流的流向为由第三运算放大器的正输出端通过第三积分电容和接收单元流向第三运算放大器的正输入端以及第二积分电容。
在本申请一种可能的实现方式中,接收单元包括第二光电二极管,电流反向单元被配置为:响应于第一驱动信号,控制第二光电二极管的阴极与第一运算放大器的正输入端电性连接以及第二光电二级管的阳极与第一运算放大器的负输入端电性连接;响应于第二驱动信号,控制第二光电二极管的阳极与第一运算放大器的正输入端电性连接以及第二光电二极管的阴极与第一运算放大器的负输入端电性连接。
在本申请一种可能的实现方式中,接近检测电路还包括与积分单元电性连接的模数转换单元,模数转换单元用于将积分单元输出的目标电压信号转换为数字信号,数字信号用于表征目标物的接近程度。
本申请中的第一方面及其各种可能的实现方式具有如下有益的技术效果:在发射单元处于发光状态时,接收单元响应于发射光和环境光得到第一光电流,在发射单元处于截止状态时,接收单元响应于环境光得到第二光电流,通过控制第一光电流和第二光电流相对于积分单元的流向相反,可以使积分单元对第一光电流和第二光电流的积分处理反向,如此,积分单元最终输出的目标电压信号则是去除了环境光对应的电压后的电压信号,通过该电压信号便可以准确判断目标物的接近程度,提高了接近检测的精准度,确保了接近检测电路的可靠性。
第二方面,本申请提供一种接近检测电路,该接近检测电路包括接收单元、控制单元以及积分单元,接收单元分别与积分单元和控制单元电性连接,接收单元对应配置有发射单元。接收单元用于在发射单元处于截止状态时,响应于接收到的环境光得到第一光电流,以及在发射单元处于发光状态时,响应于接收到的反射光和环境光得到第二光电流;反射光是发射单元在发光状态时发出的检测光经目标物反射后所形成的光信号。控制单元用于控制发射单元的工作状态以及在发射单元进行状态切换时,控制积分单元的输出电压信号反相。积分单元,用于分别对第一光电流和第二光电流进行积分处理,得到对应的第一输出电压信号和第二输出电压信号,并基于第一输出电压信号和第二输出电压信号,得到用于接近检测的目标电压信号。
在本申请一种可能的实现方式中,控制单元用于:在预设的检测周期内,控制发射单元处于发光状态的时长和处于截止状态的时长相同。
在本申请一种可能的实现方式中,积分单元包括第一运算放大器和第一积分电容,第一积分电容通过一组合开关电性连接于第一运算放大器的负输入端与输出端之间,组合开关被配置为:在发射单元处于截止状态时,响应于控制单元的第一驱动信号,控制第一积分电容的第一极板与第一运算放大器的输出端电性连接以及第一积分电容的第二极板与第一运算放大器的负输入端电性连接;在发射单元处于发光状态时,响应于控制单元的第二驱动信号,控制第一积分电容的第一极板与第一运算放大器的负输入端电性连接以及第一积分电容的第二极板与第一运算放大器的输出端电性连接。
在本申请一种可能的实现方式中,组合开关包括主开关对和副开关对,主开关对和副开关对状态相反,且主开关对的第一主开关和第二主开关同步,
副开关对的第一副开关和第二副开关同步;第一主开关一端与第一积分电容的第二极板连接,另一端与第一运算放大器的负输入端连接,第二主开关一端与第一积分电容的第一极板连接,另一端与第一运算放大器的输出端连接;第一副开关一端与第一积分电容的第二极板连接,另一端与第一运算放大器的输出端连接,第二副开关一端与第一积分电容的第一极板连接,另一端与第一运算放大器的负输入端连接。
在本申请一种可能的实现方式中,接收单元包括第一光电二极管,第一光电二极管的阴极与第一运算放大器的负输入端连接,第一光电二极管的阳极连接接地极,组合开关被配置为:响应于第一驱动信号,第一主开关和第二主开关闭合,第一副开关和第二副开关关断;响应于第二驱动信号,第一主开关和第二主开关关断,第一副开关和第二副开关闭合。
在本申请一种可能的实现方式中,组合开关包括第一单刀双掷开关和第二单刀双掷开关,第一单刀双掷开关的动触点与第一积分电容的第二极板连接,第一单刀双掷开关的第一静触点与第一运算放大器的负输入端连接,第一单刀双掷开关的第二静触点与第一运算放大器的输出端连接;第二单刀双掷开关的动触点与第一积分电容的第一极板连接,第二单刀双掷开关的第一静触点与第一运算放大器的输出端连接,第二单刀双掷开关的第二静触点与第一运算放大器的负输入端连接。
在本申请一种可能的实现方式中,接收单元包括第一光电二极管,第一光电二极管的阴极与第一运算放大器的负输入端连接,第一光电二极管的阳极连接接地极,组合开关被配置为:响应于第一驱动信号,第一单刀双掷开关的动触点与第一单刀双掷开关的第一静触点连接,第二单刀双掷开关的动触点与第二单刀双掷开关的第一静触点连接;响应于第二驱动信号,第一单刀双掷开关的动触点与第一单刀双掷开关的第二静触点连接,第二单刀双掷开关的动触点与第二单刀双掷开关的第二静触点连接。
在本申请一种可能的实现方式中,接近检测电路还包括开关电容单元和模数转换单元,开关电容单元分别与积分单元和模数转换单元电性连接;开关电容单元,用于根据积分单元输出的目标电压信号得到模拟信号输出至模数转换单元;模数转换单元,用于将模拟信号转换为数字信号,数字信号用于表征目标物的接近程度。
在本申请一种可能的实现方式中,开关电容单元包括第二运算放大器、第二电容、第三电容、第二开关、第三开关以及第四开关;第二开关和第二电容串联于积分单元的输出端与第二运算放大器的负输入端之间,第二电容还通过第三开关连接有参考电压源;第三电容和第四开关串联于第二运算放大器的负输入端与第二运算放大器的输出端之间;第二运算放大器的输出端与模数转换单元的输入端连接。
本申请的第二方面及其各种可能的实现方式具有以下有益的技术效果:通过控制单元在发射单元进行状态切换时,控制积分单元的输出电压信号反相,可以使第一输出电压信号或第二输出电压信号反相,然后在发射单元的工作状态切换后,积分单元再基于反相的第一输出电压信号或第二输出电压信号对第二光电流或第一光电流进行积分处理,如此,积分单元最终输出的目标电压信号则是去除了环境光对应的电压后的电压信号,通过该电压信号可以准确判断目标物的接近程度,提高了接近检测的精准度,确保了接近检测电路的可靠性。
第三方面,本申请还提供一种接近传感器,该接近传感器包括第一方面、第二方面、或者它们的任一种可能的实现方式的接近检测电路。
为了更清楚地说明本申请中的技术方案,下面将对本申请描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例中提供的接近检测电路的功能模块示意图;
图2是本申请一实施例中提供的积分单元的电路原理示意图;
图3是本申请一实施例中提供的第一光电流的流向示意图;
图4是本申请一实施例中提供的第二光电流的流向示意图;
图5是本申请一实施例中提供的目标电压信号的时序示意图;
图6是本申请一实施例中提供的电流反向单元的结构示意图;
图7是本申请一实施例中提供的第一光电流对应的电路原理示意图;
图8是本申请一实施例中提供的第二光电流对应的电路原理示意图;
图9是本申请一实施例中提供的镜像电路的电路原理示意图;
图10是本申请一实施例中提供的镜像电路的另一电路原理示意图;
图11是本申请一实施例中提供的第二光电流对应的另一电路原理示意图;
图12是本申请一实施例中提供的目标电压信号的另一时序示意图;
图13是本申请一实施例中提供的积分单元的另一电路原理示意图;
图14是本申请一实施例中提供的第一光电流对应的另一电路原理示意图;
图15是本申请一实施例中提供的第二光电流对应的另一电路原理示意图;
图16是本申请一实施例中提供的目标电压信号的又一时序示意图;
图17是本申请一实施例中提供的积分单元的又一电路原理示意图;
图18是本申请一实施例中提供的发射单元处于截止状态时积分单元的电路原理示意图;
图19是本申请一实施例中提供的发射单元处于发光状态时积分单元的电路原理示意图;
图20是本申请一实施例中提供的组合开关的一实施方式的示意图;
图21是本申请一实施例中提供的发射单元处于截止状态时组合开关的状态示意图;
图22是本申请一实施例中提供的发射单元处于发光状态时组合开关的状态示意图;
图23是本申请一实施例中提供的目标电压信号的时序示意图;
图24是本申请一实施例中提供的组合开关的另一实施方式的示意图;
图25是本申请一实施例中提供的发射单元处于截止状态时组合开关的状态示意图;
图26是本申请一实施例中提供的发射单元处于发光状态时组合开关的状态示意图;
图27是本申请一实施例中提供的接近检测电路的功能模块示意图;
图28是本申请一实施例中提供的接近检测电路的功能模块示意图;
图29是本申请一实施例中提供的开关电容单元的电路原理示意图;
图30是本申请一实施例中提供的目标电压信号的时序示意图;
图31是本申请一实施例中提供的目标电压信号的时序示意图;
图32是本申请一实施例中提供的接近传感器的结构框图;以及
图33是本申请一实施例中提供的接近传感器的示意图。
下面将结合本申请中的附图,对本申请中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在本申请的描述中,需要理解的是,术语“中心”、“纵向”、“横向”、“长度”、“宽度”、“厚度”、“上”、“下”、“前”、“后”、“左”、“右”、“竖直”、“水平”、“顶”、“底”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本申请和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制。此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个特征。在本申请的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。
需要指出的是,本申请实施例中“连接”可以理解为电连接,两个电学元件连接可以是两个电学元件之间的直接或间接连接。例如,A与B连接,既可以是A与B直接连接,也可以是A与B之间通过一个或多个其它电学元件间接连接。
在本申请中,“示例性”一词用来表示“用作例子、例证或说明”。本申请中被描述为“示例性”的任何实施例不一定被解释为比其它实施例更优选或更具优势。为了使本领域任何技术人员能够实现和使用本申请,给出了以下描述。在以下描述中,为了解释的目的而列出了细节。应当明白的是,本领域普通技术人员可以认识到,在不使用这些特定细节的情况下也可以实现本申请。在其它实例中,不会对公知的结构和过程进行详细阐述,以避免不必要的细节使本申请的描述变得晦涩。因此,本申请并非旨在限于所示的实施
例,而是与符合本申请所公开的原理和特征的最广范围相一致。
本申请实施例提供一种接近检测电路及接近传感器,以下分别进行详细说明。
首先,本申请提供一种接近检测电路,请参阅图1,图1是本申请实施例中提供的接近检测电路的一个功能模块示意图,该接近检测电路包括接收单元102、控制单元(图中未示出)以及积分单元103,该接收单元102分别与积分单元103和控制单元电性连接,接收单元102对应配置有发射单元101。
其中,接收单元102可以用于在发射单元101处于发光状态时,响应于接收到的反射光和环境光得到第一光电流,以及在发射单元101处于截止状态时,响应于接收到的环境光得到第二光电流;该反射光是发射单元101在发光状态时所发出的检测光经目标物反射后形成的光信号。
控制单元可以用于控制发射单元101的工作状态以及控制第一光电流和第二光电流相对于积分单元103流向相反,积分单元103可以用于分别对第一光电流和第二光电流进行积分处理,得到对应的第一积分电压和第二积分电压,并基于第一积分电压和第二积分电压,得到用于接近检测的目标电压信号。
本申请实施例中,发射单元101可以配置有两个工作状态,即发光状态和截止状态,可以理解,当发射单元101处于发光状态时,发射单元101可以发出检测光,而当发射单元101处于截止状态时,该发射单元101不发光,即此时无检测光发出。
可以理解,该发射单元101发出的检测光的波长与接收单元102能够感知到的光的波长可以是相匹配的,例如,发射单元101所发出的检测光是可见光或某个可见光域,则接收单元102能够感知的反射光也是相对应的可见光或某个可见光域;若发射单元101所发出的检测光是红外光或某个不可见光域,则接收单元102能够感知的反射光也是相对应的红外光或某个不可见光域。
控制单元可以通过控制发射单元101的工作状态来控制检测光的发出,举例来说,当控制单元向发射单元101发出触发信号时,发射单元101可以响应于该触发信号而处于发射状态,从而基于一定的发光频率发出检测光;而当控制单元停止向发射单元101发出触发信号时,则发射单元101由发射状态
转换为截止状态,从而停止发出检测光。
本申请实施例中,发射单元101可以是发光二极管(Light-Emitting Diode,LED)或垂直腔面发射激光器(Vertical Cavity Surface Emitting Laser,VCSEL)等具有发光功能的光源,在不同的应用场景中,发光单元101的具体器件构成可以不同,此处不做具体限定。
发射单元101发出的检测光在经目标物反射后,可以形成反射光射向接收单元102,接收单元102可以根据接收到的反射光形成相对应的光电流,基于该光电流便可以判断目标物的接近程度,此处的接近程度可以是目标物相对于接近检测电路、发射单元101、接收单元102或预先设定的某一个基准点的远近程度。
由于在环境中,除发射单元101外,还可能存在如太阳、白炽灯等其他光源,这些光源发出的光即环境光的波长若在接收单元102可感知的光域内,则同样会被接收单元102感知到从而形成相对应的光电流,而环境光的光电流会影响对目标物的接近程度的判断,因此,在对目标物的接近程度进行判断时,需排除这部分的光电流的干扰。
本申请实施例中,接收单元102可以在发射单元101处于发光状态时,响应于反射光和环境光得到第一光电流,而在发射单元101处于截止状态时,响应于环境光得到第二光电流,控制单元可以用于控制第一光电流和第二光电流相对于积分单元103流向相反,如此,积分单元103可以对第一光电流和第二光电流进行不同的积分处理。
可以理解的,第一光电流为反射光和环境光两者的光强度所对应的光电流,而第二光电流是环境光的光强度所对应的光电流,由于在检测过程中接近检测电路所处环境不会改变或者变化很小,从而环境光的强度保持不变或者变化范围在可控的检测误差范围内,因此,发射单元101在发光状态和截止状态时所对应的环境光的强度可以认为是相同。
由于第一光电流和第二光电流相对于积分单元103流向相反,若两者中的一者的流向为流入积分单元103,则另一者的流向为流出积分单元103。
举例来说,若第一光电流的流向为由积分单元103流出,则可以理解积分单元103对第一光电流进行向上积分处理,得到第一积分电压;相对应的,第二光电流的流向则为流入积分单元103,此时,积分单元103对第二光电流
进行向下积分处理,得到第二积分电压。
本申请实施例中,积分单元103的输出信号可以是第一积分电压和第二积分电压两者之差,由于第一积分电压是对第一光电流进行向上积分处理得到的电压,第二积分电压对第二光电流进行向下积分处理得到的电压,而第一光电流是在发射单元101处于发光状态时,响应于反射光和环境光的光强度之和得到的电流信号,第二光电流是在发射单元101处于截止状态,响应于环境光的光强度得到的电流信号,因此,第一积分电压与第二积分电压之差则是在反射光和环境光对应的积分电压的基础上,去除了环境光对应的积分电压后所得到的电压信号即目标电压信号,基于该目标电压信号便可以确定目标物的接近程度。
需要说明的是,在其他的一些应用场景中,第一光电流的流向也可以是流向积分单元103,此时积分单元103可以对第一光电流进行向下积分处理,得到第一积分电压;相对应的,第二光电流可以是由积分单元103流出,此时积分单元103则对第二光电流进行向上积分处理,得到第二积分电压。
在此场景中,第一积分电压与第二积分电压之差同样为去除了环境光对应的积分电压后所得到的电压信号即目标电压信号,区别于前述示例的是,此时的目标电压信号为负值,在对目标物的接近程度进行判断时,可以取负的目标电压信号的绝对值进行目标物的接近程度的判断,也可以直接对负的目标电压信号进行量化,确定目标物的接近程度。
值得注意的是,本申请实施例中,控制单元101可以先控制发射单元101处于发光状态,再控制发射单元101由发光状态转换为截止状态;或者,控制单元也可以先控制发射单元101处于截止状态,再控制发射单元101由截止状态转换为发光状态,发射单元101的具体工作状态的先后顺序可以根据实际应用场景进行确定,具体此处不作限定。
本申请实施例中,在发射单元101处于发光状态时,接收单元102响应于发射光和环境光得到第一光电流,在发射单元101处于截止状态时,接收单元102响应于环境光得到第二光电流,通过控制第一光电流和第二光电流相对于积分单元103的流向相反,可以使积分单元103对第一光电流和第二光电流的积分处理反向,如此,积分单元103最终输出的目标电压信号则是去除了环境光对应的电压后的电压信号,通过该电压信号便可以准确判断目标物
的接近程度,提高了接近检测的精准度,确保了接近检测电路的可靠性。
接下来,继续对图1所示的接近检测电路的各单元以及在实际应用中可能采用的具体实施方式进行详细阐述。
在本申请一些实施例中,控制单元具体可以用于在预设的检测周期内,控制发射单元101处于发光状态的时长和处于截止状态的时长相同。
可以理解,检测周期可以是预先设定的任一时长,例如20ms、45ms等,由于要去除环境光对判断目标物接近程度的干扰,因此,第一积分电压与第二积分电压之差需完全抵消环境光所对应的积分电压,又由于第一光电流和第二光电流相对于积分单元103的流向相反,因此,在相同的时间内分别对第一光电流和第二光电流进行积分处理后,得到的第一积分电压与第二积分电压之差即为理想的目标电压信号。
根据前述的说明可以知道,在相同的时间内分别对第一光电流和第二光电流进行积分处理,则可以确定发射单元101发射检测光的时长和不发射检测光的时长相同,即发射单元101处于发光状态和截止状态的时长相同。
在一种具体实现中,发射单元101处于发光状态和截止状态的时长可以均分检测周期的总时长,举例来说,检测周期为20ms,则发射单元101处于发光状态和截止状态的时长可以分别为10ms,例如,发射单元101可以在检测周期的前10ms内处于发光状态,在检测周期的后10ms内处于截止状态;或者,发射单元101可以在检测周期的前10ms内处于截止状态,在检测周期的后10ms内处于发光状态。
在另一种具体实现中,发射单元101处于发光状态和截止状态的时长可以是检测周期的前一部分时长,例如,若检测周期为50ms,则发射单元101处于发光状态的时长可以是50ms的前15ms,发射单元101处于截止状态的时长可以是与该前15ms相邻的下一个15ms,在发射单元101处于截止状态的15ms结束后,可以直接根据积分单元103当前输出的目标电压信号确定目标物的接近程度。
可以理解的,在一个检测周期内得到的目标电压信号的值可能较小不便于后续的量化,因此,在本申请一些实施例中,可以在多个连续的检测周期内控制发射单元101在发光状态和截止状态之间进行状态转换,从而使每个检测周期内得到的目标电压信号累加,得到便于后续量化的较大的电压信号。
请参阅图2,图2是本申请实施例中提供的积分单元的一个电路原理示意图,在本申请一些实施例中,积分单元103可以包括第一运算放大器U1和第一积分电容C1,第一积分电容C1电性连接于第一运算放大器U1的负输入端与输出端之间,接近检测电路还可以包括与控制单元电性连接的电流反向单元104,接收单元102通过电流反向单元104与第一运算放大器U1的负输入端电性连接;该电流反向单元104可以被配置为:
在发射单元101处于发光状态时,响应于控制单元的第一驱动信号,控制第一光电流的流向为由第一运算放大器U1的输出端通过第一积分电容C1和接收单元102流出;
在发射单元101处于截止状态时,响应于控制单元的第二驱动信号,控制第二光电流的流向为由接收单元102通过第一积分电容C1流向第一运算放大器U1的输出端。
如图3所示,接收单元102可以包括第一光电二极管D1,在发射单元101处于发光状态时,响应于该第一驱动信号,电流反向单元104可以控制第一光电二极管D1的阴极与第一运算放大器U1的负输入端电性连接以及控制第一光电二级管D1的阳极连接接地极GND,由于第一光电二极管D1的内部电流流向为由阴极流向阳极,因此,此时第一光电流为由第一运算放大器U1的输出端通过第一积分电容C1和第一光电二极管D1流向接地极GND。
此时,第一积分电容C1的右极板的电压逐渐增大,由于第一积分电容C1的右极板与第一运算放大器U1的输出端同电位,因此目标电压信号逐渐增大,可以理解,目标电压信号的大小与积分时间即发射单元101的发光时长、第一积分电容C1的容值大小以及接收单元102接收到的反射光和环境光的光强度有关。
若发射单元101的发光时长为ΔT,反射光为I_c,环境光为I_a,则在积分时间ΔT内,第一运算放大器U1输出的目标电压信号以斜率Slop_on=(I_c+I_a)/C1向上积分,且积分值ΔV1=(I_c+I_a)*ΔT/C1,即第一积分电压为ΔV1。
如图4所示,在发射单元101处于截止状态时,响应于该第二驱动信号,电流反向单元104可以控制第一光电二极管D1的阳极与第一运算放大器U1的负输入端电性连接以及控制第一光电二极管D1的阴极连接接地极GND。
此时,第一积分电容C1的右极板的电压逐渐减小,即目标电压信号逐渐减小,可以理解,此时目标电压信号的大小与积分时间即发射单元101处于截止状态即不发光的时长、第一积分电容C1的容值大小以及接收单元102接收到的环境光的光强度有关。
若发射单元101的不发光的时长同样为ΔT,环境光为I_a,则在积分时间ΔT内,第一运算放大器U1输出的目标电压信号以斜率Slop_off=I_a/C1向下积分,且积分值ΔV2=I_a*ΔT/C1,即第二积分电压为ΔV2。
如图5所示,图5是本申请实施例中提供的目标电压信号的一个时序示意图,本申请实施例中,第一积分电容C1并联有第一复位开关RST1,在开始检测目标物的接近程度之前,首先可以控制第一复位开关RST1闭合,以消耗第一积分电容C1上原本存储的电能,然后控制该第一复位开关RST1断开,开始进行接近检测。可以理解,在第一光电二极管D1与第一运算放大器U1的负输入端之间还可以连接一控制开关(图中未示出),在该控制开关闭合时,开始进行接近检测。
控制单元发出触发信号至发射单元101,以驱动发射单元101向目标物发射检测光如红外光IR,在发射单元101处于发光状态即IR_ON时,第一光电二极管D1接收到反射光和环境光,根据前述的说明,积分单元103对第一光电流进行向上积分处理,此时第一积分电容C1的电量可以由0基于斜率Slop_on增长至ΔV1,即目标电压信号VOUT由0基于斜率Slop增长至ΔV1。
当发射单元101处于发光状态即IR_ON的时长达到预设时长如ΔT时,控制单元停止向发射单元101发送触发信号,发射单元101由于无触发信号的驱动,则停止向目标物发射检测光,在发射单元101处于截止状态即IR_OFF时,第一光电二极管D1只接收到环境光,积分单元103对第二光电流进行向下积分处理,此时第一积分电容C1的电量可以由ΔV1基于斜率Slop_OFF减小ΔV2,由于在相同的积分时长内,第一光电二极管D1接收到的环境光和反射光的光强度大于只接收到环境光时的光强度,因此,ΔV1大于ΔV2,ΔV1-ΔV2即为去除了环境光的影响的目标电压信号VOUT的幅值。
在目标电压信号VOUT的幅值为ΔV1-ΔV2的基础上,若再基于上述的方法继续控制发射单元101处于发光状态IR_ON和截止状态IR_OFF,则在经过两个检测周期后,第一运算放大器U1输出的目标电压信号VOUT的幅值为
2*(ΔV1-ΔV2)。
通过对该2*(ΔV1-ΔV2)进行量化,便可以确定目标物距离接近检测电路的接近程度。
请参阅图6,图6是本申请实施例中提供的电流反向单元的一个结构示意图,在本申请一些实施例中,接收单元102可以包括第一光电二极管D1,电流反向单元104可以包括第一开关S1、第二开关S2、第三开S3关以及镜像电路105,该镜像电路105的第一输出端通过第二开关S2与第一光电二极管D1的阴极连接,镜像电路105的第二输出端通过第三开关S3与第一运算放大器U1的负输入端连接,第一光电二极管D1的阴极通过第一开关S1与第一运算放大器U1的负输入端连接,第一光电二极管D1的阳极连接接地极GND,控制单元可以被配置为:
在发射单元101处于发光状态时,输出第一驱动信号以控制第一开关S1闭合以及第二开关S2和第三开关S3关断;
在发射单元101处于截止状态时,输出第二驱动信号以控制第一开关S1关断以及第二开关S2和第三开关S3闭合。
本申请实施例中,在发射单元101处于发光状态时,控制单元通过第一驱动信号控制第一开关S1闭合以及第二开关S2和第三开关S3断开,则电路结构如图7所示,此时第一光电流的流向为由第一运算放大器U1的输出端通过第一积分电容C1和第一光电二极管D1流向接地极GND,积分单元102对第一光电流进行向上积分处理。
而在发射单元101处于截止状态时,控制单元通过第二驱动信号控制第一开关S1断开以及第二开关S2和第三开关S3闭合,则电路结构如图8所示,由于第一光电二极管D1的电流始终是由阴极流向阳极的,因此,第二光电流是由镜像电路105的第一输出端流出,又由于镜像电路105的工作原理,在镜像电路105的第二输出端同样会输出与第二光电流大小相等的电流信号,该电流信号通过闭合的第三开关S3流向第一运算放大器U1和第一积分电容C1,此时,积分单元102对该电流信号进行向下积分处理。
可以理解,本申请实施例中的镜像电路105可以是镜像电流源、带隙基准源电路等现有的任一种具有镜像功能的电路结构或器件,如图9所示,图9是本申请实施例中提供的镜像电路的一个电路原理示意图,该镜像电路105
可以包括第一场效应管M1以及第二场效应管M2,第一场效应管M1的栅极和第二场效应管M2的栅极连接,第一场效应管M1的源极和第二场效应管M2的源极分别连接电压源VDD,第一场效应管M1的栅极和第一场效应管M1的漏极还与第二开关S2连接,第二场效应管M2的漏极与第三开关S3连接。
本申请实施例中,当发射单元101处于发光状态时,第一开关S1闭合,第二开关S2和第三开关S3断开,则镜像电路105未接入回路,第一光电二极管D1感应到反射光和环境光后,第一光电流由第一运算放大器U1的输出端通过第一积分电容C1以及闭合的第一开关S1流向第一光电二极管D1,此时第一积分电容C1的右极板电压升高,因此,第一运算放大器U1的输出端输出的目标电压信号逐渐增大,即积分单元102对第一光电流进行向上积分处理。
而当发射单元101处于截止状态时,第一开关S1断开,第二开关S2和第三开关S3闭合,由于第一光电二极管D1的电流始终是由阴极流向阳极的,因此,第二光电流是由第一场效应管M1的漏极通过闭合的第二开关S2流向第一光电二极管D1,基于该电路结构可以知道,第二场效应管M2的漏极同样会有与第二光电流大小相等的电流信号通过闭合的第三开关S3流向第一运算放大器U1的负输入端和第一积分电容C1,此时第一积分电容C1的右极板电压下降,因此,第一运算放大器U1的输出端输出的目标电压信号逐渐减小,即积分单元102对第二光电流进行向下积分处理。
请参阅图10,图10是本申请实施例中提供的镜像电路的另一个电路原理示意图,该镜像电路105可以包括第二运算放大器U2、第一场效应管M1以及第二场效应管M2,第二运算放大器U2的正输入端分别与第二开关S2和第一场效应管M1的漏极连接,第二运算放大器U2的负输入端分别与第三开关S3和第二场效应管M2的漏极连接,第二运算放大器U2的输出端分别与第一场效应管M1的栅极和第二场效应管M2的栅极连接,第一场效应管M1的源极和第二场效应管M2的源极分别连接电压源VDD。
本申请实施例中,当发射单元101处于发光状态时,第一开关S1闭合,第二开关S2和第三开关S3断开,则镜像电路105未接入回路,第一光电二极管D1感应到反射光和环境光后,第一光电流由第一运算放大器U1的输出端通过第一积分电容C1和闭合的第一开关S1流向第一光电二极管D1,此时第
一积分电容C1的右极板电压升高,因此,第一运算放大器U1的输出端输出的目标电压信号逐渐增大,即积分单元102对第一光电流进行向上积分处理。
而当发射单元101处于截止状态时,第一开关S1断开,第二开关S2和第三开关S3闭合,电路结构如图11所示,由于第一光电二极管D1的电流始终是由阴极流向阳极的,因此,第二光电流是由第二运算放大器U2的正输入端通过闭合的第二开关S2流向第一光电二极管D1,基于该电路结构可以知道,第二运算放大器U2的负输入端处同样会有与第二光电流大小相等的电流信号通过闭合的第三开关S3流向第一运算放大器U1的负输入端和第一积分电容C1,此时第一积分电容C1的右极板电压下降,因此,第一运算放大器U1的输出端输出的目标电压信号逐渐减小,即积分单元102对第二光电流进行向下积分处理。
请参阅图12,图12是本申请实施例中提供的目标电压信号的另一个时序示意图,本申请实施例中,第一积分电容C1并联有第一复位开关RST1,在开始检测目标物的接近程度之前,首先可以控制第一复位开关RST1闭合,以消耗第一积分电容C1上原本存储的电能,然后控制该第一复位开关RST1断开。
控制单元发出触发信号至发射单元101,以驱动发射单元101向目标物发射检测光,同时,控制单元发出第一驱动信号以控制第一开关S1闭合,第二开关S2和第三开关S3断开,在发射单元101处于发光状态即IR_ON时,第一光电二极管D1接收到反射光和环境光,根据前述的说明,积分单元103对第一光电流进行向上积分处理,此时第一积分电容C1的电量可以由0基于斜率Slop_on增长至ΔV1,即目标电压信号VOUT由0基于斜率Slop增长至ΔV1。
当发射单元101处于发光状态是时长即IR_ON的时长达到预设时长如ΔT时,控制单元停止向发射单元101发送触发信号,发射单元101由于无触发信号的驱动,则停止向目标物发射检测光,同时,控制单元发出第二驱动信号以控制第一开关S1断开,第二开关S2和第三开关S3闭合,在发射单元101处于截止状态即IR_OFF时,第一光电二极管D1只接收到环境光,积分单元103对第二光电流进行向下积分处理,此时第一积分电容C1的电量可以由ΔV1基于斜率Slop_OFF减小ΔV2,由于在相同的积分时长内,第一光电二极管D1接收到的环境光和反射光的光强度大于只接收到环境光时的光强度,因此,
ΔV1大于ΔV2,ΔV1-ΔV2即为去除了环境光的影响的目标电压信号VOUT的幅值。
在目标电压信号VOUT的幅值为ΔV1-ΔV2的基础上,若再基于上述的方法继续控制发射单元101处于发光状态IR_ON和截止状态IR_OFF,则在经过N个检测周期后,第一运算放大器U1输出的目标电压信号VOUT的幅值为N*(ΔV1-ΔV2)。
通过对该N*(ΔV1-ΔV2)进行量化,便可以确定目标物距离接近检测电路的接近程度。
如图13所示,图13是本申请实施例中提供的积分单元的另一个电路原理示意图,在本申请一些实施例中,积分单元103可以包括第三运算放大器U3、第二积分电容C2和第三积分电容C3,第二积分电容C2电性连接于第三运算放大器U3的正输入端与负输出端之间,第三积分电容C3电性连接于第三运算放大器U3的负输入端与正输出端之间,接近检测电路还可以包括与控制单元电性连接的电流反向单元104,接收单元102通过电流反向单元104分别与第三运算放大器U3的正输入端和负输入端电性连接;电流反向单元104可以被配置为:
在发射单元101处于发光状态时,响应于控制单元的第一驱动信号,控制第一光电流的流向为由第三运算放大器U3的负输出端通过第二积分电容C2和接收单元102流向第三运算放大器U3的负输入端以及第三积分电容C3;
在发射单元101处于截止状态时,响应于控制单元的第二驱动信号,控制第二光电流的流向为由第三运算放大器U3的正输出端通过第三积分电容C3和接收单元102流向第三运算放大器的U3正输入端以及第二积分电容C2。
如图14所示,接收单元102可以包括第二光电二极管D2,在发射单元101处于发光状态时,响应于控制单元的第一驱动信号,电流反向单元104可以控制第二光电二极管D2的阴极与第一运算放大器U1的正输入端电性连接以及控制第二光电二级管D2的阳极与第一运算放大器U1的负输入端电性连接,由于第二光电二极管D2的内部电流流向为由阴极流向阳极,因此,此时第一光电流为由第一运算放大器U1的负输出端流出,并通过第二积分电容C2和第二光电二极管D2流向第一运算放大器U1的负输入端和第三积分电容C3。
此时,第二积分电容C2的右极板的电压逐渐增大,第三运算放大器U3
的负输出端输出的电压信号逐渐增大,即向上积分,而第三积分电容C3的右极板的电压逐渐减小,第三运算放大器U3的正输出端输出的电压信号逐渐减小,即向下积分,此时第三运算放大器U3最终的输出电压为正输出端的输出电压与负输出端输出电压的绝对值之和。
若设定第二积分电容C2和第三积分电容C3的容值相等,发射单元101的发光时长为ΔT,反射光为I_c,环境光为I_a,则在积分时间ΔT内,第三运算放大器U3的负输出端输出的电压信号V_outn以斜率Slop_ON1=(I_c+I_a)/C2向上积分,且积分值ΔV1=(I_c+I_a)*ΔT/C2,第三运算放大器U3的正输出端输出的电压信号V_outp以斜率Slop_ON2=-(I_c+I_a)/C3向下积分,且积分值同样为ΔV1=(I_c+I_a)*ΔT/C3,因此,第三运算放大器U3的最终输出的目标电压信号为2ΔV1。
如图15所示,在发射单元101处于截止状态时,响应于控制单元的第二驱动信号,电流反向单元104可以控制第二光电二极管D2的阳极与第一运算放大器U1的正输入端电性连接以及控制第二光电二极管D2的阴极与第一运算放大器U1的负输入端电性连接,此时第二光电流为由第一运算放大器U1的正输出端流出,并通过第三积分电容C3和第二光电二极管D2流向第一运算放大器U1的正输入端和第二积分电容C2。
此时,第二积分电容C2的右极板的电压逐渐减小,第三运算放大器U3的负输出端输出的电压信号逐渐减小,即向下积分,而第三积分电容C3的右极板的电压逐渐增大,第三运算放大器U3的正输出端输出的电压信号逐渐增大,即向上积分,此时第三运算放大器U3最终的输出电压为正输出端输出电压的绝对值与负输出端输出电压之和。
同样设定第二积分电容C2和第三积分电容C3的容值相等,发射单元101不发光的时长同样为ΔT,环境光为I_a,则在积分时间ΔT内,第三运算放大器U3的负输出端输出的电压信号V_outn以斜率Slop_OFF1=-I_a/C2向下积分,且积分值为ΔV2=I_a*ΔT/C2,第三运算放大器U3的正输出端输出的电压信号V_outp以斜率Slop_OFF2=I_a/C3向上积分,积分值同样为ΔV2=I_a*ΔT/C3,因此,此时第三运算放大器U3的最终输出的目标电压信号为在2ΔV1的基础上减小2ΔV2。
如图16所示,图16是本申请实施例中提供的目标电压信号的又一个时序
示意图,本申请实施例中,第二积分电容C2并联有第二复位开关RST2,第三积分电容C3并联有第三复位开关RST3,在开始检测目标物的接近程度之前,首先可以控制第二复位开关RST2和第三复位开关RST3闭合,以消耗第二积分电容C2以及第三积分电容C3上原本存储的电能,然后再控制第二复位开关RST2和第三复位开关RST3断开,开始进行接近检测。
控制单元发出触发信号至发射单元101,以驱动发射单元101向目标物发射检测光,在发射单元101处于发光状态即IR_ON时,第二光电二极管D2接收到反射光和环境光,根据前述的说明,第三运算放大器U3的负输出端输出的电压信号V_outn以斜率Slop_ON1=(I_c+I_a)/C2向上积分,积分值为ΔV1=(I_c+I_a)*ΔT/C2,同时,第三运算放大器U3的正输出端输出的电压信号V_outp以第二斜率Slop_ON2=-(I_c+I_a)/C3向下积分,积分值为ΔV1=(I_c+I_a)*ΔT/C3,因此,第三运算放大器U3的最终输出的目标电压信号Vout为2ΔV1。
当发射单元101处于发光状态IR_ON的时长达到预设时长如ΔT时,控制单元停止向发射单元101发送触发信号,发射单元101由于无触发信号的驱动,则停止向目标物发射检测光,在发射单元101处于截止状态即IR_OFF时,第二光电二极管D2只接收到环境光,第三运算放大器U3的负输出端输出的电压信号V_outn以斜率Slop_OFF1=-I_a/C2向下积分,积分值为ΔV2=I_a*ΔT/C2,第三运算放大器U3的正输出端输出的电压信号V_outp以斜率Slop_OFF2=I_a/C3向上积分,积分值为ΔV2=I_a*ΔT/C3,此时,第三运算放大器U3最终输出的目标电压信号Vout为2(ΔV1-ΔV2),ΔV1-ΔV2即为去除了环境光的影响的目标电压信号VOUT的幅值。
在目标电压信号VOUT的幅值为2(ΔV1-ΔV2)的基础上,若再基于上述的方法继续控制发射单元101处于发光状态IR_ON和截止状态IR_OFF,则在经过两个检测周期后,第三运算放大器U3输出的目标电压信号VOUT的幅值即为4*(ΔV1-ΔV2)。
通过对该4*(ΔV1-ΔV2)进行量化,便可以确定目标物距离接近检测电路的接近程度。
可以理解的,在不同的应用场景中,可以根据实际情况选择检测周期的数量,以确保后续能够根据目标电压信号精准判断目标物的接近程度。
返回参照图1,在另一实施例中,控制单元可以用于控制发射单元101的工作状态以及在发射单元101进行状态切换时,控制积分单元103的输出电压信号反相。例如,接收单元102可以在发射单元101处于截止状态时,响应于接收到的环境光得到第一光电流,以及在发射单元101处于发光状态时,响应于接收到的反射光和环境光得到第二光电流。如前所述,反射光是发射单元101在发光状态时所发出的检测光经目标物反射后形成的光信号。积分单元103可以用于分别对第一光电流和第二光电流进行积分处理,得到对应的第一输出电压信号和第二输出电压信号,并基于第一输出电压信号和第二输出电压信号,得到用于接近检测的目标电压信号。发射单元101在发光状态和截止状态之间切换时,控制单元可以控制积分单元103的输出电压信号反相。例如,在发射单元101从发光状态切换为截止状态,或者从截止状态切换为发光状态时,控制单元可以控制积分单元103的输出电压信号反相。
举例来说,若发射单元101由截止状态转换为发光状态,由于积分单元103可以在发射单元101处于截止状态时,根据第一光电流得到第一输出电压信号,因此,此时积分单元103的输出电压信号为该第一输出电压信号,在控制单元控制发射单元101进行状态切换时,控制单元同时可以控制积分单元103的输出电压信号即此时的第一输出电压信号反相。
可以理解,此处的反相是相对于基准电压而言的,若基准电压为0V,第一输出电压信号的幅值为5V,则反相后积分单元103的输出电压信号的幅值为-5V;若基准电压为2V,第一输出电压信号的幅值为5V,则反相后积分单元103的输出电压信号的幅值为-1V,基准电压的取值可以根据实际应用场景进行确定,此处不作具体限定。
在积分单元103的输出电压信号即第一输出电压信号反相后,由于发射单元101此时处于发光状态,因此,积分单元103可以在反相后的第一输出电压信号的基础上,继续对第二光电流进行积分处理。
可以理解的,第一光电流是环境光的光强度所对应的光电流,而第二光电流为反射光和环境光两者的光强度所对应的光电流,由于在检测过程中接近检测电路所处环境不会改变或者变化很小,从而环境光的强度保持不变或者变化范围在可控的检测误差范围内,因此,发射单元101在发光状态和截止状态时所对应的环境光的强度可以认为是相同,并且,可以知道第一光电
流对应的第一输出电压信号的幅值小于第二光电流对应的第二输出电压信号的幅值。
本申请实施例中,积分单元103在反相后的第一输出电压信号的基础上,继续对第二光电流进行积分处理,由于第二输出电压信号的幅值大于第一输出电压信号的幅值,因此,积分单元最终输出的目标电压信号为第二输出电压信号与第一输出电压信号之差,且目标电压信号的幅值会大于基准电压。
可以理解,第二输出电压信号与第一输出电压信号之差则是在反射光和环境光对应的积分电压的基础上,去除了环境光对应的积分电压后所得到的电压信号,因此基于目标电压信号便可以精准确定目标物的接近程度。
需要说明的是,在其他的一些应用场景中,若发射单元101由发光状态转换为截止状态,由于积分单元103可以在发射单元101处于发光状态时,根据第二光电流得到第二输出电压信号,因此,此时积分单元103的输出电压信号为该第二输出电压信号,在控制单元控制发射单元101进行状态切换时,控制单元同时可以控制积分单元103的输出电压信号即此时的第二输出电压信号反相。
在积分单元103的输出电压信号即第二输出电压信号反相后,由于发射单元101此时处于截止状态,因此,积分单元103可以在反相后的第二输出电压信号的基础上,继续对第一光电流进行积分处理。
此时积分单元103的输出电压信号同样是第二输出电压信号与第一输出电压信号之差,由于第二输出电压信号的幅值大于第一输出电压信号的幅值,因此,此应用场景中积分单元103的输出的目标电压信号为负值,该目标电压信号同样是去除了环境光对应的积分电压后所得到的电压信号,因此基于目标电压信号同样可以精准确定目标物的接近程度。
也就是说,本申请实施例中,控制单元101可以先控制发射单元101处于发光状态,再控制发射单元101由发光状态转换为截止状态;或者,控制单元也可以先控制发射单元101处于截止状态,再控制发射单元101由截止状态转换为发光状态,发射单元101的具体工作状态的先后顺序可以根据实际应用场景进行确定,具体此处不作限定。
值得注意的是,本申请实施例中,无论发射单元101是由发光状态切换为截止状态,还是由截止状态切换为发光状态,在发射单元101进行状态切
换时,同步控制积分单元103的输出电压信号反相,积分单元103最终输出的目标电压信号均是去除了环境光对应的积分电压后所得到的电压信号,基于该目标电压信号便可以确定目标物的接近程度。
本申请实施例中,通过控制单元在发射单元101进行状态切换时,控制积分单元103的输出电压信号反相,可以使第一输出电压信号或第二输出电压信号反相,然后在发射单元101的工作状态切换后,积分单元103再基于反相的第一输出电压信号或第二输出电压信号对第二光电流或第一光电流进行积分处理,如此,积分单元103最终输出的目标电压信号则是去除了环境光对应的电压后的电压信号,通过该电压信号可以准确判断目标物的接近程度,提高了接近检测的精准度,确保了接近检测电路的可靠性。
接下来,继续对图1所示的接近检测电路的各单元以及在实际应用中可能采用的具体实施方式进行详细阐述。
在本申请一些实施例中,控制单元具体可以用于在预设的检测周期内,控制发射单元101处于发光状态的时长和处于截止状态的时长相同。
可以理解,检测周期可以是预先设定的任一时长,例如20ms、45ms等,由于要去除环境光对判断目标物接近程度的干扰,因此,第二输出电压信号与第一输出电压信号之差需完全抵消环境光所对应的积分电压,故而积分单元103在发射单元101处于截止状态和发光状态时,对环境光对应的光电流的积分时长应相同,因此,在相同的时长内分别对第二光电流和第一光电流进行积分处理后,得到的第二输出电压信号与第一输出电压信号之差即为理想的目标电压信号。
根据前述的说明可以知道,在相同的时间内分别对第二光电流和第一光电流进行积分处理,则可以确定发射单元101不发射检测光的时长和发射检测光的时长相同,即发射单元101处于截止状态和发光状态的时长相同。
在一种具体实现中,发射单元101处于发光状态和截止状态的时长可以均分检测周期的总时长,举例来说,检测周期为20ms,则发射单元101处于发光状态和截止状态的时长可以分别为10ms,例如,发射单元101可以在检测周期的前10ms内处于截止状态,在检测周期的后10ms内处于发光状态;或者,发射单元101可以在检测周期的前10ms内处于发光状态,在检测周期的后10ms内处于截止状态。
在另一种具体实现中,发射单元101处于发光状态和截止状态的时长可以是检测周期的前一部分时长,例如,若检测周期为50ms,则发射单元101处于截止状态的时长可以是50ms的前15ms,发射单元101处于发光状态的时长可以是与该前15ms相邻的下一个15ms,在发射单元101处于发光状态的15ms结束后,可以直接根据积分单元103当前输出的目标电压信号确定目标物的接近程度。
可以理解的,在一个检测周期内得到的目标电压信号的值可能较小不便于后续的量化,因此,在本申请一些实施例中,可以在多个连续的检测周期内控制发射单元101在截止状态和发光状态之间进行状态转换,从而累加多个检测周期内得到的目标电压信号,得到便于后续量化的较大的电压信号。
请参阅图17,图17是本申请实施例中提供的积分单元的一个电路原理示意图,在本申请一些实施例中,积分单元103可以包括第一运算放大器U1和第一积分电容C1,第一积分电容C1可以通过一组合开关204电性连接于第一运算放大器U1的负输入端与输出端之间,该组合开关204可以被配置为:
在发射单元101处于截止状态时,响应于控制单元的第一驱动信号,控制第一积分电容C1的第一极板与第一运算放大器U1的输出端电性连接以及第一积分电容C1的第二极板与第一运算放大器U1的负输入端电性连接;
在发射单元101处于发光状态时,响应于控制单元的第二驱动信号,控制第一积分电容C1的第一极板与第一运算放大器U1的负输入端电性连接以及第一积分电容C1的第二极板与第一运算放大器U1的输出端电性连接。
本申请实施例中,通过组合开关204能够调节第一积分电容C1与第一运算放大器U1之间的连接关系,由于第一积分电容C1两端的电压不能突变,因此,在发射单元101进行状态切换时,控制单元通过控制组合开关204的开关状态,来调节第一积分电容C1与第一运算放大器U1之间的连接关系,可以在发射单元101切换状态时,使第一运算放大器U1的输出电压信号反相。
如图18所示,本申请实施例中,第一积分电容C1的第一极板为其右极板,第一积分电容C1的第二极板为其左极板,在发射单元101处于截止状态时,组合开关204响应于第一驱动信号,可以使第一积分电容C1的左极板与第一运算放大器U1的负输入端连接,使第一积分电容C1的右极板与第一运算放大器U1的输出端连接。
如图19所示,在发射单元101处于发光状态时,组合开关204响应于第二驱动信号,可以使第一积分电容C1的左极板与第一运算放大器U1的输出端连接,使第一积分电容C1的右极板与第一运算放大器U1的负输入端连接。
由于在发射单元101处于截止状态时,积分单元103对第一光电流进行积分处理得到了第一输出电压信号,因此,第一积分电容C1两端的电压差为第一输出电压信号的幅值。在发射单元101由截止状态切换为发光状态时,由于第一积分电容C1的左极板由与第一运算放大器U1的负输入端连接转变为与第一运算放大器U1的输出端连接,第一积分电容C1的右极板由与第一运算放大器U1的输出端连接转变为与第一运算放大器U1的负输入端连接,而第一积分电容C1两端的电压不能突变,因此,第一积分电容C1上的电荷保持不变,此时第一运算放大器U1的输出电压信号则为第一输出电压信号反相后的电压信号。
然后在发射单元101处于发光状态时,积分单元103继续对第二光电流进行积分处理,得到第二输出电压信号,在一个检测周期结束后,第一运算放大器U1的输出电压信号则为第二输出电压信号与第一输出电压信号之差。
请参阅图20,图20是本申请实施例中提供的组合开关204的一个实施例示意图,在本申请一些实施例中,组合开关204可以包括主开关对和副开关对,主开关对和副开关对状态相反,且主开关对的第一主开关S1a和第二主开关S1a’同步,副开关对的第一副开关S1b和第二副开关S1b’同步。
第一主开关S1a一端与第一积分电容C1的第二极板连接,另一端与第一运算放大器U1的负输入端连接;第二主开关S1a’一端与第一积分电容C1的第一极板连接,另一端与第一运算放大器U1的输出端连接。
第一副开关S1b一端与第一积分电容C1的第二极板连接,另一端与第一运算放大器U1的输出端连接;第二副开关S1b’一端与第一积分电容C1的第一极板连接,另一端与第一运算放大器U1的负输入端连接。
本实施例中,接收单元101可以包括第一光电二极管D1,第一光电二极管D1的阴极与第一运算放大器U1的负输入端连接,第一光电二极管D1的阳极连接接地极GND,组合开关204被配置为:
响应于第一驱动信号,第一主开关S1a和第二主开关S1a’闭合,第一副开关S1b和第二副开关S1b’关断;
响应于第二驱动信号,第一主开关S1a和第二主开关S1a’关断,第一副开关S1b和第二副开关S1b’闭合。
由于第一光电二极管D1内部的电流流向为由阴极流向阳极,因此,本申请实施例中,第一光电流和第二光电流的流向均为由第一运算放大器的输出端通过第一积分电容C1和第一光电二极管D1流向接地极GND,因此,第一积分电容C1的右极板的电压逐渐升高,即第一运算放大器U1对第一光电流和第二光电流进行的积分处理均为向上积分。
可以理解,在第一光电二极管D1和第一运算放大器U1的负输入端之间还可以连接一控制开关S6,在该控制开关S6断开时,无论发射单元101处于何种状态,由于第一光电二极管D1和第一运算放大器U1之间断路,第一运算放大器U1不会有输出信号产生;在该控制开关S6闭合时,第一运算放大器U1才会有输出信号产生。
如图21所示,本申请实施例中,在发射单元101处于截止状态时,第一主开关S1a和第二主开关S1a’响应于控制单元的第一驱动信号闭合,由于主开关对和副开关对状态相反,因此,第一副开关S1b和第二副开关S1b’断开,此时第一运算放大器U1在发射单元101处于截止状态的时长内对第一光电流进行向上积分,得到第一输出电压信号。
然后控制单元控制发射单元101由截止状态切换为发光状态,同时,如图22所示,第一副开关S1b和第二副开关S1b’响应于控制单元的第二驱动信号闭合,第一主开关S1a和第二主开关S1a’断开原来的连接,在状态切换的瞬间,由于第一积分电容C1上的电荷保持不变,因此,第一运算放大器U1的输出电压信号为第一输出电压信号反相后的信号。
第一运算放大器U1继续在发射单元101处于发光状态的时长内对第二光电流进行向上积分,且向上积分的起点值为第一输出电压信号反相后的幅值,在一个检测周期结束后,第一运算放大器U1的输出电压信号则为目标电压信号。
如图23所示,图23是本申请实施例中提供的目标电压信号的一个时序示意图,本申请实施例中,第一积分电容C1并联有第一复位开关RST1,在开始检测目标物的接近程度之前,首先可以控制第一复位开关RST1和控制开关S6闭合,通过闭合的第一复位开关RST1消耗第一积分电容C1上原本存储
的电能,然后控制该第一复位开关RST1断开,由于控制开关S6闭合,因此第一光电二极管D1与第一运算放大器U1之间形成通路,在第一复位开关RST1的下降沿时开始进入接近检测。
设定发射单元101处于发光状态和截止状态的时长均为ΔT,反射光为I_c,环境光为I_a。
首先,控制单元不向发射单元101发出触发信号,则发射单元101不会发射检测光如红外光IR,同时,控制单元发出第一驱动信号,以控制第一主开关S1a和第二主开关S1a’闭合,第一副开关S1b和第二副开关S1b’断开,此时第一积分电容C1的左极板连接第一运算放大器U1的负输入端,第一积分电容C1的右极板连接第一运算放大器U1的输出端,在发射单元101处于截止状态即IR_OFF时,第一光电二极管D1仅接收到环境光I_a,根据前述的说明,积分单元103对第一光电流进行向上积分处理,此时第一积分电容C1的电压可以由0基于斜率Slop_OFF在积分时间ΔT内增长至ΔV1,此处斜率Slop_OFF=I_a/C1,第一输出电压信号即积分值ΔV1=I_a*ΔT/C1,即目标电压信号VOUT由0基于斜率Slop_OFF增长至ΔV1。
当发射单元101处于截止状态即IR_OFF的时长达到预设时长ΔT时,控制单元开始向发射单元101发送触发信号,以驱动发射单元101向目标物发射检测光,同时,控制单元发出第二驱动信号,以控制第一副开关S1b和第二副开关S1b’闭合,第一主开关S1a和第二主开关S1a’断开,此时第一积分电容C1的左极板连接第一运算放大器U1的输出端,第一积分电容C1的右极板连接第一运算放大器U1的负输入端,由于第一积分电容C1上的电荷保持不变,因此,此时第一运算放大器U1的输出端的输出电压信号为-ΔV1。
在发射单元101处于发光状态即IR_ON时,第一光电二极管D1接收到反射光I_c和环境光I_a,积分单元103对第二光电流进行向上积分处理,此时第一积分电容C1的电量可以由-ΔV1基于斜率Slop_ON在积分时间ΔT内增长ΔV2,此处斜率Slop_ON=(I_c+I_a)/C1,积分值ΔV2=(I_c+I_a)*ΔT/C1,由于在相同的积分时长内,第一光电二极管D1接收到的环境光和反射光的光强度大于只接收到环境光时的光强度,因此,ΔV2的大于ΔV1,此时第一运算放大器U1的输出电压信号ΔV2-ΔV1即为去除了环境光的影响的目标电压信号VOUT的幅值。
在目标电压信号VOUT的幅值为ΔV2-ΔV1的基础上,若再基于上述的方法继续控制发射单元101处于发光状态IR_ON和截止状态IR_OFF,则在经过两个检测周期后,控制单元驱动控制开关S6断开,从而结束接近检测,第一运算放大器U1输出的目标电压信号VOUT的幅值为2*(ΔV2-ΔV1)。通过对该2*(ΔV2-ΔV1)进行量化,便可以确定目标物距离接近检测电路的接近程度。
可以理解,在经过N个检测周期后,第一运算放大器U1输出的目标电压信号VOUT的幅值则为N*(ΔV2-ΔV1)。通过对该N*(ΔV2-ΔV1)进行量化,同样可以确定目标物距离接近检测电路的接近程度。
请参阅图24,图24是本申请实施例中提供的组合开关的另一个实施例示意图,在本申请一些实施例中,组合开关204可以包括第一单刀双掷开关SW1和第二单刀双掷开关SW2,第一单刀双掷开关SW1的动触点与第一积分电容C1的第二极板连接,第一单刀双掷开关SW1的第一静触点与第一运算放大器U1的负输入端连接,第一单刀双掷开关SW1的第二静触点与第一运算放大器U1的输出端连接。
第二单刀双掷开关SW2的动触点与第一积分电容C1的第一极板连接,第二单刀双掷开关SW2的第一静触点与第一运算放大器U1的输出端连接,第二单刀双掷开关SW2的第二静触点与第一运算放大器U1的负输入端连接。
本实施例中,接收单元101可以包括第一光电二极管D1,第一光电二极管D1的阴极与第一运算放大器U1的负输入端连接,第一光电二极管D1的阳极连接接地极GND,组合开关204被配置为:
响应于第一驱动信号,第一单刀双掷开关SW1的动触点与第一单刀双掷开关SW1的第一静触点连接,第二单刀双掷开关SW2的动触点与第二单刀双掷开关SW2的第一静触点连接;
响应于第二驱动信号,第一单刀双掷开关SW1的动触点与第一单刀双掷开关SW1的第二静触点连接,第二单刀双掷开关SW2的动触点与第二单刀双掷开关SW2的第二静触点连接。
由于第一光电二极管D1内部的电流流向为由阴极流向阳极,因此,本申请实施例中,第一光电流和第二光电流的流向均为由第一运算放大器U1的负输入端通过第一光电二极管D1流向接地极GND,因此,第一积分电容C1的
右极板的电压逐渐升高,即第一运算放大器U1对第一光电流和第二光电流进行的积分处理均为向上积分。
如图25所示,本申请实施例中,在发射单元101处于截止状态时,第一单刀双掷开关SW1响应于第一驱动信号,使其动触点与其第一静触点连接,第二单刀双掷开关SW2同样响应于第一驱动信号,使其动触点与其第一静触点连接,此时第一积分电容C1的左极板连接第一运算放大器U1的负输入端,第一积分电容C1的右极板连接第一运算放大器U1的输出端,第一运算放大器U1在发射单元101处于截止状态的时长内对第一光电流进行向上积分,得到第一输出电压信号。
然后控制单元控制发射单元101由截止状态切换为发光状态,同时,如图26所示,第一单刀双掷开关SW1响应于第二驱动信号,使其动触点与其第二静触点连接,第二单刀双掷开关SW2同样响应于第二驱动信号,使其动触点与其第二静触点连接,此时第一积分电容C1的左极板连接第一运算放大器U1的输出端,第一积分电容C1的右极板连接第一运算放大器U1的负输入端,在状态切换的瞬间,由于第一积分电容C1上的电荷保持不变,因此,第一运算放大器U1的输出电压信号为第一输出电压信号反相后的信号;
第一运算放大器U1继续在发射单元101处于发光状态的时长内对第二光电流进行向上积分,且向上积分的起点值为第一输出电压信号反相后的幅值,在一个检测周期结束后,第一运算放大器U1的输出电压信号则为目标电压信号。
可以理解,通过上述记载的针对于第一单刀双掷开关SW1和第二单刀双掷开关SW2的控制原理对组合开关204进行控制时,第一运算放大器U1输出的目标电压信号的时序可以参照图23所示的时序示意图,此处不再赘述。
图27是本申请一实施例中提供的接近检测电路的功能模块示意图。如图27所示,在本申请一些实施例中,接近检测电路还可以包括与积分单元103电性连接的模数转换单元106,该模数转换单元106可以用于将积分单元103输出的目标电压信号转换为数字信号,该数字信号可以用于表征目标物的接近程度。
本申请实施例中,该模数转换单元106可以采用现有的任一种模拟数字转换器,模数转换单元106可以对模拟量的目标电压信号进行量化,以将目
标电压信号转换为表征目标物接近程度的数字信号。
图28是本申请一实施例中提供的接近检测电路的功能模块示意图。参阅图28,在本申请一实施例中,接近检测电路还可以包括开关电容单元205和模数转换单元106,该开关电容单元205可以分别与积分单元103和模数转换单元106电性连接;开关电容单元205可以用于根据积分单元103输出的目标电压信号得到模拟信号输出至模数转换单元106;模数转换单元106可以用于将模拟信号转换为数字信号,数字信号用于表征目标物的接近程度。
本申请实施例中,开关电容单元205可以通过开关打开和关闭时将电荷移入和移出电容器来工作,也就是说,通过开关电容单元205的开关关断和闭合能够将积分单元103的目标电压信号移入开关电容单元205以及由开关电容单元205移出至模数转换单元106,从而模数转换单元106可以对信号进行模数转换。
如图29所示,图29是本申请实施例中提供的开关电容单元的一个电路原理示意图,在本申请一些实施例中,开关电容单元205可以包括第四运算放大器U4、第四电容C4、第五电容C5、第七开关S7、第八开关S8、第九开关S9以及第十开关S10。
第七开关S7和第四电容C4串联于积分单元103的输出端VOUT1与第四运算放大器U4的负输入端之间,第四电容C4还通过第八开关S8连接有参考电压源;第五电容C5和第九开关S9串联于第四运算放大器U4的负输入端与第四运算放大器U4的输出端VOUT2之间;第十开关S10与第五电容C5和第九开关S9并联地连接在第四运算放大器U4的负输入端与第四运算放大器U4的输出端VOUT2之间;第四运算放大器U4的输出端与模数转换单元106的输入端连接。
本申请实施例中,参考电压源可以是单独的电压源,也可以是与积分单元103的正输入端连接的基准电压源相同的同一电压源,该参考电压源可以输出第一参考电压信号VREF1;可以理解,第二运算放大器U2正输入端也可以连接有一电压源,该电压源可以输出第二参考电压信号VREF2,第一参考电压信号VREF1和第二参考电压信号VREF2可以相同,也可以不同,具体可以根据实际应用场景进行确定。
请结合图29和图30,本申请实施例中,第一积分电容C1并联有第一复位
开关RST1,在开始检测目标物的接近程度之前,首先可以控制第一复位开关RST1和控制开关S6闭合,通过闭合的第一复位开关RST1消耗第一积分电容C1上原本存储的电能,然后控制该第一复位开关RST1断开,由于控制开关S6闭合,因此第一光电二极管D1与第一运算放大器U1之间形成通路,在第一复位开关RST1的下降沿时开始进入接近检测。
首先控制单元不向发射单元101发出触发信号,则发射单元101不会发射检测光如红外光IR,同时,控制单元发出第一驱动信号,组合开关204响应于第一驱动信号动作,使得第一积分电容C1的左极板连接第一运算放大器U1的负输入端,第一积分电容C1的右极板连接第一运算放大器U1的输出端,在发射单元101处于截止状态即IR_OFF时,第一运算放大器U1对第一光电流进行向上积分处理,从而第一积分电容C1的电压可以由0在积分时间ΔT内增长至ΔV1,即目标电压信号VOUT1由0增长至ΔV1。
当发射单元101处于截止状态即IR_OFF的时长达到预设时长ΔT时,控制单元开始向发射单元101发送触发信号,以驱动发射单元101向目标物发射检测光,同时,控制单元发出第二驱动信号,组合开关204响应于该第二驱动信号动作,使得第一积分电容C1的右极板连接第一运算放大器U1的负输入端,第一积分电容C1的左极板连接第一运算放大器U1的输出端。由于第一积分电容C1上的电荷保持不变,因此,此时第一运算放大器U1的输出端的输出电压信号即目标电压信号VOUT1由ΔV1翻转为-ΔV1。
在发射单元101处于发光状态即IR_ON时,第一运算放大器U1对第二光电流进行向上积分处理,此时第一积分电容C1的电量可以由-ΔV1在积分时间ΔT内增长ΔV2,由于在相同的积分时长内,第一光电二极管D1接收到的环境光和反射光的光强度大于只接收到环境光时的光强度,因此,此时第一运算放大器U1的输出电压信号ΔV2-ΔV1即为去除了环境光的影响的目标电压信号VOUT1的幅值。
在目标电压信号VOUT1的幅值为ΔV2-ΔV1的基础上,再基于上述的方法继续控制发射单元101处于截止状态IR_OFF和发光状态IR_ON,则在经过两个检测周期后,控制单元驱动控制开关S6断开,从而结束接近检测,此时第一运算放大器U1输出的目标电压信号VOUT1的幅值为2*(ΔV2-ΔV1)。
然后控制单元控制第九开关S9和第十开关S10闭合,以消耗第五电容C5
上原本存储的电能,然后控制该第十开关S10断开,保持第九开关S9闭合。接着控制单元控制第七开关S7闭合,第四电容C4的左极板采样到第一积分电容C1上的电压,第四电容C4的右极板电压为第二参考电压信号VREF2,第一积分电容C1上的电压转移到第四电容C4上,在第七开关S7断开的同时,控制第八开关S8闭合,此时第四电容C4的左极板采样到与第一积分电容C1上的电压不同的第一参考电压信号VREF1,由于第四电容C4上的电压不能突变,因此,在第七开关S7断开及第八开关S8闭合的同时,基于第四电容C4的电位变化以及持续闭合的第九开关S9,第四电容C4上的电压能够逐渐转移到第五电容C5上,从而第四运算放大器U4输出的电压信号VOUT2即为模拟信号,通过对该模拟信号进行量化,便可以确定目标物距离接近检测电路的接近程度。
根据图30可以知道,本实施例可以在N个检测周期对目标物的接近程度进行检测,每个检测周期得到的目标电压信号VOUT1会累加在第一积分电容C1上,在N个检测周期结束时,控制单元驱动控制开关S6断开,从而结束接近检测,累加在第一积分电容C1上的目标电压信号VOUT1可以通过开关电容单元205转移到第五电容C5上,因此若进行N个检测周期的检测,则最终模拟信号VOUT2的幅值是单个检测周期的模拟信号的幅值的N倍。
请结合图29和图31,本申请实施例中,在开始接近检测之前,控制单元可以控制第九开关S9和第十开关S10闭合,以消耗第五电容C5上原本存储的电能,然后控制第九开关S9断开,维持第十开关S10闭合;接着控制单元控制第一复位开关RST1和控制开关S6闭合,通过闭合的第一复位开关RST1消耗第一积分电容C1上原本存储的电能,然后控制该第一复位开关RST1断开,由于控制开关S6闭合,因此第一光电二极管D1与第一运算放大器U1之间形成通路,在第一复位开关RST1的下降沿时开始进入接近检测。
首先,控制单元不向发射单元101发出触发信号,则发射单元101不会发射检测光如红外光IR,同时,控制单元发出第一驱动信号,组合开关204响应于第一驱动信号动作,此时第一积分电容C1的左极板连接第一运算放大器U1的负输入端,第一积分电容C1的右极板连接第一运算放大器U1的输出端,在发射单元101处于截止状态即IR_OFF时,第一运算放大器U1对第一光电流进行向上积分处理,此时第一积分电容C1的电压可以由0在积分时间ΔT内增
长至ΔV1,即目标电压信号VOUT1由0增长至ΔV1。
当发射单元101处于截止状态即IR_OFF的时长达到预设时长ΔT时,控制单元开始向发射单元101发送触发信号,以驱动发射单元101向目标物发射检测光,同时,控制单元发出第二驱动信号,组合开关204响应于该第二驱动信号动作,使得第一积分电容C1的右极板连接第一运算放大器U1的负输入端,第一积分电容C1的左极板连接第一运算放大器U1的输出端。由于第一积分电容C1上的电荷保持不变,因此,此时第一运算放大器U1的输出端的输出电压信号即目标电压信号VOUT1由ΔV1翻转为-ΔV1。
在发射单元101处于发光状态即IR_ON时,第一运算放大器U1对第二光电流进行向上积分处理,此时第一积分电容C1的电量可以由-ΔV1在积分时间ΔT内增长ΔV2,由于在相同的积分时长内,第一光电二极管D1接收到的环境光和反射光的光强度大于只接收到环境光时的光强度,因此,此时第一运算放大器U1的输出电压信号ΔV2-ΔV1即为去除了环境光的影响的目标电压信号VOUT1的幅值。
此时,一个检测周期结束,控制单元控制该控制开关S6断开,以及第七开关S7闭合,将第一积分电容C1上的电压转移到第四电容C4上,再控制第七开关S7断开,并在第七开关S7断开的同时,控制第八开关S8、第九开关S9闭合且第十开关S10断开,从而同样通过第四电容C4的电位变化为电压的转移提供触发条件,使得转移到第四电容C4上的电压能够逐渐转移到第五电容C5上,从而第二运算放大器U2输出的电压信号VOUT2即为模拟信号。通过对该模拟信号进行量化,便可以确定目标物距离接近检测电路的接近程度。
根据图31可以知道,在经过一个检测周期将第一积分电容C1上的电压转移到第五电容C5上后,还可以继续进行下一个检测周期的检测,从而将下一个检测周期中第一积分电容C1上的电压再次转移到第五电容C5上,从而使得此时的模拟信号VOUT2的幅值是上一检测周期的模拟信号VOUT2的幅值的两倍,以此类推,每一个检测周期中第一积分电容C1上的电压都会在该检测周期结束时转移到第五电容C5上,因此若进行N个检测周期的检测,则最终模拟信号VOUT2的幅值是单个检测周期的模拟信号VOUT2的幅值的N倍。
可以理解的,在不同的应用场景中,可以根据实际情况选择检测周期的数量,以确保后续能够根据目标电压信号精准判断目标物的接近程度。
图32是本申请一实施例中提供的接近传感器的结构示意图。如图32所示,本申请一实施例还提供一种接近传感器1800,其可以包括上面参照图1至图31描述的任一实施例中的接近检测电路。因此,接近传感器1800的具体实现方式可以参照上面结合图1至图31对任意接近检测电路的实施例的描述,这里不再赘述。
如图33所示,在本申请一些实施例中,接近传感器1800可以包括主控单元1801以及驱动单元1802,主控单元1801可以通过控制驱动单元1802来控制发射单元101的工作状态,该主控单元1801可以与前述实施例中的控制单元为同一模块,也可以是与前述实施例中的控制单元不同的另一单元模块,具体可以根据实际应用场景进行确定。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见上文针对其他实施例的详细描述,此处不再赘述。
具体实施时,以上各个单元或结构可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单元或结构的具体实施可参见前面的实施例,在此不再赘述。
以上对本申请所提供的一种接近检测电路及接近传感器进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上说明只是用于帮助理解本申请的电路及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本申请的限制。
Claims (11)
- 一种接近检测电路,包括接收单元、控制单元以及积分单元,所述接收单元分别与所述积分单元和所述控制单元电性连接,所述接收单元对应配置有发射单元;所述接收单元用于在所述发射单元处于发光状态时,响应于接收到的反射光和环境光生成第一光电流,以及在所述发射单元处于截止状态时,响应于接收到的所述环境光生成第二光电流,所述反射光是所述发射单元在发光状态时发出的检测光经目标物反射后所形成的光信号;所述控制单元用于控制所述发射单元的工作状态以及控制所述第一光电流和所述第二光电流相对于所述积分单元的流向彼此相反;所述积分单元用于分别对所述第一光电流和所述第二光电流进行积分处理,得到对应的第一积分电压和第二积分电压,并基于所述第一积分电压和所述第二积分电压,得到用于接近检测的目标电压信号。
- 根据权利要求1所述的接近检测电路,其中,所述控制单元用于:在预设的检测周期内,控制所述发射单元处于发光状态的时长和处于截止状态的时长相同。
- 根据权利要求1所述的接近检测电路,其中,所述积分单元包括第一运算放大器和第一积分电容,所述第一积分电容电性连接于所述第一运算放大器的负输入端与输出端之间,所述接近检测电路还包括与所述控制单元电性连接的电流反向单元,所述接收单元通过所述电流反向单元与所述第一运算放大器的负输入端电性连接;所述电流反向单元被配置为:在所述发射单元处于发光状态时,响应于所述控制单元的第一驱动信号,控制所述第一光电流的流向为由所述第一运算放大器的输出端通过所述第一积分电容和所述接收单元流出;在所述发射单元处于截止状态时,响应于所述控制单元的第二驱动信号,控制所述第二光电流的流向为由所述接收单元通过所述第一积分电容流向 所述第一运算放大器的输出端。
- 根据权利要求3所述的接近检测电路,其中,所述接收单元包括第一光电二极管,所述电流反向单元被配置为:响应于所述第一驱动信号,控制所述第一光电二极管的阴极与所述第一运算放大器的负输入端电性连接以及所述光电二级管的阳极连接接地极;响应于所述第二驱动信号,控制所述第一光电二极管的阳极与所述第一运算放大器的负输入端电性连接以及所述第一光电二极管的阴极连接所述接地极。
- 根据权利要求3所述的接近检测电路,其中,所述接收单元包括第一光电二极管,所述电流反向单元包括第一开关、第二开关、第三开关以及镜像电路,所述镜像电路的第一输出端通过所述第二开关与所述第一光电二极管的阴极连接,所述镜像电路的第二输出端通过所述第三开关与所述第一运算放大器的负输入端连接,所述第一光电二极管的阴极通过所述第一开关与所述第一运算放大器的负输入端连接,所述第一光电二极管的阳极连接接地极,所述控制单元被配置为:在所述发射单元处于发光状态时,输出所述第一驱动信号以控制所述第一开关闭合以及所述第二开关和所述第三开关关断;在所述发射单元处于截止状态时,输出所述第二驱动信号以控制所述第一开关关断以及所述第二开关和所述第三开关闭合。
- 根据权利要求5所述的接近检测电路,其中,所述镜像电路包括第一场效应管以及第二场效应管,所述第一场效应管的栅极和所述第二场效应管的栅极连接,所述第一场效应管的源极和所述第二场效应管的源极分别连接电压源,所述第一场效应管的栅极和所述第一场效应管的漏极还与所述第二开关连接,所述第二场效应管的漏极与所述第三开关连接。
- 根据权利要求6所述的接近检测电路,其中,所述镜像电路还包括第二运算放大器,所述第二运算放大器的正输入端分别与所述第二开关和所述 第一场效应管的漏极连接,所述第二运算放大器的负输入端分别与所述第三开关和所述第二场效应管的漏极连接,所述第二运算放大器的输出端分别与所述第一场效应管的栅极和所述第二场效应管的栅极连接。
- 根据权利要求1所述的接近检测电路,其中,所述积分单元包括第三运算放大器、第二积分电容和第三积分电容,所述第二积分电容电性连接于所述第三运算放大器的正输入端与负输出端之间,所述第三积分电容电性连接于所述第三运算放大器的负输入端与正输出端之间,所述接近检测电路还包括与所述控制单元电性连接的电流反向单元,所述接收单元通过所述电流反向单元分别与所述第三运算放大器的正输入端和负输入端电性连接;所述电流反向单元被配置为:在所述发射单元处于发光状态时,响应于所述控制单元的第一驱动信号,控制所述第一光电流的流向为由所述第三运算放大器的负输出端通过所述第二积分电容和所述接收单元流向所述第三运算放大器的负输入端以及所述第三积分电容;在所述发射单元处于截止状态时,响应于所述控制单元的第二驱动信号,控制所述第二光电流的流向为由所述第三运算放大器的正输出端通过所述第三积分电容和所述接收单元流向所述第三运算放大器的正输入端以及所述第二积分电容。
- 根据权利要求8所述的接近检测电路,其中,所述接收单元包括第二光电二极管,所述电流反向单元被配置为:响应于所述第一驱动信号,控制所述第二光电二极管的阴极与所述第一运算放大器的正输入端电性连接以及所述第二光电二级管的阳极与所述第一运算放大器的负输入端电性连接;响应于所述第二驱动信号,控制所述第二光电二极管的阳极与所述第一运算放大器的正输入端电性连接以及所述第二光电二极管的阴极与所述第一运算放大器的负输入端电性连接。
- 根据权利要求1所述的接近检测电路,其中,所述接近检测电路还包 括与所述积分单元电性连接的模数转换单元,所述模数转换单元用于将所述积分单元输出的目标电压信号转换为数字信号,所述数字信号用于表征所述目标物的接近程度。
- 一种接近传感器,包括权利要求1-10任一项所述的接近检测电路。
Applications Claiming Priority (6)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202222795389.6U CN218412932U (zh) | 2022-10-21 | 2022-10-21 | 接近检测电路及接近传感器 |
CN202222795389.6 | 2022-10-21 | ||
CN202211295860.3 | 2022-10-21 | ||
CN202211295859.0A CN115453647A (zh) | 2022-10-21 | 2022-10-21 | 接近检测电路及接近传感器 |
CN202211295860.3A CN115561826B (zh) | 2022-10-21 | 2022-10-21 | 接近检测电路及接近传感器 |
CN202211295859.0 | 2022-10-21 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024082599A1 true WO2024082599A1 (zh) | 2024-04-25 |
Family
ID=90736789
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/091206 WO2024082599A1 (zh) | 2022-10-21 | 2023-04-27 | 接近检测电路及接近传感器 |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2024082599A1 (zh) |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040164232A1 (en) * | 2003-02-24 | 2004-08-26 | Nec Compound Semiconductor Devices, Ltd. | Photocurrent-to-binary signal conversion apparatus capable of suppressing waveform distortion |
JP2008241518A (ja) * | 2007-03-28 | 2008-10-09 | Seiko Npc Corp | 電流電圧変換回路およびこれを用いた自動調光装置 |
CN102353395A (zh) * | 2011-06-26 | 2012-02-15 | 西安电子科技大学 | 抑制环境噪声的红外接近传感器 |
CN104865563A (zh) * | 2015-06-05 | 2015-08-26 | 杭州士兰微电子股份有限公司 | 积分电路及接近检测芯片 |
CN204631243U (zh) * | 2015-06-05 | 2015-09-09 | 杭州士兰微电子股份有限公司 | 积分电路及接近检测芯片 |
CN204666814U (zh) * | 2015-06-05 | 2015-09-23 | 杭州士兰微电子股份有限公司 | 积分电路及接近检测芯片 |
CN105953823A (zh) * | 2016-04-21 | 2016-09-21 | 矽力杰半导体技术(杭州)有限公司 | 环境光滤除电路、光电传感器及应用其的光电检测设备 |
CN106059507A (zh) * | 2016-05-30 | 2016-10-26 | 矽力杰半导体技术(杭州)有限公司 | D类放大器和抑制d类放大器噪声的方法 |
CN115153530A (zh) * | 2022-06-21 | 2022-10-11 | 北京极豪科技有限公司 | 采样电路、生物特征识别装置以及电子设备 |
CN115561826A (zh) * | 2022-10-21 | 2023-01-03 | 武汉市聚芯微电子有限责任公司 | 接近检测电路及接近传感器 |
CN218412932U (zh) * | 2022-10-21 | 2023-01-31 | 武汉市聚芯微电子有限责任公司 | 接近检测电路及接近传感器 |
-
2023
- 2023-04-27 WO PCT/CN2023/091206 patent/WO2024082599A1/zh unknown
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040164232A1 (en) * | 2003-02-24 | 2004-08-26 | Nec Compound Semiconductor Devices, Ltd. | Photocurrent-to-binary signal conversion apparatus capable of suppressing waveform distortion |
JP2008241518A (ja) * | 2007-03-28 | 2008-10-09 | Seiko Npc Corp | 電流電圧変換回路およびこれを用いた自動調光装置 |
CN102353395A (zh) * | 2011-06-26 | 2012-02-15 | 西安电子科技大学 | 抑制环境噪声的红外接近传感器 |
CN104865563A (zh) * | 2015-06-05 | 2015-08-26 | 杭州士兰微电子股份有限公司 | 积分电路及接近检测芯片 |
CN204631243U (zh) * | 2015-06-05 | 2015-09-09 | 杭州士兰微电子股份有限公司 | 积分电路及接近检测芯片 |
CN204666814U (zh) * | 2015-06-05 | 2015-09-23 | 杭州士兰微电子股份有限公司 | 积分电路及接近检测芯片 |
CN105953823A (zh) * | 2016-04-21 | 2016-09-21 | 矽力杰半导体技术(杭州)有限公司 | 环境光滤除电路、光电传感器及应用其的光电检测设备 |
CN106059507A (zh) * | 2016-05-30 | 2016-10-26 | 矽力杰半导体技术(杭州)有限公司 | D类放大器和抑制d类放大器噪声的方法 |
CN115153530A (zh) * | 2022-06-21 | 2022-10-11 | 北京极豪科技有限公司 | 采样电路、生物特征识别装置以及电子设备 |
CN115561826A (zh) * | 2022-10-21 | 2023-01-03 | 武汉市聚芯微电子有限责任公司 | 接近检测电路及接近传感器 |
CN218412932U (zh) * | 2022-10-21 | 2023-01-31 | 武汉市聚芯微电子有限责任公司 | 接近检测电路及接近传感器 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115561826B (zh) | 接近检测电路及接近传感器 | |
TWI438602B (zh) | 最大功率點追蹤控制器、最大功率點追蹤系統和最大功率點追蹤方法 | |
TWI651516B (zh) | 光電感測器、光電檢測方法以及應用其的心率檢測設備 | |
US10869372B2 (en) | Current source circuit and LED driving circuit | |
US20020012058A1 (en) | Photosensitive device | |
US5252820A (en) | Photoelectric conversion circuit having a tuning circuit and changeover switcher | |
CN108809278B (zh) | 一种窄脉冲峰值采样保持电路 | |
US8723097B2 (en) | Illuminance sensor having light-level-independent consumption current | |
JPS5816456B2 (ja) | 光監視装置 | |
CN218412932U (zh) | 接近检测电路及接近传感器 | |
WO2024082599A1 (zh) | 接近检测电路及接近传感器 | |
JP2007107926A (ja) | 電流検出回路およびそれを用いた受光装置ならびに電子機器 | |
US20080118252A1 (en) | Optical coupler with reduced pulse width distortion | |
KR20020077589A (ko) | 광 이미지 검출장치의 조도 제어 방법 | |
TWI500279B (zh) | 動態阻抗光檢測器接收器電路 | |
CN114220373B (zh) | 光检测模组、光检测方法和显示装置 | |
CN106599754B (zh) | 一种lid读写器及其跨阻放大电路 | |
US20220255536A1 (en) | Differential current-to-voltage conversion | |
CN115453647A (zh) | 接近检测电路及接近传感器 | |
JP2007228054A (ja) | 光学式反射型センサ用受光回路 | |
JP3937756B2 (ja) | 光電式煙感知器 | |
KR20210126959A (ko) | 게이트 신호 발생기를 내장한 포토 다이오드 기반 광자 검출 장치 | |
JP2783945B2 (ja) | 光電式煙感知器 | |
JP5290123B2 (ja) | アナログ−デジタル変換回路、照度センサ、近接センサ、携帯電話、デジタルカメラ | |
EP1906458B1 (en) | Photodetection circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23878599 Country of ref document: EP Kind code of ref document: A1 |