Introduction - University of Colorado Colorado Springscwang/ECE4330_F04/Geiger counter Report... ·...

18
Semester Project Final Report A Digital Geiger Counter: A Design Approach Based on an Embedded System ECE 5910 Embedded Systems Design

Transcript of Introduction - University of Colorado Colorado Springscwang/ECE4330_F04/Geiger counter Report... ·...

Page 1: Introduction - University of Colorado Colorado Springscwang/ECE4330_F04/Geiger counter Report... · Web viewFinally, the RC circuit is used to drive an analog meter to indicate the

Semester Project Final Report

A Digital Geiger Counter: A Design Approach Based on an Embedded System

ECE 5910Embedded Systems Design

Submitted by

Jerry MaloneDecember 9, 2003

Page 2: Introduction - University of Colorado Colorado Springscwang/ECE4330_F04/Geiger counter Report... · Web viewFinally, the RC circuit is used to drive an analog meter to indicate the

A Digital Geiger Counter: A Design Approach Based on an Embedded System

by

Jerry J. Malone, Jr.

Abstract:

This monograph describes the design and construction of a modern α-sensitive, digital Geiger counter based on an embedded processor of the Atmel AVR family and a low-cost, commercially-available pancake-type Geiger-Mueller tube with integral HV power supply. The instrument is extremely sensitive and has proven useful monitoring a variety of common low-level radiation sources. Because of the flexibility and variety of features included in the AVR family of RISC embedded processors, it was possible to construct the Geiger counter with a minimum of support circuitry and development time. Optional features, such as the ability to log data, are readily incorporated into the system.

Introduction

Radiation is all around us. We are constantly being exposed to radiation from natural background sources (cosmic rays), radioactive minerals, and trace amounts of radioactive contamination in building materials. It is interesting to observe and monitor radiation levels and sources of radiation in everyday life.

Many household items produce surprising quantities of radiation. Some of the more common of these include ceramics, such as tile and tableware, smoke detectors, and even some foods, especially seaweeds and fish. To identify and eliminate these sources of radiation from one’s environment requires the use of a Geiger counter.

A Geiger counter is also of use in amateur prospecting, if one is fortunate enough to live in an area rich in radioactive ore, such as Colorado. It is also of use in uncovering some surprising sources of radiation: taking long-distance, high-altitude commercial flights, for example, can expose a passenger to high levels of radiation.

This paper describes a very sensitive digital Geiger counter based on an embedded RISC processor. The Geiger detector and integral HV power supply used here are available commercially and were chosen to reduce development time; however, a less expensive GM tube and external HV supply could also be used with some additional investment.

Page 3: Introduction - University of Colorado Colorado Springscwang/ECE4330_F04/Geiger counter Report... · Web viewFinally, the RC circuit is used to drive an analog meter to indicate the

Background

Geiger counters are used to detect the presence of, and measure the intensity of, alpha, beta, or gamma radiation. Typically, the Geiger counters that are commercially available today are based on analog circuits. Many such instruments are sold on the surplus market for reasonable prices, although some are often 20 or more years old. A Geiger counter of this type owned by the author is shown in Figure 1. New Geiger counters of similar sensitivity and features typically sell for $700 or more.

Geiger counters use Geiger-Mueller tubes (GM tubes) to detect charged particles and other ionizing radiation typically resulting from radioactive decay or x-ray sources. A GM tube is filled with a halogen gas, and charged by a high-voltage DC potential (usually about 500V to 3kV) on its anode. One end the tube is fitted with a thin window made of brass or other material that low-energy particles can penetrate; the most sensitive tubes use a mica window for this purpose. When ionizing radiation, such as an alpha, beta, or gamma ray, penetrates the window of a charged Geiger-Mueller tube, it ionizes the gas inside, causing a brief discharge in the tube. (Although it does not carry a charge, a gamma ray causes ionization by releasing electrons from the wall of the GM tube.) This discharge can be detected as a short, decaying pulse on the anode of the GM tube.

Figure 1: Analog Geiger counter.

A schematic representative of this type of analog Geiger counter is shown in Figure 2 [4]. Although this circuit uses solid-state components, older Geiger counters that employ acorn-type vacuum tubes are not uncommon on the surplus market.

This circuit is powered by a 9-volt battery. It uses a transistor oscillator and transformer to generate the high voltage needed to charge the Geiger-Mueller (GM) tube.

A transistor amplifier is used to detect the discharge in the GM tube and create an impulse; a pair of CMOS gates acts as a buffer to isolate this transistor from the RC metering circuit that follows; the gates also serve as a driver for a low-power piezoelectric beeper to generate the distinctive “click” sound one associates with a Geiger counter.

Page 4: Introduction - University of Colorado Colorado Springscwang/ECE4330_F04/Geiger counter Report... · Web viewFinally, the RC circuit is used to drive an analog meter to indicate the

Figure 2: Circuit diagram of a typical Geiger counter with analog readout.

Finally, the RC circuit is used to drive an analog meter to indicate the frequency of discharge events. The meter indicates the frequency of discharge events occurring in the GM tube and thus the intensity of the radiation impinging upon it.

The scale on the meter of the Geiger counter shown in Figure 1 is calibrated in units of both counts/minute and mR/hr. Counts per minute is probably the most practical and intuitive unit used on a Geiger counter. A variety of other units are used for different purposes, including the Roentgen (R), Rad, Rem, and Curie (Ci); SI units include the Gray (Gy), Sievert (Sv), and Becquerel (Bq) [2, 3]. Many of these units are rather enormous and are commonly used in their milli- or micro- form. To make matters even more confusing, some of these units measure radiation intensity directly, while others indicate the equivalent biological dose. Converting between these units is not always straightforward, and the scale to be used on a Geiger counter’s readout must be chosen carefully and tailored to the desired application.

Typically, the GM tubes used in commonly-available Geiger counters are sensitive only to medium-energy beta and gamma radiation. It would be highly desirable to detect lower energy beta and alpha radiation, as these types of radiation are often more biologically damaging and are more likely to be encountered in by the user in the home or office environment.

Page 5: Introduction - University of Colorado Colorado Springscwang/ECE4330_F04/Geiger counter Report... · Web viewFinally, the RC circuit is used to drive an analog meter to indicate the

Literature Review

A search of both the popular and the professional literature yielded a number of good sources of information for this project. Several individuals have designed and built digital Geiger counters with dedicated, single-purpose hardware [4, 8, 9, 10, 11, 18]. Several of these articles are available on the Internet (see references). There is a wealth of information available about radioactive sources in the environment [6], much of which served as the impetus for this project.

There are a few other, similar products available [5] that could be used as detectors for an embedded system, however, they generally lack the features and sensitivity of the RM-80 selected for this project.

As previously mentioned, there is much potential for confusion in regard to converting radiation units. For some excellent references, see [2, 3].

One team of researchers is attempting to fabricate solid-state radiation detector devices that will eventually replace the GM tube [1]. Unfortunately, these devices are not yet commercially available. Some claim that large-area diodes, such as photovoltaic cells, can be used to detect incident radiation; however, using such diodes for this purpose is fraught with problems. It would be highly desirable to have such a device available as product design, as it would greatly reduce the power requirements, and bulk, as well as eliminate analog circuitry from the Geiger counter entirely.

A Design Approach Using An Embedded System

The analog Geiger counter discussed previously could be improved in a variety of ways. This is a natural application for an embedded processor. The features available in the Atmel AVR family of processors make them a natural choice for this application.

The Geiger counter described herein is described as “digital” in the sense that the measurement it produces is obtained and displayed directly in digital format without the use of analog averaging circuits commonly found in most commercially-available Geiger counters. One might argue that because all radiation arises from quantum phenomena, that the measurement thereof is inherently digital; this is strictly true in a philosophical sense, and it is also true in the sense that radiation produces a series of discrete pulses. However, because we are most often interested in measuring radiation intensity over time, we are counting pulses over time. Time is understood and treated as continuous quantity; particularly when the impulse response of an RC circuit is used to determine an average number of events per time as is done with typical Geiger counters. With an embedded system, however, it is possible to measure time much more accurately. The resulting measurement of radiation intensity is therefore as digital as possible in the sense that as little analog circuitry as possible is employed in the system.

Page 6: Introduction - University of Colorado Colorado Springscwang/ECE4330_F04/Geiger counter Report... · Web viewFinally, the RC circuit is used to drive an analog meter to indicate the

Of course, as with all embedded systems, we desire:

1. Rapid development time.2. The ability to update the software with minimal hardware change.3. Very low power consumption.

The features of the AVR series of processors make these possible. Some of design requirements and features specific to a digital Geiger counter include:

1. Sensitivity to low-level alpha and beta radiation.2. The ability to display radiation units in digital format on an LCD display.3. The ability to display radiation intensity on an LED bar graph.4. The ability to change the scale of radiation units.5. The ability to drive an optional external speaker.6. Data logging capability and ability to interface with a PC for data upload.7. Ability to monitor remaining battery life.

A final interesting and desirable, but optional, feature is the ability to generate a true random number sequence based on the time lag between radioactive decay events. Such a feature could be used in a variety of research situations where the pseudo-random number generators available in most computer languages are not adequate. This feature was not actually implemented for lack of time and software features (the evaluation version of the AVR Studio software was used), but could be done very easily in just a few lines of code.

All of these features are relatively simple to incorporate, with minimal additional hardware and development time. Some, however, proved difficult for rather frustrating external reasons, such as the limits to the size of variables and memory access in the evaluation version of the AVR Studio software, and purchasing an LCD with a non-standard interface. These factors, however, are easily overcome with sufficient time and resources.

A block diagram of the Geiger counter is shown in Figure 3. Note that the GM tube, HV power supply, and buffer/amplifier are incorporated into a single unit. Normally it would be necessary to construct analog circuitry for the HV power supply that powers the GM tube. (One intriguing possibility would be to use the Atmel chip’s PWM feature and feedback to drive a charge-pump circuit, generating the HV directly.) By using such a detector, the need to build a high-voltage power supply and interface circuit will be avoided, thus reducing expensive development time.

This unit was purchased from Aware Electronics [6]; other companies manufacture similar products that could be incorporated into a similar design with more support and interface logic [5]. The GM detector is shown in Figure 4. Although other less expensive models were available, this detector was chosen because of its extremely high sensitivity to low-level alpha radiation.

Page 7: Introduction - University of Colorado Colorado Springscwang/ECE4330_F04/Geiger counter Report... · Web viewFinally, the RC circuit is used to drive an analog meter to indicate the

Figure 3: Geiger counter based on an embedded system.

Figure 4: Geiger detector with integral HV supply.

The “pancake” GM tube used in this unit is extremely sensitive and allows measurement of low-level alpha radiation. A stainless steel mesh screen protects the tube from accidental damage, although it and effectively reduces the sensitive area of the tube by about 28%. Of course, this, and the shielding effects of other barriers, can easily be compensated for in the software.

Geiger-Mueller Tube

HV Power Supply

Buffer-Amplifier with CMOS-compatible output

AVR Embedded Processor

LCD Display

Charging CircuitExternal

Power

Audio

Amplifier

Speaker

Battery

Push Buttons and Indicator LEDs

Page 8: Introduction - University of Colorado Colorado Springscwang/ECE4330_F04/Geiger counter Report... · Web viewFinally, the RC circuit is used to drive an analog meter to indicate the

Code

Global variables were used in the code to count the number of pulses, “tics” of the timer, and counts per minute, as well as to store the number to be displayed on the bar graph. Complier directives to include the LCD drivers were included, although the LCD display proved problematic, as will be explained later.

#include <90s8535.h>#include <delay.h>//Alphanumeric LCD Module functions//#asm // .equ __lcd_port=0x18//#endasm//#include <lcd.h>

unsigned long int count=0;unsigned long int tics=0;unsigned long int cpm=0;char bargraph=0;

The AVR chip was configured to count pulses from the Geiger detector directly, using one of the external interrupt lines. A low pulse on this line generates an interrupt; the software simply increments a counter when this occurs. Using interrupts avoids the need for polling and makes for a very fast system.

// External Interrupt 0 service routineinterrupt [EXT_INT0] void ext_int0_isr(void){count=count+1;LEDS(bargraph,1);delay_ms(1);LEDS(bargraph,0);}

The short delay was used only to make the flashing of LED L0 a little more obvious. Further information about this is to be found below. This delay is probably better implemented in hardware in the LED driver circuit, and would certainly be done in hardware if this system were to become a commercial product.

Traditionally, a distinctive clicking sound is associated with the events detected by a Geiger counter. This clicking can easily be implemented in the embedded system Geiger counter by having the AVR processor set and then reset a single bit output when an event is detected. To amplify this sound, an analog amplifier and speaker may be connected to this bit, provided that the input impedance of the amplifier is sufficiently high. To save money and design time, it is not necessary to use a linear amplifier, since only pulses will be fed into it; just about any type of amplifier circuit will work here. This is implemented in the code in shown above where an LED briefly flashes when an even occurs.

The time base used in the system is counter/timer 0; this timer was configured to generate an interrupt on overflow. The interrupt service routine reloads the timer with 3D hex which corresponds to 1/20 of one second. This was the nearest convenient round number which could be found using the slowest clock rate available on Timer 0 of the AVR. Therefore, the number of tics had to be counted (20 per second).

Page 9: Introduction - University of Colorado Colorado Springscwang/ECE4330_F04/Geiger counter Report... · Web viewFinally, the RC circuit is used to drive an analog meter to indicate the

// Timer 0 overflow interrupt service routineinterrupt [TIM0_OVF] void timer0_ovf_isr(void){

TCNT0=0x3D; // Reload the timer itch 3D.tics=tics+1; // Count the tics (20 per sec.)

}

The system was configured to drive a series of LEDs configured as a bar graph display, with LEDs connected to Port C. Implementation of this was straightforward in the following routine:

void LEDS(char bargraph, char L0){ unsigned char x = 0; // Local variable to hold binary.

// Initially all zero. x = (bargraph<<1)+L0; // Shift the bits and add. x = ~x; // One's compliment the result. PORTC = x; // Assign to port.} // End of function.

For trail purposes, LEDs L1 through L7 on the STK500 were used implement the bar graph. LED L0 was used to indicate the detection of an event, and was intended to be connected directly to the input of an audio amplifier. The routine above accepts a char value for the bar graph, and displays the bits of that value.

The main loop of the code is shown below. Because the important events take place in the interrupt service routines, the main loop of the code is mainly for housekeeping and loading the values in the bar graph. The number of counts per minute is sent to the RS-232 port for display, mainly for diagnostic purposes.

LEDS(0,0); // Turn off the LEDs.while (1) // Do forever. { if (tics>=20) // Has a second passed? { cpm=count*4; // Yes. Compute counts per 4 sec.

printf("cpm= %d\r",cpm); // Display.tics=0; // Reset the time counter.count=0; // Reset the event counter.

bargraph=0; // Make the bargraph go blank.if (cpm>=10) // Select the LEDs to light.

bargraph=0; // All 0s.if (cpm>=20)

bargraph=0x01; // 000 0001if (cpm>=30)

bargraph=0x03; // 000 0011if (cpm>=40)

bargraph=0x07; // 000 0111if (cpm>=50)

bargraph=0x0F; // Etc.if (cpm>=60)

bargraph=0x1F;if (cpm>=70)

bargraph=0x3F;if (cpm>=80)

bargraph=0x7F;LEDS(bargraph,0); // Send the number to the bargraph.

Page 10: Introduction - University of Colorado Colorado Springscwang/ECE4330_F04/Geiger counter Report... · Web viewFinally, the RC circuit is used to drive an analog meter to indicate the

} // End “if”. }; // End “while”.} // End of main program.

Normally, we would multiply by 60 to get the counts per minute. However, because fairly low levels of radiation were being measured, the bar graph could not display any meaningful quantity if averaging over a full minute, because of the relative rarity of low-level events. Therefore, the factor was reduced to 4 to and the limits for the bargraph were reduced to make the display more responsive. Obviously this strategy is not appropriate for computing actual units or for data logging.

Other system features proved more difficult to implement. The LCD, for example, proved very problematic. It was found that the LCD (an Optrix model) was manufactured in the early 1990s, before LCD interface protocols became standardized (that is why it was so inexpensive!). It would have been highly desirable, and the author will certainly do so for future projects, to purchase one of the new LCD modules that have an integral RS-232 interface. The greater cost of such units is far outweighed by the rapid development time and simplification of code offered by these units.

The data logging, battery voltage, and PC interface features were not implemented because of the limits inherent in the AVR Studio software. The evaluation version limits the user to just a few array indices; this proved far too great for long-term data collection, where it is desirable to collect data each minute for several days. It is hoped that a larger (Mega-family) processor can be purchased that will provide additional flash memory for this purpose.

It is desirable to display other system parameters, such as battery voltage, elapsed time, and history. Using push buttons, the user can to switch between units of radiation intensity on the display, or display the reading in two different units. However, this was not implemented for lack of features.

Conclusions

Implementing an embedded system-based digital Geiger counter is very straightforward using the features available in the AVR family of processors. In this article, such a system was made using relatively few lines of code in the C language; the resulting product proved effective and practical, although problems were encountered with the LCD display selected for this project.

Additional features can be added to the Geiger counter, and its operation improved, if a full version of the AVR Studio software were available.

Indeed, the author was able to use this Geiger counter to discover several unexpected sources of radiation in his home environment, including his tea mug (approximately double background) and a brand of sea weed he enjoys in soup and vegetable dishes

Page 11: Introduction - University of Colorado Colorado Springscwang/ECE4330_F04/Geiger counter Report... · Web viewFinally, the RC circuit is used to drive an analog meter to indicate the

(approximately 50% above background). The system was tested with the radioactive sample found on the side of the author’s analog Geiger counter, with satisfactory results.

Page 12: Introduction - University of Colorado Colorado Springscwang/ECE4330_F04/Geiger counter Report... · Web viewFinally, the RC circuit is used to drive an analog meter to indicate the

References:

1. Takeuchi, S., Kim, J. and Yamamoto, Y.; Hogue, H., Development of a high-quantum-efficiency single-photon counting system, Applied Physics Letters, 74:8 (1999), p.1063-1065.

2. An excellent Internet resource on common radiation units and their use is http://www.physics.isu.edu/radinf/terms.htm.

3. Scott, B. R., Bobby’s Radiation Glossary for Students, Lovelace Respiratory Research Institute, P.O. Box 5890, Albuquerque, NM 87185 (privately published).

4. This circuit was obtained from http://www.techlib.com/science/geiger.html. This site and associated pages is an excellent starting point for understanding Geiger counter circuitry.

5. See www.medcom.com/exp.htm for an example of an embedded system-based Geiger counter that uses a similar pancake GM tube. This particular model, however, is very expensive at $685.00!

6. Aware Electronics http://www.aw-el.com/index.htm manufactures three excellent radiation detectors, the RM-60, RM-70, and RM-80, all of which use pancake-type Geiger tubes and have integral HV power supplies. The RM-80 was used here.

7. Purchasing and Modifying a Geiger Counter, http://www.pic101.com/geiger. Good background material on Geiger counter circuits.

8. Clift, Russell E., A Bargraph Geiger Counter, may be viewed at http://www.cbtricks.com/~ab7if/bgc/bgc.htm; (2001). The author builds a very good solid-state digital Geiger counter.

9. A Handheld Geiger Counter, http://blondini.orcon.net.nz/counter.html.

10. Seymour, C. J., A Geiger-Muller [sic] Radiation Monitor and Counter, Electronics Today, March, 1987. Also available at http://www.users.dircon.com.uk/~netking/geiger/geiger.htm.

11. Additional plans and ideas for homemade Geiger Counters are available at:http://www.kronjaeger.com/hv/rad/det/geiger

12. http://www.rhunt.f9.co.uk/Electronics/Geiger/Geiger_Page1.htm