Development

Sensors / Radiation Board:

» RB 01: Reading radiation in cpm

This example shows how to read radiation in CPM (counts per minute)

Required Materials

1 x Waspmote
1 x Battery
1 x Coin battery
1 x Radiation board
1 x Geiger tube

Notes

Geiger tube should not be exposed to sunlight because the CPM may not be as accurate as indoors. We advise to use an opaque enclosure when working outdoors to cover this sensor.
Never touch Geiger-Müller tube ends directly with hands or using any metallic object under any circumstance. Tube ends works with high voltages (up to 500V) which can produce spikes if they are touched. Internal circuits of radiation board and even the user could be seriously affected.
The battery must be connected in ANY example.

Code

/*  
 *  -------------------- RB.1 – Reading radiation in cpm ------------------- 
 *  
 *  Explanation: This example shows how to read radiation in CPM 
 *    
 *  Copyright (C) 2012 Libelium Comunicaciones Distribuidas S.L. 
 *  http://www.libelium.com 
 *  
 *  This program is free software: you can redistribute it and/or modify 
 *  it under the terms of the GNU General Public License as published by 
 *  the Free Software Foundation, either version 3 of the License, or 
 *  (at your option) any later version. 
 *  
 *  This program is distributed in the hope that it will be useful, 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 *  GNU General Public License for more details. 
 *  
 *  You should have received a copy of the GNU General Public License 
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>. 
 *  
 *  Version:           0.1 
 *  Design:            David Gascón 
 *  Implementation:    Javier Siscart 
 */

#include "WaspSensorRadiation.h"

void setup()
{

  // Starting USB
  USB.ON();
  USB.println(F("Starting Waspmote..."));

  // Starting Radiation Board
  RadiationBoard.ON();

}

void loop()
{

  // Variable to store measured radiation
  float radiation;

  // Measure radiation in cpm, during 5s
  USB.println(F("Measuring during 5s cpm"));
  radiation = RadiationBoard.getCPM(5000);
  USB.print(F("radiation[cpm]: "));
  USB.println(radiation);
  USB.println();
  delay(2000);

}

Output

B#Starting Waspmote...
Measuring during 5s cpm
radiation[cpm]: 60.0000000000

Measuring during 5s cpm
radiation[cpm]: 72.0000000000

Quick Publish: