Template:X-Series/IO Usage

From ZaberWiki
Jump to navigation Jump to search

I/O Usage and Examples

The {{{Device}}} features a range of flexible input and output options that can be easily examined and controlled from user software. The input and output capabilities of the {{{Device}}} can also be used with triggers to perform actions based on the current value of the I/O channel.

To minimize the number of power supplies needed, the on-board +5V and GND connections can be used as non-isolated power supplies for I/O circuitry as long as the current draw remains below 150 mA.

Digital Inputs

The digital inputs on the {{{Device}}} are fully opto-isolated and bi-directional, giving added flexibility when interfacing to external equipment. The two examples below demonstrate how the common line can be connected to a power rail or to ground, depending on the application.

Digital Input Usage

Each digital input contains an internal current limiting resistor of 442 ohms. While this value is suitable for driving the inputs with 5V (as shown in the circuit above), higher voltages will require the addition of a series resistor. A list of recommended values for the external resistor and example circuit are shown below.

Digital Input Usage

V_SUPP (V) R_EXT (Ohms) Power (mW)
0 - 8 0R n/a
8 - 15 500R 125mW
15 - 24 1500 250mW

The circuit above also shows how to interface with an open collector output from another device. Reading the inputs is accomplished by sending the unit an io get command, as shown below.

/1 io get di↵
@01 0 OK IDLE –- 0 0 1 0
/1 io get di 1↵
@01 0 OK IDLE -- 0

The first command queries all inputs on the device and shows that input 3 is high and all others are low. The second command queries a specific input on the device, in this case input 1, which is low.

Digital Outputs

All digital outputs on the {{{Device}}} are fully optoisolated and capable of sinking 20mA each at up to 60V. The first example circuit below shows how to drive an LED from one of the digital outputs. In order to switch loads with a higher current draw, for example a relay, an external switching transistor is required, as shown in example 2.

Digital Output Usage

The digital outputs are set through the io set command, as shown below.

/1 io set do 1 1↵
@01 0 OK IDLE – 0
/1 io set do 1 0↵
@01 0 OK IDLE – 0

The first command sets the first digital output, which would cause the LED in example 1 above to glow. The second command clears the output, turning off the LED.

TTL Outputs

Additional circuitry is required to get TTL signal levels from the {{{Device}}}, as shown below.

A-mcb io ttl.png

The 74LS04 contains 6 inverters so it is possible to convert all of the digital outputs with one IC. In order to maintain isolation, it is recommended that the 5V and GND supply connections come from the device requiring the TTL signalling. It is, however, possible to use the 5V and GND connections from the Analog Output connector on the {{{Device}}} to power the external device, as long as the current limits are adhered to.

Analog Inputs

The analog inputs on the {{{Device}}} accept and display voltages in the range of 0 – 10V. In order to measure other analog variables, a transducer or sensor is required that outputs an appropriate voltage range. As transducers typically provide low voltage signals, an amplifier and buffer circuit is required to interface a transducer to the {{{Device}}}.

The reference circuit below demonstrates how to connect a wheatstone bridge to one of the analog inputs on the {{{Device}}}. Various instruments are configured in a wheatstone bridge arragement, including load-cells and strain guages.

Analog Input Usage

R_GAIN's value should be chosen so that a positive full scale of the instrument produces 10V at the analog input of the {{{Device}}} and a negative full scale produces 0V. The OP97 op-amp provides an offset of 5V to the amplified value so that no load on the instrument produces an output of 5V.

The reference circuit below demonstrates interfacing a thermocouple to the {{{Device}}}. Depending on the application, an offset voltage may need to be provided.

Analog Input Usage