How to make a Geiger counter

 

home geiger counter

Three Milles Island, Chernobyl, Fukushima, and even some on national territory such as the Coral-I reactor in Madrid or the Vandellos-I in Catalonia. There are many nuclear accidents that have occurred throughout history, and despite the terrible consequences, it seems that the issue of radiation continues to raise some attraction. But what few people know is that, every day, we are all exposed to natural radiation, both that which comes from outer space and that which comes from the minerals of the earth…

Well, if you want to measure the radiation around you, in this new guide we show you step by step the procedure of how you can build a Geiger counter, that is, a device capable of measuring radioactivity. Basically, it is a device that can measure particles that impact with the sensor, such as ionizing radiation, that’s why it’s called a counter, since it can count the number of impacts and therefore the radiation level of an object or place.


symbol non-ionising and ionising radiation

Before starting with the DIY project, I would like to comment something about radiation, for those of you who don’t know about it. For those of you who already have some previous knowledge, you can skip this section and go directly to the next ones…

What is radiation?

It is a phenomenon of progration of energy in the form of electromagnetic waves or subatomic particles through a medium. Therefore, we can have different types of radiation.

What types of radiation are there?

electromagnetic spectrum

There are many types of radiation, such as thermal, electromagnetic, etc., but the ones that interest us here are two large groups:

  • Non-ionizing: it is a wave or particle that cannot tear electrons from matter, that is, it cannot ionize. Examples of this are electromagnetic waves from microwaves, radio, light, etc.
  • Ionizing: it is a wave or particle that can tear electrons from matter, that is, it can ionize due to its high energy. Therefore, it is the most dangerous of all. Within this group we have the laser, X-rays, alpha, beta, gamma, braking radiation or bremsstrahlung), etc.

If we look in the electromagnetic spectrum, the longer wavelengths, such as radio or microwave waves, are the least penetrating, those with the least energy (lower frequency). While, with form we are moving to the right, we see that every time the wavelength is smaller and the frequency of vibration greater, therefore they have more energy and are more penetrating and harmful.

Types of ionizing radiation:
Alpha, Beta and Gamma

If we focus on ionizing radiation, the one the Geiger counter is able to measure, we have to filter again and focus on three fundamentals due to nuclear phenomena:

  • Alpha: they have a positive charge and are composed of two protons and two neutrons, that is, they are a helium atom. They are the least dangerous and penetrating, since they can be stopped using a simple paper. The effect on health depends on some issues, since they can not even cross the outer layer of the skin, but if they get inside the body they can be harmful. By inhalation, ingestion or injection into the body of sources that produce this radiation could damage living tissue.
  • Beta: These are particles of negative electrical charge, electrons. They are more penetrating and energetic than the previous ones, and to stop them we could do it with a kitchen foil. In spite of being more penetrating, they are not as harmful to living tissue and DNA as the previous ones, since the ionizations that they cause are produced more widely. It could produce burns on the skin, and if they get into the body it could be but…
  • Gamma: gamma rays are the most powerful and energy, therefore the most dangerous of all. They are photons, pure energy that cannot be stopped easily, only with lead plates, concrete, etc. They pass easily through our body and produce serious damage to tissues, mutations in DNA, etc., with all that this entails, such as cancer and even death by blast if the dose is high.

Therefore, it is not a game, and we encourage you to take all the precautions and know what you are doing. We do not take care of possible problems…

Geiger-Müller tubes
tubo geiger

They are the soul of every Geiger counter, since it is the o sensor device that is in charge of receiving the radiation and transforming that number of shocks into an electrical impulse capable of being interpreted by the rest of the circuitry. It is known as Geiger-Müller tube or simply Geiger tube, and you can buy it in several online stores, such as Amazon, Aliexpress, etc. Another option is to remove it from an old or disused Geiger counter.

There are many of them, different models (SBT-9, LND-712, J408y,…) and different manufacturers (GSTube, LND, North Optic,…). The most popular are the American and Russian Strongs, although there are also Chinese ones. Some of Soviet origin usually have cheap prices, being the most expensive the LND. What we must have clear is the voltage values between which it moves, since the analogical signal that it emits will be more or less intense according to the captured radiation.

Geiger tube operation with a particle impact

Country Seller Model Capturing Particles Voltage Material Price
Russia GSTube SBM-20 Beta/Gamma 400V Aluminium Low
Russia GSTube SBM-21 Beta/Gamma 650V Aluminium Low
Russia GSTube Si-1g Gamma 440V Aluminium Low
Russia GSTube SBT-9 Beta/Gamma 389V Aluminium Low
Russia GSTube Si-3bg Beta/Gamma 400V Aluminium Low
USA LND LND-712 Alpha/Beta/Gamma 500V Mica Medium
USA LND LND-7124 Alpha/Beta/Gamma 500V Mica High
USA LND LND-7224 Alpha/Beta/Gamma 500V Mica High
China North Optic J408y Gamma 420V Glass Bass
China North Optic J305B Beta/Gamma 350V Glass Bass
China North Optic J306B Beta/Gamma 420V Glass Bass

That’s why we must calibrate our circuit to convert those signals into the nodes where the radiation is usually measured, such as Sievert (Sv), roentgen, or Rem, among others. As we would do with a temperature sensor, we must transform those output voltages in the degrees Celcius or in the scale that we are measuring.

SI unit to measure radiation:

The International System (SI) has as a unit for this the Sievert (Sv), remember that there are tables that indicate the danger or effects of the radiation we are capturing for health:

mSv Health effects
50-100 Changes in blood chemistry
500 nausea in a matter of hours
700 Vomiting
750 Hair loss in 2 or 3 weeks
900 Diarrhea
1000 Hemorrhages
4000 possible death in two months

You know it’s not just about the dose, it’s also about the exposure. I mean, we can get a dose of 100 mSv once and nothing happens, but if we’re getting 50 mSv for months, then the long term effects could be very negative…

Radiation sources for the tests:

Uranium crystals and smoke detector

To perform radiation tests, you should know that there are several options. There are uranium crystals like the ones you see in this image (left) with which Geiger counters are tested in the laboratories. But there are other sources closer to us than we can get radiation or radioactive material, for example from smoke sensors in fire detectors.

Within these detectors there is a source of ionising radiation from the Americas and they produce alpha radiation. You should even know that many foods rich in potassium have an isotope called Potassium-40 that emits radiation, although it is not a problem for our body at all, these are very low doses, just like the radiation we receive from nature itself (certain granite rocks) or from the cosmos.

We ourselves are radioactive, we are made of carbon, and carbon-14 is. But it will surprise you to know that we handle many radioactive things every day without knowing it: some buttons, ceramics, marble, certain camping lamps, cigarettes, paper spoons, some wicks, etc. You could use all that to test your Geiger counter and see if it works or not…

But I repeat, you must be careful when handling certain sources.

Necessary materials:

Once we know all this, we go straight to list all the components we need to build our home Geiger counter:

    1. High voltage DC-DC regulator/converter module (e.g.: SODIAL). It will help us to adjust the high voltages handled by the Geiger-Müller and to transform that voltage into a small voltage comparable to the Arduino boards and other components. Remember that it has to withstand the input voltage of the tube you have chosen.
      east.
    2. Loading module. For example this one.
    3. Bust Module Converter DC-DC 3-5v.
    4. Arduino Nano, although any other is also good, but in order not to increase the size too much the Nano is preferable.
    5. 128×64 or 128×32 OLED display that we will use as a screen to show the results of the measurements.
    6. Transistor 2n3904 for our tube.
    7. Resistors of 10M ohms and another one of 10K.
    8. 470pf capacitor.On/off switch.
    9. Buzzer or small speaker.
    10. AAA battery.

This is for components, although you will also need tools such as soldering irons, wiring for some joints, Arduino IDE to program the board, battery or batteries, and also a custom box if you want to protect your meter. If you have a 3D printer, you can build the box in plastic.

Step by step construction of the Geiger counter:

Geiger counter circuit diagram

The next step, once you have all the components, is to assemble all the components of the puzzle according to this diagram. The assembly is relatively simple and does not need further explanation. It’s just to connect all the elements like this. You can do it in a protoboard first to test that everything works correctly and then proceed to solder all the components to make it permanent.

Steps

The steps to follow are as follows:

  1. With a multimeter you can calibrate the voltage (picture 1). For example, if you have chosen a 410V Geiger-Müller tube, you have to adjust the potentiometer of the DC-DC module to work with this voltage.
  2. Then, just solder or weld all the components as shown in the diagram above as in picture 2.
  3. You can use a box to protect all the components or not.
  4. Connect the Arduino board to your PC with a USB cable and with Arduino IDE write the following program (you can download it here) to program it so that it can convert the voltages we work with into measurements in the unit you have chosen. You can use other units if you prefer or make adjustments by modifying the source code of the sketch…

/*
*
* SCL - A5
* SDA - A4
*
*
* Voltmeter - A3
*
* PWM - D9
* Input - D2
*
* buzzer - D7
*
*/

#{i1}includes {i1}Bounce2-{i0}

#{i1}includes{i0}
#{i1}include{i0} {i1}Wire.h.{i0}
#{i1}include{i0} {i1}Adafruit_GFX.{i0}
#{i1}include{i0} {i1}Adafruit_SSD1306.{i0}

#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);

#define NUMFLAKES 10
#define XPOS 0
#define YPOS 1
#define DELTAY 2

//////////////////////////////////////////////////////////////////////////////

unsigned long previousMillis = 0;
unsigned long previousMillis1 = 0;
const long interval = 40000;
const long interval1 = 500;

static const unsigned char PROGMEM lcd_bmp[] =
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xE0, 0x00
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x1C, 0x00
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x0E, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x80, 0x1F, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x1F, 0x80
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x1F, 0xC0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xC0, 0x3F, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xC0, 0x3F, 0xF0
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xC0, 0x3F, 0xF0
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xE0, 0x7F, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xE0, 0x7F, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xF0, 0x7F, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xE0, 0x7F, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xC0, 0x3F, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x03, 0xF8
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x40, 0x38
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x80, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0F, 0x00, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1F, 0x80, 0x18
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3F, 0xC0, 0x10
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x7F, 0xC0, 0x30,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xFF, 0xE0, 0x20
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xFF, 0xF0, 0x40
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0xFF, 0xF8, 0xC0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xF9, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFE, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFC, 0x00
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xE0, 0x00
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

static const unsigned char PROGMEM logo[] =
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xE0, 0x00
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x1C, 0x00
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x0E, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x80, 0x1F, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x1F, 0x80
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x1F, 0xC0,
0x07, 0x9E, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x7F, 0xC0, 0x3F, 0xE0,
0x07, 0x9E, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x3F, 0xC0, 0x00, 0xFF, 0xC0, 0x3F, 0xF0,
0x07, 0x9E, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0xFF, 0xC0, 0x3F, 0xF0,
0x07, 0x9E, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x3F, 0xF0, 0x00, 0x00, 0xFF, 0xE0, 0x7F, 0xF8,
0x07, 0x9E, 0x3E, 0x73, 0x9C, 0x00, 0x78, 0x3E, 0x3E, 0xF0, 0xF0, 0x01, 0xFF, 0xE0, 0x7F, 0xF8,
0x07, 0x9E, 0x7F, 0x33, 0x98, 0x00, 0x78, 0x7F, 0x3E, 0xF1, 0xF8, 0x01, 0xFF, 0xFF, 0xFF8,
0x07, 0x9E, 0x7F, 0x33, 0xB8, 0x00, 0x78, 0x7F, 0x3E, 0xF3, 0xFC, 0x01, 0xFF, 0xF0, 0x7F, 0xF8
0x07, 0xFE, 0xE7, 0x33, 0xB8, 0x00, 0x78, 0x73, 0xBE, 0xF3, 0x9C, 0x01, 0xFF, 0xE0, 0x7F, 0xF8,
0x07, 0xFE, 0xE7, 0x3F, 0xF9, 0xF0, 0x78, 0x73, 0xBE, 0xF3, 0x9C, 0x01, 0xFF, 0xC0, 0x3F, 0xF8,
0x07, 0xFE, 0xE7, 0x3F, 0xF9, 0xF0, 0x78, 0x73, 0xBE, 0xF3, 0x9C, 0x01, 0xF8, 0x00, 0x03, 0xF8
0x07, 0xFE, 0xE7, 0x3F, 0xF8, 0x00, 0x78, 0x73, 0xBE, 0xF3, 0x9C, 0x01, 0x00, 0x20, 0x40, 0x38
0x07, 0x9E, 0xE7, 0x3F, 0xF0, 0x00, 0x78, 0x73, 0xBE, 0xF3, 0x9C, 0x01, 0x00, 0x10, 0x80, 0x08,
0x07, 0x9E, 0xE7, 0x1F, 0xF0, 0x00, 0x78, 0x73, 0xBE, 0xF3, 0x9C, 0x01, 0x00, 0x09, 0x00, 0x08,
0x07, 0x9E, 0xE7, 0x1E, 0xF0, 0x00, 0x78, 0x73, 0xBF, 0xF3, 0x9C, 0x01, 0x00, 0x0F, 0x00, 0x08,
0x07, 0x9E, 0xE7, 0x1E, 0xF0, 0x00, 0x78, 0x73, 0xBF, 0xF3, 0x9C, 0x00, 0x80, 0x1F, 0x80, 0x18,
0x07, 0x9E, 0x7F, 0x1E, 0xF0, 0x00, 0x78, 0x7F, 0x3F, 0xE3, 0xFC, 0x00, 0x80, 0x3F, 0xC0, 0x10,
0x07, 0x9E, 0x7E, 0x1E, 0xF0, 0x00, 0x78, 0x3F, 0x3F, 0xC1, 0xF8, 0x00, 0xC0, 0x7F, 0xC0, 0x30,
0x07, 0x9E, 0x1C, 0x1C, 0xE0, 0x00, 0x78, 0x1C, 0x3F, 0x00, 0xF0, 0x00, 0x40, 0xFF, 0xE0, 0x20,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xFF, 0xF0, 0x40
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0xFF, 0xF8, 0xC0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xF9, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFE, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFC, 0x00
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xE0, 0x00
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

static const unsigned char PROGMEM fl[] =
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };

static const unsigned char PROGMEM bt1[] =
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };

#if (SSD1306_LCDHEIGHT != 32)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif

const int buttonPin = 2;
const int ledPin = 13;

int buttonState = 0;
int bt = 0;
int pbt = 0;
int s1 = 0;
unsigned long j;
unsigned long CR = 0;

unsigned long cs;
int sec;
/////////////////////////////////

float input_voltage = 0.0;
float temp=0.0;

///////////////////////////////////

Bounce bouncer = Bounce();

void setup() {

Serial.begin(9600);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3C (for the 128x32)

display.display();

display.clearDisplay();

display.drawBitmap(0, 0, logo, 128, 32, WHITE);
display.display();
delay(2000);
display.clearDisplay();

TCCR1A = TCCR1A & 0xe0 | 2;
TCCR1B = TCCR1B & 0xe0 | 0x09;
analogWrite(9,22 ); // на выводе 9 ШИМ=10%

pinMode(ledPin, OUTPUT); //

pinMode (7, OUTPUT); // buzzer

pinMode(2 ,INPUT); // кнопка на пине 2
digitalWrite(2 ,HIGH); // подключаем встроенный подтягивающий резистор
bouncer .attach(2); // устанавливаем кнопку
bouncer .interval(5); // устанавливаем параметр stable interval = 5 мс

}

void loop() {

///////////////////////////////////////////////////////////////////////////////////////////////////////////////

unsigned long currentMillis = millis();
unsigned long currentMillis1 = millis();

if (bouncer.update())
{ //если произошло событие
if (bouncer.read()==0)
{ bt++;
}
}

if (currentMillis - previousMillis >= interval) {
previousMillis = currentMillis;
CR = bt;
bt = 0;
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (bt != pbt) {
pbt = bt;
s1 = 1;
}


int analog_value = analogRead(A3);
input_voltage = (analog_value * 5.0) / 1024.0;

if (input_voltage < 0.1)
{
input_voltage=0.0;
}

////////////////////////////////////// TEXT ON DISPLAY////////////////////////////////////////////////////////////////////////////
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(10,0);
display.clearDisplay();
display.println(CR);
display.setCursor(10,18);
display.println(bt);
display.setCursor(40,18);
display.println();
display.setTextSize(1);
display.setCursor(40,0);
display.println("mR/hr");

////////////////////////////////////////BATTERY INDICATION////////////////////////////////////////////////////////
display.drawBitmap(0, 0, fl, 128, 32, WHITE);

if (input_voltage > 3.3) {
display.drawBitmap(0, 0, bt1, 128, 32, WHITE);
if (input_voltage > 3.4) {
display.drawBitmap(0, -5, bt1, 128, 32, WHITE);
if (input_voltage > 3.5) {
display.drawBitmap(0, -10, bt1, 128, 32, WHITE);
if (input_voltage > 3.6) {
display.drawBitmap(0, -15, bt1, 128, 32, WHITE);
if (input_voltage > 3.8) {
display.drawBitmap(0, -20, bt1, 128, 32, WHITE);
}
}
}
}
}


if (s1 == 1){
display.drawBitmap(-10, 0, lcd_bmp, 128, 32, WHITE);
digitalWrite (7, HIGH); // buzzer ON
}
else
{
digitalWrite (7, LOW); // buzzer OFF
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (currentMillis1 - previousMillis1 >= interval1) {
previousMillis1 = currentMillis1;
if (s1 == 1){
s1=0;
}
}
display.display();
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////

As you can see it is very simple (even though it seems long because of those display settings), you just have to do that conversion of the voltage received by the Arduino board to a series of data that can be shown on the display.

If everything went well, you should see the information on the screen and the buzzer noise when you face your Geiger counter with a radioactive source.

Sources

Instructable – DIY Arduino Geiger Counter

Cooking-Hacks – Geiger Counter: Radiation Sensor Board for Arduino and Raspberry Pi

Leave a Comment

*

*