KUNST
SCHÖNHEIT & WELLNESS
HANDWERK
KULTUR & GESCHICHTE
UNTERHALTUNG
UMFELD
ESSEN & GETRÄNKE
REVERSE ENGINEERING
WISSENSCHAFTEN
SPORT
TECHNOLOGIE
WEARABLES

FM and MFM: Making the Data Clock Itself
A read head is a differentiator. It produces a voltage proportional to the RATE OF CHANGE of flux, which means a stretch of uniform magnetisation produces exactly nothing no matter how long it is. Record a thousand zeros and the head is silent; record a million and it is equally silent. The drive cannot tell them apart.
It could count them with a clock, but it has no clock worth trusting. The spindle wanders by a percent or two with temperature and supply voltage, the disc was probably written in a different drive on a different day, and a percent of error accumulated over a few hundred bits puts everything in the wrong place.
So the clock is built into the data. Frequency Modulation recording puts a transition at every cell boundary as a clock, plus one in the middle of the cell for a 1 — self-clocking, completely reliable, and it spends half of every transition on saying nothing. Modified FM noticed that the clock transition is only NEEDED between two consecutive zeros, dropped it everywhere else, and doubled the density of every floppy disk in the world without touching the head or the medium. That is what the labels single density and double density meant.
FULLY BUILDABLE, and the exercise is the point: encode, decode, then walk the clock error up until the decoder fails. The error at which it breaks IS the detection window, and that number governs everything about how dense a drive can be.
Fortgeschritten
4 hours
Anweisungen
1
1
Do it once by hand
Do it once by hand
Take the byte 10100011 and write out its FM cell stream on paper: for each data bit, a clock cell that is always 1, then a data cell equal to the bit. Sixteen cells.
Now MFM the same byte. Same layout, but the clock cell is 1 only when the PREVIOUS data bit and this one are both 0. Count the 1s in each stream — those are flux reversals, and they are what actually gets written.
Then draw both as waveforms, flipping the line up or down at every 1. Two pictures of the same byte. The MFM one has fewer corners in it, and that difference is a doubling of the capacity of every floppy disk ever sold.
Benötigte Werkzeuge:
Notebook and Pencil2
2
Encode, decode, and break it
Encode, decode, and break it
Flash the sketch and open the serial monitor at 115200. It encodes five bytes to MFM, turns the cell stream into transition TIMES, applies a deliberate clock error, and recovers the data with a software phase-locked loop.
It then walks the error from 0 to 30 percent and prints where the decode fails. Watch what happens around the failure point: it does not degrade gently, it goes from perfect to garbage within a percent or two. A run of zeros is where it breaks first, which is exactly why the maximum run length matters.
Put an LED and a 330 ohm resistor on GPIO19 so each recovered transition blinks, and a second on GPIO18 for the raw flux waveform. At a slow data rate you can watch the code working before you ever reach for the scope.
Change the message to all 0x00 and re-run. MFM's clock cells save it. Then disable the clock cells in `encodeMFM` and re-run: it fails immediately, at zero error.
mfm_codec.inocpp
Materialien für diesen Schritt:
LED Assortment1 Stück
Resistor Kit (1/4W, E12 Series)1 StückBenötigte Werkzeuge:
ESP32 Development Board
Desktop Computer
Digital Oscilloscope
Jumper Wire Set
Breadboard - Classic3
3
Density ratio, and the drift budget
Density ratio, and the drift budget
Loading Jupyter Notebook...
Benötigte Werkzeuge:
Desktop Computer4
4
Compendium: three constraints, one code
Compendium: three constraints, one code
DC BALANCE, WHICH MFM IGNORES. A read channel is AC-coupled, because the head makes no DC. A code that allows long stretches at one polarity makes the baseline wander and the detector's threshold with it. EFM on the compact disc spends three merging bits per symbol almost entirely on this; MFM does not bother, and floppy drives paid for it with finicky read amplifiers.
THE SIBLING, ANNOUNCED. RLL(2,7) is blueprint 7: same rate 1/2, minimum run raised from 1 to 2, density ratio 1.0 to 1.5. The whole difference is what the decoder must remember.
AGAINST PARITY. The parity blueprint adds redundancy to DETECT an error. A channel code adds redundancy so the signal can be READ at all. Different jobs, and they stack — real drives do both.
Benötigte Werkzeuge:
Notebook and PencilMaterialien
2- LED Assortment10% Provision1 StückPlatzhalter
- Platzhalter
Benötigte Werkzeuge
6- Notebook and Pencil10% ProvisionPlatzhalter
- ESP32 Development Board10% ProvisionPlatzhalter
- Desktop Computer100% ProvisionPlatzhalter
- Platzhalter
- Jumper Wire Set10% ProvisionPlatzhalter
- Breadboard - Classic10% Provision€9.00
Verwandte Blueprints
Diese Blueprints teilen Wissen — Techniken, Materialien oder Prinzipien
CC0 Gemeinfrei
Dieser Blueprint ist unter CC0 veröffentlicht. Sie dürfen dieses Werk für jeden Zweck frei kopieren, ändern, verbreiten und verwenden, ohne um Erlaubnis zu fragen.
Unterstützen Sie den Maker, indem Sie Produkte über seinen Blueprint kaufen, wo er eine Maker-Provision von Anbietern festgelegt, verdient. Oder erstellen Sie eine neue Iteration dieses Blueprints und verbinden Sie ihn in Ihrem eigenen Blueprint, um Einnahmen zu teilen.



