0
\$\begingroup\$

In a project I am using a 74LS05 to provide an ESP32 microcontroller with 6 open-collector outputs. Actually this is fine for 5 of the outputs, but for the remaining one I'd rather have a full push-pull driver, since the rise time I currently have is still too high (and I am already using a 470 ohm pull-up resistor).

I cannot use an ESP32 output directly since the output needs to be at +5V when high.

I'd like to keep the solution as simple as possible. I was thinking that maybe I could add an external BJT or MOSFET to "complement" the open-collector output but I have no idea of how to do that.

Any hints?

EDIT: Here's some additional info:

  • I don't want to add a 74xx04 for just one output, the other 5 outputs are fine open-collector-style.
  • I am using LS logic because the project is retrocomputing-related. I could switch to an HCT but would that change much?
  • I don't know the exact characteristics of the input I have to drive. it's the right mouse button input of the Amiga Paula custom chip, which is notoriously hard to drive.
  • I can take some measurements with a scope if that helps.
  • On a different project I am driving the same input straight from an output pin of an AVR microcontroller and in that case the signal rises "immediately".

EDIT2: Here's an old scope screenshot showing how slow the signal is rising (blue). It needs to be high before the following clock rising edge (yellow). I can't remember what pull-up value I was using when I took this screenshot though, maybe 1k or 820 ohm.

enter image description here

\$\endgroup\$
19
  • \$\begingroup\$ The ESP32 can't drive the 74LS05 directly.It might be simpler just to use 5 mosfets & resistors for the OC outputs and something like a 74HCT04 for the push-pull output. \$\endgroup\$
    – Kartman
    Apr 18 at 12:48
  • \$\begingroup\$ You must define C load @ 470 =R and max rise time. No good reason to use LS TTL. \$\endgroup\$ Apr 18 at 12:49
  • \$\begingroup\$ @Kartman What is the reason you say that ESP32 cannot drive a 74LS05 directly - I think it can, very well. \$\endgroup\$
    – Justme
    Apr 18 at 12:56
  • \$\begingroup\$ Use a 74LS04? Why would you want anything other than the obvious solution? In other words, you need to be a lot more clear about your requirements and constraints. \$\endgroup\$
    – Dave Tweed
    Apr 18 at 13:09
  • 1
    \$\begingroup\$ @TonyStewartEE75 I didn't have a 270 R so I tried with 220: did not work, looked like the line couldn't be pulled down. So I switched to 330 and things started to look better. Then I realized I could put 1k5 in parallel to get 270 and so I did. Now the signal gets to around 4V before the next clock edge, which seems to work fine and leave a decent margin. Here's a pic: dropbox.com/s/gvuk4us3aqka1z8/…, grey line is with 330, blue is 270. So thanks a lot for helping find the smallest pull-up value I could use. \$\endgroup\$
    – SukkoPera
    Apr 22 at 21:00
1
\$\begingroup\$

Adding a MC74VHC1GT50 to an open-collector with pullup resistor output, will give a TTL level output which can source/sink 8mA. It is one 6 pin surface mount chip.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks, this might be a way but I feel a bit dirty adding a SMT component to a 100% THT board. That's why I was looking for a way to do it with a discrete transitor. \$\endgroup\$
    – SukkoPera
    Apr 18 at 20:58
0
\$\begingroup\$

The analog characteristics of logic are computed by the. Vol/Iol and Vil/Iil output and input low impedance ratios. All TTL families differed in speed and power yet maintained a 10:1 fan-out ratio. This applies to both current and resistance.

The 74LS05 is an inverting Open Collector with an output saturation resistance of 25 Ohms maximum ( 400 mVmax/16mA) and an input Vil Resistance if 250 Ohms minimum (400mV/1.6mAmax). the input voltage threshold for all TLL is two Vbe drops or 1.3 but for noise power immunity, the thresholds were defined safely as “0” = <= 0.8V and “1” = >2.0V.

Similarly impedance for 3.3V logic has been designed for 22 Ohm drivers @ 3.0V and this lowers slightly at 3.6V.

Thus you can get superior performance driving LS logic directly from 3.3 V CMOS logic such as the ESP32 family. If for any reason your wires are too inductive, and ringing causes logic errors, this can be well-damped pulses with same risetime by adding 50 to 150 series from 3.3V logic to drive say a 240 Ohm ribbon cable or twisted pairs.

For open collector outputs or switch contacts from the joystick, you just need any suitable pullup R’s.

Thus there is no need to add redundant interface circuitry to drive a TTL Joystick from 3.3 Logic.

\$\endgroup\$
16
  • \$\begingroup\$ Thanks for your effort, I appreciate it. Unfortunately, I probably didn't explain myself well enough, as this does not answer what I was asking. I can drive the direction and button 1 pins well enough, I have problems driving pin 9 when emulating a CD32 controller. This pin ends into an ADC built in Paula and has weird driving characteristics that make signals rise very slowly . Please see the question again, I have added a few details. \$\endgroup\$
    – SukkoPera
    Apr 18 at 20:52
  • \$\begingroup\$ Not enough details . Can you use this to define which 📌 on here i.stack.imgur.com/eoqMp.png. there are shunt caps to intentionally slow down rise time. If you don’t explain the specs, how can anyone understand if what you expect is correct. Anyways the ESP32 has 22 ohm drivers so the rise time and fall time will be just as fast if that’s what you need. \$\endgroup\$ Apr 18 at 21:18
  • \$\begingroup\$ Ignore the -1 lame. Vote \$\endgroup\$ Apr 18 at 21:20
  • \$\begingroup\$ It's the POT0Y or POT1Y signals. The ESP32 cannot bear with the pull-ups to +5V that are inside the Amiga (Resistor Network R370), that's why we resorted to using a 7405. Please have a look at my project (and scope trace above) and suggest the simplest way to get a quicker rising signal, that's the only problem I have left. \$\endgroup\$
    – SukkoPera
    Apr 18 at 21:22
  • \$\begingroup\$ POT0Y or POT1Y on pins 9,5 do not connect to R370 pull-ups on Pins 1 to 4 . Which one is it again? To drive 5V with 4k7 pullup to 2V =logic “1” you pull down to gnd with 3.3k to get 2V then the 22 Ohm 0 to 3.3 V driver pulls down below 0.8V and above 2V to 3V from 3.3 to be compatible. \$\endgroup\$ Apr 18 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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