SLYA093 September 2025 TMAG3001 , TMAG5253
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.
Figure 4-1 Keyboard Design ExampleThe 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.
Figure 4-2 Keyboard Design Example SchematicsTable 4-1 shows the truth table for the keyboard arrow logic
| TMAG_EN0 | TMAG_EN1 | Selected Key |
|---|---|---|
| 0 | 0 | Left Arrow |
| 0 | 1 | Down Arrow |
| 1 | 0 | Right Arrow |
| 1 | 1 | Up 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.