Mightyohm Geiger counter online (via serial com port)

Support forum for the mightyohm.com Geiger Counter.
http://mightyohm.com/geiger
chankly
Posts: 2
Joined: Thu Apr 18, 2013 2:05 pm

Mightyohm Geiger counter online (via serial com port)

Postby chankly » Thu Apr 18, 2013 2:46 pm

I have setup an online display of counts per minute from my Mightyohm Geiger Counter for background radiation, from Victoria Australia. I am interested in seeing if there are any long term trends, there is virtually no risk of fallout here, the nearest nuclear reactor is thousands of km away. The graphs can be found here:
http://www.chankly.com/geiger/cpm.html
and converted to uSv:
http://www.chankly.com/geiger/usv.html

Graphs of last hour, 4 hours, day, week, etc. Uploaded every 5 minutes (or hourly for the longer time ranges).

There were three aspects that may be of interest to the forum.

1) I used a serial com port converter rather than USB serial port as I preferred not to have to install a driver, when a com port should do the job. See photo attached of the converter (the USB connect is used for power only).

2) I power the Mightyohm from the 5V rail of the serial port converter, and I just used 3 signal diodes in series to reduce the voltage to 3V. This works fine as the current drawn is very low.

3) I pass the serial output from the Geiger counter to a log file, and then parse this log file a line at a time to collect the counts each second. These counts are then accumulated for one minute and stored in an rrdtool database (which provides the graphs). Modes supported are SLOW and FAST, as both provide similar output and I was able to test both. This conversion is done by a perl script. I chose to accumulate the 1 second counts in the perl script; though it would have been easier to take the CPM from the Mightyohm output. The reason I chose to do it that way is that I did not understand the FAST/SLOW mode displays both provided the same CPM information until after I did some testing of the script. This is all running on a Linux PC.

If there is any interest I can provide the perl script, instructions for Linux, rrdtool db configs, rrdtool graph definitions, and any more details required.

Regards, Alan F.
Attachments
IMG_3980_small2.JPG
Com port TTL level converter

User avatar
mightyohm
Site Admin
Posts: 1002
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Mightyohm Geiger counter online (via serial com port)

Postby mightyohm » Mon Apr 22, 2013 11:53 pm

This is super cool - thanks for sharing!
rrdtool looks perfect for this type of measurement. Reminds me of network bandwidth logs I have seen in the past.

bfesser
Posts: 2
Joined: Sat Aug 31, 2013 3:43 pm

Re: Mightyohm Geiger counter online (via serial com port)

Postby bfesser » Sat Aug 31, 2013 3:56 pm

chankly wrote:If there is any interest I can provide the perl script, instructions for Linux, rrdtool db configs, rrdtool graph definitions, and any more details required.
I am very interested, and would greatly appreciate your effort. I'm hoping to connect my to a Raspberry Pi with a LAMP stack to serve up the graph pages on my local network.

chankly
Posts: 2
Joined: Thu Apr 18, 2013 2:05 pm

Re: Mightyohm Geiger counter online (via serial com port)

Postby chankly » Sun Sep 08, 2013 3:04 am

For instructions and the scripts for loading the Mightyohm data into an rrdtool database, and to produce the graphs, see the attached archive. This is for Linux only. Uncompress and extract it to a new directory with "tar xfz gprobe.tar.gz". Extract it to /var/apps/geiger to be consistent with the default location used by the scripts.

See the file mgc.txt for more details.

I have changed a number of the file locations in these scripts to be more tidy, so let me know if there are any mistakes.
Attachments
gprobe.tar.gz
gzipped tar archive of scripts and detailed instructions
(6.71 KiB) Downloaded 805 times

bfesser
Posts: 2
Joined: Sat Aug 31, 2013 3:43 pm

Re: Mightyohm Geiger counter online (via serial com port)

Postby bfesser » Wed Sep 11, 2013 5:15 pm

Thank you for sharing this. I really appreciate it. Unfortunately, my kit just died (something on the HV-side), so it'll be a little while before I can test your scripts.

jetson
Posts: 2
Joined: Mon Nov 24, 2014 8:16 pm

Re: Mightyohm Geiger counter online (via serial com port)

Postby jetson » Mon Nov 24, 2014 9:19 pm

Chankly

Thanks for the great instructions and scripts. I was able to use them to connect my Mightyohm geiger counter to my Raspberry Pi and post RRD graphs online. Thanks for thinking of things like log rotation. For others following your instructions, I have one small correction in your rrdtool create statements:
rrdtool create geiger.rrd -s 60 DS:geiger:ABSOLUTE:100:0:U \
RRA:ABSOLUTE:0.5:1:50000 \ <-this ABSOLUTE should be AVERAGE
RRA:MIN:0.5:60:8800 \
RRA:MAX:0.5:60:8800 \
RRA:AVERAGE:0.5:60:8800 \
RRA:MIN:0.5:1440:7305 \
RRA:MAX:0.5:1440:7305 \
RRA:AVERAGE:0.5:1440:7305

To manually start the screen command using your directory structure, use:
sudo screen -S gprobe /var/apps/geiger/probe.pl
To see if it's working properly:
tail -f /var/apps/geiger/probe.log

I made a script to start probe.pl automatically in crontab to survive a power failure or other reboot.
sudo crontab -e
@reboot pi /var/apps/geiger/geigerstart.sh

geigerstart.sh
screen -d -m -S gprobe /var/apps/geiger/probe.pl

bgrattan
Posts: 4
Joined: Sun Jun 17, 2018 8:33 am
Location: Ashland VA
Contact:

Re: Mightyohm Geiger counter online (via serial com port)

Postby bgrattan » Thu Mar 21, 2019 11:08 am

Hello,
I'm having problems with several of the graphs produced by the program kindly supplied by "chankly" and "jason." The minutes scale seems to be showing odd values 0, 100 m to 500 m with no calculations of max, min and ave. See attached.
However, the uSv graphs seem to be working.
My disadvantage is that I don't really understand the rrdtool syntax and thus can't troubleshoot the problem which is probably very simple.
Can anyone offer help here? Thanks in advance.
Bob

geigerusv_h.png

geiger_h.png

User avatar
mightyohm
Site Admin
Posts: 1002
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Mightyohm Geiger counter online (via serial com port)

Postby mightyohm » Fri Mar 29, 2019 3:30 pm

Bob,

Sorry I can't help you, I'm not familiar with rrdtool either.