Thursday, January 19, 2023

XRF Exciter source using a Moxtek Miniature X-Ray Tube

 I am working on a new XRF Exciter source, employing a pretty cool miniature, ceramic, 10W X-Ray tube with Tungsten 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 testing I was driving the tube with my 3-channel power supply in a rather "manual fashion" - 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 current - 0 to 4V are scaled to 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. A TTL level signal controls the beam ON/OFF and there is a FILAMENT READY return signal from the HV PS 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 will be part of my design goals for the controller.

Prototyping the X-Ray tube controller - using nRF52840 MCU with ARM Cortex M4F, 24LC32 EEPROM for storing configurations, 12-bit MCP4728 Quad DAC for Tube control voltages, large SHARP Memory display (400x240), bi-directional 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, 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.

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 and calculated X-Ray tube power. Third section is the X-Ray tube's Parameter (S) Set configuration where the user can dial in voltage in -5kV to 50kV range (0.1kV steps) and Tube's current 1uA to 200uA (0.1uA steps). Bottom part is the (M) monitor display showing the return signals from the tube's power supply module - sampled with 2x 12-bit ADCs. 
All set parameters are persistent - stored in EEPROM and automatically loaded on startup. There are also two user-configurable Presets with Tube parameters for quick switching between different sets of values for different experiments. I might increase the number of presets to 3 eventually.

There are 3 operational modes - MOMENTARY when beam is ON while the OPERATE button is pressed and turned OFF when 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. 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 timer while the beam is ON.

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. There is an INTERLOCK detection feature which inhibits any operation unless the interlock switch on the door/lid of the 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 Timeout feature which will turn off the tube after a period of time if left unattended. The controller also constantly monitors the Low Voltage supply and disables the tube if under-voltage condition occurs. Tube temperature is monitored with an external sensor attached to the tube housing and the tube is turned OFF 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 the tube is turned OFF.
Another safety feature is a "parameter watchdog" - 2 seconds after the x-ray tube is on 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 is exceeded, the controller will turn OFF the tube.

There is a relay with NO/NC contacts used for control of external equipment - X-Ray ON indicator, shutter, 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. 

 This is 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.

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 2.4V (they run with 3.00V reference) - I plotted voltage set vs. voltage read and created a curve to correct it, which improved the accuracy quite a bit.


The internal ADCs of nRF52840 are configured for 12-bit resolution and using the built-in 3.0V (0.6V x5 Gain) voltage reference. The ADC noise is very typical for these chips - around ~3mV swing as seen on the plot. I might employ a ring-buffer and toss out the Min and Max values over a couple of seconds samples while averaging the rest in an attempt to get a more stable readout if I get bored - now the least significant digit exhibits some ADC noise from time to time - it is fairly stable due to the over-sampling conversation I am performing so no huge motivation to address this.

3 comments:

Anonymous said...

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!

Anonymous said...

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

Andrey E. Stoev said...

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.