Thread: Resistors
View Single Post
Old 2021-01-14, 02:30   #10
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

33×347 Posts
Default

Quote:
Originally Posted by retina View Post
Or, as a mathematician might say: the possibilities get interesting very fast.
That was the "ElectronicCrank" inside me, not the "MathCrank". They do eight-hours shifts...
The c3 and c4, however, sounds very interesting, albeit they are subsets of the general case, you do all combinations and keep those which are linear (or log) and ignore the others.

Here I could share an interesting story, not long ago we did a project which involved 8 keys (push buttons) but we only had 2 or 3 inputs available, and somebody came with the idea to use an analog-to-digital line (ADC) of the MCU and connect all the keys there, with different resistor dividers, or some R-2R network. This worked nice in theory, and you could clearly read different voltages when pressing the keys one by one, but it was quite difficult to distinguish between key combinations, like for example, pressing two or three keys that made higher individual voltages was generating a lower voltage (as they were kinda "parallel" in that case, making a lower total resistance) and that created (almost) the same effect as pressing a single key which made a lower individual voltage. After a lot of experiments and calculus, we decided to use two ADC lines and connect 4 buttons (with the right resistor nets) to each line. In this case, we could differentiate all keys combinations more accurate, because only 16 cases, and not 256, and the input keypad worked perfectly, no matter what you pressed.

Then we sent samples to the customer, and total fiasco. Unknown to us, and that's happens when you (the customer) do NOT share all data, and when you (designer/manufacturer) do not ask, they were not using metal-dome switches (which give a zero-ohm resistor when you push them), which we used in our tests, but cheap rubber keypads, which have a carbon pill contact. The carbon pills give a contact resistance which could be anything between few ohms and few kilo-ohms, dependent on the materials used, contact surface, and pressure. That is how a carbon microphone used to work, ages ago, when they were invented. Yep, if you press one key harder the resistance is very low, while if you press it softer, only a little, the resistance is much higher. Therefore, pressing a single key harder may look the same for the system like pressing two or more keys softer (remember, they are all connected to the same ADC line of the MCU, it can read the voltage, and decide what's pressed), where the individual resistances of the keys in combination will be higher, but all in parallel give a smaller total resistor.

Of course, the design was anything but usable. You could not press any key reliable, single or not. Total screw up. In fact, it was a very clever design , you could use one single key to generate all possible key combinations (and any resistance, in fact), if you could control your amount of force when pressing it.

Of course, we had to redesign, and make place to connect an 8 keys matrix....

Last fiddled with by LaurV on 2021-01-14 at 06:16
LaurV is offline   Reply With Quote