- supports up to 3 GM signal sources eg. GM tubes / counters and an additional coincidence signal connected at the same time
- GM / cosmic ray count logging (accurate in the normal GM tube response times)
- time logging for each hit on each source for lower count rates (<100 cps only)
- CSV exponential distribution statistics for the GM / cosmic ray pulses (<100 cps only)
- average CPM and dose logging
- real time demonstration output to console
- SSH real time console output - supports laptops, phones and tablets
- CSV raw data output - compatible with MS Excel, Google Spreadsheet, OpenOffice, LibreOffice, Quickoffice, iWork, Matlab, Mathematica and Maple.
- written in object oriented python - no messing about with C or Arduino
- open source and documented
- runs in background as separate process threads for each equipment
- supports RPi A/A+, B/B+ and RPi 2
- dose calibration even for different tubes at the same time
- supports both trigger types for each equipment to connect various equipment at the same time
- supports any commercial Geiger Müller counter with low OR high pulse output (old ones, too) (just make sure it's 3V compatible so you don't damage your Pi - make sure it's "level shifted")
- supports DIYGeigerCounters
- supports the Mightyohm Geiger Counter
- supports coincidence / cosmic ray detectors, such as my prototype CR-2
- supports long datalogging
2. Setup git, if you haven't done it before: sudo apt-get install git
3. git clone https://github.com/mvadai/rpi-geiger-logger.git
- cd rpi-geiger-logger
- open settings.py in any plain text editor eg. nano settings.py
- read the instructions in the file and make changes
- save your changes
II. Connect your geiger loggers / counters / signal to the RPi GPIO. Warning: make sure the signal is 3V otherwise you risk damaging your Pi.
0. cd rpi-geiger-logger
1. sudo python main.py <number of seconds>
Replace the number of seconds with the desired whole number.
Running the datalogging in the background:
1. Issue the command above with 10 seconds, or make sure the RPi doesn't ask for the root password.
2. Issue the following command
Over SSH: nohup sudo python main.py <number of seconds> >/dev/null 2>&1 &
For console: sudo python main.py <number of seconds> >/dev/null 2>&1 &
That's it. Wait for the program to finish and you'll find your data in the CSV files in the same folder.
This is the main part of the program deals with input and output and the event handling on the different Geiger-Müller counters / signal sources. It takes one argument, the logging time needed expressed in seconds. Runs 1-4 threads depending on the configuration in settings.py. It's an ideal app to harness the powers of the Raspberry Pi 2. You can have a processor for each GM signal.
The settings can be changed here. See the file itself for detailed instructions.
This is the main class for each signal source all the calculation and datalogging is done here.
GPIO pin number - BCM numbering convention.
Determines the ionosation rate for a certain CPM for a certain GM tube. This should be in the GM tube's datasheet. For the SBM20 this is 22 CPS/mR/h for Co-60 gamma and 29 CPS/mR/h for Ra-226 gamma. Read the calculating the dose section here for more information.
Determines the mR to uGy conversion given by the datasheet if applicable. For tubes using CPS to uGy, this should be 1.
Stores the time the counter was started.
Stores the total number of GM hits. Default is 0.
This list stores the times for the GM hits.
__init__(pin, CPStomR, mRtouGy):
Constructor takes the GPIO pin number, the CPStomR (CPS/mR/h) and the mR to uGy conversion rate (eg. 8.77)
Increments the counter by one and appends the current time to the TIMES the current dose to DOSES and the current CPM to CPMS.
Returns the average counts per minute as int, CPM for the whole logging period.
Returns the average counts per hour as int, CPH for the whole logging period.
Returns the average as float dose in uGy/h calculated from CPM.
Returns the average dose calculated from the CPH in uGy/h as float.
Returns the estimated CPM as int for times less than a minute and the CPM above one minute.
Returns the estimated CPH as int for times less than an hour and the CPH above one hour.
Returns the actual dose in uGy/h based on the dose conversion factor given in settings.py. The calculation done is the following. Absorbed dose in uGy/h = (mR to uGy factor) * CPS / (sensitivity (CPS/mR/h)).
Returns the actual dose in uGy based on the dose conversion factor given in settings.py converted back from CPH.
Calculates the timely distribution of GM hits. Determines the appropriate time intervals and counts the hits falling into those intervals. Writes the distribution in a CSV file.
Writes the total number of hits, the times for each hit, the average CPM and average dose for a counter into a CSV file.
Tests and limitations
The operating system is much slower than this. The 3 simultaneous signals appear in the logs usually within 0.01s only. This is only because of the response time of the operating system, not the actual signal detection on the detector itself or on the BCM chip. Therefore you can't assume that the 3 simultaneous signals which do appear on the hardware at the same time on the us timescale, will appear at the same time in the logs, too, only within 0.01s. The time difference between the signals in the logs is usually around 0.002 s.
However, this does not mean that the detector itself is that slow or you're witnessing a false positive detection or we're missing out on some signals. The time logging has a constraint of above, therefore it works until roughly 100 CPS. The event detection has been tested in the normal GM tube ranges (up to 10 kHz) the count rate. See this link for a nice comparison of the GM tubes.
The 0.01s variation between the log times for 3 simultaneous hits is the price we pay for not busy waiting on the processor and for the low power consumption. When the hits are more frequent, the processor scales up.
Stay tuned for data for the Raspberry Pi 2.
To avoid false detections to calibrate the prototype detector, please check the troubleshooting section here.