Geiger CPM Calculation Method?

I have a sparkfun geiger counter and am in the process of writing some code to be able to calculate counts per minute.

I plan on using a graphic LCD so I don’t think I’ll have the memory available to do a rolling buffer/array. (and I’m not sure I can handle doing that in C anyways, I got lazy/spoiled by high level languages)

How should I calculate it? I know I could take counts for a whole minute, then update the screen, but updating the value once a minute seems very inefficient to me. I suppose I could take a count every five seconds, scale it up by 12x, and do a pseudo-rolling-average (average * 0.9 + current * 0.1)?

There are a million ways I could do it but I figured I would check with the experts before I did my own thing.

Also, I should mention the v13 firmware doesn’t do me any good because I’m using a separate arduino to read the events via serial. (I just check available(), so if a byte is available, i know there was an event)

Thanks!

I don’t know that there’s a “best” way to do this. A lot depends on how responsive you want the display to be. If you were measuring an audio level, there would be times you would want the display to react quickly (so as to see some measure of the transisents) and other times when you want to to react slowly (so as to get a good average reading). If you have a graphical display you can do what a lot of DVMs do, display a well averaged numeric number and a fast reacting bar graph. The best of both worlds ! Or make the filtering switchable. Or not.

How often does the Geiger spit out a reading ? How often do you want to see a change ?

Just for reference, what does the system look like (block diagram-wise) ? The Geiger has an MCU, which I assume spits out a reading every N secs. That reading being a count of the hits it had in the prior N secs. You then have another Arduino reading this serial output and then doing something with it (the averaging/filtering and display updates ?).

I have an Arduino Uno reading the serial output from the sparkfun geiger board. I check to see if there’s a byte to read, and if there is, I read it and add to the counter variable. I have a graphic OLED screen that I display the info on. I was updating the display every loop, but that was slowing down the count so I have it update the display once a second. At the moment, I have it get a timestamp (micros()), then take counts until a full second has gone by, then take the number times 60 to get CPM. I have yet to implement any type of filtering or averaging algorithms.

I also wrote a really streamlined version of the code (no display, just bare minimum) to do a “benchmark” of the counter board. I have certified 10,000 CPM uranium ore and the highest I can get the board to count is 1200 CPM. A little disappointing considering I was told it would be around 40 CPS, which would be 2400 CPM, but I only get about half that.

So I starting thinking that maybe the Serial reading is slowing things down, so I’m going to rewrite it to read from the buffer once a second (instead of continuously like it is now). Using a second microcontroller (instead of reprogramming the onboard one) was in an attempt to keep it running quickly.