Friday, April 29, 2011

Linux scripts for datalogging and graphing of the radiation measurements

Here are the scripts that I'm using on my Linux box to capture the measurement data that is sent by my Geiger-Counter processor Computer (RS232) interface.
It sends one line with the radiation value (in mR/h) measured during each sampling period (111.11s).


create.sh:

#!/bin/sh
# create.sh - create rrd for storing radiation measurement values (run once)
RRD=rad.rrd

rrdtool create $RRD \
--start 1301511639  --step 111 \
DS:mR-h:GAUGE:333:0:10000.0 \
RRA:AVERAGE:0.5:1:6000  \
RRA:AVERAGE:0.5:6:3000  \
RRA:AVERAGE:0.5:16:3000 


sc.sh:

#!/bin/sh
# sc - simple serialport capture script
SERIAL=/dev/ttyS0

# run loop forever:
while true ; do
    read a < $SERIAL
    N="`date  +%s`"
    echo "rrdtool update rad.rrd $N:$a" >> data.log
    rrdtool update rad.rrd $N:$a
    echo $a >> geiger.log
    sh graph.sh
done


graph.sh

#!/bin/sh
# graph.sh - generate graphs from rrd

# mR (milliRoentgen) to Roentgen: CDEF:value=mR,1000,/ \
# mR (milliRoentgen) to Sievert: CDEF:value=mR,100000,/ \

rrdtool graph radday.png -s -24h -e now \
 -l 0 -r \
 --alt-y-grid \
 --units-length 5 \
 --units-exponent -6 \
 --width 800 --height 500 \
 -t "Beta+Gamma Radiation last 24h - `date`" \
 --vertical-label "Sievert/h -------->" \
 --right-axis 100:0 \
 --right-axis-label "R/h ------->" \
 --color FONT#000000 -R light --font "DEFAULT:0:DejaVuSansMono" \
 DEF:mR=rad.rrd:mR-h:AVERAGE \
 CDEF:value=mR,100000,/ \
 CDEF:smoothed=value,3333,TRENDNAN \
 VDEF:rad5max=value,MAXIMUM \
 VDEF:rad5min=value,MINIMUM \
 VDEF:rad5avg=value,AVERAGE \
 VDEF:slope=value,LSLSLOPE \
 VDEF:int=value,LSLINT \
 CDEF:trend=value,POP,slope,COUNT,*,int,+ \
 AREA:smoothed#0000ff40: \
 LINE1.5:smoothed#0000ff:" Radiation (avg)   " \
 LINE1:value#ff000080:" Radiation (raw)   " \
 LINE1:trend#000000:"--- trend\c":dashes \
 VDEF:rad5las=value,LAST \
                COMMENT:"      " \
                COMMENT:"Maximum       " \
                COMMENT:"Minimum       " \
                COMMENT:"Average       " \
                COMMENT:"Last          \n" \
                COMMENT:"     " \
                GPRINT:rad5max:"%6.2lf %SSv/h" \
                GPRINT:rad5min:"%6.2lf %SSv/h" \
                GPRINT:rad5avg:"%6.2lf %SSv/h" \
                GPRINT:rad5las:"%6.2lf %SSv/h \l" \



Wednesday, April 27, 2011

Very efficient HV inverter circuit for Geiger-Mueller Tubes

(updated 2011-06-07, see below)
Trying to build a D.I.Y Geiger Counter, I have been experimenting with various circuits to generate the High Voltage that Geiger-Mueller Tubes require (most operate around 500V D.C) . There are many circuit diagrams out on the net. I've built several. One challenge is finding a proper coil (or transformer) that has the right properties to let the inverter function in the way the voltage boost is sufficient. Another challenge is stabilizing the high voltage and lastly have a low current consumption (for battery use). During my experiments, some circuits required more than 150mA @ 5V D.C this is definitely too much for battery use. Others were a lot more conservative, but could not generate sufficiently high voltage (just 450V D.C, just the low threshold of the G.M. tube I have, but I prefer operating the tube at the center of the plateau).
I didn't have good results with the diode-cascade type of voltage-doubling.

In the end, I had good result with a circuit, built with a CCFL (backlight) H.V. Transformer scrapped from a power-supply board of a (defective) Dell or BenQ TFT Monitor.

On this perticular PSU board, there are 4 of these Transformers (located on the left edge of the board):

4 CCFL transformers.

On this board, there are also some very good Transistors 2SC5707, designed for switchmode circuits.
 I used one of these as oscillator for my HV inverter circuit. 


Here is the final circuit diagram of the H.V. Geiger-Meuller tubes (note: there is a small update, see below). The primary winding of the transformer is brought in resonance at its optimum efficiency point, around 55kHz
In my experimental setup, the circuit draws just a few milliamps out of a 5V supply, delivering 550V to a G.M. Tube FLZ76V. The complete D.I.Y Geiger Counter circuit, with PIC16F628A microcontroller and a 16x2 LCD screen draws 5mA from 5V D.C.

