Showing posts with label XRF. Show all posts
Showing posts with label XRF. Show all posts

Sunday, July 7, 2024

Moxtek X-Ray Tube Controller - Part 3 - Enclosure

Finally, I got around to make an enclosure for the Moxtek X-Ray Tube Controller with a proper control panel.

The complete "X-Ray Tube Commander 2000" Controller in all of its glory.
 This enclosure might be further improved with an angled front panel at some point if I get too bored but for now it serves the purpose.
The faceplate text is currently done "quick-n-dirty" style with a Label Maker but I'll print a nice colored laminated front decal for it to get the more refined "lab equipment" look, just the way I did with my N2PK VNA.

The front panel component mounts include large LCD display, 2 backlit control buttons, a rotary encoder /w button, a keylock and a small speaker grill.

I designed the enclosure with TinkerCAD - this application is excellent for simple projects such as this one, and it is very fast to work with.
Once the measurements are taken, it literally takes minutes to create the design and output the STL file for printing.

I made the bottom part of the enclosure a bit taller than necessary, just to have some spare room if I decide to change things around or add more connectors on the sides. Since it is a just a piece of benchtop equipment, the size is not critical.
 If I ever do another print of this, I will definitely make the box slimmer, round the corners and angle the front panel. 

The X-Ray Tube Controller PCB and components, installed in the enclosure. 


A "Window" on the side exposes the edge of the PCB where all tube interface connectors are located - a DB-9 for connecting to the tube's HV module, supplemental power connector for tubes working at higher power levels (>4W), terminal strip with all interface signals to external devices (test enclosure interlock switch, illuminated warning sign, etc.)
I used this window to feed thru temperature sensor cable, but I will drill and mount a proper 4-pin connector at some point.

The keylock is part of the X-Ray safety protocol and prevents from engaging the beam without a key. These types of X-Ray tubes create an incredibly high flux right at the aperture and when setting up a sample for XRF the user should turn and remove the key to prevent any accidents.
 In addition, the XRF enclosure door interlock switch is in-series with the keylock so the control key must be turned to "ON" AND enclosure door closed for the beam to engage. A very serious X-Ray hazard is not only the direct exposure to the beam but also from scattering. Even air scatters and reflects X-Rays so no tube operation should be done without proper shielding. 

The yellow MODE Button serves multiple functions depending on the context.
Single-press is RESET (for Timers, errors, time logging and also acts as an "Emergency Stop" while the X-Ray beam is ON).
 Long-press changes beam operating modes and a double-click switches between the 2 memory presets. 
This button also acts as a "SHIFT" while tube operating parameters are dialed in with the rotary encoder (for Timer and Min High Voltage). Holding the MODE button down while pressing the Encoder button will toggle ON/OFF the Tube Error Check feature.
The yellow LED in the MODE button is a "READY" indicator showing that the x-ray beam can be engaged - it turns off if the current conditions disable the x-ray tube - during parameter entry, filament cooling stage or errors for example.

The push-button on the Rotary encoder is used to enter Parameter Setup mode and scroll thru the different digit positions while entering the value. 
Tube and Controller Parameters are then dialed in with the rotary encoder at the position of a blinking cursor. 
This button also serves as an "Emergency STOP" button in Timer or Toggle modes, instantly and unconditionally terminating the X-Ray beam.
When the beam is ON and operating in Timer mode, the rotary encoder can be used to add or remove time from the currently running timer by simply spinning the knob.
The BLUE button is exclusively used to operate the X-Ray beam (according to the selected mode).
The blue LED in this button indicates if the beam is ON and it also flashes with 1 Hz period while the Timer is running.
The status line on the display will show the status of the "Filament heated" signal returned by the tube with a message "X-RAY ON!"

On this picture, the status line displays "Tube ERR!" with Error Code E-111 due to operation with disconnected X-Ray tube.
I also added an option to temporary disable the Tube Error Check.

The 3-digit error code is very easy to read:

First digit on the left shows the state of the "Filament Ready" signal, returned by the tube when the tube is turned ON: 0 - signal present, 1 - signal is missing. 

Second digit shows the state of the High Voltage return: 0 means that the tube returns the same voltage as the one requested (Set) by the controller, 1 - returned voltage is lower than requested, 2 - return voltage is higher than requested. 

The third (right) digit has the same functionality as the second digit but reflects the return of the Emission Current.

Tube Return voltages are monitored within a specific preset tolerance. Emission current is only checked for Set current >5uA - at very low currents, below 5uA the tube return for Emission Current might fluctuate more than the established tolerance and could generate an error otherwise.

Tuesday, March 7, 2023

Complete DIY XRF Setup

My DIY XRF setup is finally complete - it is comprised of an Amptek X-123 detector using the proprietary Amptek 25 mm2 / 500 μm Si-PIN X-Ray detector element (model FSJ32MD-G3SP), Amptek Pre-Amplifier and DP5 DPP /MCA.

Details about the detector are in THIS post.

