6
Journal of Automatic Chemistry, Vol. 20, No. 6 (November-December 1998) pp. 189-193 Automation photometer of Hitachi U-2000 spectro- with RS-232C-based computer K. Senthil Kumar, B. S. Lakshmi and Gautam Pennathur Sub-DIC Biotechnology Information Services, Centre for Biotechnolo, Anna University, Madras 600 025, India 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 ecacy 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 eciency 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 analy- tical instrument to the computer, and has become essential in most of the modern chemical laboratories [1-3]. It allows easy calculations to be performed for special data, e.g. measuring spectral area, rate of reac- tions, etc. The availability of computers and sophisticated programming languages has largely alleviated this prob- lem [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 wave- length 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-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 CO M 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) ran- ging 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 synchro- nized 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’ (ac- knowledge to the transmitting section that the trans- mitted byte has been received properly) cannot be done because the spectrophotometer lacks sophisticated micro- processor functions. Software The software is written as per requirements and specifica- tion 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. (1) Protocol: Polling (2) Link: One-to-one 0142-0453/98 $12 oo ) 1998 Taylor & Francis I,td 189

Automation of Hitachi U-2000 spectro- photometer with …downloads.hindawi.com/journals/jamc/1998/183604.pdf · U2000, through its RS-232Cport to a IBMcompatible computer ... instrument

Embed Size (px)

Citation preview

Page 1: Automation of Hitachi U-2000 spectro- photometer with …downloads.hindawi.com/journals/jamc/1998/183604.pdf · U2000, through its RS-232Cport to a IBMcompatible computer ... instrument

Journal of Automatic Chemistry, Vol. 20, No. 6 (November-December 1998) pp. 189-193

Automationphotometer

of Hitachi U-2000 spectro-with RS-232C-based computer

K. Senthil Kumar, B. S. Lakshmi and GautamPennathurSub-DIC Biotechnology Information Services, Centre for Biotechnolo, AnnaUniversity, Madras 600 025, India

The interfacing ofa commonly used spectrophotometer, the HitachiU2000, through its RS-232C port to a IBM compatible computeris described. The hardware for data acquisation was designed bysuitably modifying readily available materials, and the softwarewas written using the Cprogramming language. The various stepsinvolved in these procedures are elucidated in detail. The ecacy ofthe procedure was tested experimentally by running the visiblespectrum of a cyanine dye. The spectrum was plotted through a

printer hooked to the computer. The spectrum was also plotted bytransforming the abscissa to the wavenumber scale. This wascarried out by using another module written in C. The eciency ofthe whole set-up has been calculated using standard procedures.

Introduction

Over the last few years, laboratory automation hasfocused on the transfer of digitized data from an analy-tical instrument to the computer, and has becomeessential in most of the modern chemical laboratories[1-3]. It allows easy calculations to be performed forspecial data, e.g. measuring spectral area, rate of reac-tions, etc. The availability of computers and sophisticatedprogramming languages has largely alleviated this prob-lem [4, 5].

In this article, we describe the interfacing of a HitachiU-2000 spectrometer with an IBM AT/486 compatiblemini-computer using C language. The Hitachi U-2000 isa compact low cost instrument working in the wave-length of 1000-200 nm. The instrument is provided witha standard RS-232C port for easy interfacing [6].

The advantage of using the C language compiler is itssuperiority in terms of speed. Thus, it is best suited fordeveloping interface modules. The other major factor isportability, wherein programs written in C can be run on

any computer with little modification [7-9].

The serial port of the computer is connected to the RS-232C interface. The baud rate can be selected from thefollowing 4800, 1200, 600, 300, 150 and 110 bps. Thedata format is selected as 7E2 (7 bits + even parity + 2stop bits) [4, 5].

instrument controlled by commands (control bytes) sentfrom the personal computer. The selection of this modeinactivates all the other keys.

Hardware

The RS-232C (serial, asynchronous interface) connectsan IBM AT/486 system with the spectrophotometer (U-2000 series) in the half duplex mode (data transfer takesplace in both directions, but only one at a time). Itcontains 25 pins, out of which 6 pins only are used forconnection. It connects the serial COM port of thecomputer with the serial port of the spectrophotometer.The pin details and cable connections [10] are shown infigure 1.

The Transistor-Transistor Logic level signal (TTL) ran-

ging 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 resultingsignal TxDATA from the computer goes to the receivingRxDATA pin of the spectrophotometer, where it getsconverted to TTL level by the line receiver (HD 75189).Similarly, the signal sent out from the spectrophotometeris converted, and received by the computer. The pinnumbers 1-7, 7-7 are short-circuited for protective andcommon ground, respectively.

The computer and spectrophotometer are not synchro-nized at the same clock rate, pin 4 RTS (Request-to-Send) of the computer and 5 CTS (Clear-to-Send) of thespectrophotometer, pin 5 CTS of the computer and pin 4RTS of the spectrophotometer are short-circuited to startand stop data transmission, which is called ’hardwarehandshaking’ process, but ’software handshaking’ (ac-knowledge to the transmitting section that the trans-mitted byte has been received properly) cannot be donebecause the spectrophotometer lacks sophisticated micro-processor functions.

Software

The software is written as per requirements and specifica-tion of the user. It takes care of accessing the medium(Medium Access Control Layer) and other interfacefunctions. The modules have been written in C compiler

Remote controlInterface functions

The following sequential operations are carried out onthe computer. The remote control option is selected onthe screen, then the instrument is put in the externalmode. The computer is set to this mode and the

The specification of the interface can be stated as follows.

(1) Protocol: Polling(2) Link: One-to-one

0142-0453/98 $12 oo ) 1998 Taylor & Francis I,td 189

Page 2: Automation of Hitachi U-2000 spectro- photometer with …downloads.hindawi.com/journals/jamc/1998/183604.pdf · U2000, through its RS-232Cport to a IBMcompatible computer ... instrument

K. Senthil Kumar e! al. Automation of Hitachi U-2000 spectrophotometer with RS-232C-based computer

COMPUTER SPECTROPHOTOMETER

Line driver

MC 1488

Line Receiver

MC 1489

FGI

TxDATA 2

RxDA T A 3

RTS 4

CTS 5 o-

GND 7 o

COM Post

,,o

FG

2 TxDATA:5 RxDATA

4 RTS

5 CTS

7 GND

COM Post

Line driver

HD 75188

Line Receiver

HD 75189

TTL SIGNAL RS-232C SIGNAL TTL SIGNAL

Figure 1. Cable connections for RS-232C.

cod o Control byte from COM Port

Yes No

Set COM Port to 4800 bps speed

Set Spectrometer to "REMOTE CONTROL" mode

Yes

Figure 2. Spectrophotometer endflowchart.

Execute theControl bytefunction

(3) Medium: RS-232C(twisted pair)(4) Speed: 4800 bps(5) Transmission: Serial, asynchronous and half duples(6) Distance: < 15m

Baud setting--set data transfer rate of the externalsystem; Status viewing--check whether the spectrophoto-meter is ’ON’ or ’OFF’; Data acquisation--acquire datafrom the spectrophotometer, history about the receiveddata; Graph plotting is shown in the graph (On-line andOff-line); Peak detection, multiple spectra and area arecalculated under the selected portion of the curve.

Flow chart

The flow charts for interfacing at the spectrophotometerand the computer ends are shown in figures 2 and 3,respectively [9]. The COM port should be set to thedesired baud rate. The maximum baud rate is 9600 bps.

In order to avoid ’overrun error’ and to achieve maxi-mum efficiency in terms of start, stop bits and characterlength, the medium baud rate is set to 4800 bps. Aftersending a control byte from the computer to the spectro-photometer, 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 asimilar one in the spectrophotometer side for the re-

sponse, then the whole system will be in ’dead lockcondition’. As data flows from the spectrophotometer,the computer is made to acquire data and store them inan opened file. After the storage is made, the data are fedas an input to the data processing of the graph plottingphase.

At the computer end of the flowchart, prior to sendingthe control bytes, the communication port is set at a

speed of 4800 bps. Polling (sending some control byte tothe receiver section) is done to receive the status of thespectrophotometer. Control signals are sent to the spec-trophotometer byte at a time with a proper time delaybetween 2 bytes (to avoid overrun error) till the controlbytes buffer becomes empty. If there are data at theCOM port, then the data are received, stored in a fileand processed. In the spectrophotometer end of theflowchart, the instrument is set to ’REMOTE CON-TROL’ mode before setting to 4800 bps speed. If thereis any ’response’ from the computer, then a control byte isscanned from the COM port. If the ’Control byte’ isequal to the ’STOP KEY’ code, then terminate theprocess, else perform the appropriate control byte func-tion (interface function).

Performance evaluation

Analysis

The evaluation may be done on a time basis. Thecomputer sends a poll byte to the spectrophotometerone at a time to check whether the spectrophotometeris ON or OFF. The poll time taken to send a poll to thespectrophotometer and to receive an acknowledgement

190

Page 3: Automation of Hitachi U-2000 spectro- photometer with …downloads.hindawi.com/journals/jamc/1998/183604.pdf · U2000, through its RS-232Cport to a IBMcompatible computer ... instrument

K. Senthil Kumar et al. Automation of Hitachi U-2000 spectrophotometer with RS-232C-based computer

Set Spectro ]STATUS to OFF.]

Figure 3. Computer endflowchart.

Set COM Port to 4800 bps speed

Send Polling byte

No

C;end Control byte to Spectro

from Control byfes buffer

No Yes

Process stored DATA

Calculate EFFICIENCYof the Interface

from it is 0.39 ms. The representation of poll exchange ona 4800bps link between a computer and a spectro-photometer with no data to transmit is shown below

Poll

>0.39 ms Response

Computer end > Spectrophotometer end

Control byte

>Response 2

>A major problem associated with polling is the overheadrequired in processing the non-productive polls, i.e. pollsfor which the spectrophotometer has no data to transmit.On this 4800 bps (including overhead) link, it requiresapproximately 0.01 oflink time to transmit a poll and itsresponse.

Efficiency

Time taken to send a poll and to receive response4.065 ms

Time taken to send a byte 2.033 ms

The speed in bytes per second =492 bytes/s

or

Speed for data transfer (bps)=492*8 bps

Each time a byte is sent along with 3 bps (parity, start,stop bits).

In total 11 bits are sent each time.

Efficiency of the interface E speed/overall baud rate

3936/4800=82%

Experimental

The spectrum of a typical cyanine dye 3, 3t-diethylcarboxycyanine iodide was measured. A standard solution ofthe dye was prepared by dissolving 10 mg of the dye into25 ml of methanol.

A 1-ml aliquot was further diluted to 10 ml in a standardflask. The solutions were prepared in diffused light. Thediluted solution was used for further spectral studies. Apair of matched fused silica cells of path length cm wasused for optical measurements.

The spectra of the dye as plotted from the computer tothe printer is shown in figure 4. The spectrum whereinthe abscissa is transformed into the wave number scale isshown in figure 5.

Results and discussion

The Hitachi U-2000 is a microprocessor-controlled UV-visible spectrophotometer. The function keys are set infront of the spectrophotometer and the wavelengthrange, absorbance and other functions can be set throughthe keyboard.A major problem associated with polling is the overheadrequired in processing the non-productive polls, i.e.

191

Page 4: Automation of Hitachi U-2000 spectro- photometer with …downloads.hindawi.com/journals/jamc/1998/183604.pdf · U2000, through its RS-232Cport to a IBMcompatible computer ... instrument

K. Senthil Kumar et al. Automation of Hitachi U-2000 spectrophotometer with RS-232C-based computer

1.000Wavelength 56:5.0

Absorbance 0.164

Area 7.419

0.750

0.5000

0.250

0 O0 -’485 507 529 551 57:5

WeveIength nm

Figure 4. Wavelength scan of the cyanine dye (,max 563 nm).

1.000

