As Ri is increased, Ti initially increases.
But then it reaches a maximum and starts
to decrease. This imposes an upper limit on Ri and, hence, on the number of keys
that can be connected to the circuit.
Ti may vary between Ti,min and Ti,max due
to resistor tolerances and variations in VTH.
Therefore, the values should be chosen so
that Ti,max < Ti+1,min. Assuming resistors
with 5% tolerances and a maximum VTH
variation of 5%, a maximum of 15 keys can
be connected to the circuit using the following Ri values (in kΩ): 0.01, 0.27, 0.62, 1.1, 1.8, 2.7, 3.9, 5.6, 8.2, 11, 15, 22, 30,
43, and 68. The number of keys can be
increased if resistor tolerances are tighter.
This design saves power in three ways.
First, energy of CV2 is dissipated each time
a capacitor is charged to V and discharged.
In this design, charging stops as soon as
I/O goes High and the capacitor is charged
to about VTH (less than 2 V), rather than
VDD. Second, the capacitor is charged (and
discharged) only once for each key press.
Finally, after determining which key was
pressed, the microcontroller enters sleep
mode and remains asleep until the key is
released and the state of I/O changes
back to High. So even when some of the
keys are stuck or held down, power consumption is minimized.