Close
0%
0%

Pomelo: Gamma Spectroscopy Module

A complete low-power gamma ray spectrometer that can be used by itself or integrated into other projects

Similar projects worth following
Pomelo is a radiation detector for hobby-level gamma spectroscopy. I’m designing it according to the following requirements:

- Low cost. Target is below 150 Eur in components
- Commercial off-the-shelf scintillator and SiPM
- Low power. Ideally ~5mA while data taking, but realistically... best effort
- USB connectivity (CDC for dumping data to a terminal)
- UART for interfacing with an external MCU
- Energy range: 50 keV – 3 MeV
- Onboard histogramming and run control (spectrum readout, reset, timed measurements)
- List-mode data option
- Temperature compensation
- Coincidence measurements with two devices using dedicated hardware handshaking
- Software configurable energy threshold

This project is inspired by three awesome projects, two of them being open-source:
All-In-One Gamma-Ray Spectrometer https://hackaday.io/project/185211-all-in-one-gamma-ray-spectrometer
Cosmic Pi https://github.com/CosmicPi
Radiacode https://www.radiacode.com/products

Complete gamma spectroscopy module ready to be connected either to a laptop or an embedded system. It measures less than 130mm x 40mm x 30mm

This contains everything that’s needed for gamma spectroscopy and nothing more. It has the detector assembly (Pomelo Physics) with scintillator and silicon photomultiplier, as well as the accompanying electronics (Pomelo Core) with bias supply, analog front end, and digital electronics.

Its USB and UART connectivity allow it to interface to lots of things, like a laptop, an Arduino, or a Raspberry Pi. It integrates a level shifter on the UART lines so it can talk to both 3.3V as well as 5V systems. I have used it during development to perform measurements with radioactive sources or cosmic muons:

I made an Arduino-compatible board that contains supporting circuitry to make a complete hand-held instrument based on the Pomelo Core and Physics. It has buttons and a screen, battery, and lots of wireless connectivity:

I'm also using Pomelo to experiment with visualizing gamma spectra in a more intuitive way, shown as colors on an LED strip:

Pomelo Physics

Pomelo Physics is the detector assembly, containing:

Pomelo Core

Pomelo Core contains all the associated electronics:

  • Digitally controlled SiPM bias supply ~32V - ~48V
  • Digitally controlled threshold
  • Low power analog front-end
  • ARM Cortex-M0+ microcontroller, Microchip ATSAML21G18B
  • UART connectivity with integrated level shifter
  • 10 unused GPIO pins for further expansion

Performance

Spectra for various radioactive sources taken with Pomelo

The energy resolutions at different energies are:

  • <30% @ 59.5 keV
  • <11% @ 511 keV
  • <7% above 1274.5 keV

This is the original description when I started the project in January 2024

This is very much a work in progress and most of the requirements are not satisfied yet. But thanks to excellent documentation done by NuclearPhoenix on the All-In-One Gamma-Ray Spectrometer and the Cosmic Pi project I have a proof of concept working.

Pomelo hardware and gamma spectra taken with Cs137 and Na22

Current version of the hardware includes:

  • 4mm x 4mm x 10mm GAGG(Ce) scintillator crystal with light reflector and 3D printed “dark” box
  • 4mm x 4mm Broadcom AFBR-S4N44P014M Silicon photomultiplier (SiPM) with optical grease coupling to scintillator
  • MAX1932 SiPM bias supply
  • Shaper to decrease bandwidth of SiPM pulses
  • Peak detector circuit
  • ATSAML21E18B MCU that performs triggering, pulse height measurement, and peak detector reset

Energy resolution is 14.3% @ 662 keV and 12.4% @ 1274.5 keV.

Architecture

  • Theremino MCA

    mihai.cuciuc08/02/2024 at 21:16 0 comments

    Pomelo is all about interfacing with as many things as possible. Theremino MCA is a popular open-source gamma spectroscopy software designed to work with DIY detectors. It relies on the PC’s sound card for digitizing pulses in order to build a spectrum.

    Pomelo Core makes internal analog signals available on a pin header, mostly for debugging. Among these there is a low-pass filtered version of the SiPM output. Unfortunately, it’s still a bit too fast to be properly digitized by a PC sound card and while it does work, the results are a bit wonky. But if we slow it down a bit more using an RC low-pass filter, it becomes just right. I used 10 kOhm and 10 nF.

    To get a feel for how well the pulse amplitudes match between the Pomelo Core output and the signal that is read by the sound card I grabbed some pulses both with a Saleae logic analyzer and with Audacity and manually aligned the time scales to look at the same pulses.

    Pulses from a Th-232 source at different stages in the analog chain. The time scale is manually aligned to look at the same pulses in both Saleae Logic and Audacity.

    Same plot as above but zoomed in to see the shapes of individual pulses

    The sound card is detecting pulses as being negative, despite the Pomelo output being positive. I inverted the waveform in Audacity to make things easier to see.

    One thing to notice is that the RC filtered signal rides on a DC baseline of ~2.5V. This is due to the PC’s sound card providing bias for the microphone -- it’s not a huge problem for Pomelo, as its output is fed directly from a stiff source, an op-amp’s output. The 10 kOhm resistor nicely isolates these two.

    The spectrum of a Th-232 source looks very good both in the Theremino MCA software, as well as exported and displayed alongside the spectrum recorded by Pomelo Core.

    Th-232 spectrum and individual pulse in the Theremino MCA software

    Spectra taken with both Pomelo Core as well as with Theremino MCA, with uncalibrated x axes scaled to cover the same energy range

  • Pomelo core in coincidence mode

    mihai.cuciuc07/15/2024 at 04:18 0 comments

    I used a pair of modules are run in coincidence mode to detect and measure cosmic muons.

  • Pomelo Core new use case

    mihai.cuciuc06/21/2024 at 04:28 0 comments

    I added a new project describing an experiment that uses Pomelo to measure gamma attenuation in aluminum. The result is surprisingly close to the literature value.

  • Updated scintillator and wide range energy linearity

    mihai.cuciuc06/17/2024 at 16:15 0 comments

    Pomelo sales rep showing off the latest prototype sporting a 10mm x 10mm x 20mm CsI(Tl) crystal

    I designed the device dimensions with a 2cc (10mm x 10mm x 20mm) CsI(Tl) scintillator in mind, but only had 3cc ones to test with. It’s why the detector element extended beyond the device’s edge, but now that the 2cc crystals arrived, I can share the final design and some preliminary performance plots.

    The scintillator is not yet potted in silicone, which does decrease light output a little (and thus worsens resolution). I took spectra with several lab sources and computed the resolutions for every gamma line and checked the detector linearity.

    Spectra for Am-241, Na-22, Cs-137, Mn-54, Co-60, and Th-232 on the same plot in logarithmic scale. Energy resolutions for each energy shown in the last column

    Detector linearity plot. There is a small quadratic term that is typical of SiPMs

  • Pomelo Core use cases

    mihai.cuciuc06/01/2024 at 09:44 0 comments

    I updated the project description to include use cases for the Pomelo. One is a complete hand-held instrument with battery, user interface, and lots of connectivity, and others are physics experiments that are enabled by the Pomelo:

  • Pomelo Core v1

    mihai.cuciuc05/23/2024 at 04:54 0 comments

    This contains all the functionality to do gamma spectroscopy and nothing more

    I'm planning on producing something that looks more similar to other gamma detectors, like the excellent products that are already out there: the Radiacode, the Kromek Sigma25, or the CapeScint CsI-MacroPixel-MCA. To shift towards that I merged the digital and analog electronics into a single PCB, removing the battery and charging circuit, as these are not core to the functionality of the detector. The detector now consists of two parts:

    Pomelo Physics:

    • CsI(Tl) scintillator, 3cm^3
    • Silicon photomultiplier
    • 3D printed dark box to house scintillator and keep stray light away from SiPM
    • Temperature sensor

    Pomelo Core:

    • Digitally controlled SiPM bias supply ~32V - ~48V
    • Low power analog front-end
    • Microchip SAML21 (ARM Cortex-M0+) microcontroller
    • USB connectivity
    • UART connectivity with integrated level shifter

    Pomelo Physics. Scintillator and SiPM detachable module

    Back of Pomelo Core PCB

  • Scintillator potting

    mihai.cuciuc05/13/2024 at 04:48 0 comments

    CsI(Tl) scintillators are slightly hygroscopic – they absorb some moisture and this affects their crystal structure, worsening their performances. However, the magnitude of this worsening is very small as shown by this paper and this paper.

    In any case, my plan is to limit the amount of moisture that can reach the scintillator by adding silicone in between the Teflon-wrapped scintillator and the 3D printed detector case that serves as a dark box. Using a somewhat rubbery silicone will also work to provide some cozy mechanical support for the scintillator. The resulting internal structure of the detector assembly should look like the following diagram:

    Detector assembly structure. The scintillator is attached to the SiPM (not shown) that is soldered to the PCB. I plan on filling the gap between scintillator and dark box with silicone

    Room-temperature vulcanizing silicone curing test

    As I’m using a one-component RTV silicone I wanted to make sure that curing still happens inside the 3D printed box, as the exposure to outside air is quite limited in that case. To test this I printed a fake “scintillator” block that I wrapped in Teflon and I made a few test runs that I could then break and look inside for how the curing went.

    Test pieces for testing potting and curing. No expensive components (SiPM or CsI(Tl) crystals) were hurt in these tests

    Loading some silicone into the dark box and then squishing the assembly in

    Having assembled these units I let them cure for ~1 week. I then broke a few and extracted the plastic fake “scintillator” and its Teflon wrapping to find this very nicely cured shell around the scintillator block.

    Broken test assembly. The silicone cured nicely everywhere, but I did not manage to get it completely centred

    One thing I did not consider is that the fake "scintillator" I 3D printed with ~30% infill was full of air. While it was covered in Teflon, I'm not sure this was an air-tight barrier, so some of the curing might have happened because of that empty space. In any case I assume that it will still cure just through the shell, even if it will take longer.

    With this test successful I went on to pot an actual scintillator and see how this affects its performance.

    Detector performance after curing

    I potted a real detector and took Na-22 spectra before and afterwards to obtain the following spectra.

    Na-22 spectrum and resolution for the 511 keV gamma line before silicone potting (red) and after potting (blue)

    The peaks are shifted a little to the left after potting, so the pulse height is somewhat lower, suggesting that light collection is not as good as before potting. This is also indicated by the slight worsening of the energy resolution. While there is some loss in light that gets collected on the SiPM, the added resilience of the detector assembly is worth it.

  • Digital temperature compensation

    mihai.cuciuc05/09/2024 at 05:13 0 comments

    The gain of silicon photomultipliers (SiPMs) increases with applied voltage and decreases with temperature. Hamamatsu has an informative write-up on this topic.

    This presents an opportunity to compensate for temperature changes by tuning the bias voltage, with some circuits doing this directly in hardware, by having a thermistor in the voltage feedback loop of the bias supply. An example of this is in Figure 8 in the MAX1932 datasheet.

    I decided to go with a digital temperature sensor and tweak the bias voltage in firmware. The temperature sensor is placed directly underneath the SiPM on the detector PCB to get a reading as close as possible to the sensor.

    A TMP126 chip in the middle of the detector PCB provides very accurate temperature readings. The SiPM is directly underneath it, on the other side of the PCB.

    I ran a few tests to see how temperature and bias voltage influence the spectra from a Na-22 source, with the following animated results.

    Increasing temperature of the SiPM decreases its gain, so the gamma peaks shift to lower values in the spectrum. This can really mess up the long-term stability of the detector and make gamma peaks disappear into blobs. Temperature is in degrees Celsius.

    Higher bias voltage increases the SiPM gain.

    From this data I derived a voltage compensation coefficient and managed to keep the gain fairly stable, with a loop that runs every 5 seconds and updates the bias voltage. While it’s not great, it’s much better than without it.

    Relative gain shift with fixed bias voltage (orange) and with a varying bias voltage calculated from the temperature value.

    The difference that this makes is in keeping an overall better energy resolution for the system at varying temperatures.

    Left plot has data taken between 29 and 40 degrees Celsius, without temperature compensation loop running. Plot on the right is taken between 24 and 40 degrees Celsius, but with the temperature compensation enabled and results in a better energy resolution.

  • ADC calibration

    mihai.cuciuc04/30/2024 at 05:15 0 comments

    Plot on the left shows Na-22 source spectrum without ADC calibration applied, with a zoom on on the 1274 keV peak. Plot on the right has ADC calibration applied.

    Missing codes

    The 12-bit ADC in the SAML21 is great for most jobs. It can read voltages from tons of sources, has on-chip voltage references that it can use, and is reasonably accurate. But the ADC is quite stubborn in skipping some codes quite a lot. To test this, I generated some voltages with the DAC and took 100 measurements of them with the ADC. Most measurements look like the plot on the left in the following figure, with the measurements spread nicely around a center value. But in the middle of the ADC range is the worst culprit, with its plot on the right.

    On the left is a histogram of some fixed voltage measurement with the ADC with a nice reasonable spread. On the right is a histogram of another fixed voltage, this time in the middle of the 12 bit ADC range. Four consecutive ADC codes are missing.

    Mapping out the ADC response

    With much higher statistics you do get some counts in those codes eventually. But it’s not just those 4 codes in the middle that are underrepresented. I wanted to get a map of all underrepresented codes, but I did not trust that the DAC is perfect and didn’t want to mix the two imperfections. I decided to use a very slow ramp generator to swing across the ADC range while taking as many readings as possible. That should ideally produce a flat histogram. I also wanted my ramp generator to be simple enough to integrate on the PCB as part of a “self calibration” tool. I ended up with a very simple op-amp integrator.

    Ramp generator for checking the ADC underrepresented codes. It can be completely disabled from the MCU to save power.

    Taking a LOT of ADC data using the ramp generator produces the following histogram which shows the underrepresented bins. As I’m truncating my readings to 10 bits, now the troublesome middle of the ADC range is at bin 512.

    Histogram of the ramp generator readings showing periodic underrepresented codes in the ADC.

    Correcting for missing codes

    This structure gets imprinted on the gamma spectra I gather and make them look unpretty. Realistically it’s not a huge problem, as the detector resolution is low enough that these structures can safely be ignored. It’s still obvious where the gamma peaks are even if there’s a gap right in the middle of one, as can be seen in the first plot at the beginning of this log. But I still want it fixed.

    My first thought was to run some smoothing on the spectrum, with a moving average window. That did not work great as the dips were still visible, and it also started worsening the energy resolution of the measured peaks. Not cool.

    Then I tried multiplying the gamma spectrum with the inverse of the calibration histogram. This did make the spectrum look pretty, but I did not like the thought of presenting an altered version of the histogram that the one I store in memory. Plus, since it involved integer division you could present a histogram that has a different integral than the total number of pulses you measured. Also not cool.

    I wanted a solution that would work on an event-by-event basis -- whenever I have a measurement, place it in an appropriate bin such that the end result is a pretty histogram.

    Calibrating the ADC - donor and acceptor bins

    Whenever I get a gamma reading from the ADC I want to be able to quickly decide if I should place it in its corresponding histogram bin, or to give it away to one of the neighbouring bins to smooth out the resulting spectrum. Physics-wise this is not such a big deal -- each bin is ~2.5 keV, whereas the detector resolution is ~60 keV. So “misplacing” a reading a few bins left or right is ok.

    For the rest of this section let's assume I just got a gamma ray measurement, and the ADC reading is 509.

    I look in the calibration histogram at 9 bins centered on the one corresponding to the measurement, shown in the following plot.

    A slice of...

    Read more »

  • Analog PCB update with new bias supply

    mihai.cuciuc04/27/2024 at 08:13 0 comments

    Assembled Pomelo (top), as well as its components: detector (bottom), analog board (left), and digital board (right)

    I integrated the new SiPM bias supply into the analog board. With this new version (v3) together with the 3cm^3 CsI(Tl) scintillator the results are pretty good:

    • 2.6mA @ 3.3V in background conditions
    • 4.3mA @ 3.3V with a 44 kBq Na-22 source on the detector
    • <10% energy resolution @ 662 keV

    The old version (v2) of the board with the same detector had the following:

    • 6.3mA @ 3.3V in background conditions
    • 7.6mA @ 3.3V with a 44 kBq Na-22 source on the detector
    • <10% energy resolution @ 662 keV

    Cs-137 and Na-22 spectra taken with the v3 board and 3cm^3 CsI(Tl) scintillator. Threshold was set very high, but it can be set below 60 keV

    This updated PCB implements the new low power bias power supply and adds a ramp generator for calibrating the ADC. More details on ADC calibration in a following log.

View all 18 project logs

Enjoy this project?

Share

Discussions

Residual Entropy wrote 08/09/2024 at 18:41 point

I've been looking for a way to do gamma spectroscopy semi-affordably and this is exactly what i was looking for, this is awesome!!

  Are you sure? yes | no

[deleted]

[this comment has been deleted]

mihai.cuciuc wrote 07/14/2024 at 16:33 point

Hi, Dylan,

Yup, that's the plan -- in its entirety, actually. I plan on selling them and making the firmware and schematics available. Not the PCB layout though, as by the time you start modifying that you're better off redoing the whole thing anyway.

It will take me a while to start selling them -- I'm reasonably good at engineering, not at the business side of things. But if you're way too eager to get one, PM me.

  Are you sure? yes | no

Dan Maloney wrote 06/04/2024 at 23:39 point

Fantastic project, love the lesson in scintillation counting. Wrote this up for the blog, should publish soon. Great work!

  Are you sure? yes | no

peter jansen wrote 04/17/2024 at 05:01 point

Super interesting!  How small do you think you could ultimately make the sensor and accompanying electronics?  

  Are you sure? yes | no

mihai.cuciuc wrote 04/17/2024 at 05:04 point

Thanks! I'm aiming to fit everything on a 5cm x 10cm PCB, with the height given by the detector laid on its side, so about 2.5cm.

  Are you sure? yes | no

