Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

TTL-Switch

Solved!
Go to solution
Hello everybody,

i have a question concerning a "Digital-Switch" i need for my work.
 
Is it possible to create a TTl-switch by using a digital output and a analog- or digital input channel?
The idea is to generate a constant "High" on the digital output and to measure High or Low, depending on the condition of the switch, with a digital or analog input.
I have attaced a drawing to point out what i mean.
Do i risk any damage to the equipment if i use this circuit?

Greetings
0 Kudos
Message 1 of 5
(5,145 Views)

 

First, I do not think that your circuit will damage anything. The output voltage of the digital output will never be higher than the supply voltage of the digital section of the board, and since the digital input circuitry is supplied from the same source, input voltage never will exceed the supply voltage. On the other hand, probably your circuit will not work. If the input circuitry is completely TTL-compatible, the circuit sending a low level signal to it has to sink some current (less than 1mA) from the input, otherwise it will still detect a high level. I am not familiar with the board you are using but virtually all digital inputs on NI boards I have encountered have pull-up resistors which will make them "see" a high level if the input line is interrupted. This pull-up-resistor, on the other hand, eliminates the need for a voltage source (like your "constant high digital output"). It is sufficient to connect a switch (or switching circuitry with low impedance and/or low saturation voltage) between the digital input and DGND. If the switch is open, the pull-up resistor will "automatically" provide a high-level input. If the switch is closed, the switch provides the current path to GND required by TTL specifications and thus a low-level will be detected. 

Message 2 of 5
(5,138 Views)

Thank you for the reply.

 

You were right! I only need to connect the switch to a DI to achieve what i want!

But that brings up another question. Pherhaps you can help me with that, too.

 

When i connect the switch to a AI and AI GND, the voltage floats to -10V, which is the minimum input voltage i have configured. When i close the switch it jumps back to 0V. Can you explain this to me? 

 

Greetings

GT

 

0 Kudos
Message 3 of 5
(5,134 Views)
There are many different configurations possible for an analog input of a data acquisition board, and in any case of doubt you should refer to the manuals of your device. Usually analog inputs do not have such a thing like a pull-up resistor, and when the input is open (i.e. nothing connected to it), theoretically it may yield random readings since the (usually) high-impedance input will pick up noise from the environment. Also, analog inputs usually require a bias resistor connected from the analog input to AGND to provide a bias current (in the range of micro-amps or even less) to the input amplifier. Similar to a plain operation amplifier, an analog input needs this bias to work properly. If there is nothing connected between AI and AGND, without a bias resistor the readings usually are at any end of range, since the voltage droop across the non-existent (and hence infinite) resistor will be quite high. So make sure that there is ALWAYS a path to AGND which will provide the (rather low) bias current to the input. The maximum value of the bias resistor usually is indicated in the manual. 
0 Kudos
Message 4 of 5
(5,128 Views)
Solution
Accepted by topic author GT-Combustion

OK, i think i got it.

Thank you for your help!

0 Kudos
Message 5 of 5
(5,125 Views)