This was more an exercise in debugging an Asrock motherboard than a true project... But let's start from the beginning. The events at Fukushima inspired many people to create online Geiger counters. Getting my paws on one led to a frenetic search to get the damn thing online.
First I found a small C program to get the counts per minute in my Ubuntu Linux (10.04 LTS) PC. That was easy. Then I had to interface it with the COM1 port on my Asrock PC. Because the battery powered РКСБ-104 (RKSB-104) counter only draws about one milliamp it's possible to power it from the COM port. However, the bozo who laid out the board forgot that in order to use IDC (crimp)-type D-connectors the IDC header has to be routed accordingly. This means that IDC pin #1 goes to DB-9 pin #1 but IDC pin #2 goes to DB-9 pin #6. And not like this:
So the ready-made ribbon cable did not work! This took me the better part of a day to figure out. At the end I was watching my screen while plugging and unplugging the cable and being surprised that readings appeared. This was of course because the interface ground got connected to the mobo's RI input. That also explained why I initially did get some readings. Rewiring the 9-pin sub D put everything straight and I could continue with the Round Robin Database. Only not after I built a new interface replacing the simple Schmitt-trigger inverters which would have worked perfectly in the first place!
The RRD Tools are an amazing and flexible set of programs. So amazing that using them is a somewhat overwhelming experience. For instance, I figured out that you cannot feed a string value to it but have to convert it first to a number (GAUGE) for it to be entered in the database. Eventually I ended up with three shell scripts: the database generator (only used once), the updater (which also kicks the RS232 program that receives the counts) and the graph generator and uploader. And of course I need a crontab to have it update regularly. That was a lot of programming for a hardware guy!
The result is very rewarding. The Online Real Time Geiger Counter Amsterdam is operational and slowly the graphs fill up with data. I even found out how to interpret the readings: someone figured that for the used СБМ20 tubes the CPM to μSv value is 175 CPM per μSv. So for the reading of about 30 CPM this means about 0.17 μSv/hr. Which seems about right...
Copyleft 26 June 2012
Back to the homepage