Summary of Arduino-based event counter
This project describes a self-contained Arduino-based event counter designed for long-term measurement of radioactive decay or cosmic ray counts. Using an Arduino Pro Mini paired with a DS3231 real-time clock, it counts digital pulses via interrupt and logs hourly event counts to an SD card with timestamping. The device includes a power-failure safeguard that saves data immediately upon outage and resumes counting automatically after power returns. It can handle up to 10,000 counts per second and features an LCD display, count control switch, and signal conditioning op-amp for 3.3V compatibility.
Parts used in the Arduino-based event counter project:
- Arduino Pro Mini 328, 3.3V/8MHz
- DS3231 real-time clock module
- SD card module
- Large capacitor (for power-failure buffering)
- Zener diode (for voltage regulation during power failure)
- ALD1701 operational amplifier (for signal level shifting)
- LCD display (for time, count, and error messages)
- Battery backup for RTC chip
- Count/don't-count toggle switch
- Supporting passive components (resistors, capacitors, etc.)
- PCB with larger pads and vias (for 2-sided toner-transfer manufacturing)
I teach Modern Physics here at CSUC, and we occasionally use isotopes with half-lives of a year or less (such as Zinc-65 and Cadmium-109) for energy-calibration sources for a gamma-spectroscopy lab. I thought it might be fun to try measuring the activity of one of these sources over time and thus get a looooong-scale half-life data-set for students to play around with. Or maybe watch background nuclear count rates as a function of time for a couple months and see if we can locate the sun and/or galactic center from the cosmic ray count rate as a function of time and/or season.
I didn’t want to dedicate an entire computer and LabVIEW seat to the project, and besides I haven’t yet seen a six-month period here during which our power didn’t go off at least once. I figured it’d be nice to have a cheap self-contained module that did nothing else but count and log the counts. Here’s what I came up with:
The control unit is an Arduino Pro Mini, 328/3.3V/8MHz. It talks to a DS3231 real-time clock to get time-stamp information, and counts nuclear events (or any other digital signals) using an interrupt. Every hour (or so) it saves the event count to the SD card, with time-stamp information at the beginning and end of the interval, and starts another interval. The board has a large capacitor and a zener diode so that if the power fails the Arduino immediately saves the current count (with time-stamp) and writes a warning in the file to let the user know what happened. When power resumes, so does the counting — on the next line in the file with a new time-stamp, of course. When you’re ready to stop collecting data, flip the switch and pull the SD card: everything is saved in ASCII format on the file “DATA.TXT”
It can comfortably count events at up to 10ks/s. Possibly more, but I’ve not tested it past that rate as that’s two orders of magnitude faster than what I need. There is also a count/don’t-count switch, a battery backup on the RTC chip, an ALD1701 op-amp follower making sure that the input pulses are 3.3V-safe by the time they reach the Arduino, and of course an LCD that provides helpful information such as the time/date, count, and occasionally an error message.
A complete parts-list, EagleCAD schematic and board layout, and Arduino programs are available here, should you want to make your own. I use the DS3231 library I wrote earlier, so you’ll need to either grab that or modify my code to use your own clock routines if you’d prefer. The board layout I put together has larger-than-necessary pads —particularly on the vias— to facilitate 2-sided board production if you’re using the toner-transfer method.
For more detail: Arduino-based event counter