Arduino DIY Geiger Counter

12,940

66

38

Introduction: Arduino DIY Geiger Counter

So you have ordered a DIY Geiger counter and you want to connect it to your Arduino. You go on line and try to duplicate how others have connected their Geiger counter to Arduino only to find something is wrong. Although your Geiger counter seems to work nothing works as described in the DIY you are following when you connect your Geiger counter to your Arduino.

In this Instructable I will be covering how to troubleshoot some of these glitches.

Remember; assemble and code Arduino one step at a time, if you go straight to a finished project and there is a missed wire or line of code it could take you forever to find the problem.

Step 1: Tools and Parts

Prototype box I used a Ferrero Rocher candy box.

Small breadboard

16x2 LCD

Arduino board ether a UNO or Nano

220 Ω resistor

Pot 10 kΩ adjustable resistor.

DIY Geiger Counter Kit

Jumper Wires

Battery connector or harness

Oscilloscope

Fine Nose Pliers

Small Standard Screwdriver

Step 2: Assemble Your Geiger Counter

Any damage to your Geiger Tube; and your Geiger counter won’t work, so use the protective acrylic cover to prevent damage to your Geiger tube.

This Instructable is on how I repaired the same Geiger counter with a broken Geiger tube and fitted the protective acrylic cover to prevent breakage in the future.

https://www.instructables.com/id/Repairing-a-DIY-G...

Step 3: Electrically Testing the Geiger Counter

First use the right voltage for the power supply; the USB cord supplies 5 volts DC right from your computer, however the 3 AA battery holder is for 1.5 volt alkaline batteries making a total voltage of 4.5 volts. If you use 1.2 volt rechargeable NI-Cd or NI-MH batteries you will need a 4 AA battery holder for a total voltage of 4.8 volts. If you use less than 4.5 volts the Geiger counter may not act as it should.

There is very little circuitry on the Geiger counters output; so as long as the speaker makes a ticking sound, and the LED blinks, you should get a signal on the VIN pin.

To be sure of the output signal; connect an oscilloscope to the output by connecting the positive side of the oscilloscope probe to the VIN and the negative side of the oscilloscope probe to the ground.

Rather than just waiting on background radiation to trigger the Geiger counter I used americium-241 from a smoke detectors ion chamber to increase the Geiger counters reactions. The output of the Geiger counter started at +3 volts and dropped to 0 volts every time the Geiger tube reacted to the alpha particles and returning to +3 volts a moment later. This is the signal you will be recording with Arduino.

Step 4: Wiring

There are two ways you can connect the Geiger counter to you Arduino and your computer.

Connect the GND on Arduino to the GND on the Geiger counter.

Connect the 5V on Arduino to the 5V on the Geiger counter.

Connect the VIN on the Geiger counter to the D2 on Arduino.

With independent power connected to the Geiger counter.

Connect the GND on Arduino to the GND on the Geiger counter.

Connect the VIN on the Geiger counter to the D2 on Arduino.

Connect Arduino to your computer.

Step 5: Code

Open Arduino IDE and load the code.

// This Sketch counts the number of pulses a minute.

// Connect the GND on Arduino to the GND on the Geiger counter.

// Connect the 5V on Arduino to the 5V on the Geiger counter.

// Connect the VIN on the Geiger counter to the D2 on Arduino.

unsigned long counts; //variable for GM Tube events

unsigned long previousMillis; //variable for measuring time

void impulse() { // dipanggil setiap ada sinyal FALLING di pin 2

counts++;

}

#define LOG_PERIOD 60000 // count rate

void setup() { //setup

counts = 0;

Serial.begin(9600);

pinMode(2, INPUT);

attachInterrupt(digitalPinToInterrupt(2), impulse, FALLING); //define external interrupts

Serial.println("Start counter");

}

void loop() { //main cycle

unsigned long currentMillis = millis();

if (currentMillis - previousMillis > LOG_PERIOD) {

previousMillis = currentMillis;

Serial.println(counts);

counts = 0;

}

}

In Tools select the Arduino or other board you are using.

In Tools select the Port and Com

Upload the code.

Once the code is uploaded in Tools select Serial Monitor and watch your Geiger counter work.

Look for glitches. The only thing about this code is it is a bit tedious you must wait 1 minute for every count.

