ATtiny26 Geiger counter schematic and code

Technical discussions about electronics, sensors, circuit design, and testing.

ATtiny26 Geiger counter schematic and code

Postby Jim Remington » Sun Mar 29, 2009 12:52 pm

This is the Geiger counter project described in the previous post (dealing with the ATtiny26 board and LP2950 regulator).

Most of the circuit was taken from Tom Napier's article in issue #184 of Circuit Cellar (Nov. 2005).

In the HV generator two components are critical: the 1N4937 fast recovery diode (I used NTE552) and the STX13005 transistor (or similar), which has a 700 V collector-emitter breakdown voltage. I got free samples from STMicroelectronics. The inductor should be a high quality wave wound dust core choke. The output voltage is set by the maximum current, which is detected by the 20 ohm resistor in the emitter lead of the STX13005 (lower value=higher voltage). I measured 510 V from my version of the circuit using a 100 Mohm input resistance DVM. This is the recommended voltage and remains approximately constant over the input voltage range of 5-9 V. The LND712 tube will work fine in this circuit, but you should replace the 4.7M anode resistor with 10M. I added an HV shutoff circuit to save power, and redesigned the HV filter circuit and the INT0 input circuit to reduce capacitatively coupled noise from the power supply.

Geiger_sch.gif
Geiger_sch.gif (8.13 KiB) Viewed 23557 times


The rest of the circuit consists of an 8x2 LCD, with DB4-7 attached to PA4-7; RS and E are attached to PB0 and 1. Two pushbuttons are attached to PA1 and PA2 (pullups on). RS232 output is bit-banged and sent to PA0 at 9600 baud. PA0 is connected to RX on an FTDI USB to serial chip on a breakout board, which also powers the entire circuit. I used a 4.194304 MHz crystal, which conveniently divides
to 1 second.

Hope this is useful!
Jim


MAIN PROGRAM

Code: Select all Expand


SUPPORT ROUTINES
Code: Select all Expand
Jim Remington
 
Posts: 586
Joined: Mon Aug 21, 2006 11:32 pm
Location: Eugene,OR

Re: ATtiny26 Geiger counter schematic and code

Postby paul » Sun Mar 29, 2009 4:27 pm

Thanks for posting, Jim! Do you know what frequency is produced by the 555 timer circuit? I am wondering whether the switching could be done by the AVR instead.
User avatar
paul
Pololu Employee
 
Posts: 1490
Joined: Sun Nov 30, 2003 12:06 am
Location: Las Vegas, NV

Re: ATtiny26 Geiger counter schematic and code

Postby Jim Remington » Sun Mar 29, 2009 7:26 pm

Paul:

The 555 oscillates at about 4 kHz, but the important point is that the pulse on time is controlled by the inductor and emitter resistor (which sets the maximum current), which in turn sets the high voltage value. The inductor on time turns out to be about 30 microseconds at Vcc = 9V. The uP could certainly generate such a pulse but the interrupts for the counter and real time clock would complicate the timing or, the pulse generation code could interfere with the basic particle counting.

At the moment, I'm out of memory. However, I'm thinking that the next version might dispense with the pushbuttons and the interactive parameter setup. Instead, it would simply accept commands from a PC over the serial line. That would be much simpler to program and would also free up a lot of space for other functions. I might experiment. On the other hand, the CCFL inverters sold by All Electronics for $6.95 work down to 1.5 V and when powered at 3.6 V, generate about 250VAC at 50 kHz (consuming 15 mA). This is an obvious way to go if you don't mind the extra current draw (see attached)!

I would suggest adding some sort of regulation, such as a 1 Meg resistor in series with a string of Zener diodes, to set the output at the recommended 500 V.

ccfl.gif
ccfl.gif (2.62 KiB) Viewed 23421 times


Cheers, Jim
Jim Remington
 
Posts: 586
Joined: Mon Aug 21, 2006 11:32 pm
Location: Eugene,OR

Re: ATtiny26 Geiger counter schematic and code

Postby paul » Mon Mar 30, 2009 9:11 am

Okay, so you are injecting a constant average current; did you have to adjust that resistor value to match the other components? I'm also curious about whether the 500 V level drops when there are a lot of counts, and what the pulse length is - it looks like the output RC constant is about 10 us? Does that set your dead time, or is the tube a limiting factor?

Anyway, this all looks very fun, and I am definitely going to have to try building my own Geiger counter soon. I would like to try doing it without the 555, using a PWM output and analog feedback to set the output voltage, if possible, and maybe a hardware counter on the AVR for the counting. There are plenty of uses for one of these around the house: checking for radon, measuring the potassium content of bananas, analyzing granite countertops, etc...

-Paul
User avatar
paul
Pololu Employee
 
Posts: 1490
Joined: Sun Nov 30, 2003 12:06 am
Location: Las Vegas, NV

Re: ATtiny26 Geiger counter schematic and code

Postby Jim Remington » Mon Mar 30, 2009 9:43 am

Paul:

These things are indeed fun! Another interesting source of radioactivity is "uranium glass" or "vaseline glass", which is yellow fluorescent due to added uranium and thus weakly radioactive. There are also the famous radioactive orange glazed ceramics that were popular a couple of decades ago. For a very hot source of alpha radiation, you can take apart a smoke detector to get at the polonium emitter. Keep in mind that it is extremely dangerous to inhale or ingest polononium, so everything should be handled while wearing gloves and a good air filter mask.

In the circuits above the HV supply is unregulated, so the output depends on the average current draw by the Geiger tube. For the LND7313 tube, the pulse is about 200 usec long, with a peak current of about 30 uA. At 1000 counts/sec (a pretty hot source), I calculate that this corresponds to an average current draw of 3 uA or a drop of 30V across the 10 Mohm resistor. That is acceptable.

In my vicinity the average background is about 1 count/second, but you should see how that shoots up when you go up over 5,000 feet elevation! Cosmic radiation at 30,000 feet is about 100 times as high as at sea level.

For a PWM HV source example, Nuts & Volts had an article a while ago showing how to make an LED flashlight with a 100 uH inductor and an ATtiny13 running 13 bytes of code:
http://nutsvolts.texterity.com/nutsvolts/200802/?pg=33

It would be easy to adapt this to power a Geiger counter.
Jim
Jim Remington
 
Posts: 586
Joined: Mon Aug 21, 2006 11:32 pm
Location: Eugene,OR

Re: ATtiny26 Geiger counter schematic and code

Postby CorbettROV » Fri Apr 03, 2009 9:34 pm

Hi, sorry this is a little bit off topic, but I was wondering if you could refer me to a program that will write an electrical schematic such as the on you have in your post.

Thanks, Jacy
CorbettROV
 
Posts: 79
Joined: Tue Sep 23, 2008 10:36 am

Re: ATtiny26 Geiger counter schematic and code

Postby Jim Remington » Sun Apr 12, 2009 8:28 am

Sorry about the delayed response!

The schematic was generated using the program Capture from the free PSPICE 9.1 student version. The package can be downloaded from various places on the web. It is a bit cumbersome (parts selection is awkward) but with a little practise, it is OK.

In order to produce images such as that posted, I select the entire schematic within Capture, "copy", then paste into some other drawing program such as Freehand or Powerpoint and finally write out a .gif file.

Jim
Jim Remington
 
Posts: 586
Joined: Mon Aug 21, 2006 11:32 pm
Location: Eugene,OR

Re: ATtiny26 Geiger counter schematic and code

Postby nexisnet » Sun Apr 12, 2009 12:30 pm

If you want something really easy and intuitive to use, I would recommend the free software from ExpressPCB. It's actually two programs, Express PCB for doing circuit board layout, and Express SCH for schematic diagrams. It's sort of the MS Paint of circuit design. For example, I used Express SCH to make these schematics: 1 | 2. It uses a proprietary file format for ordering circuit boards from the company, but I've never actually ordered anything from them (although I have printed out circuit board designs from Express PCB and tried to use them as transfers for etching).

