Photosensor with voltage reversal mechanism

By integrating two sets of window opening times through a voltage reversal mechanism, the optical sensor solves the problems of inaccurate counting and high time complexity of existing optical sensors under different environments, achieving more accurate counting and lower time complexity, and is suitable for placing optical sensors under the screen of electronic devices.

CN117516703BActive Publication Date: 2026-05-12ANPEC ELECTRONICS CORPORATION
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ANPEC ELECTRONICS CORPORATION
Filing Date
2022-08-03
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing light sensors suffer from inaccurate counting and high time complexity when adjusting the brightness of display screens under different environments. In particular, in optical applications, time differences caused by external optical variations have a significant impact.

Method used

The optical sensor employing a voltage reversal mechanism charges the capacitor by reversing the voltage through a voltage reversal circuit. Combined with a switching component and a counter, it integrates two sets of window opening times into the same time zone, reducing one fine counting operation, improving counting accuracy, and reducing time complexity.

Benefits of technology

It enables accurate counting within the same time zone, reduces the time width of optical applications, and is suitable for applications that require shorter window times, such as placing light sensors under the screen of electronic devices, thereby improving the flexibility and counting accuracy of light sensors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117516703B_ABST
    Figure CN117516703B_ABST
Patent Text Reader

Abstract

A light sensor with voltage reversal mechanism is disclosed. In a first phase time, a photoelectric component converts a first light signal into a first photocurrent to charge a capacitor to a first voltage, and a counter counts a first coarse estimate value according to the first voltage. In a second phase time, the photoelectric component converts a second light signal into a second photocurrent to charge the capacitor from the reversed first voltage to a second voltage, and the counter counts a second coarse estimate value according to the second voltage. After counting the second coarse estimate value, the counter counts a fine estimate value according to the second coarse estimate value. One of the first and second light signals is a light signal emitted by both an ambient light source and a light emitting component and reflected by a target, and the other is a light signal emitted by the ambient light source.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a light sensor, in particular, to a light sensor with a voltage inversion mechanism. BACKGROUND

[0002] In different environments, the human eye has different requirements for the screen brightness of the display screen of electronic products. Therefore, light sensors such as ambient light sensors (ALS) and proximity sensors (PS) are widely used in various electronic products such as mobile devices. The light sensing value of the light sensor can be used as a basis for automatically adjusting the brightness of the display screen of the electronic device to improve the viewing effect in various environments. SUMMARY

[0003] The technical problem to be solved by the present application is to provide a light sensor with a voltage inversion mechanism to overcome the shortcomings of the prior art. The light sensor includes a photoelectric component, a voltage inversion circuit, a comparator, and a counter. The photoelectric component is configured to convert the light energy of a received first light signal into a first photocurrent and provide the first photocurrent to a capacitor to charge the voltage of the capacitor to a first voltage. The voltage inversion circuit is connected to the capacitor. The voltage inversion circuit is configured to invert the first voltage to form an inverted voltage. The first input terminal of the comparator is connected to the capacitor. The second input terminal of the comparator is coupled to a reference voltage. The comparator is configured to compare the first voltage with the reference voltage to output a first comparison signal. The input terminal of the counter is connected to the output terminal of the comparator. The counter is configured to count according to the first comparison signal to output a first rough estimate count value. After counting the first rough estimate count value, the photoelectric component converts the light energy of a received second light signal into a second photocurrent and provides the second photocurrent to the capacitor to charge the voltage of the capacitor from the inverted voltage to a second voltage. The comparator compares the second voltage with the reference voltage to output a second comparison signal. The counter counts according to the second comparison signal to output a second rough estimate count value. After counting the second rough estimate count value, the counter performs a fine counting operation on the second rough estimate count value to calculate a fine count value. One of the first light signal and the second light signal is a light signal reflected by the object to be measured after being emitted by both the ambient light source and the light emitting component. The other of the first light signal and the second light signal is a light signal emitted by only the ambient light source.

[0004] In an embodiment, the voltage inversion circuit inverts the positive first voltage to form a negative inverted voltage. The absolute value of the inverted voltage is equal to the first voltage.

[0005] In an embodiment, the second photocurrent charges the voltage of the capacitor from the negative inverted voltage to the positive second voltage.

[0006] In this embodiment, when the energy of the light signal emitted by the ambient light source is higher than the energy threshold, during the first phase time, the light-emitting component and the ambient light source simultaneously emit light signals, and a counter counts a first coarse estimate. After the first phase time ends, a second phase time begins. During the second phase time, only the ambient light source emits light signals, and a counter counts a second coarse estimate.

[0007] In this embodiment, when the energy of the light signal emitted by the ambient light source is lower than the energy threshold, only the ambient light source emits a light signal during the first phase time, and the counter counts a first coarse estimate. After the first phase time ends, the second phase time begins. During the second phase time, the light-emitting component and the ambient light source simultaneously emit light signals, and the counter counts a second coarse estimate.

[0008] In one embodiment, the optical sensor with a voltage reversal mechanism further includes a current supply component. The current supply component is connected to a capacitor. The current supply component is configured to provide a bias current to the capacitor simultaneously with a second photocurrent to charge the capacitor.

[0009] In one embodiment, the current supply component is configured to provide a bias current to the capacitor while the first photocurrent is provided to the capacitor, in order to charge the capacitor.

[0010] In one embodiment, the current supply component includes a current source.

[0011] In one embodiment, when the energy of the light signal emitted by the ambient light source is lower than the energy threshold, the current supply component provides a bias current to the capacitor.

[0012] In one embodiment, the optical sensor with a voltage reversal mechanism further includes a current amplifier. The current amplifier is connected to the photoelectric component and a capacitor. The current amplifier is configured to amplify the second photocurrent and provide it to the capacitor to charge the capacitor.

