Multichannel Pulse Height Analyzer

Some interesting links on radiation spectroscopy:

Hardware

This system is designed to analyze the height of Gaussian-shaped pulses and it expects a signal from a pulse-shaping amplifier. It is also known to work with non-overlapping exponentially rising and exponentially decaying pulses.

The position of the HV/LV jumpers of the fast analog inputs should be chosen depending on the amplitude range of the input signal. Ideally, the amplitude range of the input signal should closely match the chosen hardware input range.

The basic blocks of the system are shown in the following diagrams:

Multichannel Pulse Height Analyzer

Exponential Pulse Generator

The width of the pulse at the input of the pulse height analyzer module can be adjusted by varying the decimation factor of the CIC filter.

The baseline is automatically subtracted. The baseline level is defined as the minimum value just before the rising edge of the analyzed pulse.

The embedded oscilloscope can be used to check the shape of the pulse at the input of the pulse height analyzer module.

The exponential pulse generator can be used to generate signals with specified time and amplitude distributions. It consists of an impulse generator module and two IIR filters. The impulse generator module outputs a 8 ns (1 clock cycle at 125 MHz) impulse of a required amplitude and after a required time interval. The two IIR filters are used to emulate the exponentially rising and exponentially decaying edges of the generated pulses.

The projects/mcpha directory contains five Tcl files: block_design.tcl, pha.tcl, hst.tcl, osc.tcl, gen.tcl. The code in these files instantiates, configures and interconnects all the needed IP cores.

The source code of the R script used to calculate the coefficients of the FIR filter can be found in projects/mcpha/filters/fir_0.r.

Software

The projects/mcpha/server directory contains the source code of the TCP server (mcpha-server.c) that receives control commands and transmits the data to the control program running on a remote PC.

The projects/mcpha/client directory contains the source code of the control program (mcpha.py).

MCPHA client

Getting started with MS Windows

Getting started with GNU/Linux

sudo apt-get install python3-numpy python3-matplotlib python3-pyqt5
git clone https://github.com/pavel-demin/red-pitaya-notes
cd red-pitaya-notes/projects/mcpha/client
python3 mcpha.py

Building from source

The installation of the development machine is described at this link.

The structure of the source code and of the development chain is described at this link.

Setting up the Vitis and Vivado environment:

source /opt/Xilinx/Vitis/2023.1/settings64.sh

Cloning the source code repository:

git clone https://github.com/pavel-demin/red-pitaya-notes
cd red-pitaya-notes

Building mcpha.bit:

make NAME=mcpha bit

Building SD card image zip file:

source helpers/build-all.sh