BMOW title
Floppy Emu banner

Current Limiting, Part 3

I’ve been searching for a simple and reliable way to prevent a short-circuit on Yellowstone’s -12V supply when a particular type of Macintosh disk drive is connected. Connecting this drive results in a +5V to -12V short circuit, but if the short is removed, the drive otherwise works just fine. One obvious solution is to put a series resistor on the -12V supply connection. For example a 1.7K ohm resistor would limit the short-circuit current to a safe 17V / 1.7K = 10 mA. But a series resistor on the -12V supply for Macintosh drive protection would obviously screw up other types of drives, by making the supply appear to be something other than -12V volts. Obviously. Or maybe not so obviously.

When I actually tested it, I was very surprised by the results. As far as I know the -12V supply is only used by Disk II drives. A 1.8K series resistor on the -12V supply for a Disk II drive resulted in an apparent supply voltage of -8.7V, but the drive still worked fine. I then tried larger value resistors resulting in “-12V” supply voltages of -6.5V, -5.0V, and -0.8V, and everything continued to work. Even at +3.7V the drive continued working, but I/O was slightly slower than normal, suggesting that a high number of retries were happening. The drive finally failed after I reached 100K ohms and +6.9V for the so-called -12V supply.

How can this be? How can the -12V supply voltage accuracy matter so little? What is it used for?

Looking at the schematic for the analog board of a Disk II drive, -12V is only used in one spot, at one terminal of a 10K potentiometer at the bottom-right. It’s part of an analog reference adjustment for the MC3470, the drive’s floppy disk read amplifier circuit. Pages 7-119 to 7-120 of the MC3470 datasheet describe how it adjusts the differential amplifier that’s used to detect peaks in the AC signal from the drive’s read head.

As best as I can tell, if the -12V supply voltage is incorrect, it will result in “peak shift”. The boundaries between bits will appear to shift slightly forward or backward from where they’re actually located on the disk. A small degree of shift won’t cause any problems, but eventually it will reach a threshold where bits begin to be read incorrectly, resulting in errors.

For the past week I’ve been researching and discussing current limiting circuits, current mirrors, and supply switching circuits. Can I forget about all that stuff and simply put a 1.8K resistor in series with the -12V supply? These test results say “yes”, but I’m still somewhat hesitant.

Hesitancy #1 is because I don’t know what the worst case might be. Maybe my Disk II drive isn’t representative of others. Maybe there are other types of drives (DuoDisk? Two daisy-chained Unidisk 5.25 drives?) that use the -12V supply in ways I don’t know about, or that will result in bigger voltage errors for the same series resistance.

Hesitancy #2 is because even if it works in tests, any error in the -12V supply voltage will cause some amount of peak shift, which might be the difference between a badly-degraded floppy disk working and not working. It’s a little like throwing away part of the noise margin for digital signals. It may still work fine for most situations, but when things are already working poorly for other reasons, it could be enough to tip the result into failure.

On the other hand, maybe the simplest solution is best. If it works in tests, even with series resistor values far larger than the ones I’d actually need for current limiting, then what’s not to like about this solution?

Read 7 comments and join the conversation 

7 Comments so far

  1.   - July 18th, 2021 11:40 pm

    Also somewhat dangerous, but if you’re really sure that this is the only board that does not connect “-12V” to a 5 V rail, you could take advantage of that board’s schematic.

    Assuming the 10 kΩ pot’s middle terminal is loaded with a sufficiently high impedance, you could use a -18 V supply with a 2.5 kΩ series resistor. That way, the “-12V” line will indeed be at -12 V, and in the shorted-to-5-V case, there will even be slightly less waste current.

    That’s assuming you don’t need the -12 V supply for anything else, so you can replace it with a -18 V supply at no extra cost.

  2. Tux2000 - July 19th, 2021 5:03 am

    @Anonymous:

    No, you don’t want to connect -18 V to a line specified as -12 V, not even via a series resistor. Yes, the Disk II will probably work fine with -18 V and a series resistor. But what about other drives? You simply don’t know! Some components are extremely sensitive to voltages outside the spec, and start misbehaving or releasing magic smoke. Yes, a series resistor prevents excessive current on the -12 V line when feed -18 V. But if you destory a transistor in an integrated circuit by applying -18 V instead of -12 V, that may cause a latch-up, which kills the IC using power from one of the other supply lines.

    Apart from that: From where do you want to get that -18 V? I doubt the Apple has a supply voltage more negaive than -12 V. So you would need a DC/DC converter, and to make things worse, it must either work with positive ground, or it must be an isolated converter with no galvanic connection between input and output. Both aren’t cheap, neither as a ready-to-use module nor as individual components. Also, any switch-mode supply creates extra noise on the supply lines. Given the fact that the Apple connector has only one ground pin, and needs capacitors even at unused supply lines to compensate for that, you really DON’T want a switch-mode supply on an extension card.

  3. Tux2000 - July 19th, 2021 5:20 am

    Minimal-cost approach:

    Add one current-limited resistor per drive connector, something like 2.2 kOhm. Your tests suggest stable behavoir with 2.2 kOhm. Current through Mac drives will be limited to 7.72 mA, 132 mW at the resistors. Add a two-pin jumper header in parallel to each of the resistors, and document that placing the jumper will bypass the current limiting resistor, supplying problematic Disk II drives with full -12V, but make the Yellowstone incompatible with Mac drives.

    That way, the Yellowstone should work fine in the common case, but allows users to choose.

    If your calculation allows to spend a few extra cents, you can even avoid burning 132 mW:

    Use a three-pin jumper header per drive connector, connect pin 9 to the mittle pin, connect one of the outer pins directly to -12 V, connect the other outer pin via 2.2 kOhm to -12 V, place the jumper cap so that pin 9 is connected to the resistor, and document the connector as following:

    “Factory default position of the jumper cap limits current, should work with all drives. Other position supplies unlimited -12 V to problematic drives. Remove jumper cap or place it on only one pin when a Mac drive is connected to avoid heating up the current limiting resistor. If in doubt, leave the jumper in the factory default position.”

  4. Steve - July 19th, 2021 8:52 am

    Ultimately I think this is a subjective engineering question without a “right answer”. Is it OK to modify the -12V power supply connection in response to the internal workings of the disk drives that are expected to be connected to Yellowstone? Or must it have a true -12V supply that can accommodate unknown types of drives, even drives that are not yet invented?

    I’m still undecided, but I think a simple series resistor is probably the way to go, combined with an optional bypass jumper like Tux2000 suggested. I don’t see a strong reason to use a more complex circuit or a current limiter, when testing says the series resistor works OK for the Disk II, and even the more complex circuits are making assumptions about the Disk II internals. If the user wants “no assumptions” behavior, they can install the optional jumper to get the full -12V, but in practice I don’t think that will ever be necessary.

    On a related topic of current limiting, I recently revisited the 74LVC245 bus driver, that was causing occasional problems when driving large switching currents on the data bus. I had already mitigated the problem through firmware changes, but I said I was also going to replace the chip with a 74LVCR2245, which has integrated 27 ohm series resistors to limit current. I changed my mind about that, and added external resistors instead, so I can keep the regular 74LVC245. Because the resistors are external, I can choose whatever resistance I want, and the 74LVC245 is cheaper and more widely available than the 74LVCR2245. I’m not sure what resistance value to use, but since this is a slow 1 MHz data bus, high performance isn’t critical. I plan to start with 33 ohms and see how it goes.

    I have disabled some of the spam filters for comments. We can see if this helps, or if the blog quickly fills with robo-comments about sunglasses and shady investments.

  5. Mike Jetzer - July 22nd, 2021 9:10 am

    I know that certain computers (IIGS ROM 03, IIc Plus, Apple IIc Card for the Macintosh LC) can’t use the UniDisk (A9M0104), instead requiring the Apple 5.25 Drive (A9M0107). Although I cannot locate a reference, somewhere I thought I read it was because the UniDisk required -12V. If that is the case, I wonder if the Disk IIc also requires -12V, as I believe it predates the UniDisk.

    Again, this is just something I think I recall but which I cannot verify.

  6. Steve - July 22nd, 2021 9:27 am

    That might be right. I remember reading something similar, and I was just searching for it again yesterday, but couldn’t find whatever it was I’d read. It was something about the history of floppy drive development for the Apple II family. From memory, I think it said the Disk II required -12V, and so did the Unidisk 5.25, but none of the later drives required -12V. I don’t remember if it mentioned the Disk IIc.

  7. Steve - July 22nd, 2021 9:45 am

    According to http://wiki.apple2.org/index.php?title=A2_5.25_Drives_(19_Pin) the incompatibility of some Apple II models with those drives isn’t related to -12V, but is a software thing:

    “The reason drives may not work with the IIgs ROM 03, IIc Plus or Macintosh LC //e emulator card is because around the introduction of the Apple IIc Plus, Apple changed the Smartport protocol to where each device hooked to it, (be it 5.25″ drive, 3.5″ drive or a Smartport compatible hard disk) needs an ID Byte. The UniDisk 5.25″, DuoDisk and most 3rd party drives DO NOT CONTAIN this needed ID Byte rendering such drives unusable with the newer Smartport protocol.

    The difference is due to the way Apple implemented the Write Protect circuit on their own disk drives. The Apple design integrates the Stepper Motor Phase 2 in the write protect status detection where as many third party drive manufactures used a simple ground to complete the circuit. Incompatible drives on these models will just spin at startup, the recalibration will not take place. However placing a disk into the drive enough to pass the Write Protect switch, or a write protected disk, before turning on the computer will allow the drive to boot. Thus it is possible to use incompatible third party drives with the IIc Plus or ROM 3 in a constant write protected state.”

    Based on what I know about those drives, I think the part about an ID byte is incorrect. The problem is that those drives are incorrectly detected as being intelligent Smartport drives instead of dumb 5.25 inch drives, because of the way they handle the write-protect signal, which is also used for Smartport communication.

Leave a reply. For customer support issues, please use the Customer Support link instead of writing comments.