[0013] In one embodiment, the current amplifier amplifies the first photocurrent and provides it to the capacitor to charge the capacitor.

[0014] In this embodiment, the voltage reversing circuit includes a first switching component, a second switching component, a third switching component, and a fourth switching component. A first terminal of the first switching component is connected to the photoelectric component and the first input terminal of the comparator. A second terminal of the first switching component is connected to the first terminal of a capacitor. A first terminal of the second switching component is connected to the second terminal of the capacitor. A second terminal of the second switching component is grounded. A first terminal of the third switching component is connected to the photoelectric component and the first input terminal of the comparator. A second terminal of the third switching component is connected to the second terminal of the capacitor. A first terminal of the fourth switching component is connected to the first terminal of the capacitor. A second terminal of the fourth switching component is grounded. When the first and second switching components are turned on, the voltage of the capacitor is charged to a first voltage. When the third and fourth switching components are turned on, the voltage of the capacitor is charged from the reverse voltage of the first voltage to a second voltage.

[0015] As described above, the present invention provides a light sensor with a voltage reversal mechanism, which has the following characteristics:

[0016] A voltage reversal circuit is set up to reverse the voltage of the capacitor after charging to a negative value, and charging starts from the reversed voltage. This deducts the residual voltage of the capacitor, so as to achieve the effect of performing a fine counting operation only once.

[0017] Reducing the time span between a set of external optical applications allows for greater flexibility in optical applications.

[0018] Integrating the two sets of window opening times into the same time zone can reduce the differences in ambient light caused by time differences, thereby obtaining more accurate count values.

[0019] By integrating the two sets of window opening times into the same time zone, the light sensor can be applied to applications that require shorter window opening times, such as placing a light sensor under the screen of an electronic device.

[0020] Reducing the time spent on external optical applications allows for greater flexibility in optical applications.

[0021] To further understand the features and technical content of the present invention, please refer to the following detailed description and drawings of the present invention. However, the drawings provided are for reference and illustration only and are not intended to limit the present invention. Attached Figure Description

[0022] Figure 1 The circuit diagrams are for the first and second embodiments of the optical sensor with a voltage reversal mechanism of the present invention.

[0023] Figure 2 The circuit diagrams for the voltage reversing circuit, photoelectric component, and current amplifier of the optical sensor with voltage reversing mechanism according to the first and second embodiments of the present invention are shown.

[0024] Figure 3 This is a schematic diagram showing the direction of photocurrent flow to the capacitor provided by the optical sensor with voltage reversal mechanism in the first and second embodiments of the present invention during the first phase time.

[0025] Figure 4 This is a schematic diagram showing the flow direction of the photocurrent to the capacitor provided by the optical sensor with voltage reversal mechanism in the second phase time of the first and second embodiments of the present invention.

[0026] Figure 5 This is a waveform diagram of the signal of the switching component of the optical sensor with a voltage reversal mechanism according to the first embodiment of the present invention.

[0027] Figure 6 This is a waveform diagram of the signal performed by the optical sensor with a voltage reversal mechanism according to the first embodiment of the present invention, representing the sensing and counting operations.

[0028] Figure 7 The waveform diagram shows the signal of the sensing and counting operation performed by the optical sensor with voltage reversal mechanism according to the second embodiment of the present invention.

[0029] Figure 8 This is a circuit diagram of a light sensor with a voltage reversal mechanism according to a third embodiment of the present invention.

[0030] Figure 9 This is a schematic diagram showing the direction of photocurrent flow to the capacitor provided by the optical sensor with voltage reversal mechanism in the first phase time, according to the third embodiment of the present invention.

[0031] Figure 10 This is a schematic diagram illustrating the flow direction of the photocurrent to the capacitor provided by the optical sensor with a voltage reversal mechanism in the second phase time, according to the third embodiment of the present invention.

[0032] Figure 11 This is a waveform diagram of the signal from a traditional optical sensor. Detailed Implementation

[0033] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can understand the advantages and effects of the present invention from the content disclosed in this specification. The present invention can be implemented or applied through other different specific embodiments, and various details in this specification can also be modified and changed based on different viewpoints and applications without departing from the concept of the present invention. Furthermore, the accompanying drawings of the present invention are for simple illustrative purposes only and are not depictions of actual dimensions, as stated in advance. The following embodiments will further describe the relevant technical content of the present invention in detail, but the disclosed content is not intended to limit the scope of protection of the present invention. In addition, the term "or" as used herein may, depending on the actual situation, include any combination of any one or more of the associated listed items.

[0034] Please see Figure 1 and Figure 2 ,in Figure 1 The above are circuit diagrams of the optical sensors with voltage reversal mechanisms according to the first and second embodiments of the present invention. Figure 2 The circuit diagrams for the voltage reversing circuit, photoelectric component, and current amplifier of the optical sensor with voltage reversing mechanism according to the first and second embodiments of the present invention are shown.

[0035] The optical sensor in this embodiment may include, for example: Figure 1 The components shown are: photoelectric component RX, current amplifier CRA, tenth switch component SW10, eleventh switch component SW11, capacitor Cin, fifth switch component SW5, comparator COM, sixth switch component SW6, counter CT, coarse estimate value storage component RS1, seventh switch component SW7, signal converter ADR, reference voltage regulation circuit VFC, eighth switch component SW8, ninth switch component SW9, and fine count value storage component RS2.

[0036] For ease of explanation, the optical sensor of this embodiment will be fully described below as including, for example, Figure 1 The invention includes all circuit components shown, but is not limited thereto. In practice, the optical sensor of this invention may contain only... Figure 1 The circuit components shown may be omitted from the diagram.

[0037] It is worth noting that the optical sensor of the present invention includes, for example, Figure 1 and Figure 2 The voltage inverting circuit VRC is shown. For example, as... Figure 1 and Figure 2 As shown, the voltage inversion circuit VRC may include a first switching component SW1, a second switching component SW2, a third switching component SW3, and a fourth switching component SW4. This is only an example and the invention is not limited thereto.

[0038] The first terminal of the first switching component SW1 of the voltage inverting circuit VRC can be connected (through the current amplifier CRA) to the cathode of the photoelectric component RX and to the first input terminal of the comparator COM. The anode of the photoelectric component RX can be grounded. The second terminal of the first switching component can be connected to the first terminal of the capacitor Cin. The first terminal of the second switching component SW2 of the voltage inverting circuit VRC can be connected to the second terminal of the capacitor Cin. The second terminal of the second switching component SW2 can be grounded.

[0039] The first terminal of the third switching component SW3 of the voltage inverting circuit VRC can be connected (through the current amplifier CRA) to the cathode of the photoelectric component RX and can also be connected to the first input terminal of the comparator COM. The second terminal of the third switching component SW3 can be connected to the second terminal of the capacitor Cin. The first terminal of the fourth switching component SW4 of the voltage inverting circuit VRC can be connected to the first terminal of the capacitor Cin. The second terminal of the fourth switching component SW4 can be grounded.

[0040] The second input of comparator COM can be connected to the first terminal of the fifth switching component SW5. The second terminal of the fifth switching component SW5 can be coupled to the reference voltage Vref. The output of comparator COM can be connected to the first terminal of the sixth switching component SW6. The second terminal of the sixth switching component SW6 can be connected to the input of counter CT. The output of counter CT can be connected to the input of coarse estimate value storage component RS1.

[0041] The output of comparator COM can also be connected to the first terminal of the seventh switching component SW7. The second terminal of the seventh switching component SW7 can be connected to the input of the signal converter ADR. The output of the signal converter ADR can be connected to the input of the reference voltage regulation circuit VFC and the input of the fine count value storage component RS2.

[0042] The output of the reference voltage regulation circuit VFC is connected to the first terminal of the eighth switching component SW8. The second terminal of the eighth switching component SW8 can be connected to the second input terminal of the comparator COM.

[0043] It should be understood that the control terminals of the first to twelfth switch assemblies SW1 to SW12, except for the ninth switch assembly SW9, can be connected to an external control circuit and turned on or off by the external control circuit.

[0044] The control terminal of the ninth switch assembly SW9 can be connected to the second terminal of the sixth switch assembly SW6. The first terminal of the ninth switch assembly SW9 can be connected to the first input terminal of the comparator COM. The second terminal of the ninth switch assembly SW9 can be grounded.

[0045] The first terminal of the tenth switching assembly SW10 can be connected to the input terminal of the current amplifier CRA. The second terminal of the tenth switching assembly SW10 can be grounded. The first terminal of the eleventh switching assembly SW11 can be connected to the output terminal of the current amplifier CRA. The second terminal of the eleventh switching assembly SW11 can be grounded.

[0046] The first terminal of the twelfth switch assembly SW12 can be connected to the output terminal of the optical driver GDR. The second terminal of the twelfth switch assembly SW12 can be connected to the anode of a light-emitting component TX, such as a light-emitting diode. The cathode of the light-emitting component TX, such as a light-emitting diode, can be grounded.

[0047] Please see Figures 1 to 4 ,inFigure 3 This is a schematic diagram illustrating the flow direction of the photocurrent to the capacitor provided by the optical sensor with a voltage reversal mechanism in the first and second embodiments of the present invention during the first phase time. Figure 4 This is a schematic diagram showing the flow direction of the photocurrent to the capacitor provided by the optical sensor with voltage reversal mechanism in the second phase time of the first and second embodiments of the present invention.

[0048] First, such as Figure 3 As shown, the first switch assembly SW1 and the second switch assembly SW2 are turned on, while the third switch assembly SW3 and the fourth switch assembly SW4 are turned off. At this time, the cathode of the photoelectric component RX is connected to the first terminal of the capacitor Cin through the turned-on first switch assembly SW1 (current amplifier CRA), while the second terminal of the capacitor Cin is grounded through the turned-on second switch assembly SW2.

[0049] like Figure 3 As shown, the photoelectric component RX converts the received light energy into a first photocurrent Ipd1. This first photocurrent Ipd1 (amplified by a current amplifier CRA with a gain A) flows sequentially through the first switching component SW1, the capacitor Cin, and the second switching component SW2 to ground, so as to charge the voltage of the capacitor Cin from zero to a first voltage.

[0050] After the voltage across capacitor Cin is charged from zero to the first voltage, as Figure 4 As shown, the first switch assembly SW1 and the second switch assembly SW2 are closed, while the third switch assembly SW3 and the fourth switch assembly SW4 are open. At this time, the cathode of the photoelectric component RX is connected to the second terminal of the capacitor Cin through the open third switch assembly SW3 (current amplifier CRA), while the first terminal of the capacitor Cin is grounded through the open fourth switch assembly SW4.

[0051] like Figure 4 As shown, the photoelectric component RX converts the received light energy into a second photocurrent Ipd2. This second photocurrent Ipd2 (amplified by a current amplifier CRA with a gain A) flows sequentially through the activated third switch component SW3, capacitor Cin, and the activated fourth switch component SW4 to ground, so as to charge the voltage of capacitor Cin to the second voltage.

