Announcement

Collapse
No announcement yet.

Using timers instead of ADC to measure tx signal length

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using timers instead of ADC to measure tx signal length

    I don't know if this forum is the proper forum to ask this question, but I will ask anyway and hope someone will answer.

    I have been able to use timers at a rising edge to measure the frequency of square waves with a resolution of 5 uS.

    Why do most designs insist on using ADC when a simple 16bit timer will suffice.

    Op amps can always amplify the signal.

    BTW, I'm asking in reference to pi tech.

  • #2
    You mean as in this application notes?:

    http://ww1.microchip.com/downloads/e...tes/00592d.pdf

    Or in this project:

    http://www.best-microcontroller-proj...r-circuit.html

    Comment


    • #3
      project feasibility is not the issue. if you do a google search for "tachometer <insert favorite uC here > project" you will find several free projects, not really necessary to purchase code.

      I'm more interested in the reasoning behind ADC.

      Comment


      • #4
        There are PI projects using timers instead of ADC, even on this forum.
        Using timers instead of ADC will usually require comparator stage in front of it. And, what you are doing then is actually making some sort of ADC using comparator and timer. Why, if you already have one on board? Questions about "resolution" of such ADC vs. onboard one will decide. Plus, internal ADC is usually equipped whit sample&hold ckt. and can be timed to take more samples at different parts of waveform for more detailed analysis etc.

        Comment


        • #5
          How do you use an ADCto measure frequncy or time?

          Comment


          • #6
            ADC is not intended to measure frequeny, timers do, but to mesure time (interval) some sort of start-stop command must exist, usually analog one, comparators etc, and then you make effective time-to-digital information conversion, sort of ADC again.High resolution counter, sort of.

            Comment


            • #7
              Newbie's Guide to Timers



              I never really understood why people would use built-in ADC anyway, regardless of processor used (even the ARM processors have mediocre ADC implementation IMHO).

              Unless you use devoted ADC hardware you are not likely to have the resolution nor speed. With decent encoders costing $5-$10, why compromise your project?

              Back to the topic, I now see the advantages of using ADC over devoted timers, thanks Tepco.

              Comment


              • #8
                even 24 bit converters use 1 bit adcs and oversampling

                http://www.microchip.com/stellent/id...pnote=en533730

                Comment


                • #9
                  But Mario was talking about square waves. They have only two levels of amplitude and you don't have to measure them. Why not just use an interrupt on the micro as the waveform rises to measure the timer, and another when it falls. Then subtract to get the time period?

                  Comment


                  • #10
                    Few days ago I was looking for the simplest PI....
                    have a look at this:
                    http://www.miymd.com/index.php/projects/tpimd/

                    Comment


                    • #11
                      Originally posted by Stefano View Post
                      Few days ago I was looking for the simplest PI....
                      have a look at this:
                      http://www.miymd.com/index.php/projects/tpimd/
                      ...The theory behind the receiver is that we use an analog comparator with a reference voltage of several millivolts, when the flyback starts the comparator's output goes high, when it decays below the comparator's reference voltage it goes low again....
                      But that's usuing the comparitor in the micro to detect the rise and fall of the waveform. It is not using the ADC.

                      Comment


                      • #12
                        Yes, right. Maybe I misunderstood the first question.
                        Why do most designs insist on using ADC when a simple 16bit timer will suffice?
                        My post was just to show that someone else is using counters instead of ADC...

                        Comment


                        • #13
                          Originally posted by pebe View Post
                          But Mario was talking about square waves. They have only two levels of amplitude and you don't have to measure them. Why not just use an interrupt on the micro as the waveform rises to measure the timer, and another when it falls. Then subtract to get the time period?
                          Hi pebe,

                          I had thought using timers in your described method would have been the most common approach.

                          However, most designs seem to use ADC. I would imagine the reasons Tepco mentions make ADC more useful.

                          Comment


                          • #14
                            Originally posted by mario View Post
                            Hi pebe,

                            ....However, most designs seem to use ADC. I would imagine the reasons Tepco mentions make ADC more useful.
                            Maybe, but an ADC intrinsically measures voltage. So I still don't understand how anyone uses an ADC to measure time!

                            Comment


                            • #15
                              <P>ADC is used to measure voltages at different parts of decay slope, not TIME.</P>

                              Comment

                              Working...