GithubHelp home page GithubHelp logo

opengammaproject / open-gamma-detector Goto Github PK

View Code? Open in Web Editor NEW
232.0 19.0 32.0 60.96 MB

☢️👁️ Hardware for a hackable DIY gamma-ray spectrometer using a popular NaI(Tl) scintillator, SiPM and a Raspberry Pi Pico.

License: GNU General Public License v3.0

C++ 95.73% C 4.27%
physics radiation gamma-ray-spectrometry radiation-detector detector arduino-ide raspberry-pi arduino citizen-science hardware

open-gamma-detector's Introduction

Open Source Hardware Association Certificate

Open Gamma Detector


This is the latest hardware revision 4.1. For older revisions, please have a look at the other branches. A comparison between the 4.0 and 3.x hardware can be found here.

This project is also on Hackaday.io, where I post important project updates and other announcements!

Open hardware for a hackable gamma spectrometer all-in-one device using a popular NaI(Tl) scintillation crystal and a silicon photomultiplier (SiPM). Extremely affordable design for a powerful DIY gamma spectroscopy setup with a total parts cost of under around 200 USD.

The detector uses a standard serial-over-USB and hardware UART connections so that it can be integrated into as many other projects as possible, for example data logging with a Raspberry Pi, weather stations, Arduino projects, etc. It includes both scintillation counter and multichannel analyzer (MCA) functions depending on how you want to use it.

Photo of the detector board with mounted SiPM, crystal and OLED
Photo of the detector board

If you want a more barebones version of the Open Gamma Detector to only count pulses or similar, you can have a look at the Mini SiPM Driver board.

Features

Here are some of the most important specs:

  • Compact design: Total size 120 x 50 mm. Approx. 70.5 x 50 mm area for electronics and additional 49.5 x 50 mm to mount a scintillator.
  • All-in-one: No external parts (e.g. sound card) required to record gamma spectra.
  • Standalone spectra recordings on built-in flash.
  • Easily programmable using drag-and-drop firmware files or the standard Arduino IDE.
  • Low-voltage device: No HV needed like with photomultiplier tubes.
  • Can use SiPMs in the voltage range of 27.5 V to 33.8 V.
  • 4096 ADC channels with built-in 3 V voltage reference.
  • Energy resolution of up to 7% @ 662 keV possible; highly dependent on your SiPM/scintillator assembly.
  • Energy Mode: ~20 µs total dead time while measuring energy (default settings).
  • Geiger Mode: <5 µs total dead time without energy measurements (default settings).
  • Low power consumption: ~20 mA @ 5 V with default firmware at normal background.
  • Built-in ticker (buzzer) for audible pulse count rate output.
  • Additional broken-out power pins and I2C, SPI and UART headers for custom parts (e.g. display, µSD card, etc.).
  • Simple OLED support out of the box (SSD1306 and SH110x).
  • Built-in True Random Number Generator.

How To Get One

  • For quick access and purchase of all the parts (PCB and BOM), you can use Kitspace (may be outdated!).
  • Otherwise, use a PCB manufacturer and an electronics distributor of your choice and proceed on your own. All the files you'll need can be found in this repo.

You will also need to buy a SiPM (e.g. the MICROFC-60035-SMT-TR) and scintillator (NaI(Tl) recommended) separately at a distributor of your choice. You might also want to grab one of the countless SiPM breakout boards I made.

Working Principle

Here is a nice flow chart to describe how the device roughly works:

Working Principle Flow Chart

Hardware

Hardware design has been done with EasyEDA and all the needed files for you to import the project as well as the schematic can be found in the hardware folder. There is also a Gerber file available for you to go directly to the PCB manufacturing step.

Detailed information about the hardware of the detector as well as the potentiometer settings and assembly can be found in the hardware directory.

Software

The software aims to be as simple as possible to understand and maintain. To achieve this I decided to use an off-the-shelf microcontroller - the Raspberry Pi Pico. This board can be programmed with the Arduino IDE over micro-USB and is powerful (dual core, fast ADC, plenty of memory, ...) enough for the purpose and also exceptionally cheap.

To program the Pico and/or play around with the firmware, head to the software directory. There you will also find documentation on the serial interface (!), display support, and much more.

Troubleshooting and FAQ

Please have a look at REFERENCE.md for some general guidance.

If this doesn't help you, feel free to reach out and create an issue or open a discussions thread.

Example Spectra

Here is a small collection of example spectra I could make quickly without putting much effort into the detector settings (threshold, SiPM voltage, software tweaks). I'm using the Tiny MicroFC Breakout and just a single SiPM (which isn't the optimal setup actually). In addition, neither the electronics nor the scintillator and sample were shielded from EMI or background radiation whatsoever. So as you can see the detector is actually pretty robust in that regard.

Background spectrum (2h) with no samples:

Background spectrum

Spectrum (2h) of two tiny (~5 g) LYSO scintillator showing two distinct gamma peaks (201.83, 306.78 keV) with an additional ~55 keV X-ray peak. The 307 keV peak has an energy resolution of ~14% in this case:

Lu-176 spectrum

Spectrum (5min) of Am-241 commonly used in household ionization smoke detectors (e.g. in the US, no longer in the EU). Gamma peaks at 26.34 and 59.54 keV:

Am-176 spectrum

Spectrum (2h) of a small tea cup with pure Uraninite (also known as pitchblende) contents in its glaze. You can see all kinds of isotopes of the Uranium series including the Bi-214 peak at ~610 keV. Because they just used the pure Uraninite without any filtering whatsoever, there is also some U-235 in it and all the daughter radionuclides as well:

Uraninite Glaze

Spectrum of a Na-22 test source, about ~2 µCi made with a Rev.2 board (worse energy resolution than the latest version). You can see the 511 keV annihilation peak and the small 1275 keV gamma peak (much smaller due to limited NaI efficiency and small scintillator size for this energy) as well as the compton edge and continuum:

Na-22

Spectrum (2h) of about 100 grams of mushrooms still containing the isotope Cs-137 from the Chernobyl disaster. You can clearly see the gamma peak at 662 keV and the ~32 keV X-ray peak. Resolution of the 662 keV peak was ~8.6%, using only a single SiPM and an old NaI scintillator:

Mushroom "test source"


Here are some of the same spectra using a larger 1x1 inch scintillator rated at 6.9% @ 662 keV and a 2x2 SiPM array:

Spectrum (1h) of the same mushroom sample from above. This time the resolution at the 662 keV Cs-137 was 7.7%, not bad!

Mushroom "test source"

Spectrum (1h) of a small batch of Lutetium(III) oxide. It contains Lu-176 just like the LYSO scintillator sample from above. Therefore it also has the same peaks, just a lot more clear now. The 307 keV peak now has an energy resolution of 11.5%.

Lu-176 spectrum

Known Limitations

  1. The Raspberry Pi Pico's ADC has some pretty severe DNL issues that result in four channels being much more sensitive (wider input range) than the rest. For now the simplest solution was to discard all four of them, by printing a 0 when any of them comes up in the measurement (to not affect the cps readings). You can turn this behavior off by using the set correction command. This is by no means perfect or ideal, but it works for now until this gets fixed in a later hardware revision of the RP2040 (wish us luck!).
  2. The power supply is not temperature corrected itself, meaning changes in the ambient temperature with a constant voltage affect the gain of the SiPM. This will naturally result in a different DC bias, energy range and S/N ratio. This effect is negligible around room temperature, though. The temperature dependence of the gain is -0.8%/°C (21°C) for the MicroFC SiPMs. The latest MicroFC SiPM carrier board has automatic temperature compensation on-board however! So use that if you want to get the best performance out of it.

Some Ideas

Coincidence Measurements

Using multiple detector boards with some firmware modifications it should be theoretically possible to implement a coincidence measurement feature. By respectively connecting the VSYS, GND and one of the broken-out pins to each other on both boards you have everything you need to get started. The pins would be used for an interrupt from the child detector to the parent to trigger a pulse if both timings coincide.

At the moment, though, I couldn't get a coincidence mode feature running due to some weird timing issues. There might be a firmware update in the future to implement this feature. If you have any ideas, let me know!

Cooling the SiPM

During operation all the electronics including the SiPM naturally heat up ever so slightly. Due to the detector board (where most of the power is dissipated) not being directly connected to the SiPM self-heating is negligible, though. Therefore air or water cooling alone won't improve performance considerably, because it won't heat up much above ambient temps, if at all that is. However, you could cool the SiPM PCB with a Peltier module to sub-ambient temperatures. According to the datasheet AND9770 (Figure 27) every 10°C reduction in temperature decreases the dark count rate by 50%! But be sure to correct the SiPM voltage (overvoltage) in this case as it also changes with temperature.

Note that the required breakdown voltage of the SiPM increases linearly with 21.5 mV/°C, see the C-Series SiPM Sensors Datasheet. This means that you would also need to temperature correct the PSU voltage if you wanted to use it with considerably different temperatures.

Shielding Background Radiation

Shielding the ambient background can be done ideally using a wide enough layer of lead (bricks) all around the detector with a thin layer of lower-Z material on the inside such as copper to avoid backscattering. The SiPM and the sample can then be put into the structure to get the best measurements possible (low background).

See Wikipedia: Lead Castle


Thanks for reading.

open-gamma-detector's People

Contributors

imgbotapp avatar kasbah avatar nuclearphoenixx avatar sebyon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-gamma-detector's Issues

About amplification ratio

Hi!That is a great project!Thanks for sharing!
I noticed that the amplification ratio of SIPM signal in the circuit diagram is 300. Is that so? I also use the same SIPM (the bias voltage is 30V), but I will get a lot of dark counts at such a high amplification ratio. Is there a problem with my SIPM.
In addition, I want to know what R7 R16 does. Is it to add a bias voltage to the SIPM signal?
Thank you!

Display detection not working

Moved issue from #18.

I'm using the Adafruit_SSD1306 library for OLED support and somehow display.begin() doesn't really check if there is a display in the first place. This results in the display being "used" when set display -enable has been called, even if there is non plugged in! I don't know of any harmful consequences as of yet, but it's definitely not good practice to leave this on.

FW version 2.3.3 disabled the automatic use of an OLED display to go around this issue, so users have to decide if they want to use it or not.

Here is a link to the library issue: adafruit/Adafruit_SSD1306#251

Substitute for MICROFC-60035-SMT-TR1

Hey there, awesome project!

I managed to buy most of the parts for this project but eventually I realised that the SiMP MICROFC-60035-SMT-TR1 seems to be out of stock everywhere I knew to look (mouser, digikey,etc.).

Do you happen to know a distributor who isnt't out of stock?

Alternatively, are there equivalent SiMPs which are more widely available and which could be integrated into the project with moderate effort?

Thanks in advance,

Adrian

Library Missing from Readme

I get a compilation error from Arduino IDE. The Adafruit_SSD1306 Library is not listed but is required. Its an easy fix but just wanted to bring this to your attention.

Repurposed for Muon detection?

Hello all,
Could this be easily repurposed for muon detection? It seems very similar to the MuonPi/CosmicWatch/CosmicPi etc.

Regards
Dylan

How to calibrate?

In the readme, there's a diagram of potentiometers. This suggests the device can (should?) be tuned or calibrated, but it doesn't explain how. I don't know what kind of results to expect: I was vaguely expecting a spectrum in seconds or minutes, but the readme talks about collection times of two hours - so, I don't know what "right" looks like, to calibrate the device. And, I think I understand what "gain" and "threshold" probably are - sorta, turning up the volume, and the lower limit that counts as an event, respectively, I think? But I don't know what changing the voltage would do (and am nervous about adjusting it), nor do I know why there are two potentiometers R9 and R10 there. Perhaps these things could be clarified in the readme? (Or it could be split into separate pages, if the amount of info is getting too large for a single readme?) Thanks!

Consider removal of radiation trefoil from silkscreen design

Hi, cool project!

Radiation trefoils typically designate that something is a) radioactive or b) contains radioactive materials. The presence of a radiation trefoil on this detector may give the mistaken impression to people unfamiliar with the device that the detector falls into one of these two categories.

Dead Time Correction inaccurate

In some of my tests, thanks to @dc1rdb, I've discovered that the dead time corrected cps values for the energy and geiger modes deviate from each other. Geiger mode always seems to undershoot the actual value, while energy mode always overshoots a little bit. It looks to me, however, that energy mode is a lot more accurate over larger ranges of different count rates.

Sending in 20kcps from a pulse generator with a pulse duration of 5µs, shows around 22000 in energy mode and only 16500 in geiger mode. This might be related to the fact that for geiger mode the dead time only reports as 1µs or sometimes even 0µs.

I'm not sure what's causing this, it's somewhat related to how the software takes in the interrupts behind the scenes and obviously, how the dead time is measured. For now, I'll leave the dead time correction in, though, because IMO it's much better to have it than not to, even if it's not 100% accurate.

In the future, I might add a small factor to the dead time to compensate delays in the interrupt that are not measured.

4x1 header vs 3x2 header for SiPM

Thank you for the fascinating project.

I have a question about the SiPM mount. The PCB of this project provides a connection for a 4x1 header to mount the SiPM. The apparent companion project SiPM-Carrier-Board has a 3x2 header. Is there something I don't understand about how these are supposed to work together? Or these projects are not actually related?

If they are not related would you recommend including the additional VCC filtering that the SiPM-Carrier-Board provides? Or is the filtering that is already part of the PCB of this project sufficient?

losing serial connection

I am using a MICROFC-30035-SMT-TR because I can't find the 60035.When I turn up the threshold until the red led is mostly on I lose the serial connection. Could this have something to do with the "delay" or "reset" settings? With careful adjustment of threshold and gain I can only get it up to 8 or 9 CPS. With it set here I will lose the serial when I send commands and if I reset or power cycle the serial won't come back until I reduce the threshold.
Any thoughts?

Serial2 shell commands not working

Discussed in #52

Originally posted by feraloid February 26, 2024
While connecting the OpenGamma Detector to an ESP32 via the UART/Serial2 pins (H1 #9 & 10) I have run into a problem. The documentation seems to say the OGD will accept shell commands via the UART serial (Serial2) port. The data transmitted from the OGD is coming through fine on the ESP32.

When I attempt to transmit shell commands from the ESP32 to the OGD, they are apparently ignored. I've mirrored the characters typed onto the ESP32 in code via Bluetooth serial to make sure the typed characters are being received/processed by the ESP32 code. I've also switched to lower baud rates on the chance there's a weird baud rate issue. I have tried different transmit pins off the ESP32 to make sure I didn't have a bad pin. Finally, just for completeness sake, I checked my transmit pin on the ESP32 with an oscilloscope and verified there is data coming through.

Did I misunderstand that the OGD will accept shell commands from the UART port or do I have some weird problem I have failed to find?

Hardware serial commands are not working correctly.

Diode direction silk screen missing

Hey there, me again.

I've got all the parts together now and am in the process of soldering the board. I've noticed that on the older board (which still had the rad icon printed on it ;) there was direction information for diodes visible on the silk screen. It appears to me this is missing on the new board, as I imagine they are still directional components.

For now, I will try to infer the direction from the schematics.

Cheers, mate

Random crashes when display enabled

I noticed with the latest firmware versions, which enabled display support by default (enable_display = true), the display would be enabled even if there is nothing connected! This resulted in a second bug which completely crashes the device after a random amount of time, so it would restart.

I'm using the Adafruit_SSD1306 library for OLED support and somehow display.begin() doesn't really check if there is a display in the first place.

FIX: I have fixed this in firmware version 2.3.3 by disabling display support by default. You can still enable it, if you want, but then it might crash like I said. If you upgrade from an existing device, I highly recommend resetting the settings! Otherwise the enable_display might still be true especially if you didn't change anything!

I will be posting a link to the GitHub issue for the Adafruit SSD1306 lib. Until then default OLED support will stay disabled.

[Question] Would BC412 plastic scintillator be suitable?

Hi, would a plastic scintillator be suitable for the detector of would the output be too weak? I can get a cube of 50x50x10mm of BC412 for a reasonable price shipped to EU. I know that plastic scintillator have weaker output than NaI(Tl) or CsI(Tl), however the volume of the scintillator would also be greater. Or if you have other good scintillator source suggestion in EU it would be welcome.

But I like the BC412 since it should be pretty indestructible and moisture resistant.

Thanks!

Recommended size for scintillation crystal?

I've identified what I believe to be a fairly decent deal for a Nal(Ti) crystal, which is 25mmx25mm.
I'd want to be able to identify isotopes with a fair amount of certainty, but I cannot find any information about how the crystal size affects the reading accuracy, apart from the obvious limitation of isotope size that I can easily sample.

Would it be simply the case that I may just need to sample my isotope for longer due to the decreased area of the crystal?
Additionally, would discoloration and spots on the crystal affect the results of my gamma spectroscopy much?

Cheers for your advice,
Ghostoverflow

R4 Missing in BOM file

Hey there, I am slowly progressing and am currently searching for R4.
It does not seem to be contained in the current BOM file.
Any tips on what I'm missing?

Since the other resistors number in the hundreds due to the minimum order quantity, there should be one I already have which can be used.

Cheers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.