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. 

6 comments:

  1. Ciao and very good job. I have two questions: where did you find the turn on precaution of the filament? Did you done some seasoning before using max tube voltage? Thank you!

    ReplyDelete
  2. And how did you “glued” the temperature sensor on the tube? Thank you again!

    ReplyDelete
  3. The filament protection is listed in the Moxtek tube specification, and it was also communicated to me by one of the Moxtek engineers. Filament must be heated for at least 1 seconds before it is turned off and it also must cool down for 2 seconds after it is turned off before restarted.
    In my controller, the tube start time is logged in and every time there is a command to turn off the tube by a timer or manually, if this command is received sooner than 1 second, I add a wait for the balance of time before the shutoff command is executed.
    Same goes after tube shut off command - time of the event is logged and the tube start command is disabled for the next 2 seconds.
    There is no need to exercise the tube with an increasing power the way it is tube with the high power tubes. It is an option but not really needed for this type of tube.

    Another safety feature I implemented is to write 0x000 in DAC's EEPROM for the control voltages so they are always kept at 0V when the tube is not running and while powering up the controller. Tube "power up" is done in stages - first control voltages specifying emission current and HV go up, followed by tube start signal and after the tube is turned off, same control voltages go back to 0V. This way, if there is a transient signal (spike) on the tube start/stop control line, the tube will not start accidentally.

    The temperature sensor board - (seen in the last picture of this post - http://blog.kotarak.net/2023/02/x-ray-source-controller-for-moxtek-and.html ) is attached with a small bracket and screw to the tube's brass housing. A piece of thermal interface is placed between the sensor chip and the housing.
    The tube's housing is fairly large and I don't run the tube at max power so it barely gets warm.

    ReplyDelete
    Replies
    1. Thank you so much! All is clear.

      Delete
  4. very interesting . I was involved in a small cu/ni bonification process in South Tanzania till lost month. I felt there are huge potential in PGM group metal other than gold and silver and rare earths in that area. Majority use 40 Kve XRF which is very high cost for any practical application. Do you still feel the price of XRF which ranges from 15000$ and above is justifiable. Every manufactures blames the cost of X ray tube/source. Is this fact. I come accross one manufacturer from US use Vandecaff generator for power source these guay is unapprochable in USA. Many mineral base d industry need a reliable XRF at affordable cost. Can you mention what will be your expenses to built an XRF. Is it possible to construct an affordable XRF for PGM/ Rare earths

    ReplyDelete
  5. Generally speaking portable XRF guns are extremely expensive - mainly due to the small form factor / size and the complex software which does quantitative analysis, showing direct readout of elements and percentages.
    A desktop lab setup like this one is a bit cheaper but the $15K price tag sounds about right - the detector, if using Si-PIN is around $7K and the tube is another $7K (these are list prices from Amptek and Moxtek from years ago but I dont think the prices changed much). A SDD detector type will add around $3-4K to the price.
    If doing REE XRF, it is best to use a W target anode and 50kV or even better 70kV tube. The tube I am using for example is MOXTEK Magnum using a transmission target which allows for extremely high X-ray flux at the aperture even though it is only 10W. Transmission target places the anode very close to the aperture - basically the anode is the back side of the beryllium window and this is a huge advantage because the total electrical power can be very low and the flux can be higher than tubes with power levels of hundreds of watts. This is what makes it so small and portable too but you pay the price for it - it is expensive!
    Bottom line - if you are buying new equipment, from the manufacturer, prepare for around $15K for tube + detector. Of course, in addition you'll need a PC and a shielded enclosure, not to mention the software for analysis.
    People have used portable dental X-ray machines - they are less expensive and not optimal as these tubes are not designed for a long duty cycle but I have seen OK results with them online - still there is no inexpensive solution for a proper XRF detector that I am aware of.

    ReplyDelete