The result of Covid and Work From Home has been….we stay home a lot. There are upsides, like not commuting every day. There are downsides, as we have more idle time. Since my memoir might be titled “A Mind Forever Wandering,” I was thinking one day about how much we really know about background radiation. This led to a couple of searches around Geiger Tubes, and real-time databases, etc.
After a few random purchases around the internet and a bit if python code and a left over Raspberry PI 4 1G box, I have put together a DIY Geiger Counter. Here is how I did it, and here is the code, etc, you’ll need.
Here’s what you need:
- Raspberry PI 3 or 4
- Geiger-Miller Tube with a Raspberry PI compatible board. (Link is to the one I used)
Set up Raspberry PI
First, get a Raspberry PI 3 or 4. You’ll need some kind of Raspbian OS/Raspberry PI OS on it. I always use the Raspberry PI OS installation instructions here. In short, get the OS and the imager, and create an image on the SD card. Then boot up the Raspberry PI.
You’ll also need to add Python3 and pip to get the code working. You’ll need to do something like:
$ sudo apt install python3 pip
I am using Python 3. I have not tested Python 2. Once done with that, you should use pip to install the following additional packages:
$ pip install influxdb_client RPi.GPIO
Set Up Geiger Tube
Next, Set up the Geiger-Miller tube, and the board. My pinout for a Raspberry Pi 4 1G device is pretty simple. GND pin on the board goes to pin 6. The 5V pin is wired to pin 2 for 5V of power, and the VIN input line is wired to pin 7, GPIO4. (No reason not to do pin 3 or 5. It’s just what I picked). I also pulled the J1 jumper, since the clicks get annoying. Back background radiation is about 15-35 CPM, BTW. Which is normal. About 0.11-0.15 microsieverts for those of you doing math in your heads.
Next, set up the code. My Raspberry Pi Geiger Counter code is here. You will have to set up your Influx DB v2 database, but I’ll write that up in the next blog entry.
Once you do connect to to InfluxDB you’ll be able to get cool graphs like this, in the InfluxDB v2 UI:
“CPM” here means clicks per minute. The full build is pictured below:
Questions? Ask them in the comments.
More links to Related Projects
- Background Radiation Monitor
- Raspberry Pi Zero Geiger Counter
- Portable Raspberry Pi Geiger Counter With Display : 12 Steps – Instructables
- Geiger Counter with RPi Zero W : raspberry_pi (reddit.com)