Arduino best way to count and upload CPM?
- DonZalmrol
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 40
- Thank you received: 6
3 years 8 months ago #5682
by DonZalmrol
Arduino best way to count and upload CPM? was created by DonZalmrol
So, I'm upgrading and updating my station and I'm trying to figure out the best way to upload my total CPM as the SI-22G are very sensitive.
e.g. SMB-20 counts +- 21 CPM for my location, while the SI-22G counts 83 CPM
Tube minimize the error rates, I now have two SI-22G tubes that are connected respectively to INT0 and INT1 on my Arduino.
The CPM math is being handled with an Arduino Moving Average Library and does the following:
Then I do this for tube 1 and 2 and then recalculate it for a global moving average to got the actual CPM between two tubes.
Is my approach good or am I overthinking it and should I then simple it down?
I'll try to provide a link with my ino file for those who are interested.
Thanks!
e.g. SMB-20 counts +- 21 CPM for my location, while the SI-22G counts 83 CPM
Tube minimize the error rates, I now have two SI-22G tubes that are connected respectively to INT0 and INT1 on my Arduino.
The CPM math is being handled with an Arduino Moving Average Library and does the following:
- Tube 1 counts per seconds go into an movingAverage array 1 that is 60 large (e.g counts 0-94 -> AVG = 45)
- Tube 2 counts per seconds go into an movingAverage array 2 that is also 60 large (e.g. counts 0-87 -> AVG = 45)
- movingAverage array 3 is 120 large and Tube 1 and 2 their CPS is added there to calculate the moving average -> 20 CPM
Then I do this for tube 1 and 2 and then recalculate it for a global moving average to got the actual CPM between two tubes.
Is my approach good or am I overthinking it and should I then simple it down?
I'll try to provide a link with my ino file for those who are interested.
Thanks!
Please Log in or Create an account to join the conversation.
3 years 8 months ago - 3 years 8 months ago #5686
by mw0uzo
Replied by mw0uzo on topic Arduino best way to count and upload CPM?
Looks good to me!
I remember converting CPM readings with varying sample intervals to a steady 30s interval in radlog took a bit of fiddling and checking to get right.
Yes the project files would be useful for sure - try uploading them. If there is a problem let me know and I can change settings so that it works. e.g. file size or type.
I remember converting CPM readings with varying sample intervals to a steady 30s interval in radlog took a bit of fiddling and checking to get right.
Yes the project files would be useful for sure - try uploading them. If there is a problem let me know and I can change settings so that it works. e.g. file size or type.
Last edit: 3 years 8 months ago by mw0uzo.
Please Log in or Create an account to join the conversation.
- DonZalmrol
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 40
- Thank you received: 6
3 years 8 months ago #5688
by DonZalmrol
Replied by DonZalmrol on topic Arduino best way to count and upload CPM?
I think I got it, the current uploads looks similar to the background radiation of Radu from pocketmagic for his SI-22G tube.
My code: https://pastebin.com/M97sNxNX
Might needs some fine tuning.
My code: https://pastebin.com/M97sNxNX
Might needs some fine tuning.
Please Log in or Create an account to join the conversation.
Moderators: Gamma-Man
Time to create page: 0.137 seconds