How Do Magnetic Hard Disk Drives Read and Write Data?
Magnetic hard disk drives store and retrieve digital information by magnetizing microscopic regions on spinning platters and detecting those magnetic fields with specialized read and write heads. In classical computing, these drives rely on electromagnetism to record binary data and magnetoresistive sensors to translate tiny magnetic variations back into electrical signals.
Structure of a Magnetic Hard Disk Drive
A hard disk drive (HDD) consists of one or more rigid, circular platters coated with a thin ferromagnetic film, typically a cobalt-chromium-platinum alloy. These platters are mounted on a central spindle and spun at high speeds, commonly \(5400\) or \(7200\) revolutions per minute (RPM).
Positioned just nanometers above each platter surface is a read/write head mounted at the tip of an actuator arm. As the platters spin, they drag a thin cushion of air beneath the head, creating an aerodynamic air bearing that keeps the head floating without physically touching the disk surface.
Writing Data with Inductive Coils
To write data, the drive uses a tiny electromagnet known as an inductive write head. The write head consists of a magnetic core wrapped with a microscopic copper coil.
When electrical current flows through the coil, it generates a magnetic field across a narrow gap in the core:
\[B = \mu_0 \frac{N I}{L}\]
Here, \(B\) is the magnetic flux density, \(\mu_0\) is the permeability of free space, \(N\) is the number of coil turns, \(I\) is the current, and \(L\) is the effective length of the magnetic path.
By reversing the direction of the current \(I\), the drive flips the polarity of the magnetic field. As the platter spins beneath the write head, this localized field aligns the magnetic domains in the ferromagnetic coating along specific tracks, encoding binary \(1\)s and \(0\)s as transitions in magnetic orientation.
Reading Data with Magnetoresistive Heads
Modern hard drives do not use the inductive coil to read data back. Instead, they rely on a separate magnetoresistive (MR) sensor, typically based on giant magnetoresistance (GMR) or tunneling magnetoresistance (TMR).
A magnetoresistive head is built from alternating ultrathin layers of ferromagnetic and non-magnetic (or insulating) materials. Its electrical resistance changes depending on the relative alignment of the magnetic moments in its layers.
- Reference Layer: One ferromagnetic layer has a fixed magnetic orientation.
- Free Layer: Another ferromagnetic layer changes its magnetic orientation when exposed to an external magnetic field from the spinning platter.
- Resistance Change: When the free layer aligns parallel to the reference layer, electrical resistance is low. When it aligns antiparallel, resistance is high.
A constant sense current passes through the MR sensor. According to Ohm's law, \(V = I R\), changes in resistance \(R\) produce corresponding fluctuations in voltage \(V\).
Signal Processing and Error Correction
The raw analog voltage waveform produced by the magnetoresistive head is weak and noisy. A preamplifier mounted near the actuator arm boosts this signal before sending it to the drive's read channel.
The read channel uses analog-to-digital converters and digital signal processing algorithms, such as partial-response maximum-likelihood (PRML) detection, to interpret the voltage transitions as a stream of binary bits. Finally, error-correcting codes (ECC) verify data integrity and correct any bit errors caused by thermal noise or media imperfections before delivering the data to the computer.