Low-cost virtual instrumentation system of an energy-dispersive X-ray spectrometer for a scanning electron microscope

The paper describes an energy-dispersive X-ray spectrometer for a scanning electron microscope (SEM-EDXS). It was constructed using the new architecture of a virtual instrument (VI), which is low-cost, space-saving, fast and flexible way to develop the instrument. Computer-aided teaching (CAT) was used to develop the instrument and operation rather than a traditional instrument technique. The VI was designed using the object-oriented program language C++ and compact programmable logical devices (CPLD). These include spectra collection and processing, quantitative analysis and X-ray-intensity distribution analysis. The procedure is described in detail. The VI system gives an e¡ective and user-friendly human interface for the whole analytical task. Some examples are described.


Introduction
Energy dispersive X-ray spectrometry (EDXS) is a fast, non-destructive and multi-elemental analysis technique. When it is connected to a scanning electron microscope (SEM), it can conveniently obtain the information of compositions with the surface characteristic of the sample. It is widely applied in research and in industry analysis, such as in material, interface and surface, mineralogy, etc. [1] Although the analytical technique is mature, the quantitative analysis technique can be improved especially for light elemental analysis, biological specimens and rough surfaces [ 2± 4]. New computerized commercial instruments are expensive and lack thē exibility of a purpose-built function. The analysis speed of the traditional instrument is slow and the data processing is limited. It is diae cult to link these with new methods of data processing because the installed computer cannot link to newer systems. The compromise between the cost and convenience is presented here.
The applications of virtual instrument (VI) have become more popular in modern instrument development and may play a role in avoiding this con¯ict. A VI in principle is a computer-based , software-driven instrument for testing, measuring and process control purposes. By incorporating standard computer hardware interfaces (such as plug-in board, RS-232 and IEEE 488) and using the computationa l power of a generic central processing unit (CPU), a VI de® nes its speci® c functions through software programming [5].
Compared with hardware-based instruments, the advantage of a VI is its¯exibility. This is of particular value in open-ended research studies. The functionality and user± machine interface of conventional test instruments are manufacturer-de® ned. Consequently, end-users have limited options to expand or modify the exiting functions. In contrast, the functionality of a VI can be explicitly de® ned, modi® ed and expanded by its users through software programming.
In this work, the method is adopted with an eye to the future. VIs were written in C ‡ ‡, which performs all the analytical functionalities of SEM-EDXS. A complex programmable logical device (CPLD) was used to develop the hardware. [1] The main functions of instrument include X-ray point analysis (XRPA); X-ray line scans (XRLS) and X-ray distribution images (XRDI).

Type of analysis
XRPA is the basic functionality of SEM-EDXS, which can give the qualitative and quantitative analysis for a point (microregion) on the surface of the sample. Data collection includes manual, timing, counting and dead time correction. In general, the last three modes are mainly used for quantitative analysis with a standard sample while all the modes can be used for non-standar d analysis.
The second analysis is XRLS. In this case, the electron beam is scanned slowly along a single line in the electron image of sample. The intensity for the element being investigated is plotted directly to the SEM or PC monitor. The X-ray line scans in the SEM can only show the relating variations of one elemental concentration, but it can give more information on PC.
The third mode is XRDI, which can calculate the approximate composition distribution of the surface of the sample. This analysis also can be ful® lled on the SEM or the PC using similar line scans. The analysis on the SEM will give the result of one element, while the PC can show the distribution of many elements. Figure 1 shows the EDXS hardware system con® guration developed. This hardware includes the following modules: signal preprocessing, spectra pulse processing, line-scanning feedback and area-scanning feedback. The detector collects X-ray photons, and the photon is converted to an electric charge, which is proportional to the energy of the incident X-ray photon.

Hardware description
An EDAX9100 is used (EDAX Inc., 91 McKee Drive, Mahwah, NJ 07430, USA). The signal-processing circuit and the detector-controllin g circuits for signal processing were designed in-house. The output signals of module 2 are a composite of the spectra pulse, the inhibited signal and the signal of the X-photon number. The spectra pulse is similar to a Gaussian function, and the band width of the pulse is about 80 m s. The peak-to-peak value is in the range ‡10 to ¡10 V. The inhibited signal comes from the detector discharges. When the signal is active, the whole system must stop working. The width of this signal is about 200 m s and the amplitude is 5 V. The third signal represents the number of X-photons, which is a 0.5m s-wide digital pulse. One pulse represents an Xphoton and the amplitude is 5 V. In ® gure 1 the two control signals are represented by the box arrow pointed to module 6, and the spectral pulse signal is the arrows directed to the modules 4 and 5. The long dashes box represents the on-chip functionalities, which mainly include some control facilities and the computer interface. These are implemented in two electrically reprogrammable logic devices, the EPM7128S (Altera Digital Library; Altera Corp., 1998, 101 Innovation Drive, San Jose, CA 95134, USA) with an in-system programmability (ISP) technique that provides a¯exible means of upgrading the instrument or changing its functionality. The short dashes box represents on-board realization, mainly including some interface such as A/D, S/H and D/ A. The AD IC is a 12-bit and 10m s device. For the 80m s pulse width, it is fast enough to data transform and transmit to computer without the loss of the pulse. The main advantage of the development is the instrument control, and functions can integrate together into a single board, even into a single chip. It also decreases the space taken by the instrument. In addition, the integrated realization may reduce the faulty ratio of the instrument.
The multichannel analyser (MCA) is implemented by software. A fast AD method is used for the digitalized pulse peak. Because the width of the pulse time is larger than the sum of the AD convert time and the computer IO operation time, the computer memory becomes the memory of the MCA. This method of implementation provides a¯exible way for data handling and displaying the data and it reduces the complexity of the hardware implementation.
A more in-depth description of the section is included in Junfeng Lei et al. [6].

Software architectur e
The whole programme, which can run under win9x on any IBM-compatible personal computer, was written in C ‡ ‡. The instrument' s operation interface uses a combination of menus and toolbars. The hardware control and operation was encapsulated in a Virtual Device Driver (VxD) programme developed only for win9x.
The programme for the work modules of the whole system are described below. The work¯ow of the analytical modules is shown in ® gure 2. A more detailed description of the section is included in Libo Zeng et al. [7].

Calibration
Because of the drift of the instrument circuit, the instrument often needs to correct the energy gauge. The instrument supplies hardware and software calibration for this task. The hardware method is applied only when the instrument is initially installed or the change of the energy gauge is large, while the software method adopts an algorithm such that the energy gauge is dilated and shrunk and translated linearly. This method is often used for user scaling for a small change of energy gauge and it is enough to handle the majority of cases.

Spectra collection and identi¢cation
The spectra collection adopted a soft MCA. The spectra pulse discrimination was ful® lled by the hardware, but the classi® cation of the spectra pulses in terms of the pulse height and run-time display were provided by a computer program.
The element identi® cation often used is the look-up table.
Because of the diversity of the sample and the complexity of the spectra, the complete automatio n of the identi® cation is completely reliable. In this system, identi® cation is provided by a semi-automated identi® cation assisted by user intervention.

X-ray point analysis
To obtain the composition information of a sample, the system supplies quantitative or semiquantitative analysis using the ZAF correction algorithm similar to Frame C.
There are three methods for background subtraction available to user in the program: interpolation, background simulation and background ® lter. For each different spectrum character of the diå erent samples, these methods supply diå erent selection criteria for background subtraction in individual analytical cases. Spectra stripping can be ful® lled by peak ® tting of computer-generate d peaks whose pro® le is a modi® ed Gaussian function or by library spectra if the spectra overlap is acceptable. In addition, miscellaneous peaks are automatically removed from the spectrum by a menu command for all identi® ed elements.
As mentioned above, there are many kinds of algorithms for quantitative analysis that are applicable for all cases. It is important that the original spectra data are open for users. In this system, the data are stored in an ASCII ® le. The spectra data are 4096 double-word arrays at the front of the ® le as well as data for display of the spectra.

Intensity distribution analysis
This mode can only supply qualitative information of sample compositions in the analytical region because the topograph of the sample seriously in¯uences the accuracy of analytical mode. It includes four approache s to get the intensity distribution: XRLS on the SEM and computer, and XRDI on the SEM and computer.
The key implementation of the function is the corresponding relation between electrons' image and the intensity of the X-ray along the analytical line or the whole SEM image. Two parameters are supplied for the XRLS to adjust the corresponding relationship between the intensity distribution curve and the scanning line. Two other parameters are used to enhance the eå ect of the display at the ® rst installation, while the adjustment of only one parameter is needed to enhance the display eå ect within general analysis. For XRDI, the expression of intensity distribution is simpler than XRLS, so the two parameters only need to adjust the corresponding relation between the intensity distribution and the image. A dialogue is supplied to set up the parameters, and an empirical expression is adopted to adjust the algorithm  for the corresponding relationship between the intensity distribution and the image.
The intensity distribution analysis is also for quasidigital mapping because it was not necessary to control the scanning mode of the electron beam and the digitalization of the electron image through image sampling.

Results and examples
A typical analytical example is shown in ® gure 3. It is a graphical user interface (GUI) serving as a panel for control and display of the results of a VI in a quantitative analysis routine. The sample measured is a standard sample (National Standard GBW02104, Zn/Cu alloy). The spectra was collected and evaluated by the system. It is a test of the whole system including the spectrometer, the spectra processing and the quantitative methods. The specimen is a chip with a curve surface that is¯attened with a mechanical pressure about 800 kg. The results are given in table 1 and show that the accuracy is within 5% of the certi® ed values for most of the elements. Larger diå erences are found only for the elements close to the detection limit.
An example of quasidigital mapping on PC is given in ® gure 4, which includes line and image distribution. In the function, the mapping provides multi-elemental analysis once due to the power of computer. It can also ful® l the colour multi-elemental mapping within an image. The above works use custom-designed distribution on a PC and requires an online SEM image-analysis system to carry out the image collection.

Conclusion
A virtual instrument of EDXS for SEM is described. All of the main components, with the exception of the Si (Li) detector and analogue signal-processing circuit, are built into a single circuit board. It was developed to replace the old EDXS in use in SEM. The system is inexpensive (total cost under $6000), and is smaller, faster and morē exible than the old one. It can be used with the new Si (Li) detector expediently. The system was used for computer-aided teaching (CAT) to accomplish the instrument development and operation.
The whole system has been running since 1999 in the SEM without any inner malfunction. Several new applications and developments based on the architecture are in development.