[0052] It is worth noting that the first photocurrent Ipd1 flows from the first terminal of capacitor Cin to the second terminal of capacitor Cin, while the second photocurrent Ipd2 flows from the second terminal of capacitor Cin to the first terminal of capacitor Cin. Therefore, after the first photocurrent Ipd1 charges the voltage of capacitor Cin from zero to the first voltage, the second photocurrent Ipd2 charges the voltage of capacitor Cin from the reverse of the first voltage to the second voltage. The reverse first voltage is the reverse voltage described in this paper, and the absolute value of this reverse voltage is equal to the first voltage.

[0053] Please see Figures 1 to 6 ,in Figure 5 This is a waveform diagram of the signal of the switching component of the optical sensor with a voltage reversal mechanism according to the first embodiment of the present invention. Figure 6 This is a waveform diagram of the signal performed by the optical sensor with a voltage reversal mechanism according to the first embodiment of the present invention, representing the sensing and counting operations.

[0054] The optical sensor of the present invention can perform multiple sensing cycles, such as, but not limited to, Figure 5 and Figure 6 The sensing cycle signal CYS1 indicates the first and second sensing cycles. It is worth noting that the optical sensor of the present invention performs two coarse estimation operations within each sensing cycle, but only one fine counting operation, as detailed below.

[0055] First, such as Figure 5 As shown, during the first phase time of the phase time counting signal PTSC, the twelfth switch on signal SWS12 is at a high level, representing as follows: Figure 1 The twelfth switch assembly SW12 shown is turned on. At this time, as... Figure 1 The optical driver GDR shown outputs an optical drive signal, which is transmitted to the light-emitting component TX via the activated twelfth switch component SW12 to drive the light-emitting component TX to emit an optical signal. Simultaneously, the ambient light source emits an optical signal.

[0056] like Figure 6 As shown, during the first phase time of the phase time signal PTS1, the light-emitting component signal LDS1 is at a high level, indicating that the light-emitting component TX is turned on.

[0057] Next, the photoelectric component RX receives the light signals emitted by both the light-emitting component TX and the ambient light source, reflected by the object under test (e.g., a human body) and returned to the photoelectric component RX as the first light signal. The photoelectric component RX can then convert this first light signal into... Figure 3 The first photocurrent Ipd1 is shown.

[0058] like Figure 5As shown, during the first phase time of the phase time counting signal PTSC, the first switch on signal SWS1 and the second switch on signal SWS2 are at high levels, representing as follows: Figure 1 The first switch assembly SW1 and the second switch assembly SW2 shown are turned on.

[0059] like Figure 3 As shown, the first photocurrent Ipd1 output by the optoelectronic component RX (amplified by current amplifier CRA with a gain of A) flows sequentially through the first switched component SW1, the first terminal of capacitor Cin, the second terminal of capacitor Cin, and the second switched component SW2 to ground. The result is as follows: Figure 6 The capacitor voltage signal VINS1 shown indicates that the first photocurrent Ipd1 charges the voltage of capacitor Cin to a positive first voltage Vp11. The first voltage Vp11 of capacitor Cin is input to the first input terminal of comparator COM.

[0060] like Figure 5 As shown, during the first phase time of the phase time counting signal PTSC, the fifth switch on signal SWS5 and the sixth switch on signal SWS6 are at high levels, representing that... Figure 1 The fifth switch assembly SW5 and the sixth switch assembly SW6 shown are turned on.

[0061] The reference voltage Vref is input to the second input terminal of comparator COM through the fifth switch component SW5. Comparator COM compares the first voltage Vp11 of capacitor Cin with the reference voltage Vref to output a first comparison signal, which is sent to counter CT through the sixth switch component SW6.

[0062] The counter CT can count based on the level of the first comparison signal (e.g., but not limited to, the high level) to count a first coarse estimate. Thus, in... Figure 5 The first phase time of the phase time counting signal PTSC shown is or as... Figure 6 Within the phase-time signal PTS1 shown, the first coarse estimate operation of the counting operation signal CTS1 is completed. The first coarse estimate value of each count by the counter CT can be output to the coarse estimate value storage component RS1, for example, stored in a buffer.

[0063] After the comparator COM outputs a (high-level) first comparison signal or the counter CT counts, the ninth switch component SW10 can be turned on according to the first comparison signal, grounding the first input terminal of the comparator COM through the ninth switch component SW10, so as to reset the voltage of the first input terminal of the comparator COM to zero.

[0064] The above counting and resetting operations are repeated until the twelfth switch component SW12 is turned off or the light-emitting component TX stops emitting light. This completes the process as follows: Figure 5 and Figure 6 The operation involves a first coarse estimate of the first light signal reflected by the test object (e.g., human body) after both the ambient light source and the light-emitting component TX emit light during the first phase time.

[0065] After completing the first coarse estimate operation within the first phase time, the second coarse estimate operation within the second phase time begins.

[0066] like Figure 5 and Figure 6 As shown, during the second phase time of the phase time counting signal PTSC, the twelfth switch on signal SWS12 is at a low level, representing that... Figure 1 The twelfth switch assembly SW12 shown is turned off. As a result, the optical driver GDR stops driving the light-emitting component TX. (As...) Figure 6 The LDS1 signal of the light-emitting component shown is at a low level, indicating that the light-emitting component TX is off. At this time, the photoelectric component RX only receives the light signal emitted by the ambient light source, which serves as the second light signal. The photoelectric component RX can convert the received second light signal into... Figure 4 The second photocurrent Ipd2 is shown.

[0067] It is worth noting that, such as Figure 5 As shown, during the coarse estimation operation within the second phase time of the phase time counting signal PTSC, the third switch on signal SWS3 and the fourth switch on signal SWS4 are at high levels, representing... Figure 1 The third switch assembly SW3 and the fourth switch assembly SW4 shown are turned on.

