I purchased a GQ GMC-320 Plus Geiger Muller Counter Data Logger from Amazon a few years ago.
The main reason I purchased the GQ Geiger counter was that it has a serial interface and what looked like interesting software from GQ especially graphs of data captured. I played with the GQ software but was not really impressed since you can only get an hour worth of CPM readings without paying for upgraded software from GQ so in the drawer the GMC-320 went….
I got bored last month and found the GMC-320 sitting in the drawer, decided to take it out and play with it a little. A couple of years have gone by so the software must be better by now. I downloaded the current interface from the GQ website and installed it on my laptop… nope same old interface, how very disappointing. Someone must have better software to interface the unit with, while searching I stumbled across this code written for a Raspberry Pi on the 247coding.com website. It had some very basic features that I liked such as it read data from the serial interface, it created a gauge web page, FTP upload and it stored data in a CSV file. Wow exactly almost everything I needed to get started.
This is what the original QuickCPM code webpage looked like:
Things I did not like about the original code:
- It had a fixed com port on the Raspberry PI
- only displayed CPM and temperature from the counter
- no graphing
- no error checking for bad data received
- original code was from Python 2.x
Do not get me wrong, this was a great piece of code to start from, without this code I think the GMC-320 would be back in the drawer. Okay, so I have many challenges to overcome that I can tackle my boredom with.
I had never worked with Python before. I setup the Python 2.7.3 IDLE interface on my Win 10 laptop and started to play with the code. Python had some weird stuff to get used to but I have coded in several other languages so not surprisingly it was so simple pick up Python code and run with it. After playing around with the 247coding.com code for a few days and getting the code to run on Windows I decide it was time to make some changes.
Changes to the code include:
- Added graph for Temperature
- Added uSv information with CPM to uSv/hr calculation based on the M4011 Geiger Muller Tube at a 153.8 ratio.
- Added graph for uSv per hour for each minute of captured data
- Added uSv dose rate for each hour of captured data
- Auto Com Port identification
- If Com Port is disconnected, the loop will continue and reconnect even if the device is plugged into a different port
- Coded to work in multiple operating systems for Com Ports ( currently only verified on Win 10 )
- If serial data is in error or corrupted data received, reject data and try again
- FTP setup to transfer gauge pages on each minute, new uSv per hour and temperature graph every ten minutes, and uSv hour dose rate every hour.
- Modified code to work in Python 3.x
- Added program start time, last update, peak CPM time to display
- Added port connection to display
- Added separate gauge for peak CPM
- Changed gauges to have a better appearance, and changed range
- Changed CSV files to add header to beginning row and to log all pertinent data
- Setup two pages sizes, one for cell phone and one for desktop displays.
- And many other little changes…
The code should work on GMC-280, GMC-300, and of course the GMC-320 which it was tested for. As for the 280 and 300 the baud rate will have to be changed in the code variables
So here is the what the new code web page looks like now:
Note: On live page click the temperature gauge for temperature graph.
I am still playing with the code a little bit but am pretty much complete with what I wanted out of it.
I may add a separate page to this monitor with interactive data charts. The only issue I have with this is the interactive charts are fairly large chunks of data to transfer via FTP then again also to receive to a web page. So if I do this, I may set up the program to only transfer the interactive charts once every 24 hours. I really think it would be nice to have the interactive data charts for long term data but also think they may not need to be accessed very much.
Click GMC Radiation Monitor to see real time data from the working code. The unit should be up and running but may be down while I am working on the laptop. I am working on transferring this to an Acer Aspire One with a very low power atom processor running Linux, seeing how Raspberry Pi is still a fairly costly out of stock item for the time being…
Update: 11/23/22 — I have completed transferring this Python code from my Win 10 laptop to the Acer Aspire Netbook Nav450 with an Intel Atom processor. I have set the Acer netbook up to run Puppy Linux Fossapup64 from a USB stick. I was happy I only needed a couple of quick little fixes in the code to get this running on Linux. The main time spent was getting Puppy setup and installing all of the Python libraries, mainly because Puppy is a very lite version of Linux and it needs extra care and feeding to get it going nicely. A note for installing the Kaleido library into Python on Puppy is to use export TMPDIR=’/var/tmp’ before running the pip3 install -U Kaleido command.
If you are interested in the code as it currently stands, ping me on my YouTube channel since it is the only place where I check messages anymore.
I wish to thank the original coder/s at 247coding.com for the starter code for this project!
This post contains a link to the Amazon web page GMC-320: As an Amazon Associate I earn from qualifying purchases.
For reference the GQ-RFC1201 GQ GMC Geiger Counter Communication Protocol manual is here.