Fast Counter Design

Discussion in 'The Projects Forum' started by hami1101, Jan 30, 2012.

  1. hami1101

    Thread Starter New Member

    Sep 12, 2011
    Hello Everyone

    I have a question regarding counter design, actually I have analog signal which has a positive and negative peaks of only 10 micro second duration. I wanted to detect those positive peaks only using arduino microcontroller and then displaying the detected peak values as well but since the adc of arduino is slow and takes about 100 micro second to read an analog input so its not possible by using adc of arduino and I am now required to use some fast counter which can count these positive peaks and then the arduino can be used to display the number of counts.

    I hope I have explained my work in a good way and look forward to get support on this :)

    Thanks in advance to everyone
  2. MrChips


    Oct 2, 2009
    10us for positive and negative pulses give an input frequency of 50KHz. Most MCUs can count way over this.
  3. hami1101

    Thread Starter New Member

    Sep 12, 2011
    But I need to use Arduino and its adc take about 100 micro seconds to read the analog signal so which means that most of the peaks will go missing in this case so thats why I am trying that may be I could use a fast external counter before Arduino?
  4. John P

    AAC Fanatic!

    Oct 14, 2008
    As a frequency, your signal doesn't seem very challenging. Are you saying that it's a variable amplitude, and you therefore think you have to read it through an A/D converter? Or is it some other characteristic of the signal that's important?

    If you're just interested in the frequency, you'd do better to look for some way to convert it into a digital signal first, then count the pulses.
  5. hgmjr


    Jan 28, 2005
    What I suggest you do is write a program to benchmark the interrupt latency of the arduino. You can define a memory location and then create an interrupt service routine in which you increment the memory location. Once a second you can read the value from the memory location zero it and then print the value read.

  6. Georacer


    Nov 25, 2009
    He said that he wants to count the positive peaks and measure their amplitude. If the restriction of the 100us for the ADC is valid, then the second part will be a problem.

    Could he by any chance have the power to charge a capacitor with those pulses?
  7. crutschow


    Mar 14, 2008
    A sample & hold circuit, such as the DS1843, would work to hold the signal long enough to do the A/D conversion.
  8. PaulEE


    Dec 23, 2011
    Do you need the height and width of the peaks, or just one or the other? How accurately and with what resolution do you need to know the peak height? Width?

    An even better thing to do would be to explain why you're doing this...we can probably all tell you a more straightforward way....maybe...