On the exciter side, in the past, I have used X-Rays from an Am-241 source (59.54keV). Unfortunately, there is no exempt quantity or a way to obtain high activity, pure Am-241. The ones used in modern household smoke detectors are only 0.9 uCi (unless obtained from the old Pyrotronics industrial smoke detectors with up to 80uCi) but still have the Am-241 mixed and pressed into Gold and Silver foil which has parasitic emissions of the said metals in addition to the Am-241 decay product - usually a fairly strong Np La line emission (from Np-237 decay product). The Neptunium La-line is observed even with recently created Am-241) La at 13.95keV.

I decided to switch over to an X-Xay Tube where the emission can be controlled precisely, the spectrum is uniform with the exception of the XRF emissions from the target material (Tungsten in my case) but this is normally a single element and easy to remove from the spectra.

 I am using Moxtek Magnum series transmission X-Ray tube with Tungsten target - 10W total electrical power (-50kV / 200 uA) controlled by an X-ray source controller of my own design my own design.

The X-Ray tube is placed inside a Lead shield. The aluminum box on the right-top in this picture is the detector enclosure, housing the detector element, preamp, power supply and the Amptek DP5 Digital Pulse Processor.

This is my test setup while doing XRF on a piece of copper foil for initial Energy Calibration.

The aluminum box in the center of the picture is the X-Ray tube's high-voltage power supply module. It is a high-frequency switching supply with a very easy to work interface - 3 output channels (2 analog and 1 digital) and 3 input channels (2 analog and 1 digital) + 12V main power. The supply is very efficient and the current draw is around 1.5A at maximum power.

The X-Ray source aperture and detector at almost 90 degrees so the X-Rays are skimming the surface of the specimen.

This is the first XRF of Copper foil with the new source - the Ka line is at 8.05keV and to the right the Kb-line is at 8.90keV. 
I still need to adjust the detector Peaking Time and Flat Top Time as well as the Slow and Fast detector thresholds - currently I have over 99% of Dead time due to the current settings intended for low X-Ray flux source and too much of primary beam getting into the detector. Revising the geometry of the setup - the placement of the detector, exciter and sample should resolve this issue.

My X-Ray Source Controller works flawlessly, and I am really happy with the end-result.

Saturday, February 25, 2023

X-Ray Source Controller for MOXTEK and AMPTEK Mini X-Ray tubes (Part 2)

A follow up on this post this post

 I needed controller for the Magnum series 50kV / 10W MOXTEK X-Ray source and as it turns out the FTC-200 controller, once sold by MOXTEK is no longer available - it was discontinued due components availability and the Moxtek sales engineer told me - "We expect customers to develop their own solutions." 

This was not a big deal - their FTC-200 controller has very basic functionality anyways, and it is lacking some features that I really needed, so I went ahead and developed my own design to control the MOXTEK X-Ray tube.

Currently, MOXTEK tubes are available in one of 3 configuration - built-in USB controller, I2C interface and Analog Interface. The MAGNUM tube I am using is equipped with the analog interface, but it should be quite easy to add the I2C control capabilities to the controller design as well.

One of my design goals is to have a stand-alone unit with no PC required. I don't want to fumble with numerous PC applications while doing XRF and prefer to have a piece of hardware with actual buttons and dials to adjust the X-ray tube parameters and to operate it. For the fairly simple functionality the controller affords, there is no real benefit from running it with a PC.

I was pleasantly surprised to find out that the AMPTEK Mini-X2 tube uses the same electrical interface as the MOXTEK Magnum series of X-Ray tubes so my controller will work for AMPTEK Mini-X2 just as well which makes it even more versatile.

Update: As it turns out Newton Scientific X-Ray tubes are also equipped with the same analog interface or at least have a connector option for it. (thanks Matteo!) 

Simplified block-diagram of XTC-2000

My source controller is based on the nRF52840 System-on-a-Chip (SoC) using Cortex M4F processor and employs 6 control channels as required by the x-ray source interface - 4 Analog and 2 digital channels. Of these 6 channels, there are 2 Analog outputs (driven by precision 12-bit DACs), used for setting up tube's High Voltage and Emission Current parameters and 1 digital output (5V TTL signal) to turn the source ON / OFF. There are also 2 Analog inputs (sampled with a multiplexed 12-bit ADC) to monitor the x-ray tube's working parameters as they are returned by the Moxtek HV module and a digital input (5V TTL signal) to report when the beam is ON and stable (The filament is fully heated and ready). 

I had to employ Logic Level shifters as the nRF52840 is a 3.3V chip and the MOXTEK module has standard 5V TTL levels for the digital signals. Furthermore, the voltage ranges on the Analog output channels range 0-to-4VDC and I have to use the 4.096V internal DAC reference voltage which means the DAC must be powered with a 5V rail. In reality, the reference is 2.048V and the output op-amp buffer of the DAC is switched to 2X GAIN mode, but still 5VDC DAC power is required. 