[0068] The second photocurrent Ipd2 output by the optoelectronic component RX (amplified by current amplifier CRA with a gain of A) flows sequentially through the activated third switch component SW3, the second terminal of capacitor Cin, the first terminal of capacitor Cin, and the activated fourth switch component SW4 to ground. The result is as follows: Figure 6 The capacitor voltage signal VINS1 shown indicates that the second photocurrent Ipd2 charges the voltage of capacitor Cin from a negative first voltage -Vp11 to a second voltage Vp21. The second voltage Vp21 of capacitor Cin is input to the first input terminal of comparator COM.

[0069] like Figure 5 and Figure 6 As shown, during the coarse estimation operation within the second phase time of the phase time counting signal PTSC, the fifth switch on signal SWS5 and the sixth switch on signal SWS6 are at high levels, representing... Figure 1The fifth switch assembly SW5 and the sixth switch assembly SW6 shown are turned on.

[0070] The reference voltage Vref is input to the second input terminal of comparator COM through the fifth switch component SW5. Comparator COM compares the second voltage Vp21 of capacitor Cin with the reference voltage Vref to output a second comparison signal, which is sent to counter CT through the sixth switch component SW6.

[0071] The counter CT counts based on the level of the second comparison signal (e.g., but not limited to, the high level) to obtain a second coarse estimate. Thus, in... Figure 5 The first phase time of the phase time counting signal PTSC shown is or as... Figure 6 Within the phase-time signal PTS1 shown, the second coarse estimate operation of the counting operation signal CTS1 is completed. The second coarse estimate value of each count by the counter CT can be output to the coarse estimate value storage component RS1, for example, stored in a buffer.

[0072] After the comparator COM outputs a (high-level) second comparison signal or the counter CT counts, the ninth switch component SW10 can be turned on according to the second comparison signal, grounding the first input terminal of the comparator COM through the ninth switch component SW10, so as to reset the voltage of the first input terminal of the comparator COM to zero.

[0073] It is worth noting that the first voltage Vp11 of capacitor Cin during the first phase time is reversed to form a negative first voltage -Vp11. During the second phase time, the voltage of capacitor Cin begins to charge from this negative first voltage -Vp11. As a result, the residual voltage of capacitor Cin during the first phase time has been subtracted at the beginning of the second phase time. Therefore, only a fine calculation is needed after the coarse estimation operation time during the second phase time, as explained in detail below.

[0074] like Figure 5 and Figure 6 As shown, after the coarse estimation operation is completed within the second phase time of the phase-time counting signal PTSC, the fine counting operation begins. During the fine counting operation within the second phase time, the seventh switch on signal SWS7 and the eighth switch on signal SWS8 are at high levels, representing... Figure 1 The seventh switch assembly SW7 and the eighth switch assembly SW8 shown are turned on.

[0075] The second comparison signal output by comparator COM can be transmitted to signal converter ADR via the enabled seventh switch SWS7. Signal converter ADR can be, for example, but not limited to, a successive-approximation analog-to-digital converter (SAR). Signal converter ADR can convert the second comparison signal of comparator COM, for example, from analog to digital format, to output a converted signal to a fine count value storage component RS2 for storage, and can also output to the reference voltage regulation circuit VFC.

[0076] During the fine-counting operation within the second phase time of the phase-time counting signal PTSC, the reference voltage regulation circuit VFC can adjust the voltage value of a modulated reference voltage input to the second input of comparator COM one or more times based on a conversion signal (e.g., a digital signal) received from the signal converter ADR. Comparator COM compares the voltage at its first input with each received modulated reference voltage to output a third comparison signal. Counter CT or other circuit components can count a fine count value based on (multiple different) third comparison signals, which can be stored in the fine count value storage component RS2, such as a buffer.

[0077] Finally, the counter CT or other circuit components can perform calculations on the first coarse estimate counted during the first phase time, the second coarse estimate counted during the second phase time, and a fine count value to calculate a photosensitizing count value. For example, the counter CT or other circuit components can subtract the fine count value from the second count value (or subtract the fine count value from the first coarse estimate value) to calculate a photosensitizing count value of the light signal emitted by the pure light-emitting component TX and reflected by the object under test (e.g., the human body).

[0078] The counter CT or other circuit components can further calculate the distance between the object to be tested (e.g., a human body) and the electronic device equipped with the photosensitive sensor of the present invention based on the photosensitive count value.

[0079] Please see Figures 1 to 4 and Figure 7 ,in Figure 1 This is a circuit diagram of a light sensor with a voltage reversal mechanism according to a second embodiment of the present invention. Figure 7 This is a waveform diagram of the signal performed by the optical sensor with a voltage reversal mechanism according to the second embodiment of the present invention, representing the sensing and counting operations. The second embodiment is identical to the first embodiment and will not be described again herein.

[0080] like Figure 6As shown, in the first embodiment, during the first phase time, the light signals emitted simultaneously by the light-emitting component and the ambient light source are converted into a first photocurrent Ipd1, which charges the voltage of capacitor Cin to a first voltage Vp11. Then, during the second phase time, the light signal emitted by the pure ambient light source is converted into a second photocurrent Ipd2, which charges the voltage of capacitor Cin from the negative first voltage -Vp11 to a second voltage Vp21.

[0081] In the first embodiment, if the energy of the light signal emitted by the ambient light source is too weak, the second photocurrent Ipd2 converted from the light signal emitted by the ambient light source is too small. As a result, after the second phase time ends, the voltage of capacitor Cin, after being charged by the second photocurrent Ipd2 from the negative first voltage -Vp11, is still a negative voltage, making it difficult to count the second coarse estimate value.

[0082] Therefore, in the second embodiment, during the first phase time, only the ambient light source emits light signals. Then, during the second phase time, both the light-emitting component and the ambient light source emit light signals simultaneously, as detailed below.

[0083] like Figure 7 As shown, during the first phase time of phase-time signal PTS1, the light-emitting component signal LDS2 is at a low level, indicating that the light-emitting component TX is off or does not emit light signals. During the second phase time of phase-time signal PTS1, the light-emitting component signal LDS2 is at a high level, indicating that the light-emitting component TX is on and emits light signals.

[0084] During the first phase time of the phase-time signal PTS1, only the light signal emitted by the ambient light source is converted into the first photocurrent Ipd1 by the photoelectric component RX (and amplified by the current amplifier CRA with a gain A). Figure 3 The flow sequentially passes through the first switching component SW1 (on), capacitor Cin, and the second switching component SW2 to ground. (As shown) Figure 7 As indicated by the capacitor voltage signal VINS2, this first photocurrent Ipd1 charges the capacitor from zero to the first voltage Vp12.

[0085] The comparator COM compares the first voltage Vp12 with the reference voltage Vref to output a first comparison signal. The counter CT counts based on the first comparison signal to obtain a first coarse estimate.

[0086] After the first phase time of phase time signal PTS1 ends, the second phase time of phase time signal PTS1 begins. During the second phase time of phase time signal PTS1, both the first switch component SW1 and the second switch component SW2 are turned off, and the third switch component SW3 and the fourth switch component SW4 are turned on.

[0087] It is worth noting that during the second phase time of the phase-time signal PTS1 in this embodiment, both the light-emitting component and the ambient light source emit light signals simultaneously. After being reflected by the object under test (e.g., a human body) to the photoelectric component RX, the light signals are converted into a second photocurrent Ipd2 by the photoelectric component RX. Therefore, the current value of the second photocurrent Ipd2 in this embodiment is greater than the current value of the second photocurrent Ipd2 in the first embodiment.

[0088] In this embodiment, the second photocurrent Ipd2 (after being amplified by current amplifier CRA with a gain A) is as follows: Figure 4 The flow sequentially passes through the activated third switch assembly SW3, capacitor Cin, and fourth switch assembly SW4 to ground. The result is as follows: Figure 7 As indicated by the capacitor voltage signal VINS2, this second photocurrent Ipd2 charges the capacitor Cin from a negative first voltage -Vp12 to a positive second voltage Vp22.

[0089] The comparator COM compares the second voltage Vp22 with the reference voltage Vref to output a second comparison signal. The counter CT counts based on the second comparison signal to obtain a second coarse estimate. After obtaining the second coarse estimate, a finer count can be performed as described above.

[0090] Please see Figure 1 , Figure 6 , Figure 7 and Figure 11 ,in Figure 6 This is a waveform diagram of the signal performed by the optical sensor with a voltage reversal mechanism according to the first embodiment of the present invention, representing the sensing and counting operations. Figure 7 This is a waveform diagram of the signal performed by the optical sensor with a voltage reversal mechanism according to the second embodiment of the present invention, representing the sensing and counting operations. Figure 11 This is a waveform diagram of the signal from a traditional optical sensor.

[0091] like Figure 11 The sensing cycle signal CYS0 shown indicates that, in a traditional optical sensor, each sensing cycle requires the photoelectric component to be activated within the first windowing time Top01 of the windowing signal WDS0 to receive the ambient light source and the light signal reflected by the light-emitting component after being emitted by the human body. At this time, as... Figure 11 The light-emitting component signal LDS0 shown is at a high level, representing the light emitted by the component. The photocurrent converted from this light signal charges the capacitor, as shown by the gradually increasing voltage signal VINS0. During the first phase time of the phase-time signal PTS0, a conventional optical sensor performs the following actions on the received light signal: Figure 11 The counting operation signal CTS0 shown is used for the first coarse estimate operation to calculate the first coarse estimate value.

[0092] Next, the windowing signal WDS0 of the conventional optical sensor changes from a high level to a low level. At this time, the photoelectric component of the conventional optical sensor is turned off, and the reception of optical signals stops. During the first phase time of the phase-time signal PTS0, the conventional optical sensor performs the following steps on the first coarse estimate value: Figure 11 The first fine count operation of the counting operation signal CTS0 shown is used to count the first fine count value.

[0093] Next, the conventional optical sensor's windowing signal WDS0 transitions from a low level back to a high level, entering the second windowing time Top02, activating the photoelectric component to receive the light signal emitted by the ambient light source. During the second phase time of the phase-time signal PTS0, the conventional optical sensor performs the following actions on the received light signal: Figure 11 The second coarse estimate operation shown in the counting operation signal CTS0 is used to calculate the second coarse estimate value.

[0094] Next, the windowing signal WDS0 of the conventional optical sensor switches from a high level to a low level, at which point the photoelectric component of the conventional optical sensor is turned off, and the reception of optical signals stops. During the second phase time of the phase-time signal PTS0, the conventional optical sensor performs the following process on the second coarse estimate: Figure 11 The second fine counting operation shown in the counting operation signal CTS0 is used to count the second fine count value.

[0095] In comparison, such as Figure 6 and Figures 8 to 10 The sensing cycle signal CYS1 shown indicates that, for each sensing cycle executed by the optical sensor of this invention, the optical signal is continuously received by the photoelectric component RX only within the window opening time Top1 of the window opening signal WDS1. Next, the optical signal emitted by the ambient light source and the optical signal reflected by the light-emitting component TX are sensed and subjected to a first coarse estimation operation, and the optical signal emitted only by the ambient light source is sensed and subjected to a second coarse estimation operation.

