Emmett's Geiger Counter Project
My First One
Getting Started
The PIC
The Code
The Schematics
More Pictures
Home


Geiger Counter 2

This site: southernradiation.com has some great info on classic Geiger counters and other Cold War factoids.

My first Geiger counter:
The first Geiger counter I had was a Precision Radiation Instruments Inc. Model 107C "Professional" that I got at a flea market when I was in high school, and paid way too much money for. $30. It required two 67.5V batteries and two 1.5V D-cells. The batteries would have cost me another fortune. It sat around for many years. I finally built a DC inverter for it that supplied the tube filament voltage and the 132.5V DC plate voltage that ran off a 6v battery. I ended up selling it at a swap meet... It was nice to be able to check things to see if they were "hot" or not. I used to have a lot of meters and aircraft instruments that had radium dials and hands. Several years later, I decided that it would be nice to have one again, so I set out to build one from scratch, given all the nifty plans I've seen in magazines and on the Internet. I had two goals in mind. 1. Use a GM tube that is sensitive to detect high energy alpha particles. 2. Keep it relatively simple, but use a PIC micro controller to drive an LCD display and have a serial port interface to a computer for long term background radiation logging, and as a potential source of random numbers. The display would read out total counts, counts/time and rough mR/hour readings like the old ones used to. (Well, maybe not so simple!)

Getting Started:
 I ended up finding a real nice high quality GM tube on Ebay for $30 with shipping. It is a 5979 out of a U.S. Navy PDR-27 Geiger counter. It has a mica window so it can pick up alpha particles. It requires about 700V DC for normal operation. I decided to use a cold cathode fluorescent inverter out of a laptop computer that I obtained for a few bucks at a surplus store. This easily supplied up to 1,400V after I added a voltage doubler to its output. Its output voltage was originally controlled by a pot. I ended up being able to control it using a transistor and an op-amp that sampled its output through a string of 15-5.1Meg resistors. (I have a bucket full of them). With this additional regulator, I am able to adjust the output voltage from about 500-1200V. This will accommodate most GM tubes. The inverter worked best using a 12V battery, so I was pretty much stuck with that.  This turned out to be a good thing. I used a lead acid gel cell battery and its weight almost perfectly balanced the weight of the GM tube and its holder hanging off the side and provides an enormous amount of run time before recharging. I ended up adding a 5V switching regulator using a classic LM723 circuit to drive the PIC and LCD. This keeps the efficiency high and has another advantage. I used its voltage reference as a reference for the high voltage supply as well. I remember from my Navy days that the voltage references in these devices were very stable. (Within a millivolt over a year) I originally intended to use the LM723's "op-amp" for the high voltage regulator, but it turned out to be unsuitable. I used an LF353 instead. The other half of the LF353 is used as a comparator to indicate a low battery condition. It drives a bright amber LED when the battery is low. Looking back, I could have used an internal comparator in the PIC for this purpose, but at the time, I wasn't sure which PIC I was going to use. Aside from the PIC and LCD, I added a TTL to RS232 level converter for the serial port interface. Two 555 timers act as one-shots to produce two pulses of different durations. One supplies short pulses to the PIC and an external output. The other supplies longer pulses to the speaker and indicator LED. The LCD I choose was a typical LED back lit 16x2, with a parallel interface. (They are cheap!) I used the 4-bit interface mode. The back light is switchable to conserve battery power. Two external jacks supply the Geiger counter with power and enable the battery to be recharged. Originally I thought the PIC would "talk" to the PC. However, it turns out that most of the geiger counter software only needs a short pulse toggled on the serial line.

I started out getting the HV supply inverter and control regulator circuit working. Once I had it going, I built the 5V switching regulator. About this time, I received the tube and saw my first pulses from radiation on my oscilloscope. Another thing I noticed was that in total darkness you could see a faint purple flash around the center wire as a particle caused the "avalanche". Another thing I observed was that the cable capacitance to and from the GM tube should be kept as small as possible. The tube capacitance is only about 3pf, and the geiger pulse does not contain a lot of energy. So with more cable capacitance, more attenuation of the pulse will take place. (It gets shorter and slower.) The pulse is coupled through a 33pf capacitor and connects to the trigger pin (2) on the 555's. I set the bias to about 2.5V. The trigger voltage on pin 2 of the 555's is 1/3 Vcc, or about 1.67V. So the minimum required negative going pulse amplitude is about 830mV. The pulse amplitude is limited to Gnd and 5V by two diodes to protect the input to the 555's.

On to the PIC:
I decided to go with a PIC16F628A. The cool replacement for the popular 16F84 and is about 1/2 the price. It also has oodles of registers to use with wanton disregard and supports in circuit serial programming (ICSP). ICSP turned out to be a wonderful alternative to pulling and plugging the PIC every time I wanted to make a program change, like in my last project. I was able to support ICSP in the Geiger counter using the existing DB-9 serial port connector already installed. My home brew PIC programmer needed only a few modifications to support the new chip (The last one I did used a 16C84). A special cable connected the two together. Once I had this working so I could reliably talk to  the PIC, life was good.

It took me a couple weeks to set up the whole development environment since it had been about 7 years since I did anything with PICs. Once I could talk to the PIC, it only took a couple weeks of evenings to come up with a working Geiger counter interface with the LCD. My last project was coded with a combination of C and assembly. Since then I have become proficient in assembly language programming. (I do it all day at work!) That and the fact that the C compiler I used to use is no longer free, convinced me to go with straight assembly. There are plenty of libraries available and assembler tricks that make it not so painful.

I modeled the Geiger counter interface after the operation of a frequency counter: A "gate" is "opened" and "closed" for a precise amount of time. When the "gate" is "open", the incoming pulses increment a bank of counters. After the gate is "closed", the accumulated count is latched and displayed. Then the counter bank is reset and the the process starts again. The time base interval determines either counts/time or mR/hour. The Geiger pulse from one of the 555's is connected to the RB0/INT pin. This interrupt is used to update the Geiger count if the "gate" is open. In this case, the "gate" is the enabling and disabling of the RB0/INT interrupt. There are two buttons. One for mode selection and the other is a reset. Both of these buttons are connected to PORTB 4,5 pins. The PORTB 4-7 change interrupt is used to sense changes with either button. The buttons are fully debounced in software, and it will sit and spin until a button is released. So, all external events are interrupt driven. TMR1 is used as a prescaler for the timebase and it is serviced via a handler for the TMR1 overflow interrupt. This scheme seems to work fairly well. With a clock of 4MHz, the true reading in pulses (counts) per second only falls off about 1% with an input pulse rate of 20,000 pulses/second. (Hey, if its that high, accuracy is the least of my worries!).  The counter bank consists of six registers that are set up as BCD counters. This makes the display easy since no binary to decimal conversion is required. The 5979 GM tube specs indicate that ~ 1mR/hour = 45 counts/second. Therefore a gate of 1/45 second would have a resolution of 1mR/hour. Ofcourse different radiation sources have different energy levels, so this is really a ball park figure unless the same source of radiation is being measured. That's why the counts per unit of time measurments are also included.

There are eight modes of operation:
0
Total Count
Continuous updates
1
Counts per second
Updates ~ every second
2
Counts per minute
Updates ~ every minute
3
Counts per hour
Updates ~ every hour
4
Counts per day
Updates ~ every day
5
mR/Hour 0.00
Updates ~ every 2.222 S
6
mR/Hour 0.000
Updates ~ every 22.22 S
7
mR/Hour 0.0000
Updates ~ every 222.2 S

The Code:
Here is a tarball of the entire source code: geiger.tar.gz
If you are on a linux box you can unpack it with: "tar zxvf geiger.tar.gz"
See my previous page for the required development tools. (gputils, Prog84, etc).
Or if you wish to brouse/download the main files (Includes are in the tarball):
geiger.asm
geiger.lst
geiger.hex Intel inhx8 format. (If you are brave enough to try my version!)

The Schematics:
Geiger_Counter_Analog_Board.pdf
Geiger_Counter_CCD_Board.pdf
Geiger_Counter_Connections.pdf
Geiger_Counter_Controller.pdf
Geiger_Counter_Voltage_Divider.pdf

More Pictures:

Geiger Pic 3 Geiger Pic 4

Geiger Pic 6 geiger Pic 5