Compact Back-End Electronics with Temperature Compensation and Efficient Data Management for In Situ SiPM-Based Radiation Detection

A compact back-end interface for silicon photomultipliers (SiPMs) implementing Zener diode-based temperature compensation has been developed for the remote detection of beta and gamma radiation. Remote detection is facilitated by the development of an efficient data management system utilising MySQL database storage for recording periodic spectra data for wireless access over a private Wi-Fi network. A trapezoidal peak shaping algorithm has been implemented on an FPGA for the continuous conversation of pulses from the SiPM, signifying the detection of a radiological particle, into spectra. This system has been designed to fit within a 46 mm cylindrical diameter for in situ characterization, and can be attached to one or more SiPMs used in conjunction with a range of scintillators. LED blink tests have been used to optimise the trapezoidal shaper coefficients to maximise the resolution of the recorded spectra. Experiments with an array of SiPMs integrated with a NaI(Tl) scintillator exposed to sealed sources of Co-60, Cs-137, Na-22 and Am-241 have shown that the detector achieves a peak efficiency of 27.09 ± 0.13% for a gamma peak at 59.54 keV produced by Am-241, and a minimum energy resolution (Delta E/E) of 4.27 ± 1.16% for the 1332.5 keV gamma peak from Co-60.


Introduction
The detection of beta particles and gamma rays using scintillating materials has become a standard technique. Classically, photomultiplier tubes (PMTs) have been integrated with the scintillators for photon detection, but more recently SiPMs have been a popular alternative despite the effects of temperature-induced drift in the gain given a constant bias voltage [1].
SiPMs are light sensitive devices with many light sensitive microcells consisting of an avalanche diode and quenching resistor. When a photon strikes the diode, it conducts for a short period before being reset. These devices consist of thousands of microcells where multiple microcells can be activated simultaneously, resulting in a current spike proportional to the active number of microcells. SiPMs are preferred over PMTs in some applications, as they are not sensitive to magnetic fields and are compact in size. In addition, SiPMs require lower bias voltages to operate and therefore are more suitable for handheld counting and in situ isotope detection where power infrastructure is limited.
In order to further compact scintillator-based radiation detectors, Field Programmable Gate Arrays (FPGAs) have been integrated into the back-end electronics in order to process pulse data quickly and to interface with peripherals [2][3][4]. Previous work has investigated trapezoidal shaping algorithms that convert detected pulses into alternative forms for better ground, and wide area monitoring where the installation of ethernet and other forms of wired communication is not suitable; this could be due to safety concerns with regard to drilling holes for cables in radiologically contaminated environments, or the added trip hazards of adding cables along or across pathways.

Detector Hardware Design
The block diagram depicted in Figure 1 shows the structure of the developed backend system, from the scintillator-based detector through to the method of retrieving data using a Wi-Fi network. Each square represents a discrete part of the system with the following functionality of key areas: • The Zener Diode Temperature Compensation system has been developed to counter the drift in the gain in the SiPMs due to temperature changes. • A Bias Supply Low-pass Filter is used to remove high frequency noise from the supply of the SiPM. • A SiPM Array Board is a circuit board developed to hold a maximum of 17 SiPMs in an array in contact with the scintillator.

•
The Two stage SiPM Amplifier converts current pulses from the SiPM into pulses of voltage that can be digitized for further analysis.

•
The Re-Biasing Circuit removes dark voltage and adds a set bias to maximise ADC range. • Channel 1 & 2 ADCs are integrated into a circuit board with the FPGA to digitize pulses from the SiPM.

•
The Trapezoidal Shaper is a digital algorithm implemented in VHDL to process pulses from SiPM into a suitable spectrum. • Spectrum Memory is internal FPGA memory that holds the channel data, recording the amount of interactions detected and their corresponding energy levels. • Python Script: Spectrum Receive and Store listens for spectrum data collected by the FPGA, formatting it into a MySQL database, while a second script running on a remote PC queries the database to obtain the stored spectrum data.

•
The MySQL Database: Spectrum Table database holds every spectrum taken at a set rate (every 1.34 s), allowing a record to be kept and accessed wirelessly at a later point.

•
With an End User Computer, an end user can access the database and retrieve the spectra data via a private network and then visualize it using a developed python script.

SiPM Amplifier Design
Here, SiPM's (on a C-series semiconductor) [13] have been utilised, which possess a high readout gain of 3 × 10 . In order to amplify the SiPM output, a transimpedance amplifier is used to convert the produced pulse of current into a measurable voltage pulse that can then be digitised by an ADC for further processing. The amplification board schematic is shown in Figure 2, where the EL5171 op-amp has been implemented, as it can be configured as a single input/dual output transimpedance amplifier.

SiPM Amplifier Design
Here, SiPM's (on a C-series semiconductor) [13] have been utilised, which possess a high readout gain of 3 × 10 6 . In order to amplify the SiPM output, a transimpedance amplifier is used to convert the produced pulse of current into a measurable voltage pulse that can then be digitised by an ADC for further processing. The amplification board schematic is shown in Figure 2, where the EL5171 op-amp has been implemented, as it can be configured as a single input/dual output transimpedance amplifier.

SiPM Amplifier Design
Here, SiPM's (on a C-series semiconductor) [13] have been utilised, which possess a high readout gain of 3 × 10 . In order to amplify the SiPM output, a transimpedance amplifier is used to convert the produced pulse of current into a measurable voltage pulse that can then be digitised by an ADC for further processing. The amplification board schematic is shown in Figure 2, where the EL5171 op-amp has been implemented, as it can be configured as a single input/dual output transimpedance amplifier.

Figure 2.
Two stage EL5171 op-amp based amplifier. The first stage is a transimpedance amplifier with differential output, and the second phase is an inverting amplifier, both with a set gain.
The two 50 Ω resistors and 10 nF capacitors form a second order low-pass filter in order to reduce noise on the bias supply, which could be further introduced into the Figure 2. Two stage EL5171 op-amp based amplifier. The first stage is a transimpedance amplifier with differential output, and the second phase is an inverting amplifier, both with a set gain.
The two 50 Ω resistors and 10 nF capacitors form a second order low-pass filter in order to reduce noise on the bias supply, which could be further introduced into the amplifier pulse signal. Resistors setting the gain of the first and second stage inverting amplifiers were selected through experimental calibration in order to maximise the ADC range but not result in the clipping of the detected pulses. Capacitors have been added into the feedback of the amplifiers to act as low-pass filters with a frequency cut-off at 723 kHz and 1.54 MHz; as a result, this stretches the pulse, allowing more samples to be taken of its shape by the ADC board, as well as blocking high frequency noise.
Between the second stage of amplification and the ADC, a re-biasing circuit has been added, which blocks the SiPM's dark current, which has been amplified into a voltage. This addition also adds a set DC bias difference of −0.893 V, which allows a greater range of the ADC's input to be used, which has a peak to peak range of 2 V. It should be noted that the ADC reference voltage has been configured to be 1.5 V on the ADC board. The manufactured SiPM amplifier can be seen in Figure 3. amplifier pulse signal. Resistors setting the gain of the first and second stage inverting amplifiers were selected through experimental calibration in order to maximise the ADC range but not result in the clipping of the detected pulses. Capacitors have been added into the feedback of the amplifiers to act as low-pass filters with a frequency cut-off at 723 kHz and 1.54 MHz; as a result, this stretches the pulse, allowing more samples to be taken of its shape by the ADC board, as well as blocking high frequency noise. Between the second stage of amplification and the ADC, a re-biasing circuit has been added, which blocks the SiPM's dark current, which has been amplified into a voltage. This addition also adds a set DC bias difference of −0.893 V, which allows a greater range of the ADC's input to be used, which has a peak to peak range of 2 V. It should be noted that the ADC reference voltage has been configured to be 1.5 V on the ADC board. The manufactured SiPM amplifier can be seen in Figure 3.

SiPM Temperature Compensation
To date, multiple methods for the temperature compensation of a SiPM have been investigated and implemented. These methods include the use of a negative temperature coefficient thermistor, serially connected p-n junctions in forward bias [14], and the am-

SiPM Temperature Compensation
To date, multiple methods for the temperature compensation of a SiPM have been investigated and implemented. These methods include the use of a negative temperature coefficient thermistor, serially connected p-n junctions in forward bias [14], and the amplitude of dark pulses from the SiPM [15]. This feedback is then used to adjust the voltage bias across the SiPM in order to keep the overvoltage as constant as possible, and therefore the gain of the SiPM which depends on the overvoltage is stabilized.
Where this work diverges from previous implementations is in the use of Zener diodes as the means of continuously sensing the temperature of the SiPM. These diodes feature a Zener voltage, which is the voltage at which a Zener diode will conduct in reverse bias. However, this is not constant, and instead varies as a function of temperature according to its temperature coefficient, which itself changes from diode to diode due to manufacturing tolerances. The C-series SiPMs possess a breakdown voltage from 24.2 to 24.7 at 21 • C, a recommended overvoltage range from 1.0 to 5.0 V, and a breakdown voltage temperature dependence of 21.5 mV/ • C [13]. This allows the breakdown voltage of the SiPM to be represented by: where V SiPM Breakdown is the breakdown voltage at a temperature of T SiPM • C, V SiPM−br is the given breakdown voltage at 21 • C, and K SiPM is the temperature dependence of V SiPM Breakdown . As the SiPM overvoltage is simply the difference between the breakdown voltage and the bias voltage, the overvoltage V SiPM Overvoltage can be formulated as: In order to keep a constant gain, this overvoltage must be kept at a constant value close to the upper end of the overvoltage range in order to maximize the SiPM gain. The breakdown voltage of the Zener diode (Zener Voltage) can also be formulated as: where V Zener Breakdown is the Zener breakdown voltage at a temperature of T Zener • C, V Zener−br is the given breakdown voltage at 21 • C, and K Zener is the temperature dependence of V zener br . As the voltage drop across the diode is equal to the bias voltage placed over the SiPM (see Figure 4): where is the breakdown voltage at a temperature of °C, is the given breakdown voltage at 21 °C, and is the temperature dependence of . As the SiPM overvoltage is simply the difference between the breakdown voltage and the bias voltage, the overvoltage can be formulated as: In order to keep a constant gain, this overvoltage must be kept at a constant value close to the upper end of the overvoltage range in order to maximize the SiPM gain. The breakdown voltage of the Zener diode (Zener Voltage) can also be formulated as: where is the Zener breakdown voltage at a temperature of °C, is the given breakdown voltage at 21 °C, and is the temperature dependence of . As the voltage drop across the diode is equal to the bias voltage placed over the SiPM (see Figure 4): Therefore, given that the SiPM and Zener diode are held at the same temperature, for the overvoltage to stay constant (perfect temperature matching):  Therefore, given that the SiPM and Zener diode are held at the same temperature, for the overvoltage to stay constant (perfect temperature matching): and: If a suitable Zener diode with the exact required characteristics cannot be located, multiple Zener diodes connected in series can be used instead, as their individual voltage drops and the temperature coefficients would be combined:

Temperature Compensation System Simulation
LTspice (version XVII, Linear Technologies), a SPICE-based analogue electronic circuit simulator, was selected to produce the simulations, as it can utilise models directly from Onsemi, the manufacturer of the Zener diodes, resulting in a more accurate simulation.
In order to simulate the electrical behavior of SiPMs, a simplified Signal Photon Avalanche Diode model (SPAD model) was used. Similar models have been used when focusing on SiPM modeling for front end electronics [16] and SPICE electrical models [17]. This allows the breakdown voltage, terminal capacitance, quench resistance, and diode switching characteristics to also be modeled. For the C-series SiPM, limited model data is provided by the manufacturer, therefore only the terminal capacitance and breakdown voltage were modeled for the SiPM in this work.
The SiPM has been implemented in the simulation using three components: a voltage source, which varies using Equation (2), a digital switch with a short on duration which represents a single photon striking the SiPM, and a 3400 pF capacitor representing the total capacitance across the anode and cathode of the SiPM. Figure 4 shows the temperature compensation system using a combination of two Zener diodes in series. These diodes have Zener voltages of 5.6 V and 24.1 V, respectively, making the total series voltage drop by 29.7 V. This circuit has been simulated in LTspice alongside a non-temperature controlled 'static' system using a set bias voltage created from a voltage divider. The bias voltage of both the temperature compensated and nontemperature compensated systems have been made to match at a temperature of 27 • C. The two Zener diodes have been configured in reverse voltage bias, with two unity gain amplifiers added in order to, firstly, isolate both the reference voltage (ADC_REF) from the cathode of the upper Zener, and secondly to act as a current buffer for the Zener voltage drop in order to bias one or multiple SiPMs. The TL071 op-amp was used for the buffer op-amps.
As a result of the LTspice simulations with the temperature compensated and nontemperature compensated systems, Figures 5 and 6 have been obtained. These show the resulting pulses from the output of the transimpedance amplifier and their peak-to-peak measurements over the temperature range of −20 to 50 • C with a step of 5 • C. Without compensation, the slope of best fit has a gradient of −0.475 ± 0.020 and an intercept of 117.41 ± 0.51, compared to the compensated system with a fit gradient of 0.0035 ± 0.019 and an intercept of 104.47 ± 0.49 (a 95% confidence interval). Therefore, it has been shown that the simulated drift in pulse magnitude has been reduced by more than a factor using the Zener compensation method over the tested temperature range. resulting pulses from the output of the transimpedance amplifier and their peak-to-peak measurements over the temperature range of −20 to 50 °C with a step of 5 °C. Without compensation, the slope of best fit has a gradient of −0.475 ± 0.020 and an intercept of 117.41 ± 0.51, compared to the compensated system with a fit gradient of 0.0035 ± 0.019 and an intercept of 104.47 ± 0.49 (a 95% confidence interval). Therefore, it has been shown that the simulated drift in pulse magnitude has been reduced by more than a factor using the Zener compensation method over the tested temperature range.

Zener Diode Selection
While the simulations performed in the previous section deal with Zener diodes with set temperature coefficients, in practice, the diodes have a range of values in which the coefficients can lie between, as defined by the manufacturer. Therefore, an experiment was conducted in order to find two suitable Zener diodes that match the SiPM. The experiment involved using a temperature controllable hotplate (Voltera V-One) on which the Zener diodes were attached. An oscilloscope was used to measure the voltage drop over the two Zener diodes, and an infrared thermometer was used to measure the surface temperature of the Zener diodes. The relationship between temperature and voltage drop for the selected diodes is shown in Figure 7.

Zener Diode Selection
While the simulations performed in the previous section deal with Zener diodes with set temperature coefficients, in practice, the diodes have a range of values in which the coefficients can lie between, as defined by the manufacturer. Therefore, an experiment was conducted in order to find two suitable Zener diodes that match the SiPM. The experiment involved using a temperature controllable hotplate (Voltera V-One) on which the Zener diodes were attached. An oscilloscope was used to measure the voltage drop over the two Zener diodes, and an infrared thermometer was used to measure the surface temperature of the Zener diodes. The relationship between temperature and voltage drop for the selected diodes is shown in Figure 7.
coefficients can lie between, as defined by the manufacturer. Therefore, an experiment was conducted in order to find two suitable Zener diodes that match the SiPM. The experiment involved using a temperature controllable hotplate (Voltera V-One) on which the Zener diodes were attached. An oscilloscope was used to measure the voltage drop over the two Zener diodes, and an infrared thermometer was used to measure the surface temperature of the Zener diodes. The relationship between temperature and voltage drop for the selected diodes is shown in Figure 7.  By fitting a linear trend line, the temperature coefficient can be shown to be 22.8 mV/ • C with a voltage drop of 29.56 V at 21 • C. This trend line can be extrapolated for a more suitable temperature range (selected to be −20 to 30 • C), as seen in Figure 8. By fitting a linear trend line, the temperature coefficient can be shown to be 22.8 mV/°C with a voltage drop of 29.56 V at 21 °C. This trend line can be extrapolated for a more suitable temperature range (selected to be −20 to 30 °C), as seen in Figure 8. In Figure 8, additional data has been plotted alongside the extrapolation of the measured Zener diode temperature drop (represented as a blue line). A red line represents a compresence to a set bias voltage (29.45 V) which is constant, unaffected by temperature. The green shaded region encapsulates the ideal bias voltage of the C-series SiPM for an overvoltage of 5 V above the breakdown voltage, and the exact breakdown voltage varies from part to part due to manufacturing tolerances [13]. Finally, a gray shaded region represents the tolerances in which the combined Zener pair's voltage drop could lie; these tolerances have been taken from the respective datasheets of the diodes (see Table 1). SiPM (with 5 V In Figure 8, additional data has been plotted alongside the extrapolation of the measured Zener diode temperature drop (represented as a blue line). A red line represents a compresence to a set bias voltage (29.45 V) which is constant, unaffected by temperature. The green shaded region encapsulates the ideal bias voltage of the C-series SiPM for an overvoltage of 5 V above the breakdown voltage, and the exact breakdown voltage varies from part to part due to manufacturing tolerances [13]. Finally, a gray shaded region represents the tolerances in which the combined Zener pair's voltage drop could lie; these tolerances have been taken from the respective datasheets of the diodes (see Table 1). Interpreting Figure 8, using the set DC bias at 29.45 V would not be suitable below a temperature of approximately 10 • C, as the voltage drop leaves the SiPM's region of ideal matching, resulting in an overvoltage greater than 5 V, which could cause permanent damage to the SiPM, while the Zener voltage drop stays within the ideal region for the full temperature range. Table 1 states the device specifications taken from the respective datasheets.
As the measured Zener diodes have a 22.8 mV/ • C temperature coefficient and the SiPM has a defined 21.5 mV/ • C temperature coefficient, the resulting bias error for the tested Zener diodes with a C-series SiPM can be defined using the measured Zener diode behaviour and Equation (6): (11) where V Overvoltage error is the difference in bias voltage caused by the imperfect matching when the SiPM(s) and Zener diodes are both held at a temperature T • C. The ±0.25 represents the SiPMs breakdown voltage tolerance. Therefore, the implementation of this tested system would reduce the temperature dependence of the SiPM overvoltage from 21.5 mV/ • C to 1.3 mV/ • C.

FPGA and ADC Interconnection Board
In order to digitize the pulses from the SiPM amplification board, a digitiser board utilising a 14-Bit analog to digital converter (AD9244 [20]) was used. The ADC interconnection board was designed, manufactured and integrated into the detector to run at a sample rate of 50 MSPS. Two ADCs were included, allowing for the possibility of two separate channels operating simultaneously, providing an improvement over systems such as the Topaz-SiPM, which only has one input channel without an option to add an additional channel. Compared with another similar FPGA-based wireless gamma spectrometer [3], the system developed here has a higher resolution ADC, whilst also having a greater sample rate.
An EP2C5T144 Altera Cyclone II FPGA soldered onto a minimal development board was used for running the ADC communication, serial communication, and pulse shaping algorithms. The Cyclone II was selected due to its compact size and large I/O pinout. The ADC board fits atop of the FPGA minimal development board to be as compact as possible and has added connections for +5 V, +3.3 V, ground, input pairs for each ADC, a voltage reference output, and a UART interface for sending data to the single board computer, a Raspberry Pi Zero 2 W. A photograph of the dual ADC board attached to the FPGA board can be seen below in Figure 9.
was used for running the ADC communication, serial communication, and pulse shaping algorithms. The Cyclone II was selected due to its compact size and large I/O pinout. The ADC board fits atop of the FPGA minimal development board to be as compact as possible and has added connections for +5 V, +3.3 V, ground, input pairs for each ADC, a voltage reference output, and a UART interface for sending data to the single board computer, a Raspberry Pi Zero 2 W. A photograph of the dual ADC board attached to the FPGA board can be seen below in Figure 9. To further compact the FPGA to match the footprint of the ADC board, the JTAG, active serial header, and regulator were removed. The 1.2v regulator used to supply the FPGA was migrated onto the new cutdown board and soldered alongside new pull up resistors for the programming interfaces, without which the FPGA will not start. As a result, the original FPGA board footprint was reduced from 72 mm by 50 mm to 39 mm by 50 mm, which is identical to the ADC board. While powered, the FPGA and two ADCs pull approximately 220 mA, with a further 260 mA used by the single board computer, and less than 1 µA is used by the SiPM bias. For communication between the FPGA and To further compact the FPGA to match the footprint of the ADC board, the JTAG, active serial header, and regulator were removed. The 1.2v regulator used to supply the FPGA was migrated onto the new cutdown board and soldered alongside new pull up resistors for the programming interfaces, without which the FPGA will not start. As a result, the original FPGA board footprint was reduced from 72 mm by 50 mm to 39 mm by 50 mm, which is identical to the ADC board. While powered, the FPGA and two ADCs pull approximately 220 mA, with a further 260 mA used by the single board computer, and less than 1 µA is used by the SiPM bias. For communication between the FPGA and ADCs, two headers provide two 14-bit parallel data buses and connections for the clock 50% duty cycle stabilizer, the out-of-range indicator, and data format pins for configurability.

Digital Signal Processing
There are multiple methods of detecting and measuring the characteristics of pulses emitted by an amplified SiPM. Past research has investigated the use of trapezoidal and triangular pulse shaper algorithms that take the digitized samples of exponentially decaying pulses and convert them into another form that can be more easily analyzed [5]. Multiple shapers have also been implemented with different "fast" and "slow" shaping constants so that multiple pulses that overlap (double counts) can be identified and removed [6].
Here, a trapezoidal shaping algorithm has been implemented [5] in VHDL within the Cyclone II FPGA and AD9244 ADC in order to create and store energy spectra formed from the pulses emitted by the SiPM. The key variables that affect the output of the shaper are three sequential sample delays that will be referred to as simply delay 1, 2, and 3. Also present is a threshold value that dictates when a pulse is present above a background of noise, and finally an M coefficient that is used for zero pole cancellation, which depends on the exponential decay time of the SiPM pulses and the sample rate of the ADC [21].

FPGA Spectrum Accumulation
In this mode of operation, a two port RAM module is implemented on the FPGA, which allows for both the writing and reading of 16-bit values simultaneously at two different clock frequencies. When a pulse is emitted by the SiPM, it is amplified, digitized, and shaped; the peak value of the shaped pulse is then used as the address for recording that interaction. Proceeding a set delay after the pulse threshold trigger, the current count stored in the address of the peak value is read. On the next clock cycle, the read count value is incremented by one and then written at the same memory address, thereby representing a recorded interaction at that energy. Figure 10 shows a finite state machine of this memory writing process. The output from the shaper algorithm produces a 32-bit integer which is divided down to 16 bits for the detected peaks to fit within the limited spectrum memory on the FPGA. This also allows the energy range to be adjusted to suit the energies of the different radiation sources the detector will be tested with, as the detector energy channels scale proportionally to the division factor. From here onwards, the factor division of 2 18 and 2 17 will be referred to as zoom level 1 and zoom level 0.5, respectively. This VHDL code was simulated using Modelsim-Altera [22] before running on the detector hardware. ferent clock frequencies. When a pulse is emitted by the SiPM, it is amplified, digitized, and shaped; the peak value of the shaped pulse is then used as the address for recording that interaction. Proceeding a set delay after the pulse threshold trigger, the current count stored in the address of the peak value is read. On the next clock cycle, the read count value is incremented by one and then written at the same memory address, thereby representing a recorded interaction at that energy. Figure 10 shows a finite state machine of this memory writing process. The output from the shaper algorithm produces a 32-bit integer which is divided down to 16 bits for the detected peaks to fit within the limited spectrum memory on the FPGA. This also allows the energy range to be adjusted to suit the energies of the different radiation sources the detector will be tested with, as the detector energy channels scale proportionally to the division factor. From here onwards, the factor division of 2 and 2 will be referred to as zoom level 1 and zoom level 0.5, respectively. This VHDL code was simulated using Modelsim-Altera [22] before running on the detector hardware.

Database Design and Implementation
As this detector is primarily designed for portability and in-situ use with minimal infrastructure, there is a need to provide a method of onboard data storage, as the end user may not always be available to retrieve data captured by the detector in real time. A MySQL database was implemented in the detector to store the spectra data as it is streamed from the FPGA. MySQL is a well-suited internet of things solution, as multiple copies of this detector can be connected to a single network, each with a unique IP address allowing access through a secure SSH connection. The FPGA talks to the single board computer hosting the database using UART at a baud rate of 115,200 symbols per second. An exposure of 1.34 s was used for collecting each spectrum before the FPGA delivers the contents of the channel memory, and while doing so it resets every channel to zero, preparing for the next exposure. A python script listens for this data, where it is then formatted and inserted as a new entry into the database as a BLOB (Binary Large Object) alongside the time and date. When the user wishes to receive data wirelessly from the detector, the destination computer is connected to the same private network as the detector, and a second python script on the destination computer queries each entry of the database, removing it afterwards. The developed database has been tested up to a maximum table size of 161,717 rows of spectra data stored internally on the detector. The total count time for this data can be calculated using: Total Count Time = 161,717 × 1.34 S = 216,700 S = 2.51 Days (13)

Detector Resolution Determination Using LED Pulse Testing
Here, the resolution of the captured spectra was benchmarked using Light Emitting Diode (LED) pulse testing. This involves placing a LED in a set position above the SiPM, where it is fed voltage pulses to modulate the LED and thus test the efficacy of the SiPM detecting the bursts of light. The blinker circuit produces a constant pulse of light with a period of approximately 304 ns. The frequency of the blinking and the LED brightness were kept constant for all testing, in order to study the effects on the recorded spectra caused by adding SiPMs and changing the delay constants of the pulse shaper. The LED was kept at a constant distance of approximately 5 cm from the SiPM within a lightproof enclosure for the three experiments.
The delays of the implemented shaper have been selected in order to transition from a trapezoidal to a triangular shaped window to see the effect on the calculated resolution. Figure 11 shows three examples of the transition from a trapezoidal to a triangular shaper. For the experiment, seven different windows were used in the transition, and the sum of the three delays has been kept constant at 200 samples in order to study the shaper effect on the resulting spectra.

Detector Resolution Determination Using LED Pulse Testing
Here, the resolution of the captured spectra was benchmarked using Light Emitting Diode (LED) pulse testing. This involves placing a LED in a set position above the SiPM, where it is fed voltage pulses to modulate the LED and thus test the efficacy of the SiPM detecting the bursts of light. The blinker circuit produces a constant pulse of light with a period of approximately 304 ns. The frequency of the blinking and the LED brightness were kept constant for all testing, in order to study the effects on the recorded spectra caused by adding SiPMs and changing the delay constants of the pulse shaper. The LED was kept at a constant distance of approximately 5 cm from the SiPM within a lightproof enclosure for the three experiments.
The delays of the implemented shaper have been selected in order to transition from a trapezoidal to a triangular shaped window to see the effect on the calculated resolution. Figure 11 shows three examples of the transition from a trapezoidal to a triangular shaper. For the experiment, seven different windows were used in the transition, and the sum of the three delays has been kept constant at 200 samples in order to study the shaper effect on the resulting spectra.

LED Blinking Experiment Results
The recorded spectrum for each window with 1, 2 and 3 SiPMs was taken over 13.4 min made from a cumulative total of 600 individual spectra taken every 1.34 s. The FWHM and resolution were obtained from the recording by placing a Gaussian fit over the peak. The recorded set of spectra for one SiPM has been plotted in Figure 12 as an example, but the data has also been produced for tests with 2 and 3 SiPMs. The graph legend has been formatted with the values selected for delay 1, delay 2, and delay 3, respectively. The detector resolution has also been calculated using Equation (14), as it is an indicator of how capable the detector is in terms of distinguishing energy.

LED Blinking Experiment Results
The recorded spectrum for each window with 1, 2 and 3 SiPMs was taken over 13.4 min made from a cumulative total of 600 individual spectra taken every 1.34 s. The FWHM and resolution were obtained from the recording by placing a Gaussian fit over the peak. The recorded set of spectra for one SiPM has been plotted in Figure 12 as an example, but the data has also been produced for tests with 2 and 3 SiPMs. The graph legend has been formatted with the values selected for delay 1, delay 2, and delay 3, respectively. The detector resolution has also been calculated using Equation (14), as it is an indicator of how capable the detector is in terms of distinguishing energy.
As expected, a single peak is captured individually for each test run with a different shaping window. The peaks are at increasingly higher channels when produced by windows with decreasing delay 2 values, i.e., as the window becomes more triangular. This trend continued when using 1, 2 or 3 SiPMs. Comparing the number of SiPMs used, a positive shift in the detected peak was seen with each additional SiPM, as increasing the detectorsʹ sensitive area has increased the voltage magnitude of the output pulses, as it can collect more light from the LED.
The ratios between the number of SiPMs are important in gauging the benefit of having multiples of them. In an ideal case, doubling the sensitive area of the detector would result in a peak ratio of 2, as the pulse would be twice the magnitude, as the two spikes of As expected, a single peak is captured individually for each test run with a different shaping window. The peaks are at increasingly higher channels when produced by windows with decreasing delay 2 values, i.e., as the window becomes more triangular. This trend continued when using 1, 2 or 3 SiPMs. Comparing the number of SiPMs used, a positive shift in the detected peak was seen with each additional SiPM, as increasing the detectors' sensitive area has increased the voltage magnitude of the output pulses, as it can collect more light from the LED.
The ratios between the number of SiPMs are important in gauging the benefit of having multiples of them. In an ideal case, doubling the sensitive area of the detector would result in a peak ratio of 2, as the pulse would be twice the magnitude, as the two spikes of current from each SiPM would sum together. By taking the ratio between the peak channels for one and two SiPMs (Delays: 99, 2, 99), the gain is found as 1.60, and between one and three SiPMs (Delays: 99, 2, 99) as 1.88. One contribution for this gain inefficiency is the combined capacitance between the anode and cathode of each SiPM affecting the rise time of the pulse. This can be improved using active summation [23], although at an added cost and complexity.
The channel FWHM and resolution for all LED experiments are plotted in Figures 13 and 14 with a linear fit added for each SiPM count. Black dotted lines have also been added to link the results using the same shaper delays. Interpreting Figure 13, the FWHM and peak channel tends to increase as the shaper becomes more triangular. While an increased FWHM is not advantageous, when combined with the apparent gain increase, the resolution ( Figure 14) tends to stay relatively constant for all tested shaper shapes. With the change of one to two SiPMs improving the resolution by an average factor of 2.16, and the change from one to three SiPMs improving by an average factor of 2.79.

Temperature Compensation Experiment Results
This experiment has been used to validate a Zener temperature compensation system; the SiPM and Zener diodes were placed onto a high-power resistor, the power resistor was used to gradually heat the SiPM from a starting temperature of 30 °C to 65 °C, while the detector was collecting the spectra of a constant brightness and constant blinking LED. A slightly lower Zener voltage was used (3.9 V replacing 5.6 V) to ensure that the overvoltage stayed below 5 V. The resulting data has been plotted in Figure 15.

Temperature Compensation Experiment Results
This experiment has been used to validate a Zener temperature compensation system; the SiPM and Zener diodes were placed onto a high-power resistor, the power resistor was used to gradually heat the SiPM from a starting temperature of 30 °C to 65 °C, while the detector was collecting the spectra of a constant brightness and constant blinking LED. A slightly lower Zener voltage was used (3.9 V replacing 5.6 V) to ensure that the overvoltage stayed below 5 V. The resulting data has been plotted in Figure 15.

Temperature Compensation Experiment Results
This experiment has been used to validate a Zener temperature compensation system; the SiPM and Zener diodes were placed onto a high-power resistor, the power resistor was used to gradually heat the SiPM from a starting temperature of 30 • C to 65 • C, while the detector was collecting the spectra of a constant brightness and constant blinking LED. A slightly lower Zener voltage was used (3.9 V replacing 5.6 V) to ensure that the overvoltage stayed below 5 V. The resulting data has been plotted in Figure 15. As expected, in Figure 15 a clear shift can be seen in the non-compensated system when comparing its spectra taken at 30 °C to its spectra taken at 65 °C; this is explained as the overvoltage decreases as the SiPM's temperature increases, therefore lowering the gain of the system at higher temperatures. The temperature controlled system has undergone a small shift resulting in a side tail; this could be due to noise added by the increase in dark counts or the non-ideal Zener diode matching, but has remained as a single peak over the test duration. Figure 15. A log graph (a) plotting cumlative spectra taken over the full heating experiment. A log graph (b) of individual spectra taken at 30 • C and 65 • C, respectively, for both compensated (blue trace) and non-compensated (red trace) systems. Only channels 1600 to 2600 have been displayed for purposes of clarity.

Sealed Source Calibration with Temperature Compensation
As expected, in Figure 15 a clear shift can be seen in the non-compensated system when comparing its spectra taken at 30 • C to its spectra taken at 65 • C; this is explained as the overvoltage decreases as the SiPM's temperature increases, therefore lowering the gain of the system at higher temperatures. The temperature controlled system has undergone a small shift resulting in a side tail; this could be due to noise added by the increase in dark counts or the non-ideal Zener diode matching, but has remained as a single peak over the test duration.

Sealed Source Calibration with Temperature Compensation
The purpose of these experiments is to calibrate and validate the backend system to show that it is capable of radiation detection. The experimental set-up is as follows: the window of a cylindrical (40 mm dia. by 52 mm long) Na(Tl) scintillator manufactured by advatech [24] was placed onto the SiPM board containing three C-series SiPMs, using optical grade silicone grease to improve the light transfer between them. Along with the SiPMs, the amplifier and temperature compensation boards were placed together inside a lightproof enclosure. Sealed point sources Co-60, Cs-137, Na-22, and Am-241 (with the respective activities of 4.46, 27.27, 0.60, and 33.51 kBq) were individually placed directly upon the cylindrical scintillator before the enclosure was closed. Figure 16 shows the spectra recorded by the developed detector for a sealed source of Co-60; this experiment was repeated for sources Na-22, Cs-137 and Am-241, respectively. Two background spectra at zoom levels 1 and 0.5 were recorded before testing, and have been subtracted from the captured spectra of each source. Finally, a Gaussian fit was applied to each detected peak using 50 channels below and above the peak channel, and is displayed in Figure 16 as a dashed red line. The point at which the ADC saturates can be seen as a peak close to channel 2352.60 ± 4.21. Any pulses that saturate the ADC congregate together into this peak distribution, and as such will be excluded from the peak analysis.  Figure 16 shows the spectra recorded by the developed detector for a sealed source of Co-60; this experiment was repeated for sources Na-22, Cs-137 and Am-241, respectively. Two background spectra at zoom levels 1 and 0.5 were recorded before testing, and have been subtracted from the captured spectra of each source. Finally, a Gaussian fit was applied to each detected peak using 50 channels below and above the peak channel, and is displayed in Figure 16 as a dashed red line. The point at which the ADC saturates can be seen as a peak close to channel 2352.60 ± 4.21. Any pulses that saturate the ADC congregate together into this peak distribution, and as such will be excluded from the peak analysis.  Table 2 displays the combination of detected peaks in each recorded spectrum with a known energy expected for the tested radioisotope. This was then used to plot a calibration fit for the detector (Figure 17). The lowest peak from Am-241 was not used due to the uncertainty in the recorded counts caused by the overlap with X-rays from its daughter nuclide Np-237. The resolution for each photopeak has been calculated and plotted in Figure 18 by dividing the FWHM by the assigned photopeak energy. Table 2. Calibration table of peak channel detected for photopeak, backscatter and Compton edge of the tested sealed sources of Co-60 [25], Cs-137 [26], Na-22 [27,28] and Am-241 [29].   Table 2 displays the combination of detected peaks in each recorded spectrum with a known energy expected for the tested radioisotope. This was then used to plot a calibration fit for the detector (Figure 17). The lowest peak from Am-241 was not used due to the uncertainty in the recorded counts caused by the overlap with X-rays from its daughter nuclide Np-237. The resolution for each photopeak has been calculated and plotted in Figure 18 by dividing the FWHM by the assigned photopeak energy.  [25], Cs-137 [26], Na-22 [27,28] and Am-241 [29].  Figure 17. Graph of the calibration fit for the detector with three-sigma error bars based upon the collected peak channel data in Table 2. A linear line of best fit (dotted blue line) has been fitted to the data in order to relate each channel to a detection energy. The fit has a gradient and intercept standard error of 0.65 ± 0.02 and −56.08 ± 35.39, respectively (a 95% confidence interval). From Figure 17, a clear correlation between channel number and energy can be identified with a linear fit and an value of 0.9951. From this, the detector calibration Equation (15) is obtained. Figure 17. Graph of the calibration fit for the detector with three-sigma error bars based upon the collected peak channel data in Table 2. A linear line of best fit (dotted blue line) has been fitted to the data in order to relate each channel to a detection energy. The fit has a gradient and intercept standard error of 0.65 ± 0.02 and −56.08 ± 35.39, respectively (a 95% confidence interval).  Figure 17. Graph of the calibration fit for the detector with three-sigma error bars based upon the collected peak channel data in Table 2. A linear line of best fit (dotted blue line) has been fitted to the data in order to relate each channel to a detection energy. The fit has a gradient and intercept standard error of 0.65 ± 0.02 and −56.08 ± 35.39, respectively (a 95% confidence interval). Figure 18. Graph of the energy resolution of the detector with three-sigma error bars. A power trend line has been added to the data alongside a value for the fit.

Isotope
From Figure 17, a clear correlation between channel number and energy can be identified with a linear fit and an value of 0.9951. From this, the detector calibration Equation (15) is obtained. Figure 18. Graph of the energy resolution of the detector with three-sigma error bars. A power trend line has been added to the data alongside a R 2 value for the fit.
From Figure 17, a clear correlation between channel number and energy can be identified with a linear fit and an R 2 value of 0.9951. From this, the detector calibration Equation (15) is obtained.
Channel Energy (keV) = 0.6482 × Channel Number − 56.078 (15) Therefore, each channel represents 0.6482 keV at zoom level 1 and 0.3241 keV at zoom level 0.5. The saturation peak in Figure 16 can be used with Equation (15), indicating that the detector begins to saturate approaching an energy of 1468.88 ± 2.73 keV.
The calculated FWHM energy for each Gaussian fit peak is displayed in Table 2 and plotted in Figure 18, followed by the detection efficiencies of each Gaussian fit peak displayed in Table 3 and plotted in Figure 19. The results show that the FWHM energy resolution and efficiency increases as the energy of the detected gamma peak decreases. This relationship can also be seen in other publications working with similar systems [3,28,30]. The detector achieves a peak efficiency of 27.09 ± 0.13% for a gamma peak at 59.54 keV produced by Am-241. Table 3. Detection efficiency of each gamma peak, with all peak channels adjusted to a zoom of 1. Therefore, each channel represents 0.6482 keV at zoom level 1 and 0.3241 keV at zoom level 0.5. The saturation peak in Figure 16 can be used with Equation (15), indicating that the detector begins to saturate approaching an energy of 1468.88 ± 2.73 keV.

Specification
The calculated FWHM energy for each Gaussian fit peak is displayed in Table 2 and plotted in Figure 18, followed by the detection efficiencies of each Gaussian fit peak displayed in Table 3 and plotted in Figure 19. The results show that the FWHM energy resolution and efficiency increases as the energy of the detected gamma peak decreases. This relationship can also be seen in other publications working with similar systems [3,28,30]. The detector achieves a peak efficiency of 27.09 ± 0.13% for a gamma peak at 59.54 keV produced by Am-241. Table 3. Detection efficiency of each gamma peak, with all peak channels adjusted to a zoom of 1.  [29] 3268.31 ± 45. 20 27.09 ± 0.13 Figure 19. Plot of the calculated detection efficiency for each peak in the recorded spectras with three-sigma error bars. A power trend line has been added to the data alongside the value for the fit.

Conclusions
The work presented in this paper shows the development of backend electronics capable of amplifying, digitizing, and shaping SiPM pulses for scintillator-based gamma spectroscopy. This has been validated and calibrated experimentally using LED blink testing and exposure to radiation using sealed sources of Co-60, Cs-137, Na-22 and Am-24. Furthermore, a MySQL database system has been developed to store the spectra data recorded in the experiments, each having a total of 4096 active channels. The database has Figure 19. Plot of the calculated detection efficiency for each peak in the recorded spectras with three-sigma error bars. A power trend line has been added to the data alongside the R 2 value for the fit.

Conclusions
The work presented in this paper shows the development of backend electronics capable of amplifying, digitizing, and shaping SiPM pulses for scintillator-based gamma spectroscopy. This has been validated and calibrated experimentally using LED blink testing and exposure to radiation using sealed sources of Co-60, Cs-137, Na-22 and Am-24. Furthermore, a MySQL database system has been developed to store the spectra data recorded in the experiments, each having a total of 4096 active channels. The database has been successfully tested with up to 161,717 entries, showing that the detector can be left to record spectra unsupervised for multiple days. By recording spectra at regular intervals, this allows the future analysis of the recorded data to not only find which radioisotopes were detected, but also over what period of time, which is ideal for transient surveying applications.
Circuits have been produced, including a SiPM amplifier and a dual ADC board capable of digitizing SiPM pulses for trapezoid shaping. These boards, along with a single board computer, can fit within a cylindrical diameter of 46 mm. The fully produced detector system is also low cost, with the majority cost being that of the scintillator. A VHDL implementation of a trapezoidal shaper for the processing of SiPM pulses into a spectrum has also been produced and validated experimentally for different numbers of SiPMs. This showed that using multiple SiPMs in parallel improved the resolution of the peaks in the detected spectra, while the shaper window did not have a large effect on the resolution. On the other hand, the shaping window affected the gain of the system, finding that a triangular window resulted in peaks at higher channel numbers compared to trapezial windows for a set total delay length.
The sealed source radiation testing of the backend electrical system with a Na(Tl) scintillator has produced a range of spectra used in obtaining the resolution and detection efficiency of the detector over the range of detected energies. We found a minimum energy resolution (Delta E/E) of 4.27 ± 1.16% for the 1332.5 keV gamma peak from Co-60 and a maximum detection efficiency of 27.09 ± 0.13% from a 59.54 keV Am-241 gamma peak. A fit has been produced to relate the channel number to energy, finding that the detector has a detectable energy range from 56.08 keV to 1468.88 ± 2.73 keV, and a resolution of 648 eV at zoom level 1.
Finally, a new temperature compensation system has been designed and simulated using two serially connected Zener diodes. Temperature experiments have also found two suitable components, that being a SZMM5Z24VT1G and a SZMM3Z5V6ST1G Zener diode in combination, which would reduce the temperature dependence of the SiPM's overvoltage from 21.5 mV/ • C to 1.3 mV/ • C. The Zener temperature compensation system was also validated experimentally using a heating experiment, showing a lower shift in detected peaks within the recorded spectra when compared to a set bias system, over a temperature range of 30 to 65 • C.