1
\$\begingroup\$

In a design for the popular "gotek" floppy drive emulator, as per the standard, the outputs from the floppy emulator are open-collector.

An STM32 is used as the processor. This drives a 74HC04, which then drives MMBT2222A NPN transistors through a 1k resistor as the open-collector outputs.

On just one of these six drivers (the serial DATA_OUT from the floppy emulator), there is a schottky diode across the base resistor. What is the purpose of it?

My guess is that it causes the transistor's base capacitance to discharge quicker when the HC04 goes LOW, so this driver will switch off quicker than the others? (I'd think this level of timing precision wouldn't be needed for floppy drives).

enter image description here

On a side-note: I am developing an enhanced version for vintage computers (original is very basic without modifications). I am trying to optimize the design. Based on looking at what other floppy drives use to drive the open-collector outputs (often a 7438), I should be able to use a 74LVC07, or a 74HC07 with 3.3V powering it, and do away with the transistors? Or am I missing something important. Or the safe option: use the original design (but use HCT04 instead).

A 5.25" floppy drive on the same open-collector "bus" can have 150-ohm pull-ups. This would cause significant current that would be pushing a logic IC, so I wonder why floppy drives get away with using 7438 as the driver.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ It's a bit of a bodgy way of doing it given that the main thing to avoid is BJT saturation and this doesn't address that problem. \$\endgroup\$
    – Andy aka
    Commented May 31, 2020 at 12:29

1 Answer 1

2
\$\begingroup\$

Your guess is correct, it is there to turn off the transistor faster. The speed does matter, as the bit rate is 250 to 500 kbps, and typically the low pulse length is approximately 500ns, at least in the 150ns to 800ns range.

You can't use a 74HC07 with 3.3V supply to interface a 5V bus. The LVC07 seems like a better choise. Anyway, a design with 5V powered 74HC04 and driving the input with 3.3V signal from MCU is bad design, but as many STM32 devices have 5V tolerant IO pins, the MCU pins might be pulled up to 5V with a resistor so it can drive a 74HC04 input just fine.

\$\endgroup\$
3
  • \$\begingroup\$ The inputs to the STM32F105 from the floppy controller are direct. It does have 5V-tolerant inputs. Ahh yes I forgot that 74HC doesn't like higher voltage than VCC on inputs, but 74LVC usually allows that. The original design does not have pullups on the 74HC04 - it's not a great design - HCT should be used. I am leaning on using the LVC07, but it will have to drive 33mA in some machines, on more than one pin sometimes. This is out of spec. I must be missing something. Real drives use 7438 gates as driver, which would still be out of spec with more than 2 pins driving. \$\endgroup\$
    – Mono
    Commented May 31, 2020 at 12:54
  • 1
    \$\begingroup\$ I doubt that the Schottky diode improves the turn off time, in this application. Typical base-emitter capacitance for a 2N2222 transistor is around 25 pF. Coupled with the 1K base resistor gives a time constant of 25 ns. This is not that same a big MOSFET with a couple of thousand pf's of gate to drain capacitance. Looks like this was just lifted from a MOSFET design and someone decided to change out the transistor. \$\endgroup\$
    – SteveSh
    Commented May 31, 2020 at 13:03
  • \$\begingroup\$ @SteveSh interestingly, the schematic I am using does have unidentified MOSFETs instead of BJTs. But all the goteks i've ever seen, and had friends confirm, have MMBT2222A (SOT-23 package with "1P" marking). I've removed one to confirm this. Yet the other parts used are not bottom-grade so it's probably not a cost-cutting measure. Even if there was a MOSFET once upon a time, it would be a tiny SOT-23 one. \$\endgroup\$
    – Mono
    Commented May 31, 2020 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.