Your mileage may vary, depending on differences and tolerances of the components used.

HV inverter schematic v1.0

Update 2011-06-07:
I've finally built a complete HV inverter unit on a piece of experiment board (PCB with holes on a 2.54mm grid).
I'll use it with the SI-8B pancake tube, so the HV output is adjusted to 400V (using 4 times 100V zeners in the regulation feedback line).
The unit (unloaded) draws just 250µA off a 5V supply. Loaded with a 4M7 resistor, the output is still 390V.
So far, this is the most efficient HV inverter i've built.

Here are some pictures of the completed HV inverter unit:

The HV output side. A 4M7 anode series resistor for the GM tube already mounted as well as a 2k2 kathode resistor (for pulse detection).

Here is the updated circuit diagram of the further optimized HV inverter v1.1 with some minor changes in the feedback / regulation section resulting in better regulation and even less current consumption (<1mA @5V typical):
HV inverter schematic v1.1

Sunday, April 24, 2011

Schematic diagram of my Geiger counter - computer interface

I got request to publish the interface circuit that I'm using to connect my FH40T Geiger Counter to the PC.
The circuit only existed in my head and on breadboard, so I had to find a software that let me draw the schematic diagram quickly. After some Googling, i decided to try the free software ExpressSCH.

Here is the drawing (click on the image to view full size or save as...):


I will soon publish the source code for the PIC16F68A, but it should be tidied a bit.first.
It uses a modified version of the code published by Emmett Kyle found here.

My mod to the software enables outputting measured counter values to the RS232 port for datalogging, and also adjusting timing values to cater for varies Geiger Tube sensitivities.

Saturday, April 23, 2011

Pictures of my Geiger counter - computer interface

Here is my (experimental) Geiger Counter setup:
The FH40T Geiger Counter, with its speaker-output connected to a breadboard with PIC16F628A microcontroller and LCD and RS232 output.
The microcontroller counts the pulses from the geigercounter during a fixed interval (111.11seconds) and converts them to a value in mRem/h. The value is displayed on the LCD and sent on the RS232 port connected to a PC, which also supplies 5V DC to all circuits



On the left is a more detailed photo of the experimental breadboard setup of the Pulse counter with PIC16F628A processor / LCD / RS232.

Thursday, April 21, 2011

RadGoes now submitting live radiation data on Pachube

Just a few minutes ago, I succeeded in adding my geiger counter measurements on the Pachube website!

All radiation measurement samples are now automatically uploaded, in realtime, every 111 seconds, here:
http://www.pachube.com/feeds/24100
Here is the data link http://api.pachube.com/v2/feeds/24100.xml
Data is available in CSV: http://www.pachube.com/v2/feeds/24100/datastreams/0/archive.csv


Unit conversion: 10 µRem/h = 0.1 µSv/h





Radiation in Goes - 2011-04-21



Last 7 days's radiation graph. Note the "bump" on saturday was caused by noise due to a faulty connector

Wednesday, April 20, 2011

Radiation in Goes - 2011-04-20

Today's radiation graph

Last 7 days's radiation graph. Note the "bump" was caused by noise due to a faulty connector.



Tuesday, April 19, 2011

Radiation in Goes - 2011-04-19

Todays radiation graph
Last 7 day's radiation graph. The high peak was caused by an hardware error (faulty connector causing noise, extra counts)


Monday, April 18, 2011

Radiation in Goes - 2011-04-18

Today's radiation graph. All normal.
Last 7 day's radiation graph. The high peak was caused by an hardware error (faulty connector)


Sunday, April 17, 2011

Radiation in Goes - 2011-04-17


Today's radiation graph, normal levels

Saturday, April 16, 2011

Radiation in Goes - 2011-04-16

Today's radiation graph.

Last week's radiation graph
Notice the sudden increase on friday evening around 23h. I discovered there was a loose connection (bad connector) between geiger counter and pulse-processor, causing ghost pulses.

The connection was repaired somewhere between 14:15-14:30h.  No worries about increased radiation this time !

Friday, April 15, 2011

Radiation in Goes 2011-04-15

Today's radiation (will update several times during the day)

Thursday, April 14, 2011

Radiation in Goes - 2011-04-14

Today's radiation level
Last week's radiation level


Radiation level slightly increasing to 140nSv/h on april 14th, after being as low as 100nSv/h during the week before.
Were the higher levels caused by radioactive particles in plume from Japan driven by wind to here ?

Radiation in Goes - 2011-04-09

Radiation went from around 200nSv/h between march 30th (start of my automated radiation measurements) until april 6th, to as low as 100nSv/h later.
This animation gives perhaps a clue of the reason for the elevated level of "background" radiaton..