[0096] Within each sensing cycle of the optical sensor of the present invention, after the first and second coarse estimation operations are completed, the windowed signal WDS remains at a low level and enters an unwindowed time TRS1, during which the photoelectric component RX no longer needs to receive the light signal. After counting the first and second coarse estimation values, the optical sensor of the present invention only needs to perform one fine counting operation to count a fine count value.

[0097] In short, the optical sensor of the present invention integrates the operation times of the first and second coarse estimates into the same windowing time Top1. For each sensing cycle executed by the optical sensor of the present invention, the photoelectric component RX only needs to open for a windowing time Top1.

[0098] In contrast, traditional optical sensors require two windowing periods: the first windowing period Top01 and the second windowing period Top02. After these two windowing periods, it is necessary to wait for the first non-windowing period Trs01 and the second non-windowing period Trs02 to end, respectively.

[0099] Obviously, the time control complexity of the optical sensor of the present invention is lower than that of traditional optical sensors.

[0100] Furthermore, traditional optical sensors require two fine-counting operations, while the optical sensor of this invention only requires one. This saves the time of one fine-counting operation and shortens the computation time.

[0101] Please see Figure 8 ,in Figure 9 This is a circuit diagram of a light sensor with a voltage reversal mechanism according to the third embodiment of the present invention. Figure 10 This is a schematic diagram illustrating the direction of photocurrent flow to the capacitor provided by the optical sensor with a voltage reversal mechanism according to the third embodiment of the present invention during the first phase time. Figure 6 This is a schematic diagram illustrating the flow direction of the photocurrent to the capacitor provided by the photosensor with a voltage reversal mechanism according to the third embodiment of the present invention during the second phase time. The third embodiment is identical to the first embodiment and will not be described again herein.

[0102] like Figure 8 As shown, in the first embodiment, during the first phase time, the light signals emitted simultaneously by the light-emitting component TX and the ambient light source are converted into a first photocurrent Ipd1, which charges the voltage of capacitor Cin to a first voltage Vp11. Then, during the second phase time, the light signal emitted by the ambient light source is converted into a second photocurrent Ipd2, which charges the voltage of capacitor Cin from the negative first voltage -Vp11 to a second voltage Vp21.

[0103] In the first embodiment, if the energy of the light signal emitted by the ambient light source is too weak, the second photocurrent Ipd2 converted from the light signal emitted by the ambient light source is too small. As a result, after the second phase time ends, the voltage of capacitor Cin, after being charged by the second photocurrent Ipd2 from the negative first voltage -Vp11, is still a negative voltage, making it difficult to count the second coarse estimate value.

[0104] Therefore, the difference between the third embodiment and the first embodiment is that the optical sensor in the third embodiment further includes, for example, Figure 8 The current supply component CSY shown is, for example, but not limited to, a current source CS. In practice, the current supply component CSY may include other components capable of supplying current.

[0105] like Figure 9 and Figure 8As shown, during the first phase time, the first light signal emitted simultaneously by the ambient light source and the light-emitting component TX is reflected by the object under test (e.g., a human body) to the photoelectric component RX. The photoelectric component RX converts the received first light signal into a first photocurrent Ipd1 (amplified by the current amplifier CRA with a gain A), which, together with the bias current Ibias provided by the current supply component CSY, flows sequentially through the first switching component SW1, the capacitor Cin, and the second switching component SW2 to ground.

[0106] During the first phase time, comparator COM compares the voltage of capacitor Cin, which is charged simultaneously by the first photocurrent Ipd1 and the bias current Ibias, with the reference voltage Vref to output a first comparison signal. Counter CT counts according to the level (e.g., but not limited to, high level) of the first comparison signal from comparator COM to count a first coarse estimate.

[0107] like Figure 10 and ​ As shown, during the second phase time, only the ambient light source emits light signals, while the light-emitting component TX does not emit light signals. The photoelectric component RX converts the light signal from the pure ambient light source into a second photocurrent Ipd (amplified by the current amplifier CRA with a gain A), which, together with the bias current Ibias provided by the current supply component CSY, flows sequentially through the activated third switch component SW3, the capacitor Cin, and the activated fourth switch component SW4.

[0108] It is worth noting that during the second phase time, the second photocurrent Ipd1 and the bias current Ibias simultaneously charge the capacitor Cin to charge the voltage of the capacitor Cin from the reverse voltage to a value greater than the current threshold, such as zero, so as to facilitate the following counting operation.

[0109] The comparator COM compares the voltage of the capacitor Cin after charging during the second phase time with the reference voltage Vref to output a second comparison signal. The counter CT counts according to the level of the second comparison signal from the comparator COM (e.g., but not limited to a high level) to count a second coarse estimate.

[0110] The counter CT further refines the second coarse estimate to obtain a second fine count value. Finally, the counter CT calculates a photosensitized count value based on the second fine count value, the second coarse estimate value, and the first coarse estimate value.

[0111] For example, the counter CT subtracts the second fine count value from the first coarse estimate value and / or subtracts the second coarse estimate value from the first coarse estimate value (and takes the average of the two subtractions) to calculate a photosensor count value. Thus, although the bias current Ibias is present in both the first and second phase times, the aforementioned subtraction operation cancels out the influence of the bias current Ibias, preventing it from affecting the final numerical calculation result.

[0112] In summary, the present invention provides a light sensor with a voltage reversal mechanism, which has the following characteristics:

[0113] A voltage reversal circuit is set up to reverse the voltage of the capacitor after charging to a negative value, and charging starts from the reversed voltage. This deducts the residual voltage of the capacitor, so as to achieve the effect of performing a fine counting operation only once.

[0114] Reducing the time span between a set of external optical applications allows for greater flexibility in optical applications.

