Programmer's calculator

This is a very simple thing - a desktop calculator for operations in different number systems.

It is imagined as having a few lines of display, a lithium battery, and a keyboard with a small number of keys.

Keyboard

I will use Rue Mohr's scanless keyboard design http://ruemohr.org/~ircjunk/tutorials/elex/scanlessKeyboard/scanlessKeyboard.html .

Here is draft of the schematics:

The calculator keyboard diagram
The calculator keyboard diagram

I use the highlighted fragment to determine the resistor ratings.

Fragment of the keypad circuit
Fragment of the keypad circuit.

Let me speculate: the CE current of transistor Q1 is determined by the resistance of the 45k pull-down resistor of the controller pin (not shown in the schematic):

I_{Q_1CE} = \frac{3.3}{45e^3}\approx 0.1mA

Based on the datasheet chart, I determine that to go into saturation mode, it is enough to provide 0.6V voltage at the base. The same applies to transistor Q2.

Hence the voltage drop across resistor R1:

V_{R_1} = 3.3 - 0.6 - 0.6 = 2.1V

As can be seen from the same graphs, the base-emitter saturation current is 10 times less than the I_{Q_1CE} :

I_{Q_2BE} \approx \frac{I_{Q_1CE}}{10} = 0.01mA

I choose the resistor R2 arbitrarily 10k - anyway the voltage drop on it equals V_{Q_2BE} = 0.6V .

I_{R_1} = I_{R_2} + I_{Q_2BE} = \frac{0.6}{10e^3} + 0.01e^{-3} \approx 0.07mA
R_1 = \frac{V_{R_1}}{I_{R_1}} = \frac{2.1}{0.07e^{-3}} = 30k

You cannot move higher because of the danger of getting too little current, on the other hand a high current will have no effect. So I choose the value of 20k.

The current through resistor R1 is actually the same as predicted I_{R_1} = \frac{2.1}{20e3}=0.1mA

0.09mA :math:`R_1` current
R_1 current

Rue Mohr's <https://twitter.com/RueNahcMohr> told me to change the circuit so as to get a "keystroke detection circuit":

Modification of the keyboard circuit
Modification of the keyboard circuit