VOGONS


First post, by mkarcher

User metadata
Rank Oldbie
Rank
Oldbie

I intended to deep dive into MCGA hardware level reverse engineering on a PS/2 model 30 - but as it turned out, not only the 10MB hard drive on the hard card is dead (it was already dead when the machine was put into storage), but also both floppy drives in that system failed to boot the IBM system disk (which is known good). I also have a second PS/2 model 30, but the floppy drive on that one died 23 years ago emitting some burnt smell. So two computers with no working storage, which is not good. The Novell Personal Netware infrastructure that I used to remote-boot the storageless PS/2 is long gone, so the only thing directly at hand is IBM ROM Basic.

The broken floppy drives from the computer I expected to have working drives seem to seek properly, but can't read any data. In contrast to many other vintage floppy drives, these drives also don't have a belt. Yet, I decided to program a RPM measurement tool using IBM ROM Basic. Please be aware that this BASIC program is specific to the (early?) PS/2 models of IBM, as it uses a diagnostic input port that is not available on standard PC floppy controllers, but only in the PS/2 I/O Gate Array. Let's go

10 DEF SEG=0
20 OUT &H3F2, &H1C
30 PRINT "Wait for stabilization"
40 FOR I = 1 TO 10 : GOSUB 1010 : NEXT I
50 GOSUB 2010 : START=TMR
60 PRINT "Measuring 100 revolutions"
70 FOR I = 1 TO 100 : GOSUB 1010 : PRINT I; : NEXT I
80 GOSUB 2010 : DURATION = TMR-START
90 PRINT 60*18.2/DURATION*100; "RPM"
100 END
1000 'Wait for one index event
1010 POKE &H440,&H80
1020 WAIT &H3F0,4
1030 WAIT &H3F0,4,4
1040 RETURN
2000 'Read BIOS time tick counter
2010 X=PEEK(&H46C)
2020 Y=PEEK(&H46D)
2030 TMR=X + 256*Y
2040 RETURN

And, surprisingly, this program really indicated a problem:

Ok
RUN
Wait for stabilization
Measuring 100 revolutions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
616.9491 RPM

Huh, maybe I am just to stupid to get the formula to convert ticks per 100 revolutions into revolutions per minute wrong? Floppy drives are supposed to run at 300rpm, which is 5 revolutions per second. So 100 revolutions should take 20 seconds. I timed the 100 revolutions manually, and obtained 9.8 seconds, so the calculation that resulted in the drive being twice is fast as it should be is obviously not totally wrong, and the drive spins way too fast. Maybe the regulation is gone? I tried a different floppy disk, and indeed, this disk spun at 530 RPM. Now that's funny: Instead of a working floppy drive, I now have a friction measurement device. That's not helpful for data transfer, though... Obviously, the drive just seems to go as fast as possible, with no regulation kicking in.

It turns out you can disassemble the PS/2 floppy drives quite nicely without being afraid of loosing adjustment: You can unscrew the top cover, remove the top PCB and the shielding plate below. Try to not break the plastic clips that hold the shielding plate in place. You can also remove the mounting plate on the bottom, and unscrew 4 screws to take the machanism out. On the bottom side on the mechanism is a second PCB - this is the direct drive motor controller/motor PCB. Parts of the direct drive motor (like the coil for the index sensor magnet, the speed measuring "inductor", and most likely also the three drive coils) are directly mounted on this PCB. There are just 5 wires connecting the motor controller PCB to the main PCB, three of them are power, the last one "/MOTOR ON" and "IDX", so the fault must be located on the motor PCB. And it indeed is. I reverse engineered the complete motor PCB:
floppy.png
DrivePCB.JPG

The KiCad source code for the schematic as well as a Gimp .xcf file containing the board photo and the component designators as individual text layers are available in the associated GitHub repository.

As you see, the schematic cleanly divides into two parts. The left part contains the motor controller (including speed control), using a dedicated floppy motor controller chip, whereas the right part contains the index pulse generator. This is the first very important thing to understand: The presence of index pulses (which I measured with that basic program) only means that the index sensing coil sees the magnet fly past it. The motor controller needs more precise speed feedback: It uses a signal that toggles 60 times per revolution, and is generated by a magent (perhaps the motor magnets?) flying over a zig-zag trace below the disc-shaped flywheel. This drive does not use the "FG out" signal from the motor controller to generate the index pulses (it could divide the FG out signal by 60 to obtain a single pulse per revolution, but it would not know the rotational position of the disk, so a different sensing scheme is needed).

The final outcome of the troubleshooting is: C1, the DC blocking cap in the frequency meter section, was gone. That's an electrolytic cap, and those are prone to fail when they age. This cap is 33 years old. I tried paralleling another 1µF capacitor, and the speed of the drive suddenly drops when you hold the cap so it touches the signals C1 is supposed to be connected to. I re-ran my basic program with the cap held agains the PCB - and the output was "300 RPM". When desoldering the broken capacitor, I shorted some pins on the motor controller with solder, and need some desoldering wick and flux to clean up the mess I made. This has to wait for some days until I got these supplies.

