In this lab students will simulate using a giant magnetoresistive (GMR) sensor to measure the strength of the magnetic field B produced by a current flowing in a circuit. One section of the circuit is a long, straight wire. Students will measure the strength of the magnetic field near the middle of this wire as a function of the distance from the wire for distances much smaller than the length of the wire. Students will also use Ampere's law to calculate the magnetic field strength B produced by a current flowing in an infinitely-long, straight wire (with the rest of the circuit at infinity). They will compare the results of their measurements with the results of their calculations.
Students will measure the magnetic field strength near a current-carrying long straight wire, as a function of the perpendicular distance from the center of the wire. They will verify that close to the wire and near its center Ampere's law can be used to make reasonable predictions, even if the wire is not infinitely long. Students will learn about giant magnetoresistive sensors.
![]()
Ampere's law applied to an infinitely-long wire predicts a magnetic field of strength B=m0I/(2pr) a radial distance r from the wire. The field B is tangential to a circle of radius r centered on the wire.

We therefore have (B/I)=(m0/2p)(1/r). B/I is proportional to 1/r, and when plotted versus 1/r will yield a straight line with slope (m0/2p).
![]()
In this experiment students will use GMR sensor to measure magnetic field strength. In a GMR sensor, the resistance of two thin ferromagnetic layers, separated by a thin, nonmagnetic conducting layer is altered by changing the magnetic moments of the ferromagnetic layers from parallel to anti-parallel or vice versa.

Layers with parallel magnetic moments have lower resistance than layers with anti-parallel magnetic moments. The layers are typically less than 10nm thick. They are sputtered onto semiconductor wafers and they are patterned into narrow stripes. A very small current flowing through the conducting layer across the stripes rotates the magnetic layers into anti-parallel, high-resistance alignment. An external field applied perpendicular to the direction of current flow and parallel to the stripes can overcome the field produced by the current and rotate the magnetic moments of both layers parallel to the field. The amount of current needed to destroy the alignment caused by the external field is a measure of the magnetic field strength.
Smart sensors with sensing elements and associated electronics on the same chip can be bought. These sensors have a sensitive axis (along the stripes) and can directly detect the component of the magnetic field along this axis. The diagram below shows two GMR sensors positioned to measure the magnetic field of a bar magnet. The sensitive axes are indicated and the component of the field along the sensitive axes for the two sensors is plotted.

![]()

The Ampere's Law apparatus is shown in the figure above. It is used to measure B/I as a function of the radial distance r from a wire. For this apparatus r is the distance between the center of the wire and the point at where the GMR sensor is located beneath the surface of its mounting package. The distance r is determined with a digital scale to a precision of 0.1 mm. Initially the top surface of the IC mounting package is positioned so that it touches the wire and the digital scale is zeroed. At this position, r=r0=1.68mm. r0 is the sum of the radius of the wire (1.18mm) and the sensor depth (0.5mm). r0 must be added to all subsequent readings of the digital scale.
The magnetic field strength is measured with a GMR sensor. The magnetic field produced by the wire encircles the wire and its direction at the position of the sensor is perpendicular to the base plate. The sensor is mounted so that its sensitive axis is also perpendicular to the base plate. The output voltage of the sensor V is directly proportional to the magnetic field strength B to be measured if an appropriate offset voltage has been subtracted. The offset voltage is partly due to the earth magnetic field and partly due to sensor electronic. It must be determined before each measurement by reading the voltage when no current is flowing in the wire. The current is turned on and off with a switch.
![]()
Procedure:
Start the experiment
by clicking the link.
| ||||||||||||||||||||||||||||
Open an new Excel spreadsheet and create a data table with columns as shown below.
The labels denote the following quantities: |
| r0 | 1.68mm=1.68´10-3m |
| d | reading of the digital scale |
| V0 | offset Voltage with no current flowing note: V0 can be positive or negative |
| V | output voltage with current flowing |
| I | current flowing in wire when switch is closed |
| 1/r | 1/(r0+d) |
| DV/I | (V-V0)/I |
| k | calibration constant (see apparatus label ~10-4 T/V) |
| B/I | B/I=kDV/I |
Start taking data. As a function of r measure V0 (no current) and V (current).
Record d, V0, V, and I in your data table.
|
![]()
| Fill in the remaining columns in your data table. | |||||||||
| Produce a graph of B/I versus 1/r. | |||||||||
Fit your data to a straight line and find the slope and the intercept of this straight
line. Ampere's law predicts a slope of m0/2p=2´10-7N/A2.
Compare your measured value with the accepted value. Find the percentage difference.
| |||||||||
Note: Because B is inversely proportional to r, the field strength is largest and
changes most rapidly as a function of r close to the wire. As a result the measurements
near the wire dominate the analysis.
|
![]()
Open Microsoft Word and prepare a report using the template shown below.
| Summarize the experiment. | |
| Insert your data table and your graph and answer all the questions posed in the data analysis section. |
![]()
Save your Word document (your name_lab8.doc) and attach it to an e-mail message to mbreinig@utk.edu.