Go Down

Topic: TTL using digital outputs (Read 4775 times) previous topic - next topic

I am new to this game, so please bear with me....  I built an arduino based system that reads in IR beam breaks and sends an output to a computer to read as a TTL.  I used a 1k Ohm resistor in line to all the outputs as recommended, but it appears to cause some variability in the final voltage going out.  I believe I need a 5V signal for at least 250 microseconds to be read as a TTL.  I currently have the "TTL" output turned to high for 200 milliseconds and then turn it to low.  However, when I use a voltmeter, sometimes I see 2V, and sometimes less.  If I extend the amount of time the output is on, I can reliably hit 5V, but this should not be necessary.  Additionally, this causes problems on the computer end, where it starts seeing multiple TTL pulses when I turn the output to high for longer.  please help!

1.  I can use standard outputs to talk to a TTL device right?
2.  would removing the resistor give me better fidelity?

Thank you.

I should specify that this system is set up such that HIGH = true.  Perhaps some of my issues come from the system not equalizing fast enough?

Grumpy_Mike

Quote
I used a 1k Ohm resistor in line to all the outputs as recommended,

Who recommends that, no one here.

Quote
I can use standard outputs to talk to a TTL device right?

Yes

Quote
would removing the resistor give me better fidelity?

Yes a 1K will stop it working like a TTL output.

MarkT

You are using 1k in series?  Try 100 ohms, 1k is much higher than any likely line impedance.  More information on how long the wiring is, whether its UTP, STP, coax or whatever.

TTL inputs will happily be driven by the Arduino no problem.  The other way round would possibly have issues.

I'm assuming the input circuit in the computer is standard TTL levels and you have common grounds?
[ I won't respond to messages, use the forum please ]

Grumpy_Mike

Quote
The other way round would possibly have issues.

What would that be Mark?

Thank you for the quick replies....here is more information.

I was under the impression that you should always have a resistor in series with an output line to prevent drawing too much current and damaging the arduino output.  I am using a common ground for four outputs.  Each TTL out has its own digital output connected to about 6 feet of unshielded, braided 22 gauge wire,  These lines are soldered to a coaxial pin as shown in the attachment.  I will try removing the resistor and seeing if it works properly.


retrolefty


Thank you for the quick replies....here is more information.

I was under the impression that you should always have a resistor in series with an output line to prevent drawing too much current and damaging the arduino output.  I am using a common ground for four outputs.  Each TTL out has its own digital output connected to about 6 feet of unshielded, braided 22 gauge wire,  These lines are soldered to a coaxial pin as shown in the attachment.  I will try removing the resistor and seeing if it works properly.




The use of a series resistor on a arduino output pin is to ensure that whatever load you are driving with the signal cannot force the output pin to pass more current then the pin can safetly handle. So to say if you should be using a resistor and what value it should be, we would have to know what you are wiring that pin to. So, no it's not always required to have a series resistor, but one can use say a 200 ohm resistor just as a safety feature like the Rugged Circuits version of a bullet proof arduino board does on all it's I/O pins.

Lefty


Grumpy_Mike

Quote
I was under the impression that you should ........

No, the maximum current output is 40mA sourcing or sinking. TTL, depending of the type normally needs a 2mA sink, that resistors prevents the voltage going to the value for a logic zero.

MarkT


Quote
The other way round would possibly have issues.

What would that be Mark?


TTL schottky minimum guaranteed output voltage for HIGH is 2.7V (or 2.4V for buffer outputs).  Arduino minimum input voltage for HIGH is 0.6Vcc (3.0V).  1k pullup needed to interface to CMOS style inputs was the old recommendation wasn't it?
[ I won't respond to messages, use the forum please ]

Grumpy_Mike

Yes but in practice the voltage high only sagged that much when you were drawing a lot of current from it, which when you are feeding into a CMOS input you weren't. This was only an issue when feeding a CMOS input and another of load.

I took out the series resistor and it looks like everything is working, so thank you!  To be certain I have accurate communication, should I use a pull-down resistor prevent noise triggering a signal.  If so, whaat size is appropriate?  I believe this entails connecting the output pin to ground with a resistor...correct?


Grumpy_Mike

Quote
should I use a pull-down resistor prevent noise triggering a signal.

No, it won't help.
If anything a pull up of 4K7 at the remote end would help your noise margin.

Go Up