[0115] Integrating the two sets of window opening times into the same time zone can reduce the differences in ambient light caused by time differences, thereby obtaining more accurate count values.

[0116] By integrating the two sets of window opening times into the same time zone, the light sensor can be applied to applications that require shorter window opening times, such as placing a light sensor under the screen of an electronic device.

[0117] Reducing the time spent on external optical applications allows for greater flexibility in optical applications.

[0118] The above-disclosed content is only a preferred and feasible embodiment of the present invention and is not intended to limit the claims of the present invention. Therefore, all equivalent technical changes made based on the description and drawings of the present invention are included in the claims of the present invention.

Claims

1. A light sensor with a voltage reversal mechanism, characterized in that, The optical sensor with a voltage reversal mechanism includes: An optoelectronic component configured to convert the light energy of a received first optical signal into a first photocurrent to provide to a capacitor, thereby charging the voltage of the capacitor to a first voltage; A voltage reversing circuit, connected to the capacitor, is configured to reverse the first voltage to form a reverse voltage; A comparator, wherein a first input terminal of the comparator is connected to the capacitor, and a second input terminal of the comparator is coupled to a reference voltage, and the comparator is configured to compare the first voltage with the reference voltage to output a first comparison signal; as well as A counter, the input of which is connected to the output of the comparator, the counter being configured to count based on the first comparison signal to output a first coarse estimate; Wherein, after counting to output the first coarse estimate, the photoelectric component converts the light energy of the received second light signal into a second photocurrent to provide to the capacitor, thereby charging the voltage of the capacitor from the reverse voltage to the second voltage; The comparator compares the second voltage with the reference voltage to output a second comparison signal, and the counter counts according to the second comparison signal to output a second coarse estimate value. Wherein, after counting to output the second coarse estimate value, the counter performs a fine counting operation on the second coarse estimate value to calculate the fine count value; Wherein, one of the first optical signal and the second optical signal is an optical signal reflected by the object under test after being emitted simultaneously by both the ambient light source and the light-emitting component, and the other of the first optical signal and the second optical signal is an optical signal emitted only by the ambient light source.

2. The optical sensor with a voltage reversal mechanism according to claim 1, characterized in that, The voltage reversing circuit reverses the first voltage, which is positive, to form the reverse voltage, which is negative, and the absolute value of the reverse voltage is equal to the first voltage.

3. The optical sensor with a voltage reversal mechanism according to claim 1, characterized in that, The second photocurrent charges the capacitor from the negative reverse voltage to the positive second voltage.

4. The optical sensor with a voltage reversal mechanism according to claim 1, characterized in that, When the energy of the light signal emitted by the ambient light source is higher than the energy threshold, the light-emitting component and the ambient light source emit light signals simultaneously within the first phase time, and the counter counts to output the first coarse estimate value; After the first phase time ends, a second phase time begins. During the second phase time, only the ambient light source emits light signals, and the counter counts to output the second coarse estimate value.

5. The optical sensor with a voltage reversal mechanism according to claim 1, characterized in that, When the energy of the light signal emitted by the ambient light source is lower than the energy threshold, only the ambient light source emits a light signal during the first phase time, and the counter counts to output the first coarse estimate value. After the first phase time ends, a second phase time begins. During the second phase time, the light-emitting component and the ambient light source simultaneously emit light signals, and the counter counts to output the second coarse estimate value.

6. The optical sensor with a voltage reversal mechanism according to claim 1, characterized in that, The optical sensor with a voltage reversal mechanism also includes a current supply component connected to the capacitor, configured to provide a bias current to the capacitor to charge the capacitor while the second photocurrent is provided to the capacitor.

7. The optical sensor with a voltage reversal mechanism according to claim 6, characterized in that, The current supply component is configured to provide the bias current to the capacitor while the first photocurrent is provided to the capacitor, so as to charge the capacitor.

8. The optical sensor with a voltage reversal mechanism according to claim 6, characterized in that, When the energy of the light signal emitted by the ambient light source is lower than the energy threshold, the current supply component provides the bias current to the capacitor to charge the capacitor.

9. The optical sensor with a voltage reversal mechanism according to claim 6, characterized in that, The current supply component includes a current source.

10. The optical sensor with a voltage reversal mechanism according to claim 1, characterized in that, The optical sensor with a voltage reversal mechanism also includes a current amplifier connected to the photoelectric component and the capacitor, configured to amplify the second photocurrent and provide it to the capacitor to charge the capacitor.

11. The optical sensor with a voltage reversal mechanism according to claim 10, characterized in that, The current amplifier amplifies the first photocurrent and supplies it to the capacitor to charge the capacitor.

12. The optical sensor with a voltage reversal mechanism according to claim 1, characterized in that, The voltage inverting circuit includes: A first switching assembly, wherein a first end of the first switching assembly is connected to the photoelectric component and the first input terminal of the comparator, and a second end of the first switching assembly is connected to the first terminal of the capacitor; A second switching assembly, wherein a first terminal of the second switching assembly is connected to a second terminal of the capacitor, and a second terminal of the second switching assembly is grounded; A third switching assembly, wherein a first end of the third switching assembly is connected to the photoelectric component and the first input terminal of the comparator, and a second end of the third switching assembly is connected to the second terminal of the capacitor; as well as A fourth switching assembly, wherein a first terminal of the fourth switching assembly is connected to a first terminal of the capacitor, and a second terminal of the fourth switching assembly is grounded; When the first switching component and the second switching component are turned on, the voltage of the capacitor is charged to the first voltage; When the third switch assembly and the fourth switch assembly are turned on, the voltage of the capacitor is charged from the reverse voltage of the first voltage to the second voltage.