Step 6: Serial.println Vs Serial.print

This is one of the first glitches I found in the code; so watch for it in your code, “Serial.println(cpm);” and “Serial.print(cpm);”.

Serial.println(cpm); will print each count on its own line.

Serial.print(cpm); will look like one big number printing each count on the same line making it impossible to tell what the count is.

Step 7: J305 Background Radiation Measurement

First is the measurement of background radiation, the natural radiation that already exists naturally. The listed number is the CPM (count per minute), which is a total of measured radioactive particles every minute.

The J305 background average count was 15.6 CPM.

Step 8: J305 Measurement of Smoke Sensor Radiation

It is not uncommon for a Geiger counter to give you the same count repeatedly so check it with a radiation source. I used the radiation measurement from Americium an ion chamber from a smoke detector. The smoke sensor utilizes Americium as a source of alpha particles that ionize smoke particles in the air. I removed the metal cap on the sensor so the alpha and beta particles can get to the Geiger tube along with the gamma particles.

If everything is all right the counts should change.

Americium-241 from a smoke detectors ion chamber average count was 519 CPM.

Step 9: SBM-20

This Arduino sketch is modified version written by Alex Boguslavsky.

This Sketch counts the number of pulses in 15 seconds and converts it to counts per minute making it less tedious.

Code I added “Serial.println("Start counter");”.

Code I changed; “Serial.print(cpm);” to “Serial.println(cpm);”.

“#define LOG_PERIOD 15000”; sets the count time to 15 seconds, I changed it to “#define LOG_PERIOD 5000” or 5 seconds. I found no appreciable difference in the average between counting for 1 minute, or 15 seconds and 5 seconds.

#include

#define LOG_PERIOD 15000 //Logging period in milliseconds, recommended value 15000-60000.

#define MAX_PERIOD 60000 //Maximum logging period without modifying this sketch

unsigned long counts; //variable for GM Tube events

unsigned long cpm; //variable for CPM

unsigned int multiplier; //variable for calculation CPM in this sketch

unsigned long previousMillis; //variable for time measurement

void tube_impulse(){ //subprocedure for capturing events from Geiger Kit

counts++;

}

void setup(){ //setup subprocedure

counts = 0;

cpm = 0;

multiplier = MAX_PERIOD / LOG_PERIOD; //calculating multiplier, depend on your log period

Serial.begin(9600);

attachInterrupt(0, tube_impulse, FALLING); //define external interrupts

Serial.println("Start counter"); // code I added

}

void loop(){ //main cycle

unsigned long currentMillis = millis();

if(currentMillis - previousMillis > LOG_PERIOD){

previousMillis = currentMillis;

cpm = counts * multiplier;

Serial.println(cpm); // code I changed

counts = 0;

}

}

The SBM-20 background average count was 23.4 CPM.

Step 10: Wiring the Geiger Counter With an LCD

LCD Connection:

LCD K pin to GND

LCD A pin to 220 Ω resistor to Vcc

LCD D7 pin to digital pin 3

LCD D6 pin to digital pin 5

LCD D5 pin to digital pin 6

LCD D4 pin to digital pin 7

LCD Enable pin to digital pin 8

LCD R/W pin to ground

LCD RS pin to digital pin 9

LCD VO pin to adjust of 10 kΩ pot

LCD Vcc pin to Vcc

LCD Vdd pin to GND

Pot 10 kΩ adjustable resistor.

Vcc, Vo, Vdd

Geiger Counter

VIN to digital pin 2

5 V to +5V

GND to ground

Step 11: Geiger Counter With LCD

// include the library code:

#include

#include

#define LOG_PERIOD 15000 //Logging period in milliseconds, recommended value 15000-60000.

#define MAX_PERIOD 60000 //Maximum logging period without modifying this sketch

#define PERIOD 60000.0 // (60 sec) one minute measure period

volatile unsigned long CNT; // variable for counting interrupts from dosimeter

unsigned long counts; //variable for GM Tube events

unsigned long cpm; //variable for CPM

unsigned int multiplier; //variable for calculation CPM in this sketch

unsigned long previousMillis; //variable for time measurement

unsigned long dispPeriod; // variable for measuring time

unsigned long CPM; // variable for measuring CPM

// initialize the library with the numbers of the interface pins

LiquidCrystal lcd(9, 8, 7, 6, 5, 3);

void setup() { // setup

lcd.begin(16, 2);

CNT = 0;

CPM = 0;

dispPeriod = 0;

lcd.setCursor(0,0);

lcd.print(" RH Electronics ");

lcd.setCursor(0,1);

lcd.print(" Geiger Counter ");

delay(2000);

cleanDisplay();

attachInterrupt(0,GetEvent,FALLING); // Event on pin 2

}

void loop() {

lcd.setCursor(0,0); // print text and CNT on the LCD

lcd.print("CPM:");

lcd.setCursor(0,1);

lcd.print("CNT:");

lcd.setCursor(5,1);

lcd.print(CNT);

if (millis() >=dispPeriod + PERIOD) { // If one minute is over

cleanDisplay(); // Clear LCD

// Do something about accumulated CNT events....

lcd.setCursor(5, 0);

CPM = CNT;

lcd.print(CPM); //Display CPM

CNT = 0;

dispPeriod = millis();

}

}

void GetEvent(){ // Get Event from Device

CNT++;

}

void cleanDisplay (){ // Clear LCD routine

lcd.clear();

lcd.setCursor(0,0);

lcd.setCursor(0,0);

}

Step 12: Files

Download and install these files to your Arduino.

Place each .ino file in a folder by the same name.

Microcontroller Contest

Participated in the
Microcontroller Contest

