Patent ID: 11923841
Assignee: EMINENT ELECTRONIC TECHNOLOGY CORP. LTD.
Field: Basic communication processes (Electrical engineering)
Classification: CPC H  G | IPC G  H

Claim 0:
1. A proximity sensor comprising:
a light source configured to generate a light, wherein the light source is turned on and off several times during a measurement time interval;
an optical sensing element configured to sense a reflected light and an ambient light, wherein the reflected light is caused by an object reflecting the light, wherein while the light source is turned on, the optical sensing element generates a first current, and wherein while the light source is turned off, the optical sensing element generates a second current;
an integration circuit, coupled to the optical sensing element, configured to integrate the first current and the second current to respectively generate a first integration signal and a second integration signal, wherein the integration circuit includes:
an operational amplifier, having a non-inverting input terminal, an inverting input terminal, and an output terminal, wherein the non-inverting terminal is coupled to a ground terminal, and the inverting input terminal is coupled to the optical sensing element;
a first capacitor;
a first switch, turned on while the light source is turned on and connected in series with the first capacitor, wherein the first capacitor and the first switch are coupled between the inverting input terminal and the output terminal to generate the first integration signal;
a second capacitor; and
a second switch, turned on while the light source is turned off, connected in series with the second capacitor, and connected in parallel with the first switch, wherein the second capacitor and the second switch are coupled between the inverting input terminal and the output terminal and are configured to generate the second integration signal;

a comparator, coupled to the integration circuit, configured to compare the first integration signal and the second integration signal with a threshold value to generate a comparison signal, wherein while the first integration signal is greater than the threshold value, the comparison signal is at a first level to reset the first integration signal; while the second integration signal is greater than the threshold value, the comparison signal is at the first level to reset the second integration signal;
a first counter, coupled to the comparator, configured to count a number that the comparison signal is at the first level in a plurality of turn-on intervals of the light source during the measurement time interval so as to generate a first sensing value;
a second counter, coupled to the comparator, configured to count a number that the comparison signal is at the first level in a plurality of turn-off intervals of the light source during the measurement time interval so as to generate a second sensing value; and
a reset circuit, coupled to the integration circuit, configured to reset the first integration signal according to the comparison signal that is at the first level while the light source is turned on and reset the second integration signal according to the comparison signal that is at the first level while the light source is turned off.