WebGeiger: An Arduino based Geiger Counter

Aus DL8RDS Wiki
Wechseln zu: Navigation, Suche

1 Motivation

Radiation has been a longtime topic in my life over the past 30 years. I've grown up in northern Bavaria. Until mid of the 1980s there were plans to build the WAA (WiederAufbereitungsAnlage) in Wackersdorf. In 1986 there was the overwhelming Anti-WAA festival in Burglengenfeld, my home town, with more than 100.000 people having a great party. Note that the town just had 10000 inhabitants :-)

Then there was Chernobyl, which raised our fear of radiation even higher. We children were forbidden to play in the garden. And then there was Fukushima.

While Geiger counters were rather expensive tools some time ago, they are available as cheap DIY kits now, so there was the idea to build one myself. And since radiation is an environmental topic, I thought about building one that I could place somewhere outside and also read out remotely. The perfect playground for an Arduino webserver.

And yes, there's somemore motication: There are natural Uranium (Pitchblende) resources in northern Bavaria, not far from my home town. Sometimes you can even find Pitchblende minerals simply on the ground. So I wanted to compare natural radiation levels there and in my current home town Munich.

2 Test Results, Experiences

One of my friends had some radiation probes: An old Gas Lantern Mantle that contains the active element Thorium as well as a Pitchblende stone. He gave me the Thorium probe for a test and the Geiger circuit showed a dose of 11 Microsievert/hour when the probe was held directly and unshielded against the counter tube. That's about 300 Becquerel (decays per second). Behind some aluminium foil the dose was down to 6 Microsievert/hour (150 Becquerel). Without the probe, the radiation is down at 0.048 Microsoevert/hour, which is about 1 Becquerel (one atom decay) per second.

For a comparison: Fish caught in the northern Baltic Sea have about 5 Becquerel, some Wild Boar shot in Bavaria have about 600 Becquerel, and the limit beyond milk may no longer be sold is 370 Becquerel. For regular food the limit in Germany is at 600 Bequerel. 1998 a Wild Boar was shot in Vosgues with 1.018 Becquerel. Some Algae along the Japanese coast have 10000 Becquerel. Field vegetables from the region of Fukushima have 8000-150000 Becquerel.

Even though the radiation of that Thorium probe is rather weak in comparison, one should not incorporate (swallow or breathe in) dust particles from it, since they could have a long term effect on the lung tissue surrounding it. So I decided in favour of the Thorium mantle and against the Pitchblende stone, because the stone could loose some particles whereas the Thorium probe was well packaged.

Normally, such a probe does not contain pure and singular isotopes but an entire series of isotopes with different radiation patterns. The Thorium Decay Chain only has Alpha and Beta decay, so some interesting experiments were possible with it:

  • One foil of Aluminium reduces radiation to one half.
  • In 30 cm distance, no incresed radiation levels could be measured.

3 Components List

  • Arduino Pro Ethernet
  • SI29BG Geiger tube, operable at 400V
  • http://www.seeedstudio.com/depot/grove-geiger-counter-p-867.html Seeedstudio Geiger Counter
  • Some components to produce a continuous 5V out of higher voltages. Core component is the RECOM 7850-0.5.
  • Optionally here the SHT15 to monitor the humidity / temperature within the chassis

Overall costs about 120-150 Euro.

4 Arduino Code

/*
  Web Geiger by DL8RDS
 */

#include <SPI.h>
#include <Ethernet.h>
#include <SHT1x.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192,168,1, 177 };
static byte gateway[] = { 192, 168, 1, 120 };
static byte subnet[] = { 255, 255, 255, 0 };

int geiger_input = 2;
int count = 0;
int lastcounts = 0;
int totalcounts = 0;
long countPerMinute = 0;
long timePrevious = 0;
long timePreviousMeasure = 0;
long time = 0;
long countPrevious = 0;
float radiationValue = 0.0;

// Conversion factor CPM to uSv/h
#define CONV_FACTOR 0.00812

#define dataPin  11
#define clockPin 10
SHT1x sht1x(dataPin, clockPin);
float temp_c;
float humidity;
  
// Initialize the Ethernet server library
// with the IP address and port you want to use 
// (port 80 is default for HTTP):
Server server(80);

void setup()
{
  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);
  server.begin();
  pinMode(geiger_input,INPUT);
  attachInterrupt(0, countPulse, RISING);
  temp_c = sht1x.readTemperatureC();
  humidity = sht1x.readHumidity();
  Serial.begin(9600);
}

void loop()
{
  if (millis() - timePreviousMeasure > 10000) {
    countPerMinute = 6*(totalcounts - lastcounts);
    radiationValue = countPerMinute * CONV_FACTOR;
    timePreviousMeasure = millis();
    Serial.print("cpm = ");
    Serial.print(countPerMinute,DEC);
    Serial.print(" - ");
    Serial.print(" uSv/h = ");
    Serial.println(radiationValue,4);
    lastcounts = totalcounts;
    
    // Read values from the sensor
    temp_c = sht1x.readTemperatureC();
    humidity = sht1x.readHumidity();
  }
  
  // listen for incoming clients
  Client client = server.available();
  if (client) {
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        // if you've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println();

          client.println("<html><body>");
          client.println("<h3>WebGeiger @ DB0RGB</h3>");
          client.println("Current radiation level is at an average of uSv/h >");
          client.print("<b>");
          client.print(radiationValue,DEC);
          client.println("</b><br/>");
          client.println("Counts: ");
          client.println(totalcounts, DEC);
          client.println("<br/>");
          client.println("Uptime: ");
          client.println(millis());
          client.println("<br/>");
          client.println("Temperatur: ");
          client.println(temp_c, DEC);
          client.println("<br/>");
          client.println("Luftfeuchtigkeit: ");
          client.println(humidity, DEC);
          client.println("<br/>");
          client.println("</body></html>"); 

          break;
        }
        if (c == '\n') {
          // you're starting a new line
          currentLineIsBlank = true;
        } 
        else if (c != '\r') {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
        }
      }
    }
    // give the web browser time to receive the data
    delay(1);
    // close the connection:
    client.stop();
  }
}

void countPulse() {
  Serial.print("Zerfall bei Time >");
  Serial.println(millis(), DEC);
  count++;
  totalcounts++;
}

5 Photographs

WebGeiger-totalview.jpg WebGeiger-GeigerComponent.jpg WebGeiger-tube.jpg WebGeiger-VoltageControl.jpg WebGeiger-ArduProEthernet.jpg WebGeiger-OutdoorChassis.jpg

6 Links