Using Arduino As a Counter

Dear Arduino experts,

As an absolute beginner with little to no experience, I am currently working on a project that I would like to incorporate an Arduino as a counter.

My project is to try to use Arduino to take pulse signal (ranging from a specified voltage to eliminate lower level noise all the way up to 5 V) from a detector with a counting rate to be expected around 300 counts per minute, convert this pulse signal into counts per minute (with timestamp) then store the information on an SD card. The platform I am using now is Arduino Uno R3. I have yet to find good information on what I am trying to achieve so I have no idea how should I do this thing. It involves a lot of functions so I will try to organize them a little bit.

  1. Employ a effective and sufficient ADC to convert the signal;
  2. Set up an adjustable lower level discriminator to throw out noise;
  3. Bundle up the information into counts per minute with timestamp;
  4. Write the information above into a SD card.

Few extra questions I have after some reading.

  1. Do I need to use a faster ADC other than the built-in one judging from my count rate?
  2. Since I do not care about the amplitude of the pulses as long as they are over a certain threshold, maybe there is an easier way to do what I want? Some sort of gate thing?

Feel free to throw in anything related that you think would be helpful (equipment, things to read, etc.), I am trying to learn the stuff.

Thanks in advance.

Martin

An oscilloscope trace showing the signal you are working with would be worth much more than a thousand words.
Paul

Failing Pauls suggestion then a good description of what is making those pulses may be also useful.
eg. a schematic, link to the device / circuit. etc.

You could probably make use of the 328P's analog comparator. Put a stable reference voltage on pin A1 and your pulse on A0. When A0 exceeds A1 the ACO bit in the ACSR register is set. You could poll for an SCO state change or configure the hardware to generate an interrupt and use a simple ISR to do your counting.

You say you need to show pulses per minute; do you need a realtime clock to give minutes count or is the internal timing of the CPU sufficient?

How often do you want to write to the SD card? Once a minute? Once per event?

Why UNO? might as well get some board with SD card slot like MKR ZERO, cheaper and more power, it also has real time clock

@Paul_KD7HB @Ballscrewbob
Thank you for your advice, this is the I get out of the preamp, which uses the typical setup of a Cremat CR-110 R2.1.

After the shaping amp (Cremat CR-200-1us R2.1), it would turn into something like this and this is what I'm trying to analyze using Arduino.

The signal is generated in a typical gas filled proportional counter.

Thank you for your advice and explanation of the logic on how it works.

Realtime clock is preferred and I do not have any preference on how fast it writes to the SD card.

Thank you for pitching in. I mentioned UNO only because I have a spare one lying around, I'd certainly look into MKR ZERO. I am just gathering information and trying to learn everything about it at this point.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.