This article is a continuation of the story of the emergence of the Octodon mobile keyboard.
Beginning of the story:
Oktodon: What should be a comfortable keyboard for smartphones .
In this part, I will tell you how the idea of ​​creating this keyboard inspired me to two new and atypical for me classes - programming microcontrollers and designing miniature input elements.

')
But first I will have to fill in the gap in the company's history, or rather, write how it appeared. Those interested can go directly to the details, skipping the next part.
Some lyrics and stories
In 2010, several circumstances came together. Firstly, my friend from the Ural State University, Leonid Volkov, who was then starting to invest in IT, showed an interest in convenient input on a smartphone. Secondly, we tested the technology on an already existing plywood prototype, and determined that the starting speed of the set of users holding for the first time a new keyboard in their hands is comparable to their speed of dialing on the digital keyboard of a cellular phone (without T9). It was an encouraging start. Thirdly, I filed a patent application. Fourthly, on the advice of Leonid, I applied for a grant from the Innovation Center of the Sverdlovsk Region and received it. In my opinion, the keyboard made a strong impression on the jury. This grant allowed to turn a hobby into a real project.
It should be added that by that time I was already convinced that some of my inventions made for personal use may be of interest to a much wider circle of people. The most striking examples are the
trivial device for teaching children to ride a bicycle and the
simplest lens for the built-in flash of a DSLR . I decided that since such simple things had not yet been made by anyone, then with more complex things, like a new keyboard, there is a chance to be the first. The role model for me was the wise Chinese founder of
Inventist , thanks to which the world saw a bunch of new and wild things, such as AquaSkipper and Solowheel.
So, with the introduction of the end, and I am relieved to proceed to the technical descriptions.
Oh no! I did not write anything about the name of our company. Since for a grant it was required to register a legal entity in a short time. face, the question "name of the yacht" appeared suddenly and in full growth. We went through a bunch of abbreviations, and were already close to being called “NIMCO” (I don’t remember how it should have been deciphered, something related to new input methods), but on the last day I came up with the name “Oktodon”, in honor of the glorious animal
Octodon Degus .
Daegu, he's a Chilean squirrel, he's a dwarf chinchilla - the best of the rodents with whom I had to deal. And this word sounds proudly and majestically, like the name of an ancient dinosaur, but in fact it means the sweetest and smallest furry animal that echoes the image of a new compact input device that claims to capture the world. The octo part can be taken as a hint at the number of joysticks on the back of the new keyboard.
Now everything is exactly. Below are only technical challenges.
Bluetooth prototype for Galaxy S

As I already wrote, the plywood prototype was required to go to a full-featured, with an animated screen interface. To begin with, the phone we chose to join was chosen. It was the Android flagship of the time Samsung Galaxy S.
Android was attracted by the opportunity to make a keyboard that would work in any application, and the flagship model was chosen because of its small thickness, so that adding a keyboard would not turn the phone into a too obvious brick.
Here I must say a few words about the thickness. At that time, the budget Windows PDA was about 2 cm thick, and the ultra-thin flagships of the new generation were about 10 mm. So I decided that once people carry 2 cm in their pocket, then adding a 10 mm thick keyboard to the flagship will not be a disaster for the user. Naturally, in fact it turned out to be wrong, the flagships began to lose weight rapidly, forcing the former "ultra-thin" devices into the class of bricks. And in half a year the device 2 cm thick was a bright example of brick construction. But still, it was about the prototype, which proves the concept, and not about mass production.
One of the key advantages of the new keyboard was to be the convenience of working with input elements. They had to be responsive and comfortable to push in all directions.
For a long time, we walked along the path of using factory joysticks for cell phones. These joysticks were designed to impact them on the thumb, therefore, in order to comfortably move them with a weak little finger, an additional lever in the form of a high cap was required. This increased the deflection of the joystick and made the device thicker.
In addition, in order for the joystick to be conveniently deflected both towards you and away from you, the outer part of the joystick's cover should have been higher than the inside.
The photo shows the joysticks used in the first prototypes:
A joystick with a lever and a “cup” for a finger, the same joystick without appendages and another similar joystick.

The top cover of the input element adds more thickness to the device. Our attempt to reduce the thickness of the first prototype, saving on the size of the lever and the depth of the “cup” for a finger, led to the fact that the first prototype for a smartphone was not very convenient for entering text. Joysticks were hard pressed and the finger constantly slid off the input element when trying to accelerate:

The mechanics of pushing the flaps of this prototype was also far from ideal: the shrouds moved apart reluctantly, twisted in the process and broke to rub the wires going to the front joysticks from the case. In addition, the width of the flap extension was also insufficient, so the thumbs were tight during operation, and they constantly touched the phone case.
The electronic prototype was filled with the insides of a cheap Chinese Bluetooth keyboard, because the Galaxy S did not support USB-host. The core of the keyboard was the chip Broadcom BCM2042KFBG. We did not find information on its flashing, therefore we attached the joysticks to the keyboard matrix already programmed in it.

When clicking on the joysticks, rather arbitrary characters were now pouring in - it was necessary to recode them according to our layout.
Thanks to the talent and diligence of
Eltaron , a modified system keyboard library was assembled, which allowed directing the stream from the Bluetooth keyboard to our application, transcoding incoming characters and printing them into any input field of an arbitrary application.
Thus, despite the ergonomic failures, the main task of the stage was completed - the prototype allowed us to see the concept in detail. Although printing on it was much slower than on the previous prototype.
An interesting solution was the execution of the keyboard in the form of a removable back cover for the phone. This made it possible not only to solve the problem of accession of the accessory, but also to save size on the placement of the battery, taking the power for Bluetooth directly from the phone's battery. By the way, the performance of the accessory as a back cover later implemented Samsung in one of the covers for the Galaxy Note, and even later the innovative smartphone maker Jolla focused on the concept of smart back covers that can receive power and communicate with the phone via I2C. In general, in this issue we are “in trend” even with some advance, though not about the keyboard.
By the way, no one knows by chance why these
Cute gold-plated contacts under the cover of the Galaxy S4?
I did not find information on them on the network and did not hear anything about smart accessories that could use them, but the contacts clearly hinted at something.
UPD: The comments suggested - these are the contacts for the cover-wireless charging.
The first USB prototype
The implementation of the prototype of the gutted Bluetooth keyboard was not only inconvenient to the design, but also required a flashing of the phone. Fortunately, in the new flagships, USB-host support has become the norm, which greatly simplified the creation of later prototypes.
And my next discovery was the understanding that you can make your input device (at least the prototype), even without being an expert in electronics. Yes, albeit with a large lag from the progressive world, I discovered Open Hardware. It is difficult to overestimate the role played by miniature Arduino-compatible boards Teensy 1.0, and later Teensy 2.0 in the development of the project. Programming your USB keyboard on their base using the Keyboard library class turned out to be a trivial task. What is there to write, probably, many programmers who have not come into contact with microcontrollers before, experience the same enthusiasm from the first acquaintance with the Arduino, having felt what horizons of creativity suddenly open ...
Our next prototype was for a tablet, connected via USB and did not require reassembly of the Android kernel. Due to the small number of supported Android 2.3 USB devices, we pretended to be a regular keyboard. However, we had to dodge so that the button presses were processed not by the operating system, but by our application. Fortunately, it turned out that Android 2.3 somehow ignores the entire numeric keypad.
Having developed the simplest protocol, we began to transmit information about the deviations of the Octodon joysticks by sending scancodes of these "unprintable" characters. The system ignored them, but for us it was easy to catch clicks: Android is Linux, and raw keyboard streams are always available for reading via / dev / input / *.
The prototype was made in the form of two brutal handles-clamps.

In it, I tried to use modified factory joysticks, from which the protective cover was removed, which made it possible to fix the “cups” of the joysticks below.

The experience was negative. Joysticks were not perfect at all, the characters were not printed, the pressure was different. Therefore, the main result of this step was the approach of the device to a normal implementation from the point of view of an ordinary user. After all, now for its use did not require "geek" manipulations with the firmware of the phone.
My dream was to demonstrate breathtakingly fast (for a mobile device) printing on a working prototype. However, the problem of input elements has become a sheer wall on the way to this dream. Our keyboard turned out to be such a capricious device in terms of the choice of input elements, which created a clear feeling that there is simply no ready-made solution that suits us.
New nano micro joysticks
At the heart of all the low-cost input elements, gutted by me, were miniature metal domes or curved plates, which created the necessary tactile sensation of pressing:

When the joystick lever was applied to them, they first resisted, and then they twisted out with a click, closing the contacts under them sharply and without bounce. Thus, the sensation that everyone expects from the mechanical input elements was achieved - a clear threshold of the operation force and a clear contact closure when this threshold is exceeded.
But the rigidity of the metal domes of factory-made joysticks, designed for the thumbs, was great for the realization of low-profile input elements, which would have been convenient to work with the ring fingers and little fingers. The production of its parts of this size was irrational, because would require a significant circulation, and the problem of precise assembly would actually put us before the issue of producing our own micro-joystick, which did not fit into our budget at that stage. And yet we needed our input elements, easy to operate, clear and miniature.
Attempts to solve this problem turned out to be in vain, because the number of hares killed as a result of this decision exceeded all expectations as a result.
I began to think about the concept of a joystick, performed directly on a printed circuit board, consisting of four contact pads, each of which could be locked with a common anchor when you press the joystick in one of the directions.
The following scheme was drawn in the head:
Above the board is a quad plate hanging from the anchor of the joystick. When you click on one of its ends, it closes the anchor with one of the directions. The question was how the plate should be fixed. Fixing it with a spring, we get a system that will function as a switch.

However, such a system will essentially lose to good joysticks due to the lack of a “click” feeling. After all, a “click” arises as a result of the fact that with small efforts the input element is practically immobile, and after some threshold it suddenly falls down, closing the contacts, and it is almost impossible to stop its movement in this process. In the case of using a spring, increasing the force would lead to a gradual tilt of the joystick. The force would be maximal when closing the contacts, and the finger's micro oscillations at this point would lead to contact bounce, the moment of the click would not occur, it could be caused only by a finger stroke. Even the use of a spring does not give a clear discretization of the direction of pressing - the plate will be equally easy to deviate in any direction, which can lead to errors in the choice of direction.
The search for a solution quickly led to the idea of ​​magnets. Indeed, the force of attraction of the part to the magnet is rapidly weakened when the part is removed from the magnet, which can be used to create the right “click” feel. It remained for the small - to come up with a simple to implement construction to test this hypothesis, using parts that can be purchased or easily made.
The resulting construction was as follows:

The drawing on the board consists of a central contact area, approximately 6 mm in diameter, around which there are four contact areas of directions. In the center of the central platform there is a hole with a thread for a small screw.
In the center of the structure, held on the board by a screw, stands a mushroom consisting of a leg — a conductive aluminum washer, 4.5 mm in diameter and 1.5 mm high, on which a D10 d5 h1 ring neodymium magnet is put, on top of which is a square steel plate with a side of 5 mm.
In its normal state, the magnet hangs over the board, magnetized to a square plate. When you press one of the sides of the magnet, he first resists, not wanting to detach from the plate, and then this side comes off and reaches the direction contact, closing the center contact to the direction contact. The finger, which developed the pressure of the separation force, has sufficient inertia, while the force of attraction of the magnet to the plate weakens sharply as the plate is removed. As a result, there is a clear click of the magnet on the contact direction, as required.
This design also allows fine sampling of pressing an arbitrary part of the joystick before deviating to one of the four directions. Indeed, the rotation of the magnet with a partial separation from the site will most likely occur along one side of the square, setting the slope of the input element.
Adding to the design a lid glued to the magnet with a square hole for the plate, we get a joystick with a wonderful click, much smaller in height than all previously used factory ones. Additional thickness is saved on the absence of the joystick housing. Assembly and installation are also very easy:

The ability to fine-tune the basic tactile parameters of the new joystick has also become an important advantage when experimenting with the new input method - the response force is controlled by the size of the square plate, and the joystick stroke size is the height of the conducting washer.
The gain from using new joysticks in terms of reducing the thickness of the keyboard was completely obvious:

The use of a magnet in the joystick led further to the idea of ​​an arbitrary arrangement of the joysticks on the magnetic plate, which was eventually realized in our current prototype. This required, of course, to change the design of the joystick, so that the magnet was in its fixed part, but the principle of operation remained the same. This solution allowed us to place the joysticks on the back side in accordance with the size of the user's hand and his work style and became one of the key differences of our solution from all mobile keyboards that are currently on the market.
So unexpectedly persistent attempts to solve one problem led to the emergence of an unexpected competitive advantage.

Read about new challenges in octoodone building in the next releases.
Thanks for attention!