DIY PIC18 MCA Module for Gamma Spectroscopy 1024 Channels 10bit ADC w/SD logs
Gamma Viewer 1.00 - DIY Multi Channel Analyzer for Gamma Spectroscopy
The module is assembled miniature Multi-Channel Analyzer (MCA) board based on PIC18 microcontroller. It allows to view and collect gamma spectum instantly without a computer and safe spectra on micro SD card. The MCA uses internal 10bit ADC of the microcontroller.
The board has analog circuit that translate PMT pulses into signal that 10bit ADC can sample in better way. The spectrum is displayed on 128x64 LCD and stored on micro SD card for further analyzing with BecqMonitor2011 software.
- Application: Amateur Gamma Ray Spectroscopy Project
- ADC: 10bit 1024 channels PIC18
- Energy Range: 10keV - 3000keV
- Linear / Logarithmic Scale Display
- CPS (counts per seconds) Counter for optimal measurement control
- Calibration Engineering Menu
- micro SD card socket
- Power Supply Voltage: 5V-12V DC
- Display: 128x64 LCD 2.8" with Backlight
- Require Input Signal Amplitude: 20mV-3000mV
- Require Input Pulse Duration with exponential fall: 30uS-50uS
- Require Input Pulse Raise time: 2uS-10uS
- Recommended count rate for spectra < 1000 CPS
- Working Modes: MCA / Scintillation counter / UART-USB
- Module size: 71mm x 55mm x 20mm
- Shipping Weight: 180gr
- UPC Number: 634154871195
- SKU: RH-M-MCA-18
DOWNLOAD Firmware 1.05 (if you want to keep the old version)
What is required hardware calibration for the module?
The analog circuit and software will need minor calibrating for a particular tube, so it's better to have an oscilloscope and some previous experience to deal with PMT tubes in spectroscopy subject. With correct setup you can get FWHM resolution <7%
Before you start with the MCA, I suggest to validate that pulse shape output from your PMT pre-amplifier is under recommended requirements. The pulse rise time can be 2us-10us, fall time <=50us, overall pulses amplitude maximum 3300mV (VREF). Here is the example of the recommended pulse shape for input signal.
Connect the pulse amplifier to MCA module and test input signal at TP1.
Test TP4 and set voltage on it with small blue potentiometer. The TP4 it hardware low level LLD to cut low energy noise. Usually can be set 25mV-75mV.
Connect second oscilloscope input to TP3. On TP3 you can view pulses that are coming to ADC (green line readings in the video below). Check that rising edges of the simultaneous pulses are synchronized on TP3 and TP1. See the video to validate the correct shape of the signals.
The green color record channel in scope video above is ADC input test point TP3. The yellow color record on TP1 are PMT pulses coming from external pre-amplifier. You may need 2-channel oscilloscope to check test points TP1 and TP3.
Along with finding best HV settings you need to set up the software. It’s time now to describe menu options. Long press on left button will open the menu. It has following items:
DUMP to SD – will write spectrum to SD on demand. Require only if you want to safe the data before waiting spectrum collection is ended.
RESTART – restart new spectrum, all previous data of current collected spectrum will be erased.
RETURN – exit from menu without making and changes.
SET MAX CNT – set maximum counts in one channel. You can set from 1000 up to 30000 counts in one channel. The value will stop spectrum measurement when number is reached in particular channel and will trigger auto-dumping to SD.
SET MAX TIME – set maximum time of spectrum measurement in seconds. You can set from 100 up to 7200. The value will stop spectrum measurement when number is reached and will trigger auto-dumping to SD.
The first reached value between MAX CNT or MAX TIME will trigger auto-dumping spectrum to SD.
DC OFFSET (no longer used in 1.06 or newer firmware) – this what you read on TP1, but in ADC units! By default it set to recommended 0 (zero). If your DC offset in amplifier is higher than 100mV it suggested to try that function for better display view of spectrum. How to calculate ADC unit? Use VREF/1024. For example 3300/1024 = 3.22; Then 100mV/ 3.22 = 31 ADC units. So you can set DC OFFSET = 31 Beware, wrong settings here may lead to software instability! That’s way be careful and not increase that value in large steps.
MODE - togge working modes: MCA, Scintillation Counter or UART logger (since 1.06 firmware)
SET MIN CH – this is minimal channel number you want to view on spectrum. It works to filter out PMT noise on energy below 20keV. Trial and error method. Default is 10.
SET MAX CH – same as previous function, but form the top side of spectrum. If dynamic range of the amplifier gather all highest energies above 1700keV into one big bump on the spectrum right side then you can cut-off it with that filter.
SET MIN CH and SET MAX CH functions where updated in firmware 1.03. Previously it was used only to filter out noise channels on top/end of a spectra. Now it also allows to select a specific region and ignore all peaks beyond. On SD file, all filtered channels will be saved with zero value.
Be careful not to overlap minimum and maximum channels, otherwise the MCA will not capture any spectra.
REMOVE NOISE CPS - when enabled, allows to show on LCD only relevant CPS counts in range of minimum / maximum channels. When disabled, all CPS events are counted for LCD. This function can be useful when you debug the noise level of your system or want to estimate full spectra CPS vs. activity for selected region. Available in firmware 1.03.
LCD ZOOM RANGE - added LCD zoom. You can set number of channels to display on LCD from 128 to 1024. Available in firmware 1.03.
LCD FIRST CH - Related to LCD zoom, you can set the first channel for LCD zoom range. LCD zoom settings has no influence on SD data file. As before, the log. file will contain all 1024 channels. Available in firmware 1.03.
SAVE&RESET – you need to make software reset if any of functions above where changed to get it works.
During spectra measurement you can switch between linear or logarithmic scale by pressing right button shortly.
After dumping to SD make long press on right button to restart new measurement.
Scintillation mode for searching with NaI(Tl) / CsI probe.
Since firmware 1.03a we have added scintillation mode for the MCA module. The mode allows you to use your NaI(Tl) probe for searching of low contaminated areas. First time you activate the scintillation mode the software will run 5 minutes calibration to calculate average and standard deviation for your probe.
Menu Functions related to Scintillation mode:
SCINT MODE – activate scintillation mode, restart applied by auto.
BEEP FREQ.HZ – set for sounder clicker frequency.
DEALAY N-pulses – the module will click on every N particle detected.
CONFIDENCE SIGMA – set 2 for fast searching or 3 for more accurate search but slower response of alert.
CALIBRATE SD – will trigger 5 minute scintillation re-calibration on the next restart.
AVERAGING SEC – 2 or 3 seconds to average CPS results. Use 2 for faster search.
Take note, some MCA menu settings for acquisition spectrum is not active in scintillation mode! Switch back to spectrum mode by setting SCINT MODE to OFF.