Mittwoch, 27. September 2017

gamma spectroscopy #2: FPGA-based 4-channel data acquisition for gamma spectroscopy

Introduction

In a previous blog post I was showing how to do gamma spectroscopy using the sound card of a PC. This approach is very cheap and simple, but there are some disadvantages:

  • Limited time resolution: with a sampling rate of 192kHz the time resolution is only about 5 microseconds in a naive implementation. With some software interpolation, this value could be decreased to maybe 1 microsecond (I would guess... but I never tried it)
  • Limited rate: Because of the low sampling rate, the pulses have to be stretched to a length of about 50 microseconds in order to achieve a good energy resolution. Because of that, even with moderate count rates in the detector, there is already a lot of overlap in the pulses and that results in reduced energy resolution.
  • Limited number of acquisition channels. This is another severe point. Sound cards with more than 2 channels are very uncommon. They are for sure not standard in a PC and if one has to buy new hardware anyhow, one can also by something more specialized for gamma spectroscopy.
I want to present my first attempt to build an FPGA based data acquisition system for gamma spectroscopy with scintillation detectors.

Basic Idea

The system is based on the time over threshold (TOT) method, where the signals from a scintillator are converted into a digital signal by a threshold comparator and the length of the digital pulses is measured. A time resolution of 5 nanoseconds is easy to achieve using a 200MHz counter inside an FPGA and a rising/falling edge detector that sends the current counter value to the PC.
As can be seen on the picture, the duration for which the detector signal is over/under the threshold depends on the signal amplitude. The dependence is non-linear. For signals that have a fast rising edge and a relatively slow exponential decay the dependence is approximately logarithmic, i.e. TOT is proportional to log(Amplitude).

Implementation

The system is implemented using a Mojo Spartan6 FPGA development board from embedded micro and a self-made PCB with an 5x amplifier using BF862 JFet Transistors and a LT1720 comparator. The following picture shows the schematic for one of the four implemented channels. The signal SIG1 goes directly into an IO pin of the FPGA. The threshold can be adjusted with the potentiometer RV2 below the two transistors. The amplifier is a differential one with the second input tied to GND to compensate for temperature drifts. In addition to the signal amplification, the amplifier stage lifts both input signals for the comparator to a voltage below 3.3V and GND, allowing to use a single supply voltage. The signal path is entirely DC coupled, so even for high rates there will be no base line shift. The input impedance of the amplifier (22 kohm) determines the signal length. With a 5 ns resolution, it might be possible to use even 50 ohms which would imply no additional signal stretching at all (because the coaxial cable has also 50 ohms) and would have the additional advantage that reflections are avoided (this is however only relevant if the cables are longer).
Here are some pictures from the analog front-end PCB and the assembly with the Mojo board and the box that I used to mount everything inside.

FPGA architecture

The FPGA project is based on the VHDL port of the Mojo base project. The communication with the PC over USB (a virtual serial terminal) is already implemented in the base project. All I had to do was to implement four of the counter based TDCs. 

The Mojo base project runs at 50MHz clock speed. In order to have a high time resolution, the counter clock should be as fast as possible. Without any effort, I could go up to 200MHz. For higher counter frequencies, my design doesn't work reliable anymore. For now, I am quite happy with the resulting 5ns resolution.

Spectroscopy results

The first results are very promising. Below is a measurement over a few minutes with some LYSO crystals next to a 3x3'' NaI:Tl detector biased with -800V (purple) and a background measurement for the same time (green). The upper picture has linear scaling for the counts and labels for the 176Hf lines that originate from the decaying 176Lu as part of the LYSO material. The bottom picture has logarithmic scaling of the counts and shows labels for the two most prominent background lines and some cosmic muon events. A very nice thing about the ToT method is the lack of any practical amplitude limit. This is caused by the logarithmic dependency and the practically unlimited time measurement range (the 30-bit counter overflows only after about 5.3 seconds). For the same reason, calibration of the energy axis is more challenging because the relationship is not linear.

Outlook

There are things to improve, and I hope I can share them soon:
  • with 4 channels, I have the possibility to make more advanced setups employing gamma-gamma coincidences using more than 2 detectors. For example two NaI:Tl detectors and an active LYSO source (a LYSO crystal coupled to a small photomultiplier or silicon-photomultiplier).
  • with more channels there is need for more complex analysis software which I'm currently writing
  • The data with the Mojo board is rather limited. At the moment the total event rate of all 4 channels is about 2.5 kHz. Sending bare time-stamps to the PC is not the most efficient way of using weak data connection. In the future I want to send only time differences to the PC using a variable bit-width. 
  • If the threshold is decreased further (below the ~80 keV as it was in the test measurement) the energy resolution degrades. This is because of the faint slope of the leading edge of the signal at low amplituedes - a basic mathematical property of the exponential decay. This can be improved using a dynamic threshold dynamic threshold

Keine Kommentare:

Kommentar veröffentlichen