Arduino Geiger Counter
This is what a typical pulse looks like taken at the LED connector of the Geiger counter board:
Only the first square is an actual pulse, the following peaks are artefacts caused by the oscillator for the high voltage power supply for the Geiger tube. Since counting on the Arduino is done by triggering interrupts, the peaks cause a problem since a number of them cause additional interrupts. When the optocoupler is the only electronics component between the Geiger counter board and the Arduino, there are about 8-10 interrupts per real counts.
Even with a 10uF capacitor between pin 3 and 4 of the optocoupler
there are several peaks, resulting in several unwanted interrupts.
A 4.7uF capacitor has a shorter decay time, of course, but artificial counts still do occur.
It seems like double counts occur when the particle pulse arrives at a time that is shortly before a spike from the power supply, thus causing the small spike on the capacitor decay curve to be at a level of more than half the 5 Volts, thus triggering an interrupt. When the spike occurs at a time when the voltage has already dropped to below two Volts, then an interrupt is not triggered because the condition of a transition from "LOW" to "HIGH" is not met. (I use the "RISING" option to trigger an interrupt).
Although there are not many incidents of double counts with the 4.7uF capacitor, it would be nice to have a design that counts only actual radioactive events.
So I choose a combination of hardware and software to solve the problem: A capacitor suppresses the artificial counts at the end of a sequence, and a timeout in the interrupt routine suppresses the artificial counts at the beginning of a sequence.
On the circuit with the 4.7 uF capacitor, the voltage on the Arduino drops to 1 Volt after 5ms.
So if I suppress all counts for 5 ms after an initial interrupt, there should be no more artificial counts.
With a dead time of 5ms per count, the system is capable of counting up to 12,000 cpm (counts per minute) which is far beyond unhealthy radiation, so this design seems to be a feasible solution.