Having just started with the Arduino I thought I should try something relatively straightforward, and the idea that came to mind was an integrator for a geiger counter. The arduino counts each event, allowing one to accurately measure radiation by long integrations or detect objects that are only very slightly radioactive and don't register as "hot" with a tell-tale stream of clicks.
In my toolbox I've got an old, cheap-o geiger counter with an LED that flashes after each event. Since there's no electrical output from the geiger counter, I soldered two wires inside the geiger counter -- one to ground, the other above the LED's limiting resistor. On an oscilloscope, this produces a 20ms pulse at ~1.5V every time a radiation event is detected. I then applied this signal (through a 100k resistor) to the base of a 2N2222 transistor which provides a stronger signal to the arduino's digital input. The emitter is at ground & collector goes to digital pin 2. The geiger counter's ground goes to the arduino ground.
The code is also straightforward; an integer is initialized to zero, and after each interrupt is received, it is incremented. Every 500ms, the accumulated total and the result from millis() is printed to serial. The system behaves well with my only test subject -- an antique porcelain object glazed with a uranium-based glaze. This source gives about 250 counts/minute at 3 inches -- about as close as I can measure before accuracy starts to suffer. At this range, the arduino can keep up with the counts without difficulty -- the count-rate vs. 1/distance2 plot is linear.
...a very simple application -- just the geiger counter & two discrete components -- but fun! ![]()
// initialize variables
int pin_in = 2; // input on digital pin 2 for interrupt 0
volatile long pulse_count = 0;
// setup for counting
void setup()
{
Serial.begin(9600);
pinMode(pin_in, INPUT); // set input pin, then set it normally high
digitalWrite(pin_in, HIGH);
attachInterrupt(0, blink, CHANGE); // perform count when pin changes state
}
// main loop fairl self-explanatory
void loop()
{
delay(500);
Serial.print(millis());
Serial.print(",");
Serial.print((pulse_count-1)/2);
Serial.print("\n");
}
// when count received, increment counter
void blink()
{
pulse_count++;
}