0.7,.50

0.500-

0.250

0.0002.061 1.972 1.890 1.814

V (10 cm-’)

Figure 5. Plot of wavenumber versus absorbance.

1.745 1.680

polls for which the spectrophotometer has no data totransmit.

achieved through this alternate interface way of sharingthe printer attached to the computer at low cost.

Conclusion

The components (ICs, connectors, cables, RS-232C) usedhere are easily available in the market. The efficiency ofthis interface is 82%. The interfacing can be done using a

range of IBM PC/XT, PC/AT compatibles. Further, thisis in dedicated mode, but can be converted to interruptedmode by making the program a Terminate Stay Resident(TSR) program invokable through either software orhardware interrupts. If the keyboard section or printersection of the spectrophotometer fails, those functions are

References

l. LAHIRI, S., YUAN, B. and STILLMAN, M.J., 1994, Anal. Chem, 66,2954-2962.

2. KORENAGA, T., ZHOU, X., MORLwAKE, T., MURAKI, H., NAITO, T.and SANUKI, S., 1994, Anal. Chem., 66, 73-78.

3. GLESEMANN, A., JAGER, U. J., NORMAN, A. L., KROUSE, H. R. andBRAND, W. A., 1994, Anal Chem., 66, 2816-2819.

4. TANENAUM, A. S., 1990, Computer Networks, 2nd edition,(Englewood Cliffs, USA: Prentice-Hall inc.).

5. AHUJA, V., 1988, Design and Analysis of Computer CommunicationNetworks, 2nd edition.

6. Hitachi Instruction Manual for Model U-2000 Double BeamSpectrophotometer.

192

Page 5: Automation of Hitachi U-2000 spectro- photometer with …downloads.hindawi.com/journals/jamc/1998/183604.pdf · U2000, through its RS-232Cport to a IBMcompatible computer ... instrument

K. Senthil Kumar et al. Automation of Hitachi U-2000 spec;rophotometer with RS-232C-based computer

7. WANG, W. and BIBB, K., 1991, Illustrated Turbo C++, Asia-Pacificedition (Texas: Wordware publishing).

8. HOROWITZ, E. and SAN, S., 1982, Fundamentals of Data Structures inPascal (Maryland: Computer Science Press).

9. K;RNIGHAN, B.W. and RTCHE, D. M., 1990, The C ProgrammingLanguage, 2nd edition (Texas: Wordware publishing).

10. Institute of Electrical and Electronics Engineers, 1993, Incspectrum, Annual review, products and application.

11. JORDAN, L. and CHURCmLL, B., 1990, Communication and Networkingfor IBM PC/XT Compatibles Revised and Expanded, (New York:Prentice-Hall).

12. BERRY, J.T., 1988, C++ Programming, 2nd edition, (Indianapolis:H. W. Sams).

193

Page 6: Automation of Hitachi U-2000 spectro- photometer with …downloads.hindawi.com/journals/jamc/1998/183604.pdf · U2000, through its RS-232Cport to a IBMcompatible computer ... instrument

Submit your manuscripts athttp://www.hindawi.com

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Inorganic ChemistryInternational Journal of

Hindawi Publishing Corporation http://www.hindawi.com Volume 2014

International Journal ofPhotoenergy

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Carbohydrate Chemistry

International Journal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Journal of

Chemistry

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Advances in

Physical Chemistry

Hindawi Publishing Corporationhttp://www.hindawi.com

Analytical Methods in Chemistry

Journal of

Volume 2014

Bioinorganic Chemistry and ApplicationsHindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

SpectroscopyInternational Journal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

The Scientific World JournalHindawi Publishing Corporation http://www.hindawi.com Volume 2014

Medicinal ChemistryInternational Journal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Chromatography Research International

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Applied ChemistryJournal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Theoretical ChemistryJournal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Journal of

Spectroscopy

Analytical ChemistryInternational Journal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Journal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Quantum Chemistry

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Organic Chemistry International

ElectrochemistryInternational Journal of

Hindawi Publishing Corporation http://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

CatalystsJournal of