This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Customizable Capacitive Keyboard
Backstory
Our partner specializes in selling limited-edition keyboards with extensive customization options. The devices are of interest to keyboard nerds and all fans of custom-designed keyboards.
Request
The client's idea was to create a capacitive keyboard. End users could completely change the case of the keyboard and use their keys based on Topre switches.
The customer provided a sample keyboard from a well-known brand with some of the best features in its segment. The client asked Integra Sources to design a keyboard PCB with similar specifications.
Our team needed to design the original PCB and develop the firmware. The customer’s requirements regarding the keyboard’s specifications were as follows:
- The keyboard should use Topre switches.
- The poll time for the entire key matrix should be about 1 ms.
- The keyboard should be powered by USB type C.
- The keyboard should be compatible with most PC operating systems as a common HID device with no need for additional drivers.
- It should have full N-key rollover support.
Solution
First, we needed to determine the hardware platform for a device. The keyboard should be based on Topre switches.
Pressing a key on a mechanical keyboard generates an electrical circuit. Topre switches operate on the principle of capacitive switching, where the capacitance of an electrical circuit changes when a key is pressed.
The unique characteristics of such a keyboard are its dependability, durability, and good tactile feedback when pressing.
During the R&D process, we decided to use the STM32F411 as the most suitable solution for this electronic design project.
During the work on the project, there were changes in electronics related to the replacement of components with more suitable ones.
As we went along, the customer wished to add the ability to connect different cables to the keyboard - USB or LEMO. To do this, we split the keyboard board and made a breakout board for the cable connection.
As a result, we developed a fully customizable keyboard prototype based on the ST components.
Main Issues Resolved
At the beginning of our work on this project, we had to solve two main tasks:
- How to reduce the polling time to 1 ms.
- and how to distinguish between pressed and unpressed buttons, since even unpressed keys transmit signals.
The Topre switch consists of a key top over a rubber dome. Inside the rubber dome, there is a conical coil spring that sits above the PCB.
When the spring is in the compressed state, a capacitive touch mechanism on the circuit board detects a keypress in the middle of a keypress. The controller receives data from six columns of keys collected by a circuit on a printed circuit board. This format supports N-key rollover.
When you press a button on a conventional keyboard, the contact closes very quickly. For Topre switches, the process is smoother and more difficult to detect, as capacitance change is slower.
For the keyboard to be comparable in performance to the best mechanical keyboards, we needed to very quickly and reliably poll the keys matrix to find out which buttons are being pressed now. We had to design the device and write the firmware so that we could poll all the keys within the time specified by the customer.
We decided to use short pulse bursts to enhance polling time. The pulses will be applied to each row of the matrix. The signal from each column would go to an operational amplifier that would boost the signal to make it more distinguishable.
We used a comparator so that the system could distinguish between pressed and unpressed buttons.
The Scope of Work
- PCB schematic and design;
- Embedded hardware development;
- Firmware development.
Technologies Used
- We used Altium Designer for schematics and PCB design.
- We wrote custom firmware in C using Visual Studio Code.
- We used the GNU Compiler Collection, aka GCC, to make firmware from the source.
- The CMake tools were applied to manage the process of the assembly of firmware files and libraries.
- The STM32F411CCU6TR microcontroller, which is based on the Arm® 32-bit Cortex®-M4 processor, was used. It offers high performance, real-time capabilities, digital signal processing, and low-power, low-voltage operation.
- We used a set of HAL CMSIS libraries to simplify access to microcontroller registers and improve the convenience and speed of development.
- We used the LM393 Dual Differential Comparator and the MC14504BDTR2G Voltage Level Translator to achieve the desired characteristics for button press detection.
The device supports USB and LEMO communications.
Result
We have built a PCB that fits the customer-specified keyboard cases.
The board accurately detects keystrokes, including rollovers. The polling time is in line with the latest market requirements. Tests have shown that the product works as intended, and the customer was satisfied with the result.
Supports
Supports
Matrix poll time
You might also like...
Licensing Service Development for 3D Printers
The service uses the SHA-256 hashing algorithm to verify the authenticity of licenses. We designed the solution, created a web application with Jmix and enhanced the functionality of the desktop application.
LEARN MORE
Agricultural Robot with Computer Vision Algorithms
The agricultural robot is designed to work autonomously on a farmer’s plot. Armed with computer vision algorithms, the device sprays fertilizer precisely into the planting hole.
LEARN MORE