SLYA076 july 2023 TMAG5273
The web GUI for this demo can be found at https://dev.ti.com/gallery/info/PositionSensing/TMAG5x73_LiquidLevelDemo/. You must be logged into your account on dev.ti.com to access the GUI. Click white space anywhere to launch the GUI. The demo can be downloaded for offline use by clicking the download button and selecting the appropriate downloads.
Open the GUI and connect the TI-SCB with the TMAG5273 A1. Navigate to the Registers page and set the following items:
Then set Auto Read to As fast as possible at the top of the register map page.
Next, navigate to the Plots page. The "Liquid Level Demo" tab opens as shown in Figure 3-10.
Below the first plot the window displays the Calculated Angle and Device Angle. The Device Angle is the angle reported by the TMAG5273 device itself which is in increments of 0.25°. The Calculated Angle is the angle calculated from the magnetic field strength of the selected two axis, which for the magnet orientation in the demo is X and Y.
The GUI values are initially configured for our demo setup which used a 4" × 4" × 4" acrylic cube. The 3D printed parts sit over the edge of the water tank so that the magnet and sensor are 39.0 mm from the bottom of the tank. The radius of our float arms are 62.8 mm. For the magnet glued into our float arm, the true angle read by the TMAG5273 is 120°, and it changes by 66 degrees (to 54°) from 0% full to 100% full. All of these parameters can be adjusted to match the end system to account for any size of tank or arm radius. These parameters are illustrated in Figure 3-11. These parameters are used to calculate the tank full percentage as the float rises. It calculates the vertical distance change of the arc the float arm follows as the liquid level rises.
There are configuration controls for the R and Q values of a Kalman filter that is being applied to the data. This is effectively a moving average, and helps account for liquid sloshing in the tank. By default these values are 0.01 for R and 10 for Q, but these can be tweaked as designed for each application. There is a toggle at the bottom to disable the Kalman Filter completely.
Click the ZERO LEVEL button when there is no water in the tank to set the zero location of the float arm. The zero level from one float arm to another can be different depending on how the magnet was installed - the position of the magnet when the system is at the empty liquid level.
Both plots display the liquid level as you add or remove liquid from the tank. Both charts display the same data, but the thermometer-based chart on the right updates slightly quicker and has a large readout of the fill percentage. The GUI can also work as the standard TMAG5273 EVM GUI if you navigate to the Plots tab.