(I am playing with the idea to dynamically switch DAC's output buffer op-amp GAIN based on the needed DAC output, using 1X GAIN when output less than 2.024V is required (up to 25kV and 100uA) and automatically switching to 2X GAIN for higher DAC output. This should make the output even more precise.)

For the Analog inputs, I used precision voltage dividers to bring down the Monitor / Return channel voltages in the range of 0-to-3VDC and then used the built-in ADC reference of 0.6V with gain of 5x.

There is also a 5th Analog Input channel, internal to the controller, with its own voltage divider, used to monitor the Low-Voltage Main Input Power and to inhibit controller operation if the controller's and / or tube's input voltage is not within the nominal range. 

OSH Park service delivered again beautiful, high-quality PCBs. The ordering process is very simple and a pure joy - I almost feel sorry I don't have more PCB projects to order. 
The PCB design was done with Autodesk Eagle but I am not big fan of what Autodesk is doing with Eagle (it used to be my favorite PCB app) and very likely to switch over to KiCad in the near future.

The assembled and ready X-Ray Source controller - XTC-2000 (a.k.a. "X-Ray Tube Commander 2000" :-) 
(Chat GPT suggestion :-)

Using a rotary encoder with a pushbutton makes the UI really quick and intuitive. The button (knob-press) is used to enter adjustment mode, and the user can dial first the whole number and then the tenths after the decimal point for each parameter separately.
After entering Set mode, the encoder's push-button scrolls through different digit positions, indicated by a blinking cursor and spinning the knob changes the value. 
The rotary encoder is equipped with its own microcontroller (Atmel SAM D09) which takes care of all of the quadrature input stuff - counts, phase-detection, timing, etc. and just reports the actual tick count, delta, etc. over I2C bus to the MCU. This makes the Encoder really fast and easy to use and I can reset the tick counter with a command if needed. The encoder breakout can also generate interrupt on button press or encoder rotation.

The complete and working controller during bench-testing and DAC/ADC non-linearity compensation and alignment. 
Testing was done by looping the DAC outputs to the ADC inputs and monitoring the loop with a calibrated 6 1/2 digits benchtop DMM. The linearity corrections made sure that both, output and input agree with the voltmeter thru the entire range.
The white (unpopulated in this picture) 4-pin JST connector near the encoder is AUX I2C expansion connector, used for the X-ray tube's temperature sensor or controlling a tube with I2C interface.

Currently, the code is complete and mature, the core functionality is all done and bug-free thus "Version 1.0" release
In the unlikely event of some commercial interest, I might write a more elaborate menu system for setting up various tube types, internal parameters and calibration values, but even at this stage, XTC-2000 has a lot more features, better functionality and better ergonomics than both, the discontinued Moxtek FTC-200 controller and the entirely software-controlled Amptek solution. It also has more safety features and should take better care of the tube's health and operating conditions.

As for the user-interface, in a nutshell - there are 3 modes of operation - MOMENTARY (X-Ray is emitted only while the OPERATE button is pressed), TOGGLE (X-Ray beam is latched, on/off with each press of the OPERATE button) and COUNTDOWN (the user can dial duration in seconds for the beam and start the Timer)

There are many safety features implemented - hardware lockout, software lockout, preventing accidental exposure, emergency beam shutdown, control voltages power-down, tube shut-off watchdog and so on.

In addition, there is a number of features looking after the tube's health as minimum emission time, cooling timeout, temperature alerts, isopower curve ensuring maximum power is never exceeded, mains voltage drop and many more.


When the working parameters are dialed in, the calculated power is immediately displayed on-screen. If the calculated output power exceeds tube's maximum permissible output power for the particular type of tube, the controller will scale the Emission Current to the edge of the permissible power curve and will indicate the change in the calculated power display. This will prevent the tube from being operated at excessive power levels.
While the X-Ray tube is powered on, the controller will also display the actual power level calculated from the Tube's return channels.

As part of the safety and tube's health features, I added external temperature sensing and monitoring using MCP9809 chip.

While designing the PCB, I added an extra I2C bus connector for future expansion such as temperature sensing and control of an I2C tube.

The temperature sensor I am using is MCP9808 - a very accurate and precise chip with I2C interface. Resolution is actually much better than 0.25°C but for my purpose 1° Celsius is completely sufficient and allows faster sample time.

The controller constantly monitors the temperature of the tube, and it will shut it off if temperature exceeds +60°C. The tube will not be re-enabled until it cools down to below +55°C.  With 10W of total electrical power and a massive brass housing this is unlikely to occur, but it offers another level of safety.
The temperature sensor presence is auto-detected on startup - if the I2C cable is not plugged in, the controller will work normally, just without any temperature related features.

The critical part of attaching the sensor is the connection cable between the controller and the MCP9808 breakout board - the cable must be fully shielded due to the proximity to the tube's HV cables and must be of very low capacitance as the I2C bus does not tolerate high capacitance on the signal lines or the useable bus speed will begin to drop.  At 70cm cable length the sensor works perfectly well. The cable I used was foil-shielded 4-conductor USB cable.

The last thing, currently pending on my development list is a suitable enclosure.

Update: As part of the tube's diagnostics, I added a check for deviation from the requested parameters - if the controller detects a difference between what is requested from the tube and what is returned, it will generate "Tube Error" message with a 3-digit error code - each digit represents one of the 3 critical parameters (Filament ready, High Voltage and Emission Current) and the value represents the type of deviation. This makes it really easy and quickly to understand what is going on with the x-ray tube. The check begins 2 seconds after the tube is turned on, allowing time for all parameters to stabilize. There is an option for the user to turn off temporarily this check if needed.

Thursday, January 19, 2023

XRF Exciter source using a Moxtek or Amptek Miniature X-Ray Tube (Part 1)

 I am working on a new XRF Exciter source, employing a pretty cool miniature, ceramic, 10W X-Ray tube with Tungsten transmission target by Moxtek (MAGNUM series). This source will deliver an immensely higher X-Ray flux compared to the Am-241 source I've been using, thus cutting down on the integration time during XRF analysis and bringing out peaks hiding in the noise.

The Moxtek X-Ray tube comes with a High-Voltage Power Supply module which allows for control of both, the tube voltage (-10kV to -50kV range) and the tube's emission current (0 to 200 uA). The maximum electrical power is 10W into the tube - here are the specs.

The brass housing of the X-Ray tube with the beryllium window aperture and the two high-voltage supply cables. The tube is in a Grounded Anode configuration and the two cables deliver both, High-Voltage to the Cathode and power to the filament. The brass housing is massive enough to dissipate plenty of heat. In its final configuration, the tube will mounted inside of 1+" thick lead shielding as some X-rays are generated in all directions besides the collimated main beam. These X-Rays are much attenuated but still a radiation hazard so proper shielding is mandatory.

My test setup. The HV PS has a very neat and straight-forward interface for controlling the tube's operational parameters of the tube. It is also very efficient when it comes to power - it requires 9V to 12V DC and about 1A of current. The efficiency is a little over 80% - around 12W input power which is fantastic.


While I am designing and prototyping the X-Ray tube controller (more on this later), just for a quick test I was driving the tube with my 3-channel power supply in a rather "manual" mode - Ch.1 is the main power, Ch.2 controls the HV - 0.8V to 4V are scaled to -10kV to -50kV range and Ch.3 sets the beam's emission current - 0 to 4V are scaled to the 0-200uA range.

The tube's module returns monitor signals - voltages with the same exact scaling factors as the control voltages in order to monitor the actual HV and Current straight from the HV module. A TTL level signal controls the beam state - ON/OFF and there is a FILAMENT READY return signal from the HV PS going HIGH when the filament is heated, and the beam is ON and stable.

One important requirement is that the beam should not be turned ON sooner than 2 seconds after it has been turned OFF to prevent damage to the tube's filament. For the same reason the tube should be turned ON for a minimum of 1 second and no less than that - all these requirements will be part of my design for the controller.

Prototyping the X-Ray tube controller on a breadboard, using nRF52840 MCU with ARM Cortex M4F, 24LC32 EEPROM for storing configurations, 12-bit MCP4728 Quad DAC for Tube control voltages, large high-contrast SHARP Memory display (400x240 pixels), bi-directional logic level shifter, Non-Latching Relay, MCP 9808 temperature sensor and a nifty I2C Rotary Encoder breakout.
There are various other components - voltage dividers, voltage regulator, power conditioning, piezo buzzer, pull-up and pull-down resistors, etc. located on the controller board - I designed the board with some thru-hole components so I can easily continue the development once I have the boards in hand and swap components as needed. 
If I ever make another version of the PCB it will be all SMD based to reduce size and cost.

Controller's User Interface
Top of the screen is the Status display, temperature reading (when sensor is plugged in) and the current timer display.
 Second section, below, is the Mode Selector and Timer Selector display - it also shows the Last Run Log, calculated X-Ray tube power, Tube Temperature while running and selected memory preset. 
Third section is the X-Ray tube's Parameter Set (S) configuration where the user can dial in the tube's High Voltage (-5kV to -50kV range (0.1kV steps)) and Tube's Emission Current (1uA to 200uA (0.1uA steps)).
 Bottom part is the Tube's Return Monitor (M) display, showing the measured return signals from the tube's power supply module - sampled with a 12-bit ADC.
 
All set parameters are persistent - Once dialed, they are stored in EEPROM and automatically loaded on startup. There are also two user-configurable Memory Presets with Tube parameters and Timers for quick switching between different sets of values for different experiments. I might eventually increase the number of presets to 3.

There are 3 Operational Modes - MOMENTARY when beam is ON while the OPERATE button is pressed and turned OFF when the button is released. 
The second mode is TOGGLE - pressing the OPERATE button turns ON the beam and starts a count-up timer. Second press of the OPERATE button turns OFF the beam and logs the elapsed time. Sequential ON/OFF will integrate the beam time in the "Last Run time" until a RESET action is executed. 
The third mode is COUNTDOWN timer - the user can dial desired beam time and OPERATE button STARTS/PAUSES the countdown. The X-Ray beam is turned OFF when the timer expires but it can be PAUSED, STOPPED or CANCLED at any time. The user can also spin the rotary encoder to add or remove time from the initial timer setting while the beam is ON in 5 seconds steps.

I have added many safety features!
 When the beam is turned OFF there is a 2 seconds blackout period while the filament is cooling. During this time the beam cannot be re-engaged. It is not possible also to run the tube for less than 1 second - if any such attempt is made, the controller will automatically "pad" the time for a total of 1 second. 
This is a requirement by the x-ray tube to maintain filament health.

There is an INTERLOCK detection feature which inhibits any operation unless the interlock switch on the door/lid of the XRF enclosure is closed or overridden with a key. 
In COUNTDOWN and TOGGLE mode, pressing on the TIMER RESET / MODE button or the Rotary Encoder button acts as an EMERGENCY SHUT-OFF.

 In TOGGLE mode there is also a Timeout feature which will turn OFF the tube after a period of time if left unattended. 
The controller also constantly monitors the Low Voltage power supply and disables the tube if under-voltage / over-voltage condition occurs. 
Tube temperature is monitored with an external sensor attached to the tube housing and the tube is disabled if temperature reaches 60C.

Control voltages for the HV and the Emission Current are always kept at 0VDC when the tube is OFF to prevent the tube from firing up due to a transient on the TTL "tube enable" signal during controller power-up and shut-down. These control voltages go up to the programmed levels just before the X-ray tube is turned ON and are dropped again to 0VDC shortly after (200ms) the tube is turned OFF.

Another safety feature is a "parameter watchdog" - 2 seconds after the x-ray tube is turned ON, and the beam is stable, the controller will start actively monitoring for a difference between the set control voltages and the return monitor voltages - if a specified tolerance between what is requested and what is received is exceeded, the controller will turn OFF the tube and will report the Tube error detected.

External device control is available via a relay with NO/NC contacts used for control of various types of external equipment - X-Ray ON warning indicator, beam shutter system, XRF acquisition system, etc

The nRF52840 BLE will allow me to implement a Bluetooth connection to another host device (Smart phone for example) and control everything remotely. 

 The PCB design for the controller board.
 Critical modules are socketed and can be replaced easily. There is a terminal block and a DB-9 connector directly compatible with the Moxtek DB-9 on the Magnum series tubes and auxiliary 2-pin power connector used for tubes with higher than 4W power. The Tube module plugs in directly with the supplied Moxtek control cable.

For testing, I looped the DAC outputs used to Set the x-ray tube control parameters (the "S" display line on the display) to the ADC inputs for monitoring the tube's return (the bottom, "M" display line) and whatever is programmed as SET tracks perfectly on the MONITOR. The ADCs exhibit a small non-linearity up to about 1.2V (they run with 3.00V reference). I plotted voltage set vs. voltage read and created a curve in the firmware to correct it, which improved the measurement accuracy quite a bit.


The internal ADC inputs of nRF52840 are configured for 12-bit resolution and using the built-in 3.0V (0.6V at 5X Gain) voltage reference. The ADC noise is very typical for these chips - around ~3mV swing as seen on the plot. 
To improve on the noise, I use Interquartile Mean (IQM) when sampling, tossing out the Min and Max values for each data set, while averaging the samples in an attempt to get a more stable readout and this aproach works quite well - now the least significant digit on the readout exhibits some infrequent ADC noise of +/- 1 digit but overall it is fairly stable, also due to the over-sampling conversation I am performing. 

Sunday, June 27, 2021

The Sericho Pallasite Meteorite - XRF Analysis

I obtained 2 fragments of the Sericho Pallasite Meteorite, "discovered" in Habaswein, Eastern Kenya in 2016. 
The meteorite has been known to local populations for many years but it wasn't until 2016 when the meteorite was officially classified as such. This was a huge meteorite - so far 2.8t were recovered.

A highly sculpted complete fragment of the Sericho meteorite. This specimen exhibits the "classic" meteorite look and the fragment is complete, not cut from a larger piece.

The second specimen is an end-cut piece from a larger fragment. It exhibits the typical "fusion crust" from the entry in Earth's atmosphere. 

The back side of the second piece with straight polished cut reveals the pallasite nature of the meteorite and a structure of olivine crystals.

The XRF Analysis setup - the polished cut of the meteorite is exposed to the 59.54 keV X-Ray source and the X-Ray detector. I placed the source a bit further away decreasing the intensity in order to eliminate parasitic peaks coming from Np, Au and Ag in the source itself. The weaker beam resulted in a long acquisition time - nearly 6 hours but produced a fairly clean spectrum.

XRF analysis plot.
As it turns out from an XRF point of view, much like most other meteorites, Sericho is typical and quite boring - no exotic metals are present - just Iron, Nickel and traces of Cobalt and Chromium.
The plot prominently features the Kα1 and Kβ1 peaks of Iron and smaller peaks of Nickel. Cobalt is in very low concentration (0.8%) and masked but if one looks for it, it can be seen in the irregular shape of the base (on the right side) of the Ni Kα1 photopeak. The Ni Kα1 at 7.48 keV is too close to the 7.65 keV of the Kβ1 of Cobalt just at the edge of the detector resolution. The 6.93 keV Kα1 line of the Co is dominated by the Kβ1 Fe at 7.06 keV and can not be differentiated. Chromium can not be detected at all with my setup due to the trace amounts (0.03%)

My XRF Setup - Part 3 - Exciter

The exciter is the second main component of an XRF setup - this is the source of the primary X-Rays.

Two type of Exciters are generally used - X-Ray tube or Radioactive Isotope.

X-Ray tubes 

Pros:

- provide high-intensity beam

- low limit of element detection

- easy on/off capabilities 

- fast integration times

- fairly clean and uniform spectrum

- very small spot of irradiation / sampling 

Cons:

 - big, heavy, very delicate

- require additional cooling

- large, hazardous HV power supplies

- need for safety interlock system

- heavy beam collimators

- substantial shielding is required

- consideration must be made about beam scattering and reflection

- Not as portable

Radioactive Isotope source 

Pros: 

- smaller, lighter and simple to use

- 100% reliable

- very portable for field use

Cons:

- low intensity beam requires long acquisition times

- shielding is required as well a shutter-type on/off system

- highly regulated

- danger of contamination if source is damaged

- spectrum is not as clean and can contain various peaks

 The holder of the exciter was designed with TinkerCAD and 3D printed






While this method works and it is a convenient way to use a number of small individual sources, the main problem is that they need to be placed at some distance from the Object Under Test which decreases the flux and irradiates a larger area of the specimen. One can not easily select the area being sampled.

I made a small, single, directed source with a  Lead collimator / shield which works very well and I can place it much closer to the specimen without the detector picking up the primary X-ray.

Update: X-Ray tube is added as yet another option to do XRF excitation and I built a custom controller for it. See THIS post.

Friday, April 30, 2021

My XRF Setup - Part 2 / X-Ray Spectrometer

 Amptek (Amptek) is one of the leading companies for Space instrumentation, experimental and research XRF equipment.

They have a fantastic line of products called X-123 Spectrometer - (1) detector element and preamplifier, (2) Digital Pulse Processor and MCA and (3) Power supply.  It is all-in-one device which only requires an external power and connection to a computer. The PC software by Amptek called DppMCA is used to configure, control the X-123 operation and receive & visualize the accumulated spectrum.

Once the acquisition process is started, X-123 doesn't even need the computer connection until it is time to receive, save and display the data, integrated by the internal to X-123 multi-channel analyzer (MCA) located on the DP5 module. 

X-123 Spectrometers are offered with a variety of detectors -  Si-PIN, SDD, Fast SDD or CdTe and can employ different length extenders between the case and the detector element. Fast SDD is their top-of-the-line model, while Si-PIN is more of a general use detector. CdTe detectors are great for the higher energy region - up to 150 keV at the expense of resolution and internal noise.

I got my detector from George Dowel (GEO Electronics) as Geo-123. Internally, the unit is identical to the commercial Amptek Si-PIN X-123 unit - George uses the OEM modules and installs them in a custom-machined enclosure. The enclosure is a bit larger than the commercial Amptek version but this is an advantage - the aluminum alloy enclosure actually acts as a giant heatsink for the heat pumped by the TEC module, located inside the detector element and larger surface area results in better heat dissipation.
If there is one thing I wish for, is to have at least 1" or more extension between the detector and the main enclosure - this could help a lot with detector placement in relation to the sample and the exciter.

The "business end" of the unit - the 25 mm2 / 500 μm Si-PIN X-Ray detector element (model FSJ32MD-G3SP) with a thin, very fragile 1 mil Beryllium window.
 
(!) This window must never be touched by hand or come in contact with any object - such thing could turn into a very costly mistake!

Out-of-the-box there is a red polyethylene protective cap installed. There is actually very little reason for the red protective cap to be removed and the detector works with the cap on. I would expect to see some attenuation in the very low end of the range (0 to 2 keV) when the cap is on but even with this cap, Calcium K-lines are actually detectable.
(George supplies a spare modified cap with a built-in thin Kapton window )

Energy resolution is 190 - 225 eV FWHM @ 5.9 keV, peaking time 25.6 μs and Peak-to-Background ratio: 2000/1 (typical).

Plot showing the efficiency as a function of energy for Si-PIN detector. 

The optimal energy range for a SiPIN detector is 1 to 10 keV. 
The range of 10 keV to 25 keV exhibits a drop in efficiency to ~25%. 
Below 1 keV the loses from X-Rays traveling thru the air are significant - only 1cm of air will stop 90% of the X-Rays.
Above 25 keV the detector is still useable up to around 60 keV with a rapidly decreasing efficiency.

The X-123 Spectrometer supports USB 2.0 (mini-USB Connector), RS-232 (2.5mm jack) and Ethernet (RJ45) computer connections. 

USB works just fine and it is very fast so I never had the motivation to try any of the other interfaces. The Ethernet connectivity might require a future software release for full implementation, according to one Amptek document, but the orange data light on the port is a useful indicator - it is lit solid if the data acquisition is stopped and it is blinking when the MCA is running and storing data.
Other connectors on the back are the proprietary jack for the External Power supply and there is also a well documented auxiliary connector for gated counts and other functions.

The "sandwich" of DP5 Digital Pulse Processor (top board) and PC5 power supply module on the bottom. A ribbon cable connects DP5 to the PA230 Pre-amplifier board.

External power is supplied with a very small, proprietary connector (George provides a spare connector in the kit). 
The power adapter is regulated and rated for 5V / 2.5A. 
The current rating is very important - while the unit only needs 500-700 mA during normal operation, there is a short, high-current transient of around 2A during the boot up sequence and any current limiting bellow 2A could damage the internal power supply PC5 module.
All of the power conditioning and the generation of various voltages is done internally by the PC5 power supply module.

The Amptek software - DppMCA is quite good and I really like it! It is available on the AmpTek web site for free. The software is fairly easy to use and provides extensive toolset for data acquisition and analysis. The peak identification feature using energy reference libraries is very useful. The UI is logical and easy to use and ability to customize the color schemes.

There are a few features I wish it had but overall it does its job very well and it is well integrated with the hardware DP5 Pulse Processor.
Speaking of the DP5 module, the built-in hardware MCA in X-123 is quite impressive - 256 to 8192 channels (I normally use it in 4096 channels configuration) and 24 bits per channel (16.7 million counts). Acquisition time is selectable from 10 ms to 466 days. 
The MCA can be set to work in two modes - NORMAL and DELTA. In Delta mode it shows the spectrum, refreshed every second with pulses integrated over the past 1 second.

Combination of coarse and fine amplifier gain yields an overall Gain, continuously adjustable from x0.84 to x127.5 - the amount of preamp Gain determines the spread of the spectrum over a specified number of channels in the MCA.
For example, when using 4096 Channels, a Gain of x18.5 allows coverage of 0 to 62 keV range.

The Si-PIN detector response is quite linear and 2 point calibration is all that is needed for most applications.
I use pure, 99.9% Copper (Cu) foil - the Kα1 line at 8.05 keV and the Am-241 X-rays at 59.54 keV at the high end of the spectrum are sufficient for channel/energy calibration but more intermediate points can easily be added if necessary using different pure metals.

Gadolinium (Gd) is a Rare-Earth Element which is very interesting to XRF with its many peaks and also can be used as a calibration aid since both L and K-lines show up nicely at the low and high energy range of the detector.

XRF of a 99.9% pure 1" disk of Gadolinium (Gd).

Most of the Gd peaks can be easily identified - Kα1, Kα2, Kβ1, Kβ2, Lα1/Lα2, Lβ1, Lβ2 and even Lγ1, Lγ2 and Ll are visible in this plot. Obviously, Lα1 and Lα2 can not be separated - they are only 30 eV apart - way too close for the 190-225 eV resolution of the Si-PIN detector.

The very low count "hash" above the group of Gd L-lines is caused by Np-237 L-lines coming from the native spectrum of the exciter - 25 μCi of Am-241. Am-241 decays to Np-237 and the L-lines of the Neptunium are Rayleigh scattering and somewhat visible in the spectrum. 
The Exciter's X-Ray beam is collimated and reduced down to about 3mm spot for a precise sampling so the overall count rate is low as expected but the spectrum is nice and fairly clean. Longer integration times are to be expected with this type of exciter and I use a different exciter with a broader beam for general purpose.

Thursday, April 29, 2021

My XRF Setup - Part 1 / How it all works?

 What is XRF? 

XRF stands for "X-Ray Fluorescence" and there are two main types: Energy Dispersive XRF and Wavelength Dispersive XRF. 

I'll focus on the Energy Dispersive, Direct Excitation (2D) Method as this is what I use. 

EDXRF is a Non-Destructive method for material analysis, used to determine the Elemental composition of a material or a chemical compound. It is an extremely useful tool to analyze raw materials, minerals, alloys, etc.

The Physics behind XRF is absolutely fascinating and at the same time relatively  simple to understand.

The description of the whole process can be boiled down to this: exposing a test sample to a beam of X-Ray radiation and detecting the energy of the secondary / characteristic X-Rays emitted by the atoms in the sample and then building a histogram of the energy spectrum in order to identify specific secondary X-Ray peaks.

When a material is irradiated by short-wavelength ionizing radiation like X-Rays or low-energy Gamma Rays, the electrons from the innermost electron shells, the ones closest to the nucleus (K, L, M shells) will become excited and are expelled from the atom. This causes a vacancy in that lower electron shell and it is immediately filled with an electron from a higher-energy shell.

For example, if the electron is ejected from the K-shell, this vacancy will be filled by an electron from the L or M shells. When the electron makes the jump from a higher-energy shell to a lower-energy shell in order to fill such vacancy, it must give off the excess energy and does it so by emitting a photon with energy equivalent to the difference. This secondary photon is again, an X-Ray photon but with a very specific energy to the particular element due to the unique binding energy between the nucleus of each element (with its protons) and the surrounding electron shells. 

This, secondary emitted photon is called a Characteristic X-Ray. By detecting the energy of these characteristic X-Rays we can determine which Element from the Periodic Table the examined atom belongs to. 

There is a number of such characteristic X-Rays emitted, based on which shell, the electron comes from to fill the vacancy of the electron expelled by the primary X-Rays - if the vacancy is in the innermost shell (K-shell) and it is filled from the L-shell it is called Kα energy, if it is filled by the M shell is Kβ energy and so on. Vacancies in the L-shell are filled from the M-shell and are called Lα and when filled from N-shell - Lβ

These characteristic X-rays energy are published in lookup XRF tables.

Overlaps between Kα/Kβ and Lα/Lβ energies for some elements exist so identifying an element often relies on identifying multiple energy peaks in the spectrum, coming from different transition lines.

This is a typical XRF histogram as produced by the MCA software. I used a small sample of pure (99.98%) Cobalt metal for this test. The two blue peaks on the very left are the Kα and  lines of Cobalt. 

The other peaks in the spectrum above are just parasitic peaks coming from the X-ray exciter or the environment - for example the tall green peak on the right of the Cobalt peaks is the Bromine 1-line @ 11.92 keV immediately followed by the Br 1-line @ 13.29 keV, all coming from the plastic clamp I used to hold the small Cobalt metal sample in front of the detector - the Bromine was likely used in manufacturing of the dye or filler of the plastic and even though the clamp was just partially exposed to the detector the Bromine (Br) lines were still detected.

What do I need for XRF?

At a very basic level - three things : X-Ray Source, X-Ray detector and a computer.

The Amptek XRF Kit - Mini-X X-Ray tube and the all-in-one X-123 detector.

X-Ray source: obviously the best source is an X-Ray tube in the 40-60 kV range but these require forced cooling, HV power supply, lots of shielding and a collimator. Such setups are large and very expensive. There are small and portable tubes but they usually have an even higher price tag.

Alternatively a radioactive isotope emitting low-energy gammas / X-Rays can be used as an exciter - Cd-109, Fe-55 or Am-241 just to name a few. The intensity is usually lower than the beam from an X-Ray tube, even when mCi amounts of activity are used so counting times are longer, but it is a very portable and uncomplicated method to produce the primary X-Rays. It is important that the energy of the exciting X-Ray beam is higher than the characteristic energy to be detected.

Needless the say, regardless whether the exciter is an X-Ray tube or a Radioactive Isotope, caution must be exercised at all times dealing with ionizing radiation. 

X-Ray Detector: the X-Ray detector must have very high-resolution (typically 122-200 eV or less) as some peaks are really close to each other and high efficiency in the low-end of the X-ray energy spectrum - typically, efficiency is >25% in the 1 to 25 keV range but my detector covers energies all the way up to 60+ keV at a reduced efficiency.

The required resolution and energy range are normally outside of the capabilities of most Gamma Spectroscopy detectors. Even the thin-crystal GS probes designed for the X-ray region will not have the resolution needed - some limited XRF might still be possible though.

 A specialized semiconductor X-Ray detector device is needed - Si-PIN, SDD or CdTe detector.

These detectors are very expensive, complex and very delicate devices employing a thin and very fragile (0.5 mil or less) Beryllium window and are usually evacuated or filled with low-pressure Helium gas. Inside the detector device are housed many components: the Si-PIN or SDD detector semiconductor chip, an input FET transistor for the preamp, a temperature sensor, a built-in multi-stage thermo-electric cooler (TEC) with a delta of ~85°C which reduces thermal noise in the detector chip and a temperature sensor. The heat pumped out from the chip must be constantly dissipated in the environment thru the mounting stud and the component's back surface thermal interface.

The detector is connected to a charge-sensitive pre-amplifier and the output of the pre-amp is fed into a Digital Pulse Processor (Dpp) which does the pulse detection, pulse shaping, ADC and pulse-sorting as it has a built-in Multi-Channel Analyzer (MCA) (8k channels). 

A Power Supply module generates the bias for the detector, the power to the TEC module and controls the temperature of the detector chip, besides powering the pre-amp and Dpp.

Because of the very low Characteristic X-Ray energies of light elements it can be extremely difficult to detect these elements as their secondary X-rays are easily absorbed even by air - lightest elements emit energies <1keV.

 High-Intensity primary x-ray beam, very thin Be-window, Silicon-Drift Diode (SDD) detector, vacuum chambers and even Helium-filled test chambers are often needed for elements lighter than Potassium to be detected.

Typical Si-PIN detectors work well for elements heavier than Scandium (Z>21) but I am actually able to observe even the Calcium lines - not in great detail but visible in the spectrum.