Posts: 111
Joined: Sat Aug 09, 2014 11:48 pm

GQ GMC series radiation logger

Wed Nov 14, 2018 10:22 pm

Hi Folks

Here's a little logger for a GMC-300EPlus radiation counter and the GQ GMC 300 series...

Code: Select all

#!/usr/bin/env python2
# log data from gq gmc 300e (works with all 300 series, might need to change baud rate to 115200, or set on device)
# Author: Paul W. Rogers  (SkyPi)
# (c) 2018 P.W. Rogers, Free for personal use.
# follow instructions here for setting up a udev rule (so you know that /dev/usb device N is most probably a gq electronics gmc device)
# read the GQ electronics docs for info on the command set
import time
import serial
from datetime import datetime
import statistics

class movingaverage() :
  def __init__(self,size=20,expsmooth=True,expfact = 0.5) :
    self.dataset = []
    self.datasetsize = 0
    self.expsmooth = expsmooth
    self.expfact = expfact
    self.smoothed = 0
  def addpoint(self,data) :
    # might want to check not adding non numeric type and try convert, numpties abound eh!
    # can do the convert at level above...
    if self.expsmooth :
      if self.datasetsize == 0 :
        self.smoothed = data
      else :
        self.smoothed = self.expfact * data + (1-self.expfact) * self.smoothed    
    if self.datasetsize == self.maxsize :
    else :
      self.datasetsize += 1

  def median(self) :
    return statistics.median(self.dataset)

  def mean(self) :
    return statistics.mean(self.dataset)

  def expsmoothed(self) :
    return self.smoothed
ser = serial.Serial('/dev/gqgmc', 57600,timeout=5)

# only low 6 bits of high byte are valid data for the heartbeat message
hbmask = 0b00111111

f = open('radiation_cps_log.txt','a')

# reset stream and set heartbeat on 

ser.write("<HEARTBEAT0>>") # heartbeat off

# clear serial buffer

while ser.in_waiting > 0 :


# start heartbeat transmission 

ser.write("<HEARTBEAT1>>") # heartbeat on

# read and log the cps messages

avgpermin = 0
mavgmin = movingaverage(60) # 1 min of samples
mavgminper10 = movingaverage(600) # 10 mins of samples
mavgminper30 = movingaverage(1800) # 30 mins of samples
mavgminper60 = movingaverage(3600) # 60 mins of samples

try :
  while True:
    logline =
    cpsval = ord(logline[0]) & hbmask
    cpsval = cpsval << 8
    cpsval += ord(logline[1])
    #print ord(logline[0]), ord(logline[1]), cpsval # debug
    logline ='%Y-%m-%d, %H:%M:%S, ')+str(cpsval)+", "+"{:.2f}".format(mavgmin.mean()*60)   + \
         ", "+"{:.2f}".format(mavgminper10.mean()*60) +", "+"{:.2f}".format(mavgminper30.mean()*60) +", "+"{:.2f}".format(mavgminper60.mean()*60)
    print logline  

except Exception as e :
  print e

Posts: 111
Joined: Sat Aug 09, 2014 11:48 pm

Re: GQ GMC series radiation logger

Wed Nov 14, 2018 11:31 pm

I'd say from my observations it (gmc300e-plus) misses a very fast count in a second which echoes on its speaker but not in data but only statistically significant at low level reading perhaps... plus it is probably 1/6 as accurate as a pankake detector at low levels, apparenttly they balance out at obviously hazardous levels... slyness eh! dtecting the increase of nergetic particles in the air post FUK-YOU-SHE-MA eh"! fookin windscale eh! where's that eh! does not exist on a map anymore.. been wiped from the map and renamed eh!

the 1 minute average of my prog does match 1 min average cpm displayed on the meter...

it does seem to increase with cigarette smoke in the atmosphere!

grown in colorado/ukraine etc. eh!

well, that and just random high energy particles floating around detection range....

maybe a 3d printed new base with a fan might improve it for background detection... two different requirements where the pancake detector is detector of choice for background detection, but no standard for counts per cm2 of a detector eh! only relevant for background detection due to wierdness of tube recovery/saturation time after a hit... vs. surface area...

Return to “General discussion”