6.1
Introduction
In this chapter the amalgamation of circuits, software, and samples are discussed as a work- ing Flame Atomic Emissions Spectroscopy (FAES). The instrument will be characterized and limitations identified.
6.2
Electronic Overview
The electronic control overview is presented in Figure 6.1. As can be seen the system is fairly complex. If tight timing tolerances and repeatability were not important, one could use a basic variac to control the flow of power to the ElectroThermal Vaporizer (ETV). However, the benefits surrounding automation far outweigh the complexity of the system. The first computer connects to the USB4000 Spectrometer and sets the acquisition parameters to External Synchronous Trigger, which is described in Section 5.3.3. This computer will then save the resulting collected spectra into a single folder as a delimited file type for further processing. The second computer runs the main Python 2.7 program which interfaces with the LabJack to control the entire FAES instrument.
The LabJack provides the DB37 and DB15 ports to communicate with the Interface Board and the BoArduino Power Supply Control respectively. TheUniversal Asynchronous Receiver Transmitter (UART)communications are based at 9600 baud to relax communica- tion speed requirements of the LabJack. The control of the Interface Board and connected daughter boards is discussed in both Chapter 4and Appendix F.
The power for the Interface Board, BoArduino Power Supply Control, and BoArd- uinoETVHousingProportional-Integral-Derivative (PID)Heater is provided byAdvanced Technology eXtended (ATX)Power Supply 1. This allows for a common ground and sim- ilar 5 and 12 Volts (V) rails among the connected circuits. The Interface Board provides all the necessary power to connected daughter boards. Not listed in this diagram are the addition of the Power Supply Extension Modules which boost theETVPower Supply cur- rent handling abilities to 10 Amperes (A). These fans are powered by the 12 V rail on
ATXPower Supply 1 as well. The second ATXPower Supply is used solely to perform the cleaning of theTungsten Coil (W-Coil) ETV.
Originally the twoATXpower supplies were connected in series to provide a 17Vsupply to theETV Power Supply. This, however, proved to be unstable when large currents were required. As such the supplies were split. In addition, when performing the cleaning on the ETV with ATX Supply 2, the current draw is considered a short. The ATX Power
Computer 2 Spectrometer LabJack U6 USB Interface Board Solid State Relay Board (Fluidics Board) Arduino 1 Power Supply Control ATX 1 Computer Power Supply ATX 2 Computer Power Supply DB37 UART
ETV Power Supply (Control and extensions) DB15 SPI 12V 10A 12V 30A 12V 30A ETV PWR Arduino 3 ETV Housing PID Heater Arduino 2 Spectrometer Control Binary 01 Binary 01 Computer 1 USB
Supply would shut down. This is resolved by turning the power supply on when it is connected to the filament directly, as the start-up current draw is expected and settles as the W-Coil heats. Therefore the Fluidics Board (or as labeled in Figure 6.1, Solid State Relay Board) toggles the activation of theATXPower Supply 2 as well as the connecting and disconnecting of the power rails to theETV.
A condition was programmed into the LabJack which prevents the Fluidics Board from enabling both solid state relays at the same time, which would cause damage to theETV
Power Supply. Therefore only one relay is active at any given time, and if an error is detected, the LabJack program will automatically disable power to theETV.
The Spectrometer Control is provided via two digital input pins on the BoArduino Spectrometer Control. When the binary signal is high, the modified trigger pulse is sent as described in Section 5.3.3. As these two binary lines are independent to one another, either condition may be met in order to simplify the code. When theETVis to be cleaned, the Fluidics Board will signal the Spectrometer Control to begin the modified trigger 0.25 seconds before the actual cleaning process begins. When the sample is being vaporized for the test, the trigger command signal is sent slightly before the power is supplied. Both binary signals must be low in order to disable the modified trigger pulse.
The BoArduinoETVHousing PIDHeater is stand-alone and will continuously operate when power is supplied. The heaters themselves may be activated or deactivated with the supply of a 12 V rail to the board. However, when 5 V is supplied the BoArduino will activate. No damage will arise to the board or heaters if either the 12 or 5 V rails are connected at any given time.
6.3
Software Control Overview
The control software takes advantage of the threading capabilities of Python. In this case aGraphical User Interface (GUI)was designed for ease of use. Each button, once pressed, will disable command input until the thread has completed with the exception of the ‘Kill’ command to stop all power. This modular approach to programming the control algorithm allows for simple debugging as required. In addition, since the majority of the control is handled by a BoArduino through UART, a very logical set of function are possible to reduce program size. The GUI is presented in Figure 6.2.
A few key elements in the software were duplicated from the work of Donati et al.
in 2008. [84] Specifically the New Filament Cleaning Procedure, and the New Filament Conditioning Procedure. These two procedures improve the coil performance and remove
residual oxidative components when used inW-Coil-Atomic Emission Spectroscopy (AES), as described in the literature. [84] As theFAES here also uses aW-Coil, these procedures should have the same positive affect on the coil.
The ‘Dry’ button send the command “Dry” to the BoArduino. The BoArduino then hold a steady current of 3Athrough the filament. While doing so it monitors the required voltage to maintain the current levels and once the voltage begins to rapidly increase, indicating a rapid increase in temperature, the filament is considered dry.
The ‘Bake →’ button will read the Bake Time in seconds and the Bake Temp in Celsius to construct an appropriate message to send to the BoArduino. For example, if the Bake Time is 45 seconds and the Bake Temp is 1150 Celsius the message will read: “Bake 45 1150”. The BoArduino will then parse this UART message and hold the set temperature of 1150 Celsius for a total of 45 seconds.
The ‘Auto Dry/Bake’ button combines the above two actions and will dry the sample prior to baking (vaporizing) the sample. Following this the ETV will be cleaned for 10 seconds by enabling a power conduit between the W-Coil and ATX Power Supply 2 and turning on the power. The thread which performs this task is presented on Page98.
The ‘New Clean Filament’ button sends several bake commands to the BoArduino following the new coil cleaning procedure as described byDonati et al. in2008. [84] Once completed, the last step follows the cleaning procedure which runs for 35 seconds rather than the traditional 10.
The ‘Condition Filament’ button sends theUARTcommand “Condition” to the BoAr- duino. The BoArduino then follows the new coil conditioning procedure as described by
Donati et al. in2008. [84]
The ‘Auto Dry/Clean Filament’ button combines the Dry and Clean procedures into one. It is designed to rapidly remove any oxide layers on the W-Coil. A small sample of Milli-Q water is typically used for this.
The ‘Clean Filament’ button initiates the cleaning procedure for theETV. It works by enabling a power conduit between the W-Coil and ATX Power Supply 2 and turning on the power for 10 seconds.
The ‘Kill Power’ button is always available to the user. It has the power to instantly disconnect the power conduits to the ETV in case of an error. In addition it sends the “Kill” command to the BoArduino which will set the voltage and current controls to 0 on the ETV power supply. Once pressed the program will lock the user out for a few seconds while it kills all of the power and resets all of the boards.
Figure 6.2: FAES Instrument ControlGUI.
The ‘Auto Dry/Bake Remove Na’ button is designed to provide a secondary bake function. This is discussed further in Chapter 7, but it is used to vaporize off interfering elements. The Na aspect means that a defined temperature has been pre-set.
The ‘Auto Dry/Bake Remove Other →’ button is identical to the button above, how- ever, the user may select the intermediate bake temperature. In this case all three text fields are utilized to build the test profile desired.
The use of aGUI, with the buttons, to provide full control over theFAES provides an elegant and easy to use user-interface. In addition, a full integration of automated control with minimal user input is possible.
The thread used to automatically dry and bake (vaporize) the sample of interest is presented below:
1 #Thread to autmoatically dry and then bake (vaporize) the sample of interest
2 def Auto_Dry_Bake_sample(self):
4 print "Auto Dry Bake"
5 #Enable ETV relay. Power now available to W-Coil
6 turn_ETV_relay_on()
7
8 #Prepare the UART message for the BoArduino
9 message = ’Bake ’ + str(Bake_Time.GetValue()) + ’ ’ + str(Bake_Temp.GetValue())
10 print message
11
12 #Send the Dry command and wait for a responce
13 if (Send_UART_Message(’Dry’,’Dry Done’) == 1):
14 #Sample is now dry, disable power to W-Coil
15 turn_relays_off()
16 print "Dry Done"
17 #Wait a few seconds between steps
18 time.sleep(time_btn_steps)
19 #Enable ETV relay. Power now available to W-Coil
20 turn_ETV_relay_on()
21 #Send UART message to BoArduino and wait for a responce
22 if (Send_UART_Message(message,’Bake Done’) == 1):
23 #Sample has now been vaporized, disable power to W-Coil
24 turn_relays_off()
25 print "Bake Done"
26 time.sleep(time_btn_bake_clean-2)
27 #Clean the filament, first activate Ocean Optics trigger
28 turn_OO_relay_on
29 time.sleep(2)
30 #Turn on ATX Supply 2 for 10 seconds
31 turn_ATX_relay_on()
32 time.sleep(10);
33 #Kill all power
34 turn_relays_off()
35 Enable_Buttons()
36
37 #Exit the thread cleanly
38 turn_relays_off()
39 print "Auto Dry Bake Done"
40 thread.exit()
6.4
Fabricated FAES Instrument
The electronics and fans were mounted on a half-inch thick piece of Medium-Density Fi- breboard (MDF). A series of 3.5 inch long spacers were made from 3/4 inch MDFcut into
one inch wide strips in order to produce a raised platform to support the TS4000 Blow Torch,ETV, USB4000 Spectrometer, and collection optics. This upper platform was made using 1/4 inch MDF. Larger supports were fabricated using 2x2 pieces of lumber cut to appropriate heights.
The mounted electronics can be seen in Figure6.3. Here the majority of the electronics are shown, however, the BoArduino fixes have not yet been installed. Figure6.4 shows the complete instrument along with Computer One connected to the USB4000, and Computer Two which is running the control software for the instrument. In Figure 6.5, the ‘Y’ connection which allows for the mixing of the vaporized sample (in forming gas) and the propane fuel is displayed.
Figure 6.3: FAES Electronics mounted on 1/2” MDF. Here the BoArduino fixes for the LabJack and Ocean Optics timings have not yet been implemented. The ATX power supplies are on the right; ETV Power Supply and Extension Modules are in the middle with the four 80 mm fans providing active cooling; Interface Board, modified Fluidics Board, and the Voltage-Level Translator board are on the left.
As modeling the flame temperature as a function of the environmental conditions is outside the scope of this thesis, the flame temperature is assumed to be as reported, at 2200 K. [28] Therefore, as well documented by others, and as discussed in Section 2.3.4,
Figure 6.4: Fully Assembled FAES with Both Computers. The larger 2”x2” lumber can be seen mounted to the 1/4” MDF; the PID Heater controller, USB4000, and TS4000 are resting on the 1/4” MDF; The ETV is mounted to the top of the wood frame with two Omega heaters; Optics at the top are resting on a clear plastic bin to allow for a ‘Y’ connection. Computer One is on the left connected to the spectrometer; Computer Two is on the right running the control algorithms. Forming gas is provided through the connection on the right.
this temperature flame is limited to easily excitable elements such as Ba, Ca, Li, K, and Na. [4, 18, 40]
Figure 6.5: Closeup ofFAES ‘Y’ Connection for Mixing Gas and Vaporized Sample; Pre- Ignition. TheETV is on the left supplying vaporized sample in forming gas, Propane-Air fuel mixture from the TS4000 is on the right, Flame and Optics Collection are at the top. The total inner volume of the tubing with the pre-mixed gas is less than 0.5 cubic inches.
6.5
Data Processing
The data processing for theETV-FAES begins with identifying the proper acquisition files which correspond to each sample, and which within those correspond to the one second integrations. This is due to the multiple trigger pulses sent to the Ocean Optics USB4000 Spectrometer each second, as discussed in Section5.3.3. The second step is to perform a baseline correction to the data. The third step is to present the data as a single acquisition. The methodology behind calibrations curves is very similar, however, instead of plot- ting the data directly the peak intensity for the element of interest is plotted over multiple concentrations. Using Linear Regression Analysis, a series of single-blind, or unknown, samples are analyzed and the measured intensities are converted into starting concentra- tions to validate the system.
6.5.1
Identifying Proper Acquisition Files
As discussed in Chapter 5, Section 5.3.3, the modified trigger pulse being sent to the Ocean Optics USB4000 from the BoArduino can result in up to 40 captured spectra over the course of 10 seconds. This is because the modified trigger sends out four trigger pulses each second to account for trigger loss by the Ocean Optics. In addition, because of the way the Ocean Optics software saves the individual acquisition files, each file is saved within one folder. This means that for 10 consecutive tests, there could be a total of 400 acquisition files in a single folder. As such, a script was developed in Python 2.7 which would be able to distinguish between files which were integrated for the desired time.
This script operates using two properties of the acquisition files:
1. The files generated contain the time, to the millisecond, that the acquisition was completed.
2. The first five pixels (wavelengths) within the files are covered by an opaque material and are designed to drift downwards with larger integration times. These are negative values which continue to decrease with longer integration times. [85]
The folder containing all of the generated spectra files, which can be in the hundreds after several tests, is sorted. This is done based upon the timing difference between files. As previously discussed in Section5.3.3, the maximum time lost is 64 ms on a one second integration; therefore the maximum time between subsequent one-second acquisitions is 1.064 seconds. The time between subsequent testing of additional samples is significantly larger than this time, and as such these time gaps correspond to new samples. The files are then sorted into folders corresponding to the sample number. The script written to perform this sorting is presented in Appendix B.6. Once this sorting is completed, a modified version of the script presented in Appendix B.2 is run. The modified version cycles through all of the Test OO N folders, where N corresponds to the sample number, and generates a Comma-Separated Values (CSV) file for each test. An example CSV file for any given test may resemble that presented in Table6.1.
In this table, the larger integrations of around -500 counts in intensity on Test 1 and Test n correspond to one second integrations. During post-processing of this data, the first column (Test 0) is removed as this may be an integration of up to four seconds in length. [82, 83] Following this, the average intensity count across the first row is calculated and would, in the case of Table 6.1, result in an absolute intensity of around 290 counts. Any column which has an absolute intensity count greater than this average value for the first three wavelengths is considered to have been integrated for the full desired integration time of around one second. The number of successful one-second integrations is counted, and if
Table 6.1: Example Data Structure in Test OO N.csv as built by Python Script from Spec- tra generated with Modified Trigger Signal. The data is sorted with the script presented in AppendixB.6 and compiled with the base script is presented in Appendix B.2.
Wavelength (nm) Test 0 (Counts) Test 1 (Counts) Test 2 (Counts) · · · Test n (Counts)
178.32 -97.67 -528.69 -49.31 · · · -495.77 178.53 -97.67 -528.69 -49.31 · · · -495.77 178.75 -97.67 -528.69 -49.31 · · · -495.77 .. . ... ... ... ... 886.57 62.07 298.69 102.24 · · · 280.41
that number matches the number of seconds the test was run (typically 10), the test data is considered complete. If there is data missing, the test run is considered lost.
The negative intensities stem from a baseline thermal calibration of the USB4000 as described in the datasheet. [85] These values are typically set between 90→140 counts at the time of manufacture. This baseline number will slowly drift downwards a few counts depending upon the external environment. This drift, however, does not affect the differentiation as an averaging process to determine a threshold intensity is used, as previously discussed. During integration, these negative values, which are factory set, are also integrated leading to higher absolute values with larger integration times. This provides a consistent basis to differentiate between different integration times.
6.5.2
Baseline Correction
The idea behind the baseline correction is to account for any environmental and flame instabilities between sample runs. It is highly unlikely that the environmental and flame conditions are identical between each sample test. This is because minute changes in temperature will affect the sensitivity of the spectrometer, and as the propane cylinder loses pressure, the flame will slowly change. [85] The affect of the propane cylinder on the flame is investigated in Section 6.6. As such, a background and baseline is determined for each test individually.
After the successful acquisitions have been identified for the sample (Figure 6.6a), the total area under the entire acquisition curve is calculated, through integration, for each second of acquisition. The acquisition with the smallest area under the curve is considered to be the background. This is because the acquisition of the emission spectrum occurs prior to the vaporization of the sample and extends beyond the completed test. The additional
emission by an element causes an increase in the area under the curve in relation to the background flame. Therefore, the raw background data, determined based upon the area under the curve, from the same acquisition set is then subtracted from the entire data set (Figure6.6b). As there are slight fluctuations of up to 64 ms in each spectra, the baseline hovers around zero after the subtraction. This is corrected by detecting the baseline and shifting the spectrum accordingly (Figure 6.6c). These three steps are demonstrated on test data from a trial run of the instrument in Figure 6.6. The sample was comprised of Na and K.
Due to the methodology behind theETV, the entire sample is vaporized rapidly under test conditions. In real-world timing, this takes just over one second to accomplish. As