-Adam
User avatar
nexisnet
 
Posts: 1216
Joined: Mon Mar 21, 2005 9:29 pm
Location: Boston, Massachusetts

Re: ATtiny26 Geiger counter schematic and code

Postby SPECTRUM » Fri Apr 22, 2011 6:28 am

Hello to everybody, very nice and clever project.
I have a problem with the AVR code. I can't compile the AVR code with AVR Studio and WINAVR (I'm newbie in AVR programming and I'm sure that I'm doing something wrong). I need the .hex file to burn into the microcontroller.
Any help would be acceptable.

Thank you in advance,

Dimitris
SPECTRUM
 
Posts: 2
Joined: Thu Apr 21, 2011 12:02 am

Re: ATtiny26 Geiger counter schematic and code

Postby detube78 » Thu Oct 24, 2013 1:25 am

Hello,

I have seen on the schematic a choice of 100uH inductor and the setting of frequency and duty cycle of the TLC555.
What is the reason of the choice of the different values of this design?
Can anyone help me to understand?

Thanks a lot!

detube78
detube78
 
Posts: 2
Joined: Thu Oct 24, 2013 1:13 am

Re: ATtiny26 Geiger counter schematic and code

Postby Jim Remington » Thu Oct 24, 2013 3:45 pm

The design for the high voltage circuit was originally done by Tom Napier and published (I think) in Nuts&Volts. There might be a reference in his Circuit Cellar article referred to above.

Basically, you know how much energy can be stored in the inductance, from the current (1/2)Li^2. The maximum inductor current is controlled by the ~22 ohm resistor to ground, which triggers a transistor to switch off the 555 thus controlling the duty cycle.

Then you need to know what the current draw of the Geiger tube will be, assuming some maximum count rate. The average Geiger tube current*500 V gives you the power draw. The switching rate of the 555 is set to produce a bit more than that power draw (energy stored in inductor/time).
Jim Remington
 
Posts: 586
Joined: Mon Aug 21, 2006 11:32 pm
Location: Eugene,OR

Re: ATtiny26 Geiger counter schematic and code

Postby detube78 » Sat Oct 26, 2013 11:28 am

Thanks for the reply!

I would like to use this HV at the semiconductor radiation detector and i would like to set the HV between 0 to 1500Volts from the 4,5V. This is the reason of my question. I need to choose the good frequency with associated duty cycle and inductance. I have found the MOSFET transistor. I think after that using voltage multiplier with capacitance and diode. The current of charge is about 100uA.
detube78
 
Posts: 2
Joined: Thu Oct 24, 2013 1:13 am

Re: ATtiny26 Geiger counter schematic and code

Postby lojius » Thu May 01, 2014 8:58 pm

Hi..Guys.

I want to build a handheld spectroscopy instruments using semiconductor CZT detector. The detector will be biased with negative HV ~ 500V and signal will be extracted from the cathode.

There are many references on positive HV design but how about negative HV? Can this circuit be modified to produce a negative HV?

Thanks
lojius
 
Posts: 1
Joined: Thu May 01, 2014 8:31 pm

Re: ATtiny26 Geiger counter schematic and code

Postby Jim Remington » Sat May 03, 2014 8:37 am

To make a negative HV supply, just reverse the diodes in the circuit below. Also, most HV modules that can be salvaged from flash cameras have negative outputs.

The circuit that I showed in the original post for the Geiger counter supply cannot easily be modified for negative output.
ccfl.gif
Simple HV power supply
ccfl.gif (2.62 KiB) Viewed 2019 times
Jim Remington
 
Posts: 586
Joined: Mon Aug 21, 2006 11:32 pm
Location: Eugene,OR


Return to Electronics

Who is online

Users browsing this forum: No registered users and 5 guests