Technology behind Hall effect keyboards

Why hall effect keyboards can detect press distance

The most popular hall effect switches today place a magnet at the center of the switch stem, and our keyboards and kits are compatible with such switches.

When a user presses a key, the switch stem moves down, changing the distance between the magnet and the hall sensor on the PCB. This alters the magnetic field strength, which the hall sensor detects and outputs as varying voltage levels. By using an ADC (analog-to-digital converter), the voltage is converted into digital signals. The keyboard’s MCU (microcontroller unit) then performs a series of calculations to determine the press distance, ultimately enabling key activation and release.

SwitchThe user presses a key, moving the magnet inside the switch stem up and down
SensorThe hall sensor detects changes in magnetic field strength and outputs a varying voltage signal
ADCThe ADC converts the voltage into digital signals
MCUThe MCU calculates the press distance and sends key change information to the computer

Why achieving high precision with center-magnet hall effect switches is challenging

The relationship between magnetic field strength and distance is not linear; the further the distance (closer to the unpressed state), the smaller the change, and the closer the distance (near bottom-out), the greater the change.

Key travel to magnetic force

This is a critical characteristic, as it means the relationship between press distance and output voltage is not linear.

All hall sensors on the market, including TMR sensors, output voltage in a linear relationship with magnetic field strength.

This means we must employ methods to make the relationship between output voltage and press distance as close to linear as possible, which is the core challenge in achieving high precision with hall effect keyboards.

No electronic component in the world is perfect. Power supplies, sensors, ADCs, and so on all come with inherent noise and inaccuracies. The voltage change corresponding to a press distance of 0.00mm to 0.01mm (fractions of a millivolt) is already much smaller than the noise levels of the sensors1 and the resolution limit of 12-bit ADCs commonly built into MCUs2.

In summary, achieving a stable resolution of 0.01mm requires various methods to ensure the keyboard can reliably detect very small voltage changes (final fluctuations must be smaller than half the voltage difference for 0.00mm to 0.01mm; otherwise, it will continuously trigger due to noise).

[1] The uV-level noise specifications of some sensors on the market refer to their internal noise, while the actual output noise is typically at the mV level.

[2] For example, a 12-bit ADC operating at a 3.3V reference voltage can, at best, resolve changes of 0.8mV even under ideal conditions.