# A Designed Calibration Approach for the Measurement -While-Drilling Instrument
## 4 The Experimental Verification  
### The Hardware Design for MWD Instrument  
Based on this sensor model (Figure 1), a prototype of a MWD instrument was developed, and the schematic block diagram of this instrument is presented in Figure 8a. This prototype consisted of three electronic subsystems: a sensor subsystem, memory subsystem and control subsystem. All of these subsystems were mounted on an aluminum groove and inserted in a beryllium copper pipe, as shown in Figure 8b.  
Figure 8: The figures of the self-designed MWD tool. (**a**) The schematic block diagram of the MWD instrument; (**b**) The prototype photo of the MWD instrument.  
Figure 7: The comparison diagram of attitude deviation in the three cases. (**a**,**b**) Attitude deviation after the calibration in the three cases. (**c**,**d**) The STD of the attitude deviation.  
In the sensor subsystem, three single-axis AMR sensors (HMC1021Z) perpendicular to each other were mounted on one side of the groove, and two dual-axis accelerometers (ADXL203 CE) were mounted on other side in the same way. Beyond that, six A/D converters were also equipped for signal digitization with the help of a signal filter (three first-order filters and three second-order filters). In the control subsystem, the core used the minimum system of LPC2194 ARM, which is provided by NXP Semiconductors.  
The entire system was powered by an 8 V Ni-MH battery, and this battery voltage was adjusted into 3.3 V and 5 V for the CPU core board and peripheral circuit, respectively, by a voltage regulator. The memory subsystem, including a ferroelectric memory and flash memory, undertook the storage of calibration parameters and measurement data for special purposes.  
It should be emphasized that the precision of the output signal of AMR sensor falls easily, and even the direction of its sensitive axis may also reset or reverse. Thus, a high current flipping circuit (AMR SET/RESET circuit) is needed to contribute to each AMR sensor for eliminating magnetic history and restoring high sensitivity [39], on the basis of the datasheet [40].  
The schematic diagrams of the signal conditioning circuit of HMC1021Z and the matched SET/RESET circuit are shown in Figure 9. The steps for accurate measurement with the AMR sensor are listed as follows, according to the datasheet.  
1. Apply a positive current pulse to S/R+ pin of the AMR sensors with the SET/RESET circuit, and then read the measured value \(V_{set}\) from the corresponding A/D converter.
2. Apply a negative current pulse and read the measured value \(V_{reset}\) in the same way.
3. Calculate the actual value \(V_{out}\), according to the equation \(V_{out}=(V_{set}-V_{reset})/2\).  
However, the output signal of AMR sensor did not respond in time when a current pulse was forced on the S/R+ pin. At the same time, the amplitude of this output decreased regularly with time. This phenomenon can be verified by measuring the amplitude of the signal (\(V_{set}\) or \(V_{reset}\)) at the input pin of A/D converter, which is shown in Figure 10. There are two reasons for the response delay. One is the delay of the signal conditioning circuit, and the other is the delay of the AMR sensor. In addition, the main reason for the decrease of the output is the loss of the sensitivity of the AMR sensor over time.  
Figure 9: Partial circuit schematic diagram of HMC1021Z. (**a**) Schematic diagram of the signal conditioning circuit. (**b**) Schematic diagram of the designed SET/RESET circuit.  
Therefore, the CPU must wait for a certain time interval before starting the A/D converter to sample when sending a current pulse, so that the A/D converter could sample at a best sensitivity point. The time interval is generally 200-500 ms, and the best choice is 200 ms for the circuit shown in Figure 9.