BMOW title
Floppy Emu banner

Circuit Fixes and Pulldown Problems

I’m continuing work on the daisy chain adapter concept for Floppy Emu, and I’ve run into a problem. There’s a pulldown resistor on the Floppy Emu board that’s too weak (resistor value is too large) to reliably pull the voltage all the way down to the logic low threshold. This causes upstream drives and computers in the daisy chain to sometimes mis-detect what type of drive the Floppy Emu is currently emulating, resulting in a malfunction of the whole chain. I’d like to add some extra circuitry between the Emu and the upstream drive to fix this problem, but the details are complex and I haven’t found any great solutions. Here are some diagrams to illustrate what’s happening:

Figure 1 shows a Floppy Emu connected directly to an Apple IIGS.

Figure 2 shows a Floppy Emu daisy-chained to an Apple 3.5 Drive, A9M0106.

Apple designed a disk interface with double-purposed signals. Depending on the disk drive type, the data signal EN35 is either an input to the drive (3.5 inch drives), or is pulled low by the drive (5.25 inch and Smartport drives). The double use requires an open drain driver or inline resistors, to avoid potentially shorting power to ground if both ends drive the signal with different values.

For equipment that’s “3.5 inch aware”, it can detect whether a daisy-chained drive is a 3.5 inch drive by monitoring the voltage of EN35. The SR latch in figure 2 shows one example. At reset, it assumes the daisy-chained drive is not a 3.5 inch drive. But if EN35 is ever observed to go high, then it knows the daisy-chained drive *is* a 3.5 inch drive.

 
Need More Pulldown

On a real floppy drive’s input, EN35 is either connected to an input buffer or tied directly to ground. But Floppy Emu can do either one, depending on the emulated drive type, and that’s where the problem appears. To protect the Emu’s CPLD chip when EN35 is treated as an input, there’s an inline protection resistor of 1K (Model B) or 330 ohm (Model C). When the Emu wants to pull down EN35, it must do it through that resistor. This forms a voltage divider with the resistor in the upstream equipment, preventing the EN35 voltage from being pulled fully to 0 volts.

In figure 1, with the Model C’s 330 ohm pulldown, the voltage at Vt is pulled down to 2.0 volts. That’s not low enough for equipment (like my proposed daisy-chain adapter) to detect as a valid logic low. With the Model B’s 1K pulldown, the situation is worse, and the voltage at Vt is only pulled down to 3.3 volts. When the pulldown is inactive, the voltage measured at Vt is about 4.9 to 5.0 volts.

In figure 2, with the Model C’s 330 ohm pulldown, the voltage at Vt is pulled down to 0.49 volts. That almost works, with correct behavior about 75% of the time. On the Model B with the 1K pulldown, the voltage at Vt is only pulled down to 1.16 volts. That’s not low enough, and the circuit doesn’t work correctly. By butchering a board and testing various resistances, I found that a 200 ohm pulldown works reliably.

 
Potential Fixes

I’m in search of a magic circuit that can be inserted between Floppy Emu and the upstream device, that will fix this ugly problem:

When Floppy Emu is driven from the Apple IIgs as in figure 1, I can control both the “magic circuit” and the buffer used to sense the EN35 voltage, so a solution is relatively simple. But finding a solution that works with the Apple 3.5 drive (figure 2) is more difficult, because that feedback path to the SR latch is outside my control.

Passive Resistors – How about adding an extra pulldown resistor to bias the EN35 voltage lower? Or some kind of voltage divider? I don’t think that can work. An extra pulldown would need to be fairly strong in order to pull EN35 to a reliable logic low, so it could no longer reach a reliable logic high.

Voltage Controlled Pulldown Booster – Maybe the magic circuit could monitor the EN35 voltage, and if it ever went below ~3.5 volts, the circuit could activate a second strong pulldown to bring the voltage to 0 volts. The problem with this idea is that it would create a feedback loop. Once the second strong pulldown was activated, it would hold the voltage at 0 and keep itself activated forever.

Current Controlled Pulldown Booster – Maybe the magic circuit could monitor whether more than 1 mA is flowing into the Floppy Emu, meaning that the pulldown is active. Then it could engage a pulldown booster of some type to bring the voltage to 0 volts. This sounds like a job for a BJT, perhaps, but I’m not sure. Once the second pulldown was activated, I think all the current would flow through that pulldown instead of to the Floppy Emu, causing the booster circuit to shut off again. Maybe there’s a solution here, but I don’t see it.

Bidirectional Level Shifter – I’m not actually doing level shifting here, but level shifters have the useful property of electrically isolating the two sides. The classic bidirectional shifter based on an N channcel MOSFET won’t work here, though. It prevents a high voltage from damaging a lower-voltage circuit, but does nothing to help if a low voltage source is too weak. Maybe there’s a solution based on some other bidirectional isolation technology?

Op Amp, or Diode – Sure, why not? Now I’m just naming random electronic components, hoping for a solution. Try enough permutations, and something must work…

 
Final Thoughts

The only plausible path that I see right now is a state-based solution, similar to the SR latch that’s in the Apple 3.5 drive. This could be used to enable one of two buffers that isolate the sides of the circuit, such that the direction of data flow is always definitively in one direction or the other. Data flow would be assumed to go from the Floppy Emu to the upstream device until proven otherwise. And a weak pullup on the Floppy Emu side would compensate for the weak pulldown.

I’m not thrilled with this solution, because it’s state based, requires reset circuitry, and overall seems cumbersome. I’ll elaborate more in a future post. Meanwhile if you have other suggestions, please leave a note in the comments box.

Read 7 comments and join the conversation 

7 Comments so far

  1. Tux2000 - March 7th, 2019 1:45 pm

    If you have a spare output on the floppyemu, use that to control a simple, generic n-channel MOSFET that ties tha Apple EN35 line directly or via a small \”angst resistor\” of 100 Ohm or less to GND.

    In other words: The \”Magic Circuit\” would contain the MOSFET, with source connected to GND, the \”angst resistor\” between EN35 and drain, a pull-down of about 100 kOhm between gate and GND, and a series resitor between gate and the spare floppyemu output of about 1 kOhm.

  2. Steve - March 7th, 2019 2:07 pm

    The pinout of the disk connector is standardized, so unfortunately I can’t rely on any extra signals from the Floppy Emu board.

  3. acat - March 7th, 2019 6:19 pm

    Why not try something like this? http://tinyurl.com/y3l33k7o

    (link edited by Steve for readability) http://tinyurl.com/yxjlguut

  4. Jerry - March 7th, 2019 6:24 pm

    So what\’s the problem with a 200 Ohm or 100 ohm resistor on the FPGA I/O. What are you trying to protect it against?

  5. Jerry - March 7th, 2019 6:34 pm
  6. Steve - March 7th, 2019 10:36 pm

    The problem with a 200 or 100 ohm resistor is that it’s not what’s on the Floppy Emu Model B or C boards. 🙂 I could switch to that for future boards, but it wouldn’t help the thousands of Floppy Emus that have already shipped.

    acat, I fixed the link you posted to your falstad circuit (use the “create short URL” option when you export the circuit as a link). But I don’t think it matches the situation at hand – there’s shouldn’t be any direct path through the CPLD to ground.

  7. Tux2000 - March 8th, 2019 9:35 am

    I meant to put the extra transistor on the floppyemu board, not between board and Apple.

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