Be the First to Share

    Recommendations

    • Mason Jar Speed Challenge

      Mason Jar Speed Challenge
    • Bikes Challenge

      Bikes Challenge
    • Remix Contest

      Remix Contest

    38 Discussions

    0
    xxxmartiiinekxxx
    xxxmartiiinekxxx

    2 months ago

    Hi, please, i need arduino log for this project. I want CPM and uSV in LCD.. Can You help me please.? Thanks

    0
    Josehf Murchison
    Josehf Murchison

    Reply 2 months ago

    As long as you downloaded the Libraries. The code is in step 11.

    0
    a.kaizar
    a.kaizar

    5 months ago

    Great Project! Is this project can measure alpha radiation too?

    0
    Josehf Murchison
    Josehf Murchison

    Reply 5 months ago

    It depends on your Geiger tube the J305 Geiger tube in that kit only does Beta and Gamma.
    The SI3BG Geiger tube I have only does Gamma.
    The BSM-20 Geiger tube I have only does Beta and Gamma.
    You might want to look for a SBT-9, or SBT-11A, or Philips 18504, or LND712, or a LND7317 Giger tubes they all pick up Alpha, Bata, and Gamma. However if you use Philips 18504, or LND712, or a LND7317 Giger tubes they need about 100 volts more than that kit.

    0
    a.kaizar
    a.kaizar

    Reply 5 months ago

    Okay, thanks for your explanation sir.
    Then, if I change that tube into Philips 18504, I just give more voltage to the tube or maybe I got change the code too sir?
    Thankyou
    I'm sorry for my English 😅

    0
    Josehf Murchison
    Josehf Murchison

    Reply 5 months ago

    Sorry it is a Philips 18505 not 18504

    0
    a.kaizar
    a.kaizar

    Reply 5 months ago

    After I read the data sheet of the philips 18505 and SBT-9, I think that i'll chose SBT-9 for the next tube. But, I don't know where is katode or anode. Can you help me please sir?

    IMG-20200407-WA0006.jpg
    0
    Josehf Murchison
    Josehf Murchison

    Reply 5 months ago

    Those do not looked marked. The Anode + should be the nib and the Cathode - should be the body almost every Geiger Tube is made that way except glass bodied Geiger tubes.

    J305.JPGsbm_20_sts_5_2_.jpgSI3BG_tube_02.jpgTube Basic Data 2.png
    0
    a.kaizar
    a.kaizar

    Reply 5 months ago

    Thank you sir! You're very helpful.
    God bless you!

    0
    Josehf Murchison
    Josehf Murchison

    Reply 5 months ago

    Your welcome and god bless you in these times.

    0
    Josehf Murchison
    Josehf Murchison

    Reply 5 months ago

    The code should be the same.
    The Philips 18504 Geiger tube cannot tell the difference between Alpha, Beta, or Gamma, so it will react to all three.
    If you just want to detect Alpha, you need an Alpha specific Geiger tube, or two Geiger tubes.
    One Geiger tube that picks up Alpha, Beta, and Gamma, and one that only picks up Beta and Gamma.
    Then program the Arduino so it only registers a signal when the Alpha, Beta, and Gamma, Geiger tube signals and not when both tubes signal.

    1
    a.kaizar
    a.kaizar

    Reply 5 months ago

    Thank you so much sir. You're very helpful !
    I have done to make project with sts-5 tube, next I want to make project with philips 18505 tube. So I can measure alpha Radiation only. But I still confuse with the coding sir. Is that working if I build it with the previous code (code program when I use the sts-5 tube) sir?

    0
    4711engel1
    4711engel1

    10 months ago

    I have another question:
    How can I convert CPM in Sievert or microSV ?

    0
    4711engel1
    4711engel1

    Reply 10 months ago

    So, jetzt auch mit Umrechnung in Sievert und der Möglichkeit die Daten auch unterwegs über Internet am Handy auszulesen. Dazu verwende ich die WLan-Fä#higkeit des ESP8266 und einen Server.

    0
    Josehf Murchison
    Josehf Murchison

    Reply 10 months ago

    I don't know the the Arduino code but this is what I have.

    J305 Geiger Tube Specification:
    Tin oxide Cathode, Coaxial cylindrical thin shell structure(Wall density 50±10cg/cm2),Application of pulse type halogen tube
    application temperature:-40°C~55°C
    Could be used for :γRay 20mR/h~120mR/h
    and β Ray in range 100~1800 ChangingIndex/minutesCM2 soft β Ray
    (Both beta and gamma radiation detetion)
    Working Voltage: 380-450V
    Recommended operating voltage: 380V
    Extreme operating voltage: 550V
    Minimum plateau length: 80V
    Working Current: 0,015-0,02 mA
    Maximum plateau slope: 10%/80V
    The maximum count rate: 25 times / min
    Life: > 1 x 10^9 pulse
    Size:108x63x20mmSensivity to Gamma Radiation: 0.1 MeV
    Own Background: 0,2 Pulses/s
    Length: 90±2mm
    Diameter: 10±0.5mm

    How to convert the conuters from Geiger Counter Kit toµSv/h
    Units:
    CPM: Counter per minutes
    µSv/h: Micro Sievert per hour
    The GM tube M4011 conversion index is 151, which means that:
    151CPM=1µSv/h.
    So if the counter number is 30 CPM, the radiation is also
    (30/151)µSv/h=0.19870.1987

    0
    4711engel1
    4711engel1

    10 months ago

    Hi Josehf,
    great tutorial. I ordered one DIY Counter to start learning more about this stuff. I like to use a ESP8266 with WLan functionality to send the data to my handy.
    I'm not a great programmer. Where can I find a sketch for the ESP8266?

    0
    4711engel1
    4711engel1

    Reply 10 months ago

    I have received my geiger counter from Banggood. First test with extern USB 5V: I can hear the pings. OK.
    Next I connect the geiger counter (GC) left sight 3 pins to
    5V (GC) to VIN (ESP) , GND (GC) to G (ESP), and VIN (GC) to D2 (ESP).
    The LCD is connected to ESP over I2C to pin
    VCC (LCD) to 3V (ESP), GND (LCD) to G (ESP), SCL(LCD) to RX (ESP) and SDA(LCD) to TX(ESP).
    My problem: I can see no CNT on the LCD.
    Please see the 4 images and the INO sketch apendix.
    I have no idea to fix this problem.

    20191110_103834.jpg20191110_103847.jpg20191110_103852.jpg20191110_103900.jpg
    0
    Josehf Murchison
    Josehf Murchison

    Reply 10 months ago

    Other than the obvious differences for the serial LCD I powered my geiger counter off my Uno not a power supply.
    The ground may be isolated from the LOLIn and the geiger counter by the voltage regulator, if that is so you may not be getting a signal at D2. try adding a ground from the geiger ground to the LOLIn ground pin.
    Also a metal box can block radiation.

    0
    4711engel1
    4711engel1

    Reply 10 months ago

    There was a error in your sketch. This is the right line:

    attachInterrupt(digitalPinToInterrupt(inputPin), GetEvent, FALLING); // Define interrupt on falling edge

    Now it works great with ESP8266.