Research of Magnetic Field Influence on the Offset and Sensitivity of Magnetoresistive Sensor Readings

The article covers analysis of magnetic field sensor LSM303DLH with auxiliary components (R, C). A pair of Helmholtz coils were designed and examined. Experimental equipment able to create magnetic field of magnitude up to 1000G was produced. Research determined that residual offset in measurement of magnetic field is observed at magnitudes of external magnetic field reaching 20-50 G, depending on magnetization of the sensor. Sensitivity of the sensor is not affected by magnetization therefore offset can be eliminated during dynamic measurement of magnetic field.


I. INTRODUCTION
Thin foils of some specific materials (e.g.permalloynickel-iron magnetic alloy) have electric resistivity dependence on strength and direction of magnetic field (angle and magnitude of H vector) applied, which is called anisotropic magnetoresistivity.Sensors employing this property to measure strength of magnetic field are called AMR sensors [1], [2].
The most common way to build an AMR sensor is to group four magnetoresistive plates into a balanced Wheatstone bridge.Usually, opposite elements of the bridge are chosen equal (Fig. 1).Affected by magnetic field M parallel to the sensitive axis of the sensor resistive elements get offset in electrical resistivity, depending on angle between current and magnetic field vectors.This offset effectively imbalances the bridge, therefore it is possible to detect the magnetic field in form of offset in voltage between output terminals of the bridge Out+ and Out-.The voltage can be expressed as the following equation Out+ Out- where S -sensitivity of the sensor (typically 1mV/V/G); V s -supply voltage to bridge; M -magnitude of magnetic field in Gauss.However, AMR sensors are very sensitive to temperature changes [3] and parasitic magnetic fields.All system components, which generate magnetic fields and can be magnetized, affect the sensor: beginning with microcontrollers, magnetic fields of inductors in DC/DC converter, and ending with power supply wires and communication lines with a bus [1].
Investigated magnetic field sensor was implemented using microchip LSM303DLH (Fig. 2) was used to detect free and occupied spaces in a car parking lot.During development, it was noticed, that after exposing the sensor to a strong magnetic field (using permanent magnet from HDD or speaker) from a distance of 5-15 cm, the readings of magnetic field components are changed substantially (Fig. 3).It is shown in Fig. 3 how sensor readings change under periodic exposure to a permanent magnet and using fading alternating magnetic field for its demagnetization.Such problem is not indicated in technical documentation of LSM303DLH [4].An investigation was performed in order to determine the magnitude of the magnetic field which can make an impact on the sensor and to determine the causes of such phenomenon.

II. SELECTION OF MEASUREMENT METHOD
With aim to minimize the measurement errors caused by imperfect spatial positioning of the sensor, it was required to create a uniform calibrated magnetic field in a limited available space (but larger than the analysed sensor clearance in Fig. 2), the strength of which could be measured using indirect methods.
To that end a round Helmholtz coil with rather high diameter (55.2 mm) was employed.The strength of magnetic field created by this coil was calculated using measured coil current and physical dimensions.
A Helmholtz coil is composed of two separate coils positioned in parallel and in the way that distance l between centres of the coils is equal to radius R of the coils.Furthermore, both coils must have identical parameters: shape and dimensions, turns count, density and direction of winding, amplitude and direction of current.
Uniform magnetic field is created in section between the coils.Magnitude of the field can be calculated form equation (2) [5], [7] 8,99 ( 1) / , where B -magnitude of magnetic field in Gauss; Nnumber of turns in one coil; I -current in one coil; Rradius of one coil.
In order to maintain the uniformity of induced magnetic field as high as possible, it is required to ensure an equal current strength in both coils.When connecting coils in parallel, parasitic resistances which are difficult to assess may emerge (e.g.imperfect contacts, wires of different length and cross-section), which unbalance the arms of parallel contour, therefore the coils were connected in series.Parameters of coil used in experiment are given in Table I.In order to examine the size of zone with uniform magnetic field computer modelling with software COMSOL and physical measurement with tesla-meter "LEYBOLD DIDACTIC" were employed.General images of simulated magnetic field distribution and field distribution in XZ and XY planes are given in Fig. 4 and Fig. 5.It can be observed from Fig. 4, that parallel magnetic field lines of highest density go through the inside of the coil, and magnetic field distribution in vertical and horizontal crosssections of the coil, shown in Fig. 5, indicates, that field is quite uniform in a wide region (about 80mm in XZ plane).We can also see from Fig. 5, that measurement results correspond to modelling results.Distribution of magnetic field strength inside the coil is quite homogenous over some certain cylinder-shaped space (⌀=80mm, l=40mm), the centre of which coincides with the geometrical centre of coil pair.

III. ANALYSIS OF THE SENSOR
In this analysis, a set consisting of the PCB with AMR sensor LSM303DLH and minimal number of external R, C components, required to ensure its operation, is considered as a single sensor (Fig. 2).
The lab power supply (Fig. 6, T2) used in the first stages of research was capable of providing maximum current of 3A, which created magnetic field of magnitude about 19 gauss.Such strength of field is not sufficient to create residual offset in AMR bridges.In order to create field of higher magnitude a high capacitance (1420 µF, 400 V) capacitor battery, charged to a controlled voltage level, was used.
The experiment was conducted by applying strong magnetic field exceeding measurement range of the sensor for a short time duration (≤ 20 ) and measuring residual indication of the sensor.Below, the test circuit is presented (Fig. 6).T2 was used to create weak magnetic fields (<60G) in order to achieve higher accuracy.Furthermore, T2 was used to create constant magnetic field used to measure sensitivity of the sensor and perform calibration.
Data acquisition and registration device was created using microcontroller AT90USB1287.Data registration device was connected to computer via USB cable, and magnetic sensor data was read to data file using program specially designed for this purpose.
During analysis of sensor indications residual offset, the sensor was affected by short pulses of gradually amplified magnetic field in order to investigate the offset.Indication of the sensor was logged between separate pulses.
When analysing sensor sensitivity, at first the sensor was demagnetized using fading amplitude variable (50Hz) magnetic field, and sensor indications were captured when it was affected only by the Earth's magnetic field and affecting it using weak magnetic field, falling within the sensor's measurement range.Then the sensor was magnetized using strong (1000G) magnetic field and field components were measured in the same way.Analogous measurements were performed after magnetizing the sensor using magnetic field of opposite direction.

IV. ANALYSIS RESULTS
The dependency of AMR sensor indications in respect of strength of magnetic field affecting it was measured during the first stage of analysis (Fig. 7).As it can be seen from the graph, the largest offset of data was observed in Z which matched the direction of magnetic field strength lines.Analysis results show, that the magnetic field strength required to create a noticeable (≥5%) residual offset of sensor readings depends on the initial sensor magnetization.When the sensor was demagnetized, the magnetic field with strength of ~50G was needed.When the sensor elements were magnetized and the offset of readings was observed, then a noticeable offset could be generated by magnetic field with strength of ~20G.
During the second stage of investigation we analysed the sensor sensitivity dependence on magnetization of sensor auxiliary elements.Sensitivity measurement results, when the magnitude of magnetic field which affected the sensor was the largest, and sensitivity deviation was the smallest, are presented in Fig. 8.The measurement results were normalized absolutely (by considering the result of the first measurement to be equal zero and by subtracting the original value of the first measurement from subsequent measurements).Measurement results indicate that there is no variation of sensor sensitivity due to its magnetization, or it is less than noise produced by experimental equipment.

Fig. 3 .
Fig. 3. Variation of field components when magnetizing the sensor using random field and demagnetizing it.

Fig. 5 .
Fig.5.Planar distribution of magnetic field created by Helmholtz coils, obtained by measurements using teslameter and modelling using COMSOL software.

Fig. 6 .
Fig. 6.Principle diagram of the experiment: L1 -a pair of Helmholtz coils, inducing magnetic field; T1 -laboratory autotransformer, used to control charging of capacitors; Q1 -double thyristor used to connect the capacitor to the coil.

Fig. 7 .
Fig. 7.The dependency of sensor readings in respect of strength of magnetic field affecting it.

Fig. 8 .
Fig. 8. Normalized dependency of sensor sensitivity in respect to magnetization.X axis -number of measurement; Y axis -normalized sensor readings.

TABLE I .
PARAMETERS OF HELMHOLTZ COILS.