Some final random notes about the motor controller PCB: It regulates to 300 or 360 Hz on the frequency feedback if the reference crystal has the suggested frequency of 610.2kHz. That is not 300 or 360 pulses per minute, but pulses per second. So that's why I wrote that you need 60 pulses per revolution. You might install crystals of different frequency, so the controller regulates to another speed. In the case of the IBM drive, IBM installed a 508.5kHz crystal, and chose the mode intended for 360Hz operation (mainly for 5,25" HD drives), which also results in 300Hz target frequency. When I checked the main oscillator with the ancient 10MHz analog single channel scope at hand, my first idea was that the scope is completely out of adjustment, because the frequency was way off 610kHz. U2E/U2F seem to be used to reverse the polarity of the hall sensor supply to cut down the standby current. This assumes the hall sensors don't conduct current if supplied in reverse. This feature is disabled by having JP1 (some solder points) open.

Reply 1 of 11, by Caluser2000

User metadata
Rank l33t
Rank
l33t

It'would be faster to just put a generic 3.5 ffd with power using a standard molex connector attached to the psu.

There's a glitch in the matrix.
A founding member of the 286 appreciation society.
Apparently 32-bit is dead and nobody likes P4s.
Of course, as always, I'm open to correction...😉

Reply 2 of 11, by mkarcher

User metadata
Rank Oldbie
Rank
Oldbie

For the drive that failed with the burned smell, I knew that the motor turns, but seeking fails. So I assumed the stepper motor or the stepper motor driver to have failed. It turned out to be wrong. And that drive turns at 300RPM, so the spindle drive PCB is OK on that drive. You can't swap the spindle drive PCB without realigning the drive, so instead I measured the winding resistance of the stepper motor - both coils measured at 130 Ohms, which seems OK. It's obviously neither burnt nor shorted. Swapping in the main drive PCB into the drive that failed with the burning smell indeed resulted in a fully working drive.

Then I took a closer look at the main drive PCB of the burnt drive. And finally I found a black spot on L2, the interference inductor on the +5V supply. That inductor was no longer conducting any current, so obviously it doubled as fuse. I searched the whole PCB for shorted semiconductors or electrolytics, but didn't find any. Furthermore, as the speed signal works, and that signal is created by an 74HC14 chip connected to the 5V supply, obviously the 5V supply can not be shorted to ground. I measured the 5V rail on the drive, and obtained 3.6V. I guess that's source from data signals through ESD protection diodes (see EEVBlog #831 for details on how stuff like that happens to work sometimes), but this clearly indictates the short is gone. As I don't have a 68µH inductor at hand, I replaced the broken inductor by a FM ferrite bead with 3 turns, which I had in my parts bin, and that PCB now works "fine". I guess a capacitor (possibly the tantalum one) on the PCB shorted out for a moment, but is open now.

So at the moment, I have 1 working drive, but as soon as the 1µF X7R caps and the soldering supplies are in, I most likely have all three drives working fine again.

Reply 3 of 11, by mkarcher

User metadata
Rank Oldbie
Rank
Oldbie
Caluser2000 wrote on 2021-01-01, 17:13:

It'would be faster to just put a generic 3.5 ffd with power using a standard molex connector attached to the psu.

The PSU in the PS/2 model 30 has no molex connectors (and no 3,5" floppy connectors). The only connection on that supply is the AT-style (i guess...) mainboard connector. You also need to adapt a standard drive, because if I remember correctly, some signal on the PS/2 floppy drive uses inverted logic compared to PC drives. It might have been only the density select pin, which is not a thing on the 720K drives from the non-286 PS/2 model 30, so maybe that issue wouldn't have applied in my case.

Finally, this thread is about fixing those floppy drives, because "I recently found this old PS/2, but no floppy drive works in that thing" is a recurrent theme on retro YouTube channels recently, not about just any way to get the machine running. Mounting a standard drive instead of the PS/2 specific larger 1.6" ("half height") drives would not fit the front bezel and destroy the nice look of that old computers - and last but not least, I enjoy the challenge of fixing retro hardware.

Reply 5 of 11, by konc

User metadata
Rank Oldbie
Rank
Oldbie

Oh man I love thread like this so much. Well done and thank you for the detailed description.
On a side note, I thought that electrolytic capacitors going bad in these PS/2 drives are a common issue and people just go and replace them all first thing after cleaning the heads?

maxtherabbit wrote on 2021-01-01, 18:32:

For future reference the program ImageDisk contains a built in RPM test function. Great work reversing the motor PCB btw!

Yes, provided that you can get it somehow on the machine and run it! There are always ways of course but it's tricky sometimes

Reply 6 of 11, by Caluser2000

User metadata
Rank l33t
Rank
l33t
konc wrote on 2021-01-01, 19:07:

Oh man I love thread like this so much. Well done and thank you for the detailed description.
On a side note, I thought that electrolytic capacitors going bad in these PS/2 drives are a common issue and people just go and replace them all first thing after cleaning the heads?

Yeah It's been a known issue since the late '90s. It's the reason I don't bother collecting PS/2 systems.

There's a glitch in the matrix.
A founding member of the 286 appreciation society.
Apparently 32-bit is dead and nobody likes P4s.
Of course, as always, I'm open to correction...😉

Reply 7 of 11, by mkarcher

User metadata
Rank Oldbie
Rank
Oldbie
konc wrote on 2021-01-01, 19:07:

Oh man I love thread like this so much. Well done and thank you for the detailed description.
On a side note, I thought that electrolytic capacitors going bad in these PS/2 drives are a common issue and people just go and replace them all first thing after cleaning the heads?

I didn't google for that problem. I guess I would have found enough forum entries talking about recapping these drives that I knew what to do. If I had my ESR meter at hand (moved out from my parents like 7 years ago, most modern tools at my home, a lot of "now retro" stuff at my parent's home), maybe I would have checked the caps first. Nevertheless, a very interesting endeavour. You could easily see the 620Hz (or so) speed sensor sine wave (which I missed at first, because it is so low amplitude) at one end of the DC blocking cap, but the signal was extremely distorted at the other end of the cap. On my initial check, I measured just "flat line" (0.1V/div, 10x attenutaion at the probe) at the frequency sensor pins and concluded that the frequency sensor section of the motor controller chip is unused in favour of the external index circuitry. Only when getting deeper into it, I noticed that the index meter and the speed for regulation are two completely separate things. The actual signal is around 20 to 30mVpp, thus nicely visible at 0.01V/div, 1x attenuation, which is 100x more sensitive than the scope setting on the first inspection. The 0.1V/div, 10x were good to observe the oscillation of the reference crystal, though.

Reply 8 of 11, by maxtherabbit

User metadata
Rank l33t
Rank
l33t

The OP never specified a drive model, but I compared the motor PCB described here to my Alps DFL413C02B from my IBM 4865 External 3.5" drive and it's an exact match.

My drive apparently has a perfectly working motor PCB, just tested and I'm getting a 5Hz signal from the index wire (blue) but I am not getting an index pulse on the edge connector. Care to take a shot at reversing the logic PCB for me? lololol

Reply 9 of 11, by canthearu

User metadata
Rank Oldbie
Rank
Oldbie

Yep, I've had to replace the electrolytic capacitors on multiple different floppy drives. Some of them are non-polarized, so make sure you get the right ones.

The most notable replacement was for a HP PC-305 XT class machine. It uses a custom 1.44 floppy drive along with a special version of MS-DOS (Version 3.3 or 4.0) to correctly work with this floppy drive.

Using a normal 1.44meg Floppy drive results in only being able to use it as 720KB drive.
Using a normal version of DOS results in difficulty detecting 1.44meg floppy disks in this drive.

Thus, getting the original drive working was quite important, as replacing it properly would be a pain.

Reply 10 of 11, by mkarcher

User metadata
Rank Oldbie
Rank
Oldbie
maxtherabbit wrote on 2021-01-02, 18:17:

The OP never specified a drive model, but I compared the motor PCB described here to my Alps DFL413C02B from my IBM 4865 External 3.5" drive and it's an exact match.

My drive apparently has a perfectly working motor PCB, just tested and I'm getting a 5Hz signal from the index wire (blue) but I am not getting an index pulse on the edge connector. Care to take a shot at reversing the logic PCB for me? lololol

I'm sorry I forgot to mention the drive model. It's mentioned in the GitHub repository (actually already in the name of the repository, and thus in the picture URLs). It's a ALPS DFL413C04A.

Are you aware that the edge connector is supposed to have the index signal driven only if the drive is selected? So you need to ground DS1 (Pin 12) on the edge connector, otherwise the drive is passive on the Shugart Bus. If you lost the DS jumper (should be installed in DS1), you obviously can not select the drive at all.

Reply 11 of 11, by maxtherabbit

User metadata
Rank l33t
Rank
l33t
mkarcher wrote on 2021-01-04, 16:28:

Are you aware that the edge connector is supposed to have the index signal driven only if the drive is selected? So you need to ground DS1 (Pin 12) on the edge connector, otherwise the drive is passive on the Shugart Bus. If you lost the DS jumper (should be installed in DS1), you obviously can not select the drive at all.

Yes of course. I ended up grabbing another one of these drives (nonworking) off ebay for relatively cheap. I took its logic board and swapped it over to my original drive and its now working 100%. Ironically the second parts drive I bought has the same symptom as yours - I measure the index pulse off the motor board at about 13.2Hz or 792RPM. I could repair that motor PCB but meh since I would still only have one working drive either way. I'll save it for parts.