To precisely control the positioning of the trigger magnet with respect to the DRV5056, a motion controller system was used instead of doing testing using the 3D printed module. The motion controller consisted of a moving plate and a fixed plate, where the distance between the plates can be precisely controlled. In this setup, a magnet holder was 3D printed to hold the trigger magnet. The magnet holder was placed on the moving plate and the board of the design was placed on top of the fixed plate, as shown in Figure 3-3. Once the board was placed, an external 3.3-V power supply was connected to it.
After the magnet and board was placed, a correction factor was determined to convert the distance between the plates into the distance between the magnet and the DRV5056 sensing element. Using the conversion factor, the plate was moved so that the magnet was 7.4 mm from the sensing element of the DRV5056 (6.4 mm from the back of the DRV5056 package). This 7.4 mm distance corresponds to a trigger displacement of 10 mm. A multimeter then measured the voltage on the "LIN" test point, which is directly connected to the DRV5056 output. For this test, note that the LED op-amp circuit was disabled as a precaution by removing resistor R5, so the op-amp circuit did not draw current from the DRV5056 output. After taking a reading at 7.4 mm , readings were taken every 0.2 mm until the final reading at 17.4 mm was taken. The 17.4 mm distance corresponds to a trigger displacement of 0 mm.
Next, the design was calibrated. During calibration, the expected magnetic flux densities and measured output voltages were used to calculate new values for the sensitivity and quiescent voltage. The measured voltages were then converted to corrected magnetic flux density values using the new sensitivity and quiescent voltage values using the following formula: Bcorrected = (Vmeasured – VQ, corrected) / Sensitivitycorrected. To calculate the corrected voltage, the corrected magnetic flux density used the ideal values of the sensitivity and quiescent voltage: Vcorrected = (Bcorrected × Sensitivityideal) + VQ, ideal = (Bcorrected × 0.12) + 0.6.
Testing was done with four different calibration options to show the accuracy of each option. The following calibration options were specifically tested:
- 1 line, 2-point calibration: This calibration was performed using two data points to calculate a best-fit line equation. The slope of the best-fit line equation was selected for Sensitivitycorrected and the y-intercept of the line was selected for VQ, corrected.The values of Sensitivitycorrected and VQ were applied to all the data points from 0 to 10 mm. The selected two data points were taken at 7.8 mm and 17.2 mm. The value of 7.8 mm was selected as a calibration point because it was the first data point where the DRV5056 was powered. At 7.4 mm to 7.8 mm, the DRV5056 was turned OFF. The value of 17.2 mm was selected as the second calibration point because the data point at 17.4 mm was near the outside of the nonlinear output range of the DRV5056.
- 1 line, 3-point calibration: This calibration option uses three points to calculate the best-fit line instead of two. In addition to the two data points used in the 1 line, 2-point calibration option, a third calibration point at 12.2 mm was used as well.
- 2 line, 2-point calibration : This option calculates two different sets of Sensitivitycorrected and VQ values. The first set of values, Sensitivitycorrected,1 and VQ,1 , were calculated using the data at 17.2 mm and 12.6 mm. The second set of values, Sensitivitycorrected,2 and VQ,2, were calculated using the data at 12.4 mm and 7.8 mm. Data points from 17.4 to 12.6 mm were corrected using the values of Sensitivitycorrected,1 and VQ,1 while data points from 7.4 to 12.4 mm were corrected using the values of Sensitivitycorrected,2 and VQ,2.
- 4-line, 2-point calibration : This option calculates four different sets of Sensitivitycorrected and VQ values. The first set of values, Sensitivitycorrected,1 and VQ,1, were calculated using the data at 17.2 mm and 15 mm. These first set of values are used to calculate corrected data points from 15 mm to 17.4 mm. The second set of values, Sensitivitycorrected,2 and VQ,2, were calculated using the data at 14.8 mm and 12.6 mm. These values corrected 12.6 mm to 14.8 mm. The third set of values, Sensitivitycorrected,3 and VQ,3, were calculated using the data at 12.4 mm and 10.2 mm. These third set of values corrected the data points from 10.2 to 12.4 mm. The last set of values, Sensitivitycorrected,4 and VQ,4, were calculated using the data at 10 mm and 7.8 mm. These last set of correction values corrected data points that were less than 10.2 mm.
The pre-calibration % error of the measurements were then calculated by comparing the measured data with the corresponding values from simulation and the DRV5056 distance measurement tool. The post-calibration % error was calculated using the corrected voltage values and the corresponding voltage values from simulation and the DRV5056 distance measurement tool. The following post-calibration % error calculations were done:
- Simulated (1 line, 2-point): % error calculation using the voltages from simulation and the 1 line, 2-point corrected voltage
- Calculated (1 line, 2-point): % error calculation using the voltages from the DRV5056 measurement tool and the 1 line, 2-point corrected voltage. Note that the corrected voltage values here were corrected based on the DRV5056 measurement voltage values instead of the voltage values from simulation. As a result, the corrected voltage is different than the corrected voltage used in the 1 line, 2-point simulated scenario.
- Simulated (1 line, 3-point): % error calculation using the voltages from simulation and the 1 line, 3-point corrected voltage
- Simulated (2 line, 2-point): % error calculation using the voltages from simulation and the 2 line, 2-point corrected voltage
- Simulated (4 line, 2-point): % error calculation using the voltages from simulation and the 4 line, 2-point corrected voltage