Offline
Newbie
Karma: 0
Posts: 4
|
 |
« on: February 16, 2012, 01:30:43 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #1 on: February 16, 2012, 03:32:39 pm » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 269
Posts: 25382
Solder is electric glue
|
 |
« Reply #2 on: February 16, 2012, 03:46:04 pm » |
I used a 1k Ohm resistor in line to all the outputs as recommended, Who recommends that, no one here. I can use standard outputs to talk to a TTL device right? Yes would removing the resistor give me better fidelity? Yes a 1K will stop it working like a TTL output.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Tesla Member
Karma: 71
Posts: 6596
Arduino rocks
|
 |
« Reply #3 on: February 16, 2012, 03:48:14 pm » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 269
Posts: 25382
Solder is electric glue
|
 |
« Reply #4 on: February 16, 2012, 03:52:43 pm » |
The other way round would possibly have issues. What would that be Mark?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #5 on: February 16, 2012, 04:08:17 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15295
Measurement changes behavior
|
 |
« Reply #6 on: February 16, 2012, 04:15:29 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 269
Posts: 25382
Solder is electric glue
|
 |
« Reply #7 on: February 16, 2012, 04:16:05 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Tesla Member
Karma: 71
Posts: 6596
Arduino rocks
|
 |
« Reply #8 on: February 16, 2012, 04:25:11 pm » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 269
Posts: 25382
Solder is electric glue
|
 |
« Reply #9 on: February 16, 2012, 04:31:46 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #10 on: February 16, 2012, 05:15:00 pm » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 269
Posts: 25382
Solder is electric glue
|
 |
« Reply #11 on: February 16, 2012, 05:17:12 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
|