Data acquisition using RS-232 or printer ports on the PC has become popular due to easy and non-intrusive connection of serial converter modules. Industrial or medical applications, however, often will require isolation of the grounds from the PC ground for safety and/or noise immunity reasons.
The circuit shown allows for an isolated 12-bit data-acquisition system using the RS-232 port (see the figure). The analog-to-digital converter can be addressed via DTR (data terminal ready), CTS (clear to send), and RTS (request to send), as shown. An isolation transformer is alternately driven with a square wave via the H-bridge-configured quad switch (74HC4066). The low on-resistance of the quad switch allows for less than 80% efficiency at I < 10 mA.
To best utilize the power available from the serial port, the TD (transmit data) also is used to supply current. The TD line is usually at MARK (−12 V). Thus, the polarity of the primary circuit (connected to PC GND) is inverted to take advantage of the current available from TD, which increases the available power by 30%. The two output lines, DTR and CTS, also are inverted and initialized to −12 V (note the inversion of the rectifier diodes D4, D5, and D6).
To operate the output transistor of the U7 optocoupler, a third winding has been added to the transformer along with D3 and C8, thus forming V+. This won’t be necessary if sampling frequencies are under 500 Hz. U2 provides the complementary square-wave outputs while R2, R3, C2, and C3 introduce dead time to prevent shoot-through currents. This circuit can sample at up to 1000 Hz and supply less than 5 mA at 5 V (U6 pin 6) for transducer excitation or other circuitry. Increasing the sample rate beyond 1.5 GHz would starve the optocouplers for current.
The C routine exercises the analog-to-digital converter using COM1, while taking into account the power issues (see the listing). The sample rate depends on how fast the “12 times loop” is executed.