SBAA632 April 2024 TMAG3001 , TMAG5170 , TMAG5170-Q1 , TMAG5170D-Q1 , TMAG5173-Q1 , TMAG5273
For this demonstration, TMAG3001 was used to detect the passage of each tooth. An initial calibration routine is necessary to make full use of the magnetic field to remove the fixed bias produced by the stationary magnet. Figure 2-4 shows the X and Z axis field vector measurements as four teeth of the sprocket rotate near the sensor.
What is seen is that on each axis, an oscillation occurs about some nominal magnetic flux density observed by the Hall-effect sensor. If the pedal crankset were not present, this field can remain static at the back-bias condition. The fixed offset in the measurement presents an immediate challenge to calculations of angle.
The target input for an arctangent angle calculation has X and Y components that follow a cosine and sine behavior with matching amplitude. Plotted as a Lissajous curve in Figure 2-5, this can be easily observed as a unit circle. Similarly plotting the back-biased results in Figure 2-6, significant offset and amplitude mismatch produce an output which can not generate a full 0-360deg angle calculation.
Following a brief calibration routine to measure peak output values, the offset to subtract from each measurement can be determined using Equation 1.
And the amplitude mismatch can be normalized next by dividing each output by the total amplitude calculated in Equation 2.
The calibrated result is then found with Equation 3.
The resulting shift in the measured data is shown in Figure 2-7 and Figure 2-8.
Some skew from tooth to tooth does exist in the output plot, which is related to the chainset sprocket having some tilt relative to the mounting on the bottom bracket axle. This manufacturing defect causes a slight change in proximity to the magnet as the pedals move. For the segment of rotation shown in Figure 2-7 the amplitude was not at the peak value, and so the normalized results do not fully reach ± 0.5mT. Despite this defect, the resulting angle after this brief calibration is shown in Figure 2-9.
The resulting calculated angle over the full rotation of the sprocket is shown in relative to the entire gear wheel is shown in Figure 2-10. While some skew is still present to the output angle, the effect of this non-linearity to the overall angle measurement is reduced considering this only represents a small portion of the total rotation. Since the angle output ranges from 0-360 degrees per tooth, the effective angle non-linearity observed on each tooth is divided by the total number of teeth. In this case the number of teeth is 32. Even if an angle non-linearity of 10 degrees were observed for each tooth, the equivalent error can be limited to 0.31 degrees of the entire sprocket rotation.
The speed of rotation was controlled manually in this demonstration, so some fluctuation in speed was present. To approximate the angle error, the expected change in angle from one sample to the next was determined using the rate of change for the span of one gear tooth. Continuous sampling was used to determine the relative angle change from the start position, and a normalized angle error is shown in Figure 2-11.
With a 32 tooth gear and a 0-360 degree response per tooth, the resulting relative angle error is less than ±1 mechanical degrees.