Flow-X IO interface board

From Electriki
Revision as of 22:49, 27 December 2008 by Michai (talk | contribs)
Jump to navigationJump to search

So what is this anyway?

Below follows a description of a nice hobby-project to make an interface board that basically sits between a PC and an I/O module, to read module-outputs and stimulate module-inputs.

Flow-X module

This is a small but very nice modular flowcomputer for the oil- and gas-industry; since I toy with/at this thing at work, why not make a little something to make Life a bit Nicer.

Interface-board

It would be nice to test test and provide stimuli for various digital/analog I/O's on the module from a PC, while meanwhile trying to keep it safe, or rather fool-proof in case I/O is misconfigured (i.e. misconfigured 'low' output connected to 'high' output), because we all make mistakes.

Some of the module's I/O is read/stimulated by the interface-board directly, while for other signals, the board only multiplexes signals or even simply passes them through to a host-PC. All I/O the board is capable of reading/stimulating itself, is passed to/from a host-PC using a serial protocol. Remaining I/O to be read/stimulated is psysically connected to the board, where it is multiplexed or just passed through to the module.

Covered I/O

Each interface-board only covers half of the module's I/O; therefore, 2 boards are needed to read/stimulate all I/O on a single module. Each bord covers the following module-I/O:

1 RS-232/RS-422/RS-485 serial port

Simply passed through from module to host-PC; interface-board only provides a DE-9 connector for convenience sake.

1 PT100 resistance temperature measurement input

Resistance (or temperature) for the module can be specified by supplying an external voltage (0..5V) to the board. The signal is buffered by an opamp and then used to drive a high-intensity LED glued to a LDR. Current is limited to 27mA, just because we are very nice. In fact 27mA is insanely high come to think of it.

3 analog inputs, configurable for current/voltage

ain descr

In case of current-input, the module basically reads the voltage over an internal shunt-resistor. This current can be controlled by feeding the board with a voltage (0..5V), which is buffered by an opamp and fed into the shunt. Current is again limited to 27mA; this is low enough as to not cause damage in the module. V/I will not be linear, mainly because of the current-limiter (LM317), but this can be compensated by software.

In case of voltage input, the board simply places a safety-resistor in between the voltage (0..5V) offered to the board and the module. A relais on the board switches between current/voltage modes.

2 analog current-outputs

To read outputs from these 4..20mA outputs, the board simply contains a 220ohm shunt for each, and outputs the voltage over each shunt as output-level. Software will do conversion back to current.

8 open-collector digital I/O pins

dio descr

Because the module only has open-collector I/O's, the board provides a 'weak' 4.5V using a voltage-divider. For each digital channel, the module-side can be either input or output. The board-side can be input and output as well; damage because of misconfiguration is eliminated by a series-resistor.

auxsel descr

In addition to reading and stimulating the module's digital I/O, 2 auxiliary signals supplied to the board ('A' and 'B') may each be assigned to a digital I/O. Misconfiguration will not lead to damage by using series-resistors.

swap_ab descr

Auxiliary input 'A' can be assigned to module-inputs 0..6, while 'B' can be assigned to module-inputs 1..7. Signals 'A' and 'B can be 'parked' (decoupled) by assigning them to pins 7 and 0, respectively. To allow for any arbitrary assignment of 'A' and 'B', a swap-function is implemented in the board.

ctrsel descr

The microcontroller on the interface-board also has 2 counters; each counter can be assigned to any digital channel (0..7). Counters can be disabled/enabled separately. Counters are passive, and don't influence I/O lines in any way.

Microcontroller

mcu descr

Of course there is one! The mighty (in size) ATmega32 (DIP-40) manages all digital I/O, multiplexing and selection of signals.

Power supply

power descr

plop.

So... what does it look like?

this is a description

put interesting story here.

--Michai