Device and method for touch sensing
An embodiment of the present disclosure relates to a method of detection of a touch contact by a sensor including a first step of comparison of a voltage with a first voltage threshold; and a second step of comparison of the voltage with a second voltage threshold, the second step being implemented if the first voltage threshold has been reached within a duration shorter than a first duration threshold, the second voltage threshold being higher than the first voltage threshold.
1. A method of detection of a touch contact by a sensor, the method comprising:
first comparing, by a comparison circuit of the sensor, a voltage across a capacitor with a first voltage threshold, the first comparing comprising charging the capacitor by repeating:
charging a touch region; and
discharging the touch region into the capacitor;
in response to the first voltage threshold being reached within a first duration shorter than a first duration threshold, second comparing, by the comparison circuit, the voltage with a second voltage threshold, the second voltage threshold being higher than the first voltage threshold;
detecting, by the sensor, the touch contact in response to the second voltage threshold being reached within a second duration shorter than a second duration threshold; and
leaving a low-power operating mode in response to the detecting.
2. The method according to claim 1 , further comprising, during the second comparing, charging the capacitor by repeating:
charging the touch region; and
discharging the touch region into the capacitor.
3. The method according to claim 1 , wherein the sensor comprises a plurality of touch regions.
4. The method according to claim 1 , further comprising:
before the detecting, repeating the second comparing; and
the detecting the touch contact is in response to the second voltage threshold of each repeated second comparing being reached within the second duration shorter than the second duration threshold.
5. The method according to claim 1 , further comprising supplying, by a digital-to-analog converter, at least one of the voltage thresholds.
6. The method according to claim 1 , further comprising providing at least one of the voltage thresholds by a Schmitt trigger.
7. The method according to claim 1 , further comprising discharging the capacitor after each comparing.
8. A method of operating an electronic device, the method comprising:
during a low-power operating mode of the electronic device, first comparing, by a comparison circuit of a sensor in the electronic device, a voltage across a capacitor with a first voltage threshold, the first comparing comprising charging the capacitor by repeating:
charging a touch region; and
discharging the touch region into the capacitor;
during the low-power operating mode, in response to the first voltage threshold being reached within a first duration shorter than a first duration threshold, second comparing, by the comparison circuit, the voltage with a second voltage threshold, the second voltage threshold being higher than the first voltage threshold;
detecting, by the sensor, a touch contact in response to the second voltage threshold being reached within a second duration shorter than a second duration threshold; and
leaving the low-power operating mode in response to the detecting.
9. The method according to claim 8 , further comprising performing the first comparing and the second comparing regularly during the low-power operating mode.
10. The method according to claim 8 , further comprising, during the second comparing, charging the capacitor by repeating:
charging the touch region; and
discharging the touch region into the capacitor.
11. The method according to claim 8 , further comprising discharging the capacitor after each comparing.
12. The method according to claim 8 , wherein there are a plurality of touch regions.
13. The method according to claim 8 , further comprising:
before the detecting, repeating the second comparing; and
the detecting the touch contact is in response to the second voltage threshold of each repeated second comparing being reached within the second duration shorter than the second duration threshold.
14. The method according to claim 8 , further comprising supplying, by a digital-to-analog converter, at least one of the voltage thresholds.
15. The method according to claim 8 , further comprising providing at least one of the voltage thresholds by a Schmitt trigger.