Close

CPM calculation

A project log for Geiger counter

Radiation measurement device w/ Raspberry Pi Pico and STS-5 tube

florian-wilhelm-dirnbergerFlorian Wilhelm Dirnberger 04/18/2023 at 10:250 Comments

As for any purely statistical information (such as radioactivity) the question is what to do with cumulated data and in which manner present it to the user (on a display or other devices).

A straightforward way would be composing an arithmetic mean of extrapolated CPM values over a fixed time frame. For instance: 2s measurement, extrapolation, then take 5 extrapolated values and generate a mean value. 

The most recent value replaces the oldest value (FIFO), what is basically a ringbuffer principle.

for (int i=0; i < ringbuffer_elements; i++)
     {          
          sum += ringbuffer[i]; 
     }
mean = sum/ringbuffer_elements; 

Discussions