Data recovery using microstepper

Stepper drives have issues with the head drifting off the track center with aging. This happened some when the drives were new and programs such as SpinRite were sold that reformatted the tracks without data loss to compensate for position drift and other issues. With old drives head stiction and other problems can cause some heads to be entire cylinders out of position. Servo drives can have similar head position problems now

To recover some drives I used a SparkFun TC78H670FTG microstepper board. This will work with two phase bipolar stepper motors which is what the stepper drives I was trying to recover data from had (4 wire). I also wired up a 74LVC00 I had around to get the track 0 sensor output. The first drive I tested with was doing something strange driving the sensor so none of the signals changed when the interrupter entered the sensor when driven by my board. When it was operating under drive control the signals did change. To deal with this I moved the heads manually with software and tried to avoid hitting the head stop too much.

I thought about using relays or other switches to allow switching between the drive controlling the stepper and my board controlling the stepper. Since some drives reported faults on power on it wouldn't help with them. The SparkFun board warns about disconnecting the stepper with power on. If you try switching the drive, TVS diodes or similar should be used on the motor to clamp the inductive voltage kick you get when the leads are opened with current flow.

An issue you get with the drive not being able to drive the stepper is it will decide it has an error. Some drives shut off the read path when this happens. The TM503 I was working with does this. It had schematics so I was able to determine which pin I needed to lift and tie high to enable the read path.

The Stepper 3.02-stepper code is here. The Stepper 2.40-c code is here 3.02 should be fine but leaving old code around in case its useful. It's based on the DAC servo code so has that in the code but can't currently be used for both. I don't plan to maintain this code unless I find I need to update for my own purpose. I will answer questions for people trying to use this. Build this code using make and run this copy of setup_mfm_read. Using this will have a learning curve.

See comments at top of drive_read_stepper.c for wiring the stepper driver board. Also may need to set various #defines for your drive. The Miniscribe was using a half step technique so with the TANDOM_TM503 values stepped two cylinders when it should have stepped one. The #define settings compensate for this. Seagate ST-225 also uses half step.

You need to adjust the pot on the stepper board to set the proper current. To set the current to X amps adjust the pot to set VREF to X volts. One of the motors was labeled 1/2A 12V. That's what I used for all of the drives.

To use this you need to move the heads to cylinder 0 or before. Heads should only be moved while drive is spinning. You can move the heads with --step option on mfm_read command line. Positive values step to higher cylinders.

You need to figure out the format before trying to use this so you can specify the format on the command line. Use the normal mfm_read --analyze to get the proper command line. Then use that command line with this version. Don't try to use --analyze with the stepper code.

The approach the code uses is it searches down the disk using head 0 until it finds cylinder 0. It then uses that position as the reference. It then steps the heads back and does same for the rest of the heads until it finds the offset for each head. It then reads the disk and if gets read errors steps up to +- 1/2 cylinder around the last good offset until it gets a good read or gives up. It averages the offset needed for good read so hopefully for the next cylinder it gets a good read without searching. If the head is far from the correct cylinder you may need to increase retries so it doesn't give up too soon.

Note that much of the drive status checking is ignored since drive will fail self test the way I am using it so won't report ready. If you specify the wrong drive number it won't tell you.

Command line for one of the drives I was working with.

./mfm_read --drive 2 --format WD_1006 --sectors 17,1 --heads 6 --cylinders 809 --header_crc 0xffff,0x1021,16,0 --data_crc  0xffffffff,0x140aa0445,32,6  --tran /tmp/t --retries 64,0
If you get output like Mismatch cyl 0,383 head 0,0 index 0 then use --step -383 to move heads back to cylinder 0.

Seagate ST-251 and some other models use 5 phase stepper motor which needs a different driver. I used a Autonics MD5-HD14 I got cheap used. The 3.02 code supports that and related drivers. It also adds a new method t o read the disk. Instead of trying to find proper offset for each track in just reads each microstep position. Takes long time and generates large file but if their isn't an optimal position for the tracks this will recover all the sectors when the previous method won't work. New method is controlled by READ_ALL_STEPS in drive_read_stepper.c. Comments in the code on how to use. New method should work with the other stepper driver also. Similar command line except --ignore_seek_errors also used.

Some of the drives I was working with had frozen stepper motors. I put some oil on the outer bearing and let drives sit a day. I then powered on and unplugged and plugged them back in quickly to get them to try to seek. I pushed on the interrupter some while it was trying to seek. They eventually freed up. Some then failed with track 0 sensing errors after this procedure. I was able to fix that by loosening the interrupter and slightly moving and then power cycle until they initialized OK. I should have marked the original location since only needed a small shift. Probably would be better now that I have the microstepper board to use it to move the heads until stepper is free. There are various video and pages on how people do this.



Feel free to contact me, David Gesswein djg@pdp8online.com with any questions, comments on the web site, or if you have related equipment, documentation, software etc. you are willing to part with.  I am interested in anything PDP-8 related, computers, peripherals used with them, DEC or third party, or documentation. 

PDP-8 Home Page   PDP-8 Site Map   PDP-8 Site Search