Automation photometer of Hitachi U–2000 spectrophotometer with RS–232C–based computer

The interfacing of a commonly used spectrophotometer, the Hitachi U2000, through its RS–232C port to a IBM compatible computer is described. The hardware for data acquisation was designed by suitably modifying readily available materials, and the software was written using the C programming language. The various steps involved in these procedures are elucidated in detail. The efficacy of the procedure was tested experimentally by running the visible spectrum of a cyanine dye. The spectrum was plotted through a printer hooked to the computer. The spectrum was also plotted by transforming the abscissa to the wavenumber scale. This was carried out by using another module written in C. The efficiency of the whole set-up has been calculated using standard procedures.


Introduction
Over the last few years, laboratory automation has focused on the transfer of digitized data from an analytical instrument to the computer, and has become essential in most of the modern chemical laboratories [1][2][3]. It allows easy calculations to be performed for special data, e.g. measuring spectral area, rate of reactions, etc. The availability of computers and sophisticated programming languages has largely alleviated this problem [4,5]. In this article, we describe the interfacing of a Hitachi U-2000 spectrometer with an IBM AT/486 compatible mini-computer using C language. The Hitachi U-2000 is a compact low cost instrument working in the wavelength of 1000-200 nm. The instrument is provided with a standard RS-232C port for easy interfacing [6]. The advantage of using the C language compiler is its superiority in terms of speed. Thus, it is best suited for developing interface modules. The other major factor is portability, wherein programs written in C can be run on any computer with little modification [7][8][9].
The serial port of the computer is connected to the RS-232C interface. The baud rate can be selected from the following 4800, 1200, 600, 300, 150 and 110 bps. The data format is selected as 7E2 (7 bits + even parity + 2 stop bits) [4,5]. instrument controlled by commands (control bytes) sent from the personal computer. The selection of this mode inactivates all the other keys.

Hardware
The RS-232C (serial, asynchronous interface) connects an IBM AT/486 system with the spectrophotometer (U-2000 series) in the half duplex mode (data transfer takes place in both directions, but only one at a time). It contains 25 pins, out of which 6 pins only are used for connection. It connects the serial COM port of the computer with the serial port of the spectrophotometer.
The pin details and cable connections [10] are shown in figure 1. The Transistor-Transistor Logic level signal (TTL) ranging from 0 to 5 V emanating from the line driver section (MC 1488) of the computer is converted into an RS-232C signal (ranging from -12 to + 12 V). The resulting signal TxDATA from the computer goes to the receiving RxDATA pin of the spectrophotometer, where it gets converted to TTL level by the line receiver (HD 75189).
Similarly, the signal sent out from the spectrophotometer is converted, and received by the computer. The pin numbers 1-7, 7-7 are short-circuited for protective and common ground, respectively. The computer and spectrophotometer are not synchronized at the same clock rate, pin 4 RTS (Request-to-Send) of the computer and 5 CTS (Clear-to-Send) of the spectrophotometer, pin 5 CTS of the computer and pin 4 RTS of the spectrophotometer are short-circuited to start and stop data transmission, which is called 'hardware handshaking' process, but 'software handshaking' (acknowledge to the transmitting section that the transmitted byte has been received properly) cannot be done because the spectrophotometer lacks sophisticated microprocessor functions.

Software
The software is written as per requirements and specification of the user. It takes care of accessing the medium (Medium Access Control Layer) and other interface functions. The modules have been written in C compiler

Remote control
Interface functions The following sequential operations are carried out on the computer. The remote control option is selected on the screen, then the instrument is put in the external mode. The computer is set to this mode and the The specification of the interface can be stated as follows.

Flow chart
The flow charts for interfacing at the spectrophotometer and the computer ends are shown in figures 2 and 3, respectively [9]. The COM port should be set to the desired baud rate. The maximum baud rate is 9600 bps.
In order to avoid 'overrun error' and to achieve maximum efficiency in terms of start, stop bits and character length, the medium baud rate is set to 4800 bps. After sending a control byte from the computer to the spectrophotometer, the response is awaited in an indefinite loop. If there is no response or if there is an expectation of a signal from the computer side for the response and a similar one in the spectrophotometer side for the response, then the whole system will be in 'dead lock condition'. As data flows from the spectrophotometer, the computer is made to acquire data and store them in an opened file. After the storage is made, the data are fed as an input to the data processing of the graph plotting phase. At the computer end of the flowchart, prior to sending the control bytes, the communication port is set at a speed of 4800 bps. Polling (sending some control byte to the receiver section) is done to receive the status of the spectrophotometer. Control signals are sent to the spectrophotometer byte at a time with a proper time delay between 2 bytes (to avoid overrun error) till the control bytes buffer becomes empty. If there are data at the COM port, then the data are received, stored in a file and processed. In the spectrophotometer end of the flowchart, the instrument is set to 'REMOTE CON-TROL' mode before setting to 4800 bps speed. If there is any 'response' from the computer, then a control byte is scanned from the COM port. If the 'Control byte' is equal to the 'STOP KEY' code, then terminate the process, else perform the appropriate control byte function (interface function).
Performance evaluation

Analysis
The evaluation may be done on a time basis. The computer sends a poll byte to the spectrophotometer one at a time to check whether the spectrophotometer is ON or OFF. The poll time taken to send a poll to the spectrophotometer and to receive an acknowledgement The spectrum of a typical cyanine dye 3, 3t-diethylcar boxycyanine iodide was measured. A standard solution of the dye was prepared by dissolving 10 mg of the dye into 25 ml of methanol.
A 1-ml aliquot was further diluted to 10 ml in a standard flask. The solutions were prepared in diffused light. The diluted solution was used for further spectral studies. A pair of matched fused silica cells of path length cm was used for optical measurements.
The spectra of the dye as plotted from the computer to the printer is shown in figure 4. The spectrum wherein the abscissa is transformed into the wave number scale is shown in figure 5.

Results and discussion
The Hitachi U-2000 is a microprocessor-controlled UVvisible spectrophotometer. The function keys are set in front of the spectrophotometer and the wavelength range, absorbance and other functions can be set through the keyboard. A major problem associated with polling is the overhead required in processing the non-productive polls, i.e.