SLYA080 july 2023 TMAG5273
In some application scenarios, detecting the knob angle is not the only need, sometimes users also need to add push-button functionality. Take the on-axis test as an example to demonstrate how to use the 3D Hall-effect sensor to realize the push-button function.
In on-axis test, the magnetic field strength of the z-axis is basically unchanged, so determining whether the knob is pressed or not can only be judged by detecting the change of the magnetic field of the X and Y axes. However, when the knob is rotated, the magnetic field of the X and Y axes are also changing, which can prove difficult for the user to distinguish whether the change is caused by pressing the knob or rotating the knob. However, in use scenarios, the X and Y axes change caused by rotation is still somewhat different from pressing, which can be judged by considering the following two points:
Here we use a knob that can be pushed, as shown in Figure 4-1shows how to use a knob that can be pushed and placement of the 3D Hall sensor under the knob.
Use the above knob to perform push button test and no push button test, and get the X and Y axes magnetic field data as shown in Figure 4-2. Users manually rotate the knob and use UART to receive data. Since the amount of data is not large, the curve is not very smooth.
From the figure, we can come to the following conclusions:
The flow chart of the software implementation is showed as Figure 4-3: