The Improved X-ray Detector (iXRD) on Sharjah-Sat-1, design principles, tests and ground calibration

The iXRD is the primary science payload on Sharjah-Sat-1, a 3U CubeSat expected to be launched in Q4, 2022. Its main scientific goal is monitoring bright hard X-ray sources and transients in 20 - 200 keV band. The iXRD consists of a CdZnTe crystal (6.45 cm2 area, 5 mm thickness), a Tungsten collimator with square holes with an opening angle of 4.26∘, readout and control electronics and power supply circuitry, a back-shield and mechanical structures. Some of the design elements of iXRD have been inherited from the XRD on BeEagleSat with significant improvements in terms of collecting area, X-ray background and electronic noise. In this article, the design of the iXRD is discussed in detail taking into account mechanical, electronic, control software and data handling aspects. Its expected performance is determined after ground calibration. Depending on the pixel size, the energy resolution is 4 - 7 keV at 60 keV and the minimum detectable energy is 19 - 23 keV.

collimator. The instrument operates in the 20 -200 keV band with the scientific emphasis of long term time variability and state transitions of bright accreting compact objects. The secondary payload is a set of optical cameras for low-resolution remote sensing applications (see Fig. 1 for assembly drawings of the satellite and the payloads). Sharjah-Sat-1 is being built as a collaborative effort among the Sharjah Academy for Astronomy, Space Sciences and Technology, University of Sharjah, Istanbul Technical University, and Sabanci University. The project not only serves as a purely scientific purpose, but also provides a platform for education and capacity building for students and engineers at the respective institutes involved in the design and testing of the instrument from the development of the concept to the launch and operations [1]. For the details of the scientific aspects of the iXRD, see [2]. For the in-orbit background and sensitivity estimations, see [3]. Sharjah-Sat-1 was launched on January 3rd, 2023, and as of writing this article it is in Launch and Early Orbit Phase (LEOP) with no identified problems.
CubeSats, thanks to their low cost, fast turnaround times and ability to use commercial-off-the-shelf (COTS) components, led to a revolution in satellite development. While the capacity of a single unit (1U) is very limited, larger satellites still conforming to cubesat standards (3U, 6U, 12U, and even larger units) have been designed and produced to conduct meaningful science through finding niche applications and ideas that are very difficult to conduct with larger satellites. Astrophysics and space sciences have benefited from this revolution [4,5], and tens of small missions are currently being built to take advantage of easier access to space.
For the given main scientific objective of the Sharjah-Sat-1, observing bright compact sources, our mission may be most compared to NinjaSat [6], expected to be launched in 2023. The satellite is equipped with two identical non-imaging Gas Multiplier Counters sensitive to X-rays in the 2-50 keV band with a total effective area BlackCAT is a 6U mission, and one of its scientific objectives, detecting and studying black holes in outburst, is similar to the main objective of Sharjah-Sat-1. BlackCAT has a wide field of view [7] through a coded mask, and uses Hybrid CMOS X-ray detectors operating in the 1-20 keV band. BlackCat is being funded by a NASA APRA grant and is expected to be launched in 2024.
For solar observations, the relevant CubeSat missions are the Miniature X-ray Solar Spectrometers MinXSS [8] and MinXSS-2 [9]. These CubeSats utilize COTS Silicon drift detectors and are operational in 0.4 -30 keV band. In the energy band of the iXRD, there are no cubeSats dedicated to solar observations as the nature of solar flares tends to produce soft X-rays. However, when detected, hard X-rays are essential to calculate the total energy in non-thermal electrons and provide direct information regarding the electron properties in solar corona [10].
CdZnTe has been used in large and small missions as detector material due to its room temperature operation and large stopping power. CdZnTe crystals have been used at the focal plane of the NuStar X-ray telescope [11] and as the detector plane in coded mask imagers of ASIM [12] on the International Space Station, CZTI on AST ROSAT [13] and BAT on Neil Gehrels SWIFT Observatory [14]. For CubeSat missions, CdZnTe based detectors have been utilized in AAUSAT-2 (http:// studentspace.aau.dk/aausatii/) and XRD on BeEagleSat [15] as technology demonstrators, and on CXBN-I and CXBN-II to characterize the cosmic X-ray background in 30-60 keV band [16,17].

Instrument design
The iXRD is a hard X-ray detector comprising a CdZnTe crystal, RENA 3b [18] application specific integrated circuit (ASIC) for readout, a MSP 430 microcontroller, associated power and data handling circutry on two PCBs, a Tungsten collimator, a Tungsten back-shield and mechanical structures to integrate to the main satellite. Some aspects of the design are similar to its predecessor, the XRD on BeEagleSAT [15]. Thanks to lessons learned in developing the XRD, the iXRD design had several improvements (hence the name "iXRD") in terms of performance and scientific aim. Specifically, the noise performance is improved by separating the digital control circuitry as a back-end electronics board (called motherboard), and ASIC and its associated regulators as a front-end electronics board (called daughterboard). The crystal on iXRD is larger and has pixels rather than strips. Finally, by adding a collimator and a back-shield we reduced the background and made iXRD a system capable of observing point sources while the XRD was only a demonstrator with no pointing capability.

CdZnTe crystal and its pixel map
The iXRD utilizes a COTS pixellated CdZnTe crystal from eV Products (part of Kromek Group). The crystal is 25.4 x 25.4 x 5 mm 3 in volume, considerably larger . The crystal has 256 pixels with a pitch of 1.6 mm and has 3x100 pin connectors for easy attachment to a PCB (see Fig. 2). Prior to iXRD integration two crystals have been tested with an existing Gamma-camera system at Sabanci University and it was confirmed that all pixels are operating with similar performance in terms of energy resolution and quantum efficiency. A rigid-flex PCB is attached to the top of the crystal with conductive epoxy to provide high voltage and to read out the cathode signal (see Fig. 2 and Section 2.2).
The readout ASIC RENA 3b has 36 channels, therefore we needed to create groups of small pixels connected to each other to form 35 larger pixels (one readout channel is set aside for the cathode signal). The final pixel map is shown in Fig. 3 which is decided after the initial pixel map chosen showed poor performance in some pixel groups in early TVAC tests [19]. The decision is also based on poor performance of large pixels during calibration runs (see Section 3).

Mechanical design
The mechanical design and components that make up the iXRD are shown in the exploded CAD image given in Fig. 4. From the top, the components are: 1. Aluminum optical blocker 2. Tungsten collimator  The optical blocker is a piece of aluminum 0.3 mm thick and attached to the top of the collimator with conductive epoxy. Its main aim is to block optical light and it also provides some protection against low energy charged particles.
The collimator is produced from 95% Tungsten with 5% non-magnetic Ni-CU alloy with electrical discharge machining (EDM) from a single block. Its collimated part is 61.8 mm long and consists of 36 holes with size 4.6 x 4.6 mm providing a full width half maximum (FWHM) opening of 4.26 • . The entire length of the collimator is 75.4 mm covering the entire crystal for extra background protection from the sides. The distance between the collimator and the daughterboard is 0.5 mm. Since the collimator is heavy (466 gr), it is attached to the satellite from the top and by the rods with aluminum structures 3 and 4 shown in Fig. 4.
The CdZnTe crystal assembly (see Section 2.1) sits on top of the daughterboard PCB (6) and a flex cable passes through a hole in the daughterboard to the bottom of the daughterboard to a SAMTEC ZTF connector (see Fig. 2).
The daughterboard (6) carries the crystal, RENA ASIC and its coupling capacitors and resistors, associated voltage regulators and one thermocouple. It is produced as an 8 layer PCB.
The Tungsten backshield (7) is placed between the motherboard and daughterboard and it is connected to the ground through the rods. It provides protection from albedo photons and other particles (Altingun et al. submitted [3]) and also acts as an additional ground layer to protect sensitive daughterboard components from electromagnetic interference coming from the motherboard.
The motherboard is also an 8 layer PCB carrying the microcontroller, power and communication circuitry as well as the HV supply. It includes a standard PC104 connector for electrical and mechanical interface to the main satellite. The motherboard and the daughterboard are connected electrically with two low profile SAMTEC connectors and aluminum spacers are used for the mechanical stability of the entire system.

Power and data handling design
The electrical and data interfaces of the iXRD are shown in Fig. 5. 3.3 V and battery voltage (V bat , 7.4 -8 V) are the main power inputs that are provided by the satellite electrical power system (EPS), the incoming power traces are connected to switches at the iXRD motherboard. Each of these switches are controlled by the on-board computer (OBC) at the satellite through the PC104 connector bus. V bat is fed to the individual 5V regulators at the motherboard and the daughterboard. Individual 5V Low-Dropout Regulators (LDO) are utilized with a purpose of providing a very lownoise voltage to power the RENA ASIC. The output of 5V regulator at the daughter board is further converted into required voltages for the RENA chip operation through additional low-noise LDO regulators. The high voltage (COTS, HVP US Series) that biases the CdZnTe crystal with -500V is supplied from the motherboard and high voltage traces are isolated from the rest of the circuit to prevent discharges. Digital and analog sections are physically separated in order to keep noise coupling to the analog acquisition pins of RENA as minimum as possible. Noise testing showed that 5V regulator at the daughterboard is the most critical part for a noise floor that satisfies our minimum detectable energy criteria of 25 keV for large pixels. Exposed ground traces have been routed around the regulator to attach further shielding against electromagnetic interference (EMI) from the environment (see Fig. 2, b).
Since the microcontroller (MSP430F5438A) uses 3.3V and the RENA uses 5V for digital operation, level shifters are necessary. The circuitry also includes comparators and LVDS elements for proper control of RENA with the microcontroller. There is a single temperature sensor located close to RENA on the daughterboard to monitor system temperature. There are two SD Cards for redundancy. The commanding and data transfer are done using a UART interface to the OBC.

General operation
The operational modes of the iXRD, and transitions between them are shown in Fig. 6. The main operational modes are IDLE, DIAGNOSTIC, DATA ACQUISI-TION, and DATA PROCESSING. The system starts in IDLE mode and switches between modes when the respective command is received via UART communication. From the topmost level the iXRD does two things. Processing received commands and handling the current state. Processing commands simply consists of parsing the command buffer and getting out the message id. A simple switch statement calls After handling the command buffer, handling the current operation mode is done. All communication between the OBC and the iXRD is done using the KISS (Keep It Simple, Stupid, [20]) terminal node controller protocol over UART. As for the file management, the SD cards are partitioned into 512-byte blocks and we iterate over the available blocks while reading and writing to the SD card. There is header information at the beginning of each block which consists of a block number, run number, and a timestamp. This makes sure that each consecutive block will have increasing block ids and this fact is exploited in the reading and writing operations as we are binary searching the whole block space to find the last written or read block. There is no file system used in this process.

Operation modes
The first operation mode of iXRD is the IDLE mode. The system starts and stays in IDLE mode until a mode change command is received. Switching to and from IDLE mode is stateless as it does not change any stateful information like variables. After every other mode, the current mode is changed to IDLE mode without the need for a mode change command. The system state is cleared (excluding the SD card data) every time there is an exit from a mode.
Diagnostic mode tests several different sub-systems and peripherals like the SD cards, the temperature sensor, and RENA through sending a pre-defined configuration with an expected response. Both SD cards are tested with dummy write and read-backs. If the current SD card is faulty, the system switches to the other SD card. The errors are logged as housekeeping data with timestamps and run numbers. At any point in the lifetime of the program, the current status can be fetched by the OBC. The current status only changes after the DIAGNOSTIC mode. Fetching the current status also returns the most recent 20 errors in addition to the general status of the iXRD (OK or ERROR). The errors can be generated in the DATA ACQUISITION and DATA PROCESSING modes as well. In DATA ACQUISITION, extremely high count rate indicating a problem with electronic noise interrupts the acquisition. In this case system returns to IDLE and a safer configuration is sent to RENA. HV turning off, and not being able to write to the chosen SD card during acquisition are other cases generating errors. In these cases the system is reset and if necessary the second SD card is used. It is planned to check all error messages on ground with the incoming housekeeping file and applying appropriate recovery measures during operation. While the options are limited, the software is written such that it accepts configuration files from the ground, allowing turning off RENA channels and changing their thresholds.
The main operation mode of the iXRD is the DATA ACQUISITON. This state continues until the desired time limit or event limit is reached, which is set by a command. It can also be interrupted via a command, or fault. The mode starts with enabling interrupts from RENA. RENA readout chip sends interrupts for the hits detected and the microcontroller handles incoming interrupts and reads the output of the analog-to-digital converter (ADC) for the received event. There are 36 different channels through that an event can be received. As an event interrupt is received the triggered channels are received as a bit stream from RENA and a bit stream for the channels to read from is sent back to RENA. For each triggered channel the ADU (Analog-to-Digital Unit) is saved with the triggered channel information. Once the event buffer gets to 512 bytes it is written to the SD card and the event buffer is cleared.
The DATA PROCESSING mode reads the raw data from the SD card and processes it to create spectra and light curves in pre-defined energy levels. It starts automatically after a successful data acquisition, or it can be initiated with a command from the IDLE mode (see Fig. 6). A rough calibration is performed based on channel-to-energy values obtained on-ground (see Section 3). The plan is to send binned data through UHF-VHF while sending the raw data through S-Band allowing recovery of useful information in case S-band communication is not available.

Dead time
The iXRD has a complex, non-paralyzable dead-time behavior set by the software and electronical noise properties of the system. With the maximum speed of the microprocessor, it takes 135 μs for the system to start measuring triggered channels amplitudes with its ADC. Readout of each triggered channel's amplitude takes 25 μs. The system does not accept a new trigger during this time. Therefore each event creates approximately 200 μs to 1000 μs dead time depending on how many channels are read. Moreover, during testing it was realized that writing to SD card creates and artificial trigger in the system due to the relatively large current drawn by the writing operation. For this reason when the event buffer gets to 512 bytes, the system is not allowed to trigger for an additional 700 μs during the writing operation. Given that the expected background rates and typical count rates of bright sources add up to only around 6 cts/s [3], the dead time fraction would be very small, around 1% in the worst case. However, there is also instrumental noise due to electromagnetic coupling of RENA with the rest of the electronics in the satellite. One can carefully determine the threshold levels for each channel such that the electronic instrumental noise never triggers the system. However, setting the threshold too high also means that actual signals at low energies will not be detected. To obtain reasonable livetime fractions (90%), the electronic noise related background triggers should be less than 5 cts/s/channel, and this can be achieved by adjusting the threshold levels (before flight and during operations). The flight software allows uploading a new set of threshold values to be written to a specific block of the SD card and a command configures RENA with the new set of thresholds.

Ground calibration
Ground calibration of the energy response of the iXRD was performed by using two radioactive sources, 241 Am (59.5 keV) and 57 Co (122.1 keV, 136.5 keV). In addition, a pulser was used to determine the electronic noise and the intrinsic energy resolution for each channel.

Calibration setup
The calibration setup of the iXRD is shown in Fig. 7. The system was placed in a metal box to isolate the electronics from outer electromagnetic interference. The power to the system is provided with an external power supply, and the metal box is connected to the power supply ground. The setup includes UART connections with octocouplers to isolate possibly noisy PC ground from the system ground. There are also connections to RENA test outputs to measure noise levels in selected RENA channels (connected to one of the anodes and the cathode).
Since the iXRD collimator has a field of view of 4.26 • , and our radioactive calibration sources also have a collimated exit hole, the top of the collimator was scanned to collect statistically significant amount of data for each pixel. Fig. 7 The picture of the test setup for the iXRD system. The radioactive source was placed on the top of the metal box. The distance between the top the box and the surface of the collimator is approximately 5 cm

Calibration procedure and results
We first determined the minimum threshold levels to allow triggering in each RENA channel. This is a critical process, because the microcontroller's operating frequency is relatively low and unnecessary triggers from electronic noise may overwhelm the data acquisition code (see Section 2.4.3). Moreover, our initial tests indicated that the electronic readout induces noise in RENA as well, and the level of noise depends on the count rate. Therefore we operated the pulser with a count rate higher than expected from background in orbit and adjusted the threshold levels such that the resulting pulser spectrum does not contain a red tail from instrumental noise.
The calibration to obtain the photon energies from the ADUs was performed by fitting Gaussian functions to the 59.5 keV and 122.1 keV peaks from 241 Am and 57 Co sources, respectively. In addition to that, a linear function is employed to model the low energy tail of the corresponding peaks. Two spectra with the best fit models are shown for channel 13 for illustration purposes in Fig. 8. For the calibration, only events that leave signals on one channel and the cathode wwere adopted, the events that are shared between more than one channel were excluded.
A linear fit is performed to find the calibration parameters to go from the ADUs to energy. The energy resolution is calculated from the full width of half maximum (FWHM) of the Gaussian peaks.
The pulser is connected to the charge sensitive preamplifiers in RENA through a small coupling capacitor. Therefore, the FWHM value of the peak acquired by the pulser is a measure of the readout electronic noise level, including the capacitive noise of pixels under dark current. The pulser signal amplitude is set to have a peak close the 241 Am line (Fig. 9). In principle, one can obtain the intrinsic noise level of the crystal due to material properties and weighting potential distributions by subtracting the pulser signal in quadrature from those of the 241 Am peak at 59.5 keV for each channel [21].
The typical calibrated spectra for different pixel sizes are shown in Fig. 9. As expected, as the pixel size increases, the resolution gets worse due to "small pixel effect" (see [21] and references therein). Table 1 shows the averaged energy resolution results per channel group (see Fig. 3) for different signal sources. The energy resolution for larger pixels worsens considerably for 122 keV peak, from 4.3 keV to 10.6 keV. The same table also shows the minimum detectable energies after calibration. From single pixels to large pixels, the minimum detectable energy moves from 19.2 keV to 23.6 keV.
We also analysed the cathode signals. Ratio of the cathode signals to the anode signals can be used to estimate the depth of interaction (DOI) and the the energy resolution can be improved by using the DOI information [22]. The calibrated cathode spectra for the two radioactive sources and the pulser are demonstrated in Fig. 10.
The FWHM values are 17.73, 17.67, and 30.07 keV for the pulser, 241 Am, and 57 Co peaks, respectively. This indicates that the electronic noise is quite dominant for the cathode. Also, the 122 keV peak from the 57 Co source exhibits a long low energy tail showing that the cathode signals are severely affected from the hole trapping.

Discussion
In this section, the overall results are discussed in terms of design drivers and other factors affecting the performance of the system. The energy spectra for Ch13 (single), Ch11 (small, 6 pixel), Ch14 (medium, 9 pixel), and Ch28 (large, 11 pixel). The results from the 57 Co source are normalized by using the 241 Am peak counts

Design drivers
CubeSats provide great opportunities to test and validate detector designs directly in space environment and can be used as gateways to design and produce larger systems geared for impactful science. On the other hand, the physical, power and communication constraints of CubeSats result in trade-offs with science output and may create performance problems. Fast turnaround times mean that some decisions are made The errors in FWHM calculations are less than 0.5%

Fig. 10
The energy spectra for the cathode. The results from the 57 Co and the pulser source are normalized by using the 241 Am peak counts with little tests. The iXRD is not an exception. For example, the collimator and the back-shield designs are motivated by not only science aspects, but also being able to fit the system in the CubeSat envelope and produce it commercially with a reasonable budget. The length of the collimator is fixed by the other subsystems and the envelope of the 3U cubeSat, and the wall thickness is fixed by the constraints of the manufacturing technology, resulting in 4.26 • FWHM opening angle, larger than typically used in X-ray detectors (∼ 1 • ). While this increases the Cosmic X-ray background entering the crystal (see [3] for the discussion of background in iXRD), given the estimated attitude control uncertainty of 1 • in Sharjah-Sat-1, a very restrictive FOV may have resulted in not keeping the target on-sight. Since the sensitivity of our instrument is around 180 mCrab [3], source confusion is not an issue. The decision to use RENA 3b as the readout ASIC (and not taking full advantage of 256 small pixels available in the crystal used) is motivated by the XRD heritage as at the start of the project there was a code to control RENA with the MSP 430 microcontroller, and also a complete knowledge of possible noise problems associated with RENA. Given the initial short turnaround time (2 years, which was later extended because of the pandemic during production and testing) it was deemed to risky to use different readout electronics options for the ASIC and the microcontroller.

Factors affecting detector performance
While CdZnTe detectors have been used extensively in space due to many advantages of the material, they are known to suffer from hole trapping effects. With our calibration setup, we were able to determine the intrinsic noise contribution due to crystal properties [21]. The average intrinsic noise contribution of the crystal is calculated as 2.23, 2.93, 3.41, and 4.03 keV for single, small, medium, and large pixel groups respectively for measurements at 60 keV. These contributions are all smaller than the FWHM measured with the pulser. Therefore under 60 keV, the system is dominated by electronic noise. Measurements at 122 keV show that except single pixels, the hole trapping becomes dominant as expected. Similar conclusions can be made for the cathode, it is a planar electrode covering the entire detector area. It suffers from both large electronic noise as well as hole trapping effects. While at the start of the project we were expecting to use the DOI information for spectral improvements in the processed mode spectra, with the observed resolution and minimum detectable energy it was decided not to implement this feature in the code.
We have utilized extensive simulation tools to model electronic and material contributions to the noise and calculated the sensitivity of our detector in Altıngün et al. [3]. While using a thinner crystal could have helped in the intrinsic energy resolution, we opted for the best available COTS crystal to avoid potential setbacks with the production uncertainties and integration of a custom made crystal. Given the small size, our detector is not very sensitive above 100 keV anyways, and the main contribution of noise is readout electronics and pixel sizes.
Our (and any) detector system is susceptible to electronic noise caused by electromagnetic interference, grounding issues, and noise in the input power. The ground calibration discussed here is achieved after iterations of designs and setups to minimize this noise. However, the actual flight performance of the system depends on new set of conditions with flight electronics, power supply and grounding. Initial integration tests are ongoing and they indicate that the noise will be higher than reported in this work. The flight model performance under tests and in-orbit will be the subject of future work.