Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC 16f887 ADC for geiger counter PROBLEM

Status
Not open for further replies.

kanai42

Newbie level 6
Joined
Apr 18, 2013
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,353
PIC 16f887 ADC for geiger RADIATION counter PROBLEM

Hey guys I have been working on a project that involve a geiger counter with a PIC MCU but for now I have completed all the work except in reading radiation from the geiger counter.
MY PROBLEM IS IN THE CALCULATION OF RADIATION FROM GEIGER FROM ADC TO CPS, mS/h, e.t.c

Please I have been searching for these for two weeks now...
 
Last edited:

Geiger tubes produce pulses as ionized trails cause the gas inside them to become conductive. There is little point in using an ADC because all the pulses will be the same amplitude. What you need to do is count how many pulses there are per second. There are several ways to do that, you can use TMR0 or TMR1 with pulses applied as an external clock, use the IOC facility.

Brian.
 

Dear kanai42,

To be honest I never use Geiger radiation counter, but this doesn't matter, principal of analog signals is same...
If counter gives you analog signal you can use ADC on mcu to read this signal, and then you usually use linear equation to convert 0-1023 (0-5VDC analog input) to some 0 - XXX mS/h.

You have to find in documentation of counter what analog signal of counter corresponds to what mS/h (this is essential for linear equation)

equationin two points is:
y - y1 = ((y2 - y1)*(x - x1))/(x2 - x1)

For more see:
https://en.wikipedia.org/wiki/Linear_equation


Best regards,

Mr.Cube
 

Geiger tubes produce pulses as ionized trails cause the gas inside them to become conductive. There is little point in using an ADC because all the pulses will be the same amplitude. What you need to do is count how many pulses there are per second. There are several ways to do that, you can use TMR0 or TMR1 with pulses applied as an external clock, use the IOC facility.

Brian.

Thanks for your quick response. that is exactly what I want to do. So please can you give me an example especially in mikroC and I am using PIC16F887.
 

I gave up on MikroC a while ago but I can tell you the basic principle:

Connect the pulse circuit to T0CKI.
1. Set up TMR1 to generate an interrupt once per second.
2. Set up TMR0 to count pulses on T0CKI
3. At each TMR1 interrupt, read the value in TMR0, this is your pulses per second measurement.
4. Re-load TMR1 for the next one second period.
5. Clear TMR0 so it starts from zero again.

You might have to stretch the geiger pulses using an external timer. The pulses from the tube are extremely short and the PIC may not respond to them. You need a high impedance, high voltage to VDD conversion circuit anyway so you can easily incorporate it in the same hardware.

Brian.
 
I have gone through your tachometer example in the thread you pointed but I can't seem to figure out how to do mine can you be so kind to make an example for me for this PIC(16F887). and some instruction on what is what. I am an intermediate mikroc programmer so I guess I'll catch you quickly.
Thanks in advance.
 

I gave up on MikroC a while ago but I can tell you the basic principle:

Connect the pulse circuit to T0CKI.
1. Set up TMR1 to generate an interrupt once per second.
2. Set up TMR0 to count pulses on T0CKI
3. At each TMR1 interrupt, read the value in TMR0, this is your pulses per second measurement.
4. Re-load TMR1 for the next one second period.
5. Clear TMR0 so it starts from zero again.

You might have to stretch the geiger pulses using an external timer. The pulses from the tube are extremely short and the PIC may not respond to them. You need a high impedance, high voltage to VDD conversion circuit anyway so you can easily incorporate it in the same hardware.

Brian.

I got your point sir. I have stretched my pulses already, simply everything is fine with ma circuit the problem comes in reading the pulses. but I can't seem to get the idea especially in codes if you can elaborate more it'll be much appreciated. In any kind of coding language I will get something just write some even if it's algorithm like.
 
Last edited:

I will post a code for your PIC in a day or two.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top