4
\$\begingroup\$

I need to calculate the elapsed time between the rising edge of one pulse to the rising edge of the next pulse. This needs to be in a mobile environment, but I am not attached to any solution as long as its mobile. I have 3 questions:

  1. What is the best way of calculating this time? I have thought about using PICs capture module, is there anything better out there?
  2. How do I determine the fastest delta between rising edges that I can measure?
  3. How do I determine the resolution (ie. 1 second compared to 1.0001 seconds between edges) that can be obtained, is it related to point 2?
\$\endgroup\$
5
\$\begingroup\$

Well, I'll take a stab at your questions...

  1. The best way of measuring the time between edges greatly depends on what accuracy and overall elapsed time you need. For example, if the edges can be 2 to 4 hours apart with an accuracy of 10 seconds then you might use just about any simple microcontroller. If the edges are milliseconds apart then a more advanced microcontroller would work-- maybe something like the PIC with some sort of capture module. If you're talking <1 ms then maybe a carefully selected micro could work, or an FPGA. <100 ns and you're talking FPGA or some very dedicated circuits.

  2. Very related to #3, below. Normally, but not always, the fastest delta will be whatever is required to get you past your basic accuracy. Typically 1 clock period. Note: some measurement methods will have a larger "minimum delta" than others.

  3. Typically (but not always) your logic will run off of some sort of clock. The frequency of that clock will determine the accuracy delta. With a typical microcontroller it would be in the 1 to 50 MHz range. With an FPGA it could be up around 2.5 GHz if you did something fancy with the built-in SERDES's. Without thinking too hard about it, your accuracy is going to be about +/- 1 clock periods. But this could change depending on exactly how you do the measurement.

There are lots of other things to consider, however. What I wrote above assumes that you have a simple digital signals without noise or anything else. But if this is hooked up to some sort of sensor system (Radar, Sonar, Lidar, etc.) then the sensors you're using could greatly impact the minimum delta, accuracy, and measurement method.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.