X-Ray imaging

I have been working on making my own X-ray machine to be able to make images of objects and determine the inside geometry without having to open it.
This project is far from finished and is actively being worked on, but I will share some of my progress already.

I also use this post for my own documentation so many parts are far from finished.

Some parts of this project are a based on my previous Fusor project.

This is a project I have been wanting to do ever since I finished my Fusor in High school.
In 2024 I was able to acquire some hard to get components allowing me to work on it again.
I’m hoping to finish it this year.

X-Ray tube

An X-ray tube works by generating an electron cloud in a vacuum using a filament and then accelarating these electrons to a very hish speed towards an anode by using high voltage.
These electrons will crash into the anode where around 1% of the energy is converted into X-rays, while the rest is converted into heat.

I chose to use the HBJ21 tube because of the low cost and the fact I was able to get it imported into Belgium.
I tried to aquire other tubes that have better specs and documantation but was not able to get it shipped to me.

HBJ21 specs:

  • MaximumX-raytubevoltage: 70KV max (1.4Kw @20mA)
  • MinimumX-raytubevoltage: 50KV min (1.0KW @20mA)
  • MaximumX-raytubecurrent: 20mA max
  • Anodeheatcontent: 7000j
  • Max anode heat disipation: 210W
  • Nominalfocalspotvalue: 0.7mm
  • Maximumfilamentcurrent: 2.9A
  • Targetangle: 16°
  • price: €145

Other than the above listed specs there is no documentation available for this tube so I had to calculate certain values and create graphs myself.
Most importantly is the max operating time or exposure time without burning out the tungsten anode.

The most basic calculates to get the maximum exposure time is deviding the heat capacity by the applied power

t = 7000 / P

So I made a table at a few different voltage/current levels with the max exposure time..

Voltage (kV)Current (mA)Power (W)Time until 7000J (s)Continuous operation?
50525028.0
501050014.0
50157509.3
502010007.0
60530023.3
601060011.7
60159007.8
602012005.8
70535020.0
701070010.0
701510506.7
702014005.0
Any≤3≤210

This calculation excludes any heat disipation during the exposure. so in reality the max exposure time will be longer.
And while the listed anode heat disipation is 210W, this is only while operating at or close to the max temperature and with good cooling.
So to be on the safe side I asume the worst case scenario with no active heat disipation during exposure.

Radiation

The X-ray will obvously create a dangerous amount of Ionizing radiation that needs to be managed.

The tube actualy will generate a spectrum of X-rays.
The low energy photons will have to be filtered out because these do not contribute much to image quality and mainly pose a risk to living tissue.
A spread out spectrum from 20-70Kev (depending on tube voltage) will be created by Bremsstrahlung.
The tungstun target will also cause 2 characteristic peaks at 59.3Kev and 67.2Kev

Radiation detection

To detect this radiation and measure the output spectrum I use my Radiacode 103
This is pocket sized, bluetooth gama spectrometer.
It can measure x-ray/gamma rays from 20Kev up to 3Mev.
with a max radiation intensity of 1mS/h.

Radiation shielding

WIP

High voltage

To use an X-Ray tube a very high voltage is needed.
For the tube I will use I need 50-70KV
I split this up into 2 stage.
The first stage is a high voltage transformer that will generate upto 28KVAC (40KV peak)
The second stage will bump this voltage up to a maximum of 160KVDC

High voltage transformer

The high voltage transformer will generate the first stage high voltage of up to 28KVAC
It will operate at a high frequency to increase efficiently and decrease output ripple after rectification.
I am hoping to get it up to 10Khz, but 2Khz should be the minimum to achieve good performance at the current component choice

Transformer core

I chose the UY30 core from a random seller on Aliexpress, mainly because of the large size allowing me to space out the windings and to achieve a very high primary/secondary ratio.
I will operate this core at less than 10% of it’s power rating so I’m not worried about reaching any of it’s limits.

Transformer windings

WIP

Windings

WIP

Varnish

To protect and insulate the windings from damage and high voltage I applied a thick coating of a special high voltage varnish.

Many diyer’s seem to use simple solutions like nail polish, or epoxy.
The best solution I found is 4228A liquid from MGchemicals.
Epoxy has a dielectric strength of around 500V/mil while 4228A has a dielectric strenght of 3700V/mil

While it’s a bit more expensive it’s not too bad, and the difference in performance makes well up for it.
It’s also easy to apply, and the red coloring makes it easy to see if the coating is applied evenly.

Electronics

High voltage measurements

WIP

Filament driver

The filament of the X-ray tube needs to be controlled from 0 -> 2.9A
The current of this filament will control the amount of X-rays produced.

Because this filament is also the return path of the high voltage generator over the X-ray tube it’s important 1 side is always connected directly to ground.
That’s why I use high side switching and current control.

The circuit uses a LM338T to provide a hard current limit of 2.82A so there is no possibility of an over current situation.

The LM338T needs a hunt for reference to work as a current limiter.
This shunt also provides the feedback for the variable current control, and also goes to the ADC for live monitoring.

The variable control is achieved by using a mosfet in it’s linear region.
A DAC will provide the setpoint and an opamp will make sure the appropriate current will be reached to match the DAC setpoint.

This method is not power efficient and will dissipate a few wats of power so adequate cooling is needed.
Efficiency is not really important and I preferred to have simple and robust system for this part.

Better efficiency can be achieved with controlled dc-dc converter but this adds complexity and points of failure.

Hardware safety triggers

In case the software safety triggers react too late or not at all I wanted a fallback system that would disengage the high voltage system and trigger an alarm.

To increase reliability this safety system is made as simple as possible and will react as soon as any input signal from the high voltage system goes above the set thresholds.

A few comperators will monitor the voltage of different measurments.
The trigger point of this comperator can be set with 2 trimmer potentiometers.

When the comperator is triggered it will stop pulling down it’s output.
Because this will only last as long as the signal is above the threshold a NOR SR latch circuit is behind this to keep the alarm signal active until a reset is called.

While the alarm signal is active a buzzer will sound and a red LED will light indicating what measurement triggered the safety.

Multiple system will be turned of to ensure a safe configuration.

  • power to the primary side of the high voltage transformer
  • DAC signal to the amplifier for the high voltage transformer
  • AC power to the amplifier for the high voltage tranformer
  • Filament current driver


A self test system is also present using relays on each channel, allowing a signal from the DAC to ramp up and to test at what level the safety system activates.

Here is the full circuit

Leave a Reply

Your email address will not be published. Required fields are marked *