peter jansen wrote 04/17/2024 at 23:34 point

Since the Radiation Watch Type 5 has been retired, I was hoping you'd say something along it's size so that it could be a close mechanical replacement :) ( https://www.sparkfun.com/products/retired/14209 ).  I've tried to get it to do similar things to what you're doing, by measuring pulse width instead of height/AOC (only a correlate of energy) -- it'd be wonderful to have a proper solution in a small form factor to put on hand-held devices!

  Are you sure? yes | no

mihai.cuciuc wrote 04/18/2024 at 05:39 point

Oooh, I see -- the Radiation Watch Type 5 was indeed pretty cool -- I'll think about what could be done in similar size constraints.

Meanwhile, I suggest you take a look at the Semeatech Mini Gamma Sensor ( https://semeatech.com/Products/Radiation%20Detection/Mini%20Gamma%20Sensor.html ). It's super small, draws very little power, and has decent performance above 300 keV. I played around with them a little so let me know if you want some spectra.

  Are you sure? yes | no

Mitchell de Vries wrote 02/14/2024 at 22:46 point

Those spectra are looking nice and clean, you're inspiring me to restart my radiation detecting projects! Did you have much issue sourcing suitable calibration sources? Also, I'm guessing you'll be implementing calibration?

  Are you sure? yes | no

mihai.cuciuc wrote 02/15/2024 at 06:14 point

Thanks! I'm glad to hear my toying around is inspiring!

I have a gamma spectroscopy lab at work, so we have quite a few radioactive sources I could use for calibration. Yup, right now I do energy calibration offline, and it's pretty linear, with a very small quadratic term that is fairly common with SiPMs. The plan is to store calibration constants on the device.

But I also had good success calibrating it without lab sources, using commercial Th-232 welding rods (WTh20), a smoke detector Am-241 source (but they don't sell those in the EU any more), and K-40 from salt substitute. This last one requires some patience though :)

  Are you sure? yes | no

Muth wrote 01/18/2024 at 15:01 point

This is highly interesting ! May I ask if you have advises to source scintillators and SiPM ?

Thanks !

  Are you sure? yes | no

mihai.cuciuc wrote 01/19/2024 at 06:02 point

Thanks!

Sure, I got the SiPM from Farnell: https://ro.farnell.com/broadcom/afbr-s4n44p014m/silicon-photomultiplier-1-ch-420nm/dp/4236230

I chose them because they're fairly inexpensive and seem to be quite new (i.e. not going to be EoL soon).

As for the scintillators, I have them from OST-Photonics: https://www.ost-photonics.com/product-category/scintillation-crystal-2/

  Are you sure? yes | no

Muth wrote 01/23/2024 at 15:38 point

Thanks you very much !

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates