Raspberry Pi 3 used as environment radioactivity monitoring station

Recently I've found Pi-GI, it's an open source project of a radiation monitoring system based on Raspberry Pi, and (open source hardware) Geiger-Muller detector. Statistics are available through a web page, so it's possible to use it conveniently on a PC, tablet or a phone. It's written in python.

Today I will present how I've glued together this software and my Geiger-Muller counter described in my previous posts.

Below is a circuit of my counter, it uses 5V power supply and draws a couple of mA, so it's possible to power it directly from Raspberry. Since originally I've used three tubes in parallel, I had to remove two of them to not have values multiplied by three - most of the detectors and software for them uses only one tube.

Raspberry Pi requires 3V3 logic on GPIO ports, fortunately, that's not a problem here, pin 3 of SV3 socket just needs to be connected to 3V3 rail on the Raspberry Pi. The output (pin 2 of the same socket) needs to be connected to one of the GPIO pins. It's a bit confusing, because on the webpage the circuit states that GPIO0 is used, but in the current version of the software GPIO4 is used instead. The pin can be configured in software by editing gpio_port variable in PiGI/software/conf/default.cfg

Software installation and configuration is presented in this article, in addition, because I use STS-5 tubes, I had to change the tube type in PiGI/software/conf/default.cfg - SBM-20 has almost the same parameters as STS-5.

 60 # See: https://apollo.open-resource.org/lab:pigi:common-geiger-tube-parameter
 61 tube_id = SBM-20
 63 # GM tube specific cpm to microsievert/h conversion factor
 64 tube_rate_factor = 0.00277

Application starts by default on 8080 port, so logs are available by the web on http:/[IP of the Raspberry Pi]:8080 address. By default it starts in simulation mode, to change it and get real values, it's needed to change in http://[IP of the Raspberry Pi]:8080/webGI/index.html#serverOptionsPanel source to "environment".

That was all, now I'm able to monitor radioactivity just from my browser!

On the picture above, you may see an increased radioactivity level, I've placed smoke detector containing a radioisotope of americium on the GM tube, at the end is visible big decrease, this is because I've taken the smoke detector out, so only environmental radiation was present.

The value drops to 20-25 pulses per minute, that's normal value for environmental radioactivity - it's mentioned in the tube datasheet.

What I plan to build in 2017...

This is just a quick summary of what I have in mind for 2017, more for me as a checklist than for readers, but maybe those ideas will also be interesting for someone else as his/her future DIY projects.

    1. Semiconductor Radioactivity Detector, my first attempts of making it, I've presented here, now I'm testing and adjusting new version, but for now it still doesn't work.
    2. I'm planning to go back to making my own programming language (just for fun of making it), one part I've presented in Virtual Machine implemented as a Domain Specific Language in Ruby, but I've also made a simple compiler to ELF binary for x386. Now I plan to make a new version for ARM and compare how my coding skills improved (x386 version was made a couple of years ago).
    3. I'm also thinking about building a simple ion thruster, this was done by many people at home, the most difficult part is the availability of a high voltage source but I could use my flyback transformer presented here. Of course, it's too heavy to be on board, would have to be connected by wires and stays on the ground. Maybe capacitors would be lightweight enough to be placed on the plane and provide power for small period? I don't know yet.
    4. Alpha Particle Spark Counter is also an interesting device to build. It operates at high voltage (3-4kV DC) and its electrodes aren't well protected against touching so it's a bit of a hazard. It's also quite primitive instrument from an early era of radioactivity measurements. I still think that it will be a cool project.
    5. I have also in mind visiting Objekt Alfa which is a nuclear shelter and an old military biological laboratory. You may imagine in what biological research army was interested in during the cold war. There were three objects planed, location of the second is still classified, third wasn't build. I will post photos for sure, for now you may check this relation (not mine).

This year was very successful for this blog, many people came, and I want to thank you all, also for valuable feedback - I learn many things from your comments. Thanks, I hope, you will visit this place in 2017 too!

I wish You all the best for the new year!

Radioactivity detection using very simple ionization chamber and a single J-FET transistor

Today I will show a very simple ionization chamber that can detect radioactivity. I was able to detect with it ionizing radiation from a smoke detector (Am241 isotope). It's also immune to electromagnetic interference (EMI) due to a good shielding.

This device doesn't explicitly use any power supply. It's connected to a multimeter set to measure resistance, in this mode, the multimeter provides a small voltage to its probes (R=I/U, so to measure resistance, it has to put voltage across measured element). This is sufficient here, because basically we just need to polarise electrodes of the ionization chamber and nothing more. My multimeter provides 5.6V in this mode.

My setup is presented below, note that the sensor is this metal box, not the PCB visible on the image.

The chamber is made from copper plate soldered carefully to prevent any holes where electromagnetic fields could flow and disturb readings. Inside is one BF256B (n-channel J-FET) transistor, its gate is connected to one of ionization chamber plate made from a leg of a THT resistor, source pin is available externally, this is where "plus" probe of the DMM is connected, drain is connected to the metal case (that is both and electrode and is shielded against EMI).

ionization chamber circuit

I've used Keysight 34460A as a multimeter here, because it has histogram mode, that will be useful to look if the measured value is stable over time. PLC was set to 0.2, it will reduce accuracy, but will give much more samples.

Below two images present what is inside of the sensor (only JFET, as mentioned above) and the sensor mounted. The front was shielded using tin foil, that was secured tightly by insulation tape.

There are many movies on YouTube with people constructing ionization chambers, however, those aren't shielded completely and due to high wideband gain in those circuits, they will pick-up any electromagnetic radiation, so the results aren't very useful.

Those designs measures not only ionizing radiation, but also whole electromagnetic spectrum. Here I tried as a dummy test to place the a metal object to check if the measured value won't change, without a shielding it would probably be a big peak.

Time to show results. The resistance decreases when the amount of ionizing radiation increases, below you can see two peaks on the histogram, one on the left is when the sample (Am241 isotope) is present next to the sensor, on the right, when there is no sample.

ionization chamber results

I think, that it's a very interesting circuit, and can be used for example to understand how different shielding prevents radioactive radiation, etc. It's limited, but a good start to making own ionizing chambers.

Nuclear physic applied in smoke detectors

Not many people know, but in some smoke detectors, radioactive materials play an essential role. Today I will present one of those devices, and my -successful- attempt to reverse engineer it and get the circuit diagram.

Those smoke detectors use a small amount of Americium-241 (chemical symbol: Am) obtained in nuclear reactors as a decay product of Plutonium-241. Am241 emits mainly alpha particles, but also some gamma rays. In smoke detectors it is in a form of an oxide Am02.

When alpha particles collide with atoms in the air, as a result, ions are produced. The amount of those ions is measured by smoke detector and is quite stable over time (Am241 has half-life of 432 years), however, when the smoke is present, smoke particles neutralise alpha particles, so the measured value drops. This drop is the signal of fire, so the smoke detectors start buzzer to alert people in the building.

To measure those ions (produced by ionizing radiation), ionization chamber is used. It has a form of two differently charged plates shaped and placed in such distance that the ionizing radiation can flow between them.

Those plates, when charged, create an electric field that attracts those ions. When they are collected by plates, and additional voltage is created between plates, this voltage can be measured. The bigger this additional voltage, the bigger is the ionizing radiation.

When those smoke detectors are used as designed, they don't pose a radioactive hazard, however, if those devices are disassembled, it must be done with great care. Alpha particle sources (as used here) are very dangerous if they came into the lungs in a form of dust. They are also dangerous if digested.

On below image, you can see the ionization chamber. It's connected in the air directly to the pin of the chip to avoid parasitic currents flowing on the PCB. This is because voltages created by ionization chambers are very low. Radioactive element is inside of the ring.

To be honest, I think that the PCB could be routed much better - angles of traces should be 45° if possible.

As was visible on previous pictures, ionization chamber is soldered directly above the chip that runs this device. I wanted to know what is this chip, but didn't want to solder off the ionization chamber, that's why I reverse engineered this PCB into electronic circuit and later found an online datasheet of the chip that fits here. My works are visible below.

After searching, I have found RE46C120 datasheet, so now I was pretty sure it's this chip. Just to be sure, I checked on the oscilloscope, what signal is on the TP3 and how it looks on the datasheet - it's the same.

That's basically all for today, I wanted to share with you the idea of those pretty interesting devices.

Semiconductor Radioactivity Detector: Part I

Currently I'm trying to make a working version of a radioactivity detector that uses semiconductor as a sensor. It's a different approach than Geiger-Muller detectors or ionization chambers, more complicated, but also much more interesting.

While Geiger-Muller counters can only provide information about the amount of particles in a period of time, semiconductor detectors can also measure their energy, so it's possible to say much more about the nature of observed ionizing radiation. Some of the disadvantages of these detectors are that they are more expensive, complex and sensitivity may degrade over time.

The current version doesn't work, but I think it's so interesting concept that I've written this entry anyway.

semiconductor radioactivity detector

The idea is that when ionizing particle (alpha, beta or gamma) is blocked by the p-n junction, a small amount of the energy is released. It has a form of a current spike and can be observed by the next stages of the device.

The p-n junction is just a diode polarized reverse-biased. To make the working area of the p-n junction bigger, a photodiode is used. I know that there also exists specialized versions that are more sensitive, however, I couldn't find any in any online electronic shops.

In my design, the sensor is D1, it's polarized by R1, and C1, R2, L1 (those last three elements are making a low band filter to block noise from power supply, they should be as close to D1 as possible).

The first stage of an amplifier is based on a N-JFET to minimize current sink from the measured circuit, in addition, this type of transistors are extremely fast (that's why they are used widely in RF designs). To reduce parasitic currents between PCB traces, this part is mounted "in the air". EMI that could affect this stage are reduced by a small mass connected shield made from copper and aluminium tape.

Next two steps are high pass amplifiers. Since the signal is very small and those are not rail-to-rail opamps, a symmetrical power supply or virtual mass should be used. I've forgotten about that so lately I just used additional AA battery connected between negative power pin of the opamp and ground.

There are three outputs: raw, high/low (R10, R11, IC1C) and integrated over a period of time (IC1D, R12, R13, R14, C9, C10).

semiconductor radioactivity detector circuit

Below image shows the sensor, I've removed the protective glass from the photodiode to expose it better on the ionizing radiation.

The PCB looks like a nightmare because I've scratched some pads during multiple soldering and desoldering of elements, also some traces were cut and connected again, etc. It's a big blow of a mess now and I think that the story of this PCB is ended, soon I will design a new one based on the experience I've gained.

As I've said in the beginning of the article, the current version doesn't work - I can't observe anything except noise. This may be due to multiple problems. One of them is a proper shielding, tracks length, etc. It's a challenge to shield the device from EMI, but still make it sensitive to ionizing radiation.

Another problem is that I can test it only with alpha or beta particles, but they have big problems penetrating objects (are easily blocked), so it may be that they aren't even going to the pn junction, but are blocked by the case. This is something that is unclear to me at this moment.

I will continue working on this project and write a new article when I will make some progress.

Using Arduino to process data from Geiger–Müller counters

In the previous posts I've described a simple Geiger–Müller counter and various experiments with this device. Today I would like to present Arduino project to communicate with a Geiger-Muller counter, gather data and present it to the user. The device is based on Arduino Uno, Nokia 5110 LCD and homemade shield.

Currently it's possible to show two layouts: bar graph of the pulses in one minute interval and histogram of the gathered data. Both graphs are auto-ranging in Y axis. On the top of the pulse graph is visible also a numeric value of the last sample. The length of the histogram data is 4 minutes, the amount of bins is calculated automatically.

Below is visible layout with pulses per quant of time and histogram of them. You can clearly observe Gaussian distribution on the second image.


I didn't want to place all of the connections and input PCB dimensions of a shield, so I've used as a base one of freely available shields and modified it to my needs - I've left the licence disclaimer unmodified. Unfortunately, I wrongly connected LCD, that's why the LCD looks like rotated 180 degrees. Anyway, it still works and I don't plan to make a new PCB to fix it.

I tried to make the code reusable in my other projects so the structure may look overcomplicated, but I think it's as it should be.


Followed 3rd party librairies needs to be installed, to install them in Arduino IDE go to sketch -> Include Library -> Manage Libraries then type library name and proceed with installation.

  • Adafruit-GFX-Library
  • Adafruit-PCD8544-Nokia-5110-LCD-library
The main component is the GMCounter class that collects data in a circular buffer. I wanted to pass as an argument a size of the buffer, but also wanted to avoid using dynamic memory, finally I made this parameter an argument of template class, so now creating an object of this class looks like:
 static GMCounter<4 * 24> hourGMCounter;

This will create an object with this class with a buffer for 4*24 samples. I think, that it's quite cool.

There's a lot of commented out code in the main function, it was used to test parts of the program as it was developed. I didn't remove it because it still can be used if I will add new features.


The source code and Eagle files of the project is available on the GitHub, feel free to download and try it if you're interested in this area of physic.

In the near future, I'm planning to add data logging into a SD card and display data also in one hour interval.

LED colors vs history of mankind

Plenty of electronic devices (even those inexpensive from the Far East) have some kind of LEDs to indicate the state of the device. A good example may be a stand-by LED on the on-off switch of many TVs, another would be power-on LED on many laptop power supplies. Depends on a type of information, different color of LEDs are used.

Usually green color says that the device is in good state and don't need attention, it's the default color for power-on indicators. Yellow is used to indicate that there are some information or some events that the user may want to check, but they are not critical. Red color shows that something was wrong, that user should pay attention to the current state and maybe made some actions.

This is also a question of a good user interface, especially now, when everything tends to use white or blue LEDs - they are something fresh, something that wasn't available a decade ago. Yes, maybe they are cool, but they are also non-intuitive. That's a different story.

It may sound strange, but the selection of greed-yellow-red colors is not an accident, but is based on thousand of years of our human history. Green is intuitively connected with leafs, forest, bushes, trees - places to hide, that are much more secure than an open space. In open space, it's much easier to be observed by predators. Red is the color of fire - danger that kills and destroys, especially before human kind learned how to handle it. A lot of poisonous plants have red fruits too. Yellow is often a skin color of toxic animals that says "don't eat me, I'm toxic, you will die - I warned you". It's a color of information.

Even devices that cost tens of thousands of dollars have those LEDs that have a color selected just because thousands of years ago our ancestors were living like today monkeys and we still keep those references! That's amazing!

I think that if some day advanced alien race would get one of our electronic devices and reverse engineering it, they could understand what it is, why we use it and how it works. One thing that they wouldn't be able to understand would be why we choose those colors. That would be only possible if they would analyse our natural environment and our history.

It won't end, a lot of software applications also use those colors or have some widgets that simulate LEDs. In addition, sometimes there are also GUI widgets that simulates knobs, switches and other mechanical elements - maybe we live in an era that adds another level of this inheritance? What about floppy disc icon used as "Save as"? Who have a floppy disc, yet we still have this icon in many applications.

BTW, it's also interesting that e.g. traditional caliper works only because our eye and mind has great ability to misalignment among two line segments, however, we suck in different areas of image recognition (e.g. checking perpendicularity). An alien could analyze a caliper, but without knowledge of the biology of a human eye and human brain activity, it could be only possible to make assumptions why we are using calipers and not some other ways to measure distances.