Dr. Scott M. Baker's Raspberry Pi HAT Adds a Must-Have Peripheral: A Floppy Drive Controller

Custom-built add-on offers a quick way to hook up any 34-pin floppy to your Raspberry Pi.

Gareth Halfacree
3 years agoRetro Tech

Engineer Dr. Scott M. Baker has created a somewhat unusual add-on for his Raspberry Pi single-board computers: a controller for classic floppy disk drives, to add a chunk of low-speed magnetic storage to the device.

"If there’s one criticism I hear more often than any other about the [Raspberry] Pi, it's 'I wish my Raspberry Pi had a floppy drive'," Baker writes in the tongue-in-cheek introduction to his latest build. "It’s really shocking that the Pi doesn’t have the ubiquitous 34-pin floppy header that we all know and love. How else are you supposed to interface your Tandon TM100-2A or your Teac FD-55BR or even, for you cutting edge folks, your Sony MFP290 3.5” high density drive? So I set along to create this much needed had, the missing link between the Raspberry Pi and the floppy disk drive."

This hardware add-on for any Raspberry Pi offers the option to interface with any standard floppy drive. (📹: Dr. Scott M. Baker)

Rather than turn to an off-the-shelf USB floppy drive, which are typically available only in relatively modern 3.5in format, or use an existing interface design, Baker set about building an entirely custom interface board. "The circuit is really pretty simple, there’s only one IC, the WD37C65 controller," Baker explains. "This IC connects directly to the 34-pin floppy header. There are also some pull-ups associated with about a half-dozen of the floppy drive status lines, things like the index sensor and the write protect sensor. There's a 16 MHz oscillator that supplies the clock that the controller needs."

"[It's] a pretty simple one-chip HAT [Hardware Attached on Top]. The 16-pin grey thing is a shunt. This is the configuration I used in the video. As I mentioned in the design section, perhaps safer here to use a DIP resistor network (isolated, not bussed) or solder in discrete resistors due to the level difference between the Pi and controller IC. The floppy header is at the bottom. If you get the shrouded header like I did, with the little cut-out in the middle, it’ll keep you from pulling in your floppy cable backwards. The stacking header for the Pi protrudes out the back."

Baker has coupled the hardware with a user-mode driver and demonstration Python script which allows for formatting, image-writing, sector-by-sector and full-disk reading, but does come with a caveat: "A user-mode floppy driver may have occasional overrun," Baker explains. "No problem, when we get an overrun, we can just retry. It does have an adverse affect on performance though, and the problem is much worse when reading high density disks than when reading low density disks."

More details on the project, including a schematic and a link to the source code, can be found on Baker's website.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles