SLYA093 September   2025 TMAG3001 , TMAG5253

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Benefits of Hall-Effect Sensors
    1. 2.1 Hall-Effect Sensors for Keys
    2. 2.2 3D Hall-Effect Sensors for Knobs
  6. 3Keypress Design Considerations
    1. 3.1 Simulating Keypress Design
    2. 3.2 Keypress Bench Results
  7. 4Keyboard Design Example
  8. 5Summary
  9. 6References

Keyboard Design Example

Figure 4-1 shows an example keyboard design which has four keys designed to act as arrow keys as well as a knob. This design example uses four TMAG5253 devices for the arrow keys and a TMAG3001 for the knob. Additionally, an RGB LED was included for each of the arrow keys so that each key can light up with some color when unpressed and can turn white when pressed. The color of the LED is controlled by the knob, so as the knob gets rotated, the LEDs can change color. For more information on how to use 3D Hall-effect sensors for the knob or how to use 3D Hall-effect sensors for angle measurement, please see the 3D Hall-Effect Sensor for Knobs in Appliances application note or the Angle Measurement with Multi-Axis Hall-Effect Sensors application note, respectively.

 Keyboard Design ExampleFigure 4-1 Keyboard Design Example

The schematic for the above keyboard design is shown in Figure 4-2. This keyboard example works by using a multiplexer to switch between the four ADC outputs of each of the TMAG5253s. Using an MCU to control the inputs (TMAG_EN0 and TMAG_EN1) of the multiplexer, the MCU is able to select which of the four arrow key outputs to listen to.

 Keyboard Design Example SchematicsFigure 4-2 Keyboard Design Example Schematics

Table 4-1 shows the truth table for the keyboard arrow logic

Table 4-1 Keyboard Truth Table
TMAG_EN0TMAG_EN1Selected Key
00Left Arrow
01Down Arrow
10Right Arrow
11Up Arrow

With the keyboard design example shown in Figure 3-10, a Texas Instruments launchpad, such as the MSP-EXP432E401Y, can be used to connect to the headers shown in Figure 3-9 to power up and interact with the board.