2
\$\begingroup\$

In the question: Very accurate time measurement, Rocketmagnet show a circuit that is exactly what I need for a cub scout pinewood derby race track timer. I want to be able to dedicate a timer to each event and get accurate times for each event to +/- 100 ns.

I have not designed, built or programmed any real time control circuits / computer systems in 15 years and need a set of suggestions on where to start, what tools I need and preferably a suggestion for an eval board that I can use to start with. I can learn the newer RT programming compilers, debuggers and tools and implement any sensor circuits but need a starting point to pick the correct MCU.

Any help in getting started is appreciated.

\$\endgroup\$
5
  • \$\begingroup\$ You want an MCU that can latch the current timer value upon pin change. ATtiny2313 supports that with Input Capture. The program/interrupt latency no longer matters as it reads the latched value. I use it for timing at 50ns resolution (20MHz system clock). \$\endgroup\$
    – jippie
    Commented Jul 12, 2013 at 20:21
  • \$\begingroup\$ The pic 12f617 would almost work. It has a timer gate on a 16 bit timer. It clocks up to 20MHz for 5 MIPS, which would give you 200 nsec resolution. That said, it's 8 pins, cost less than a buck in quants of 10, and is available in DIP if you need it. \$\endgroup\$ Commented Jul 12, 2013 at 21:26
  • 1
    \$\begingroup\$ A race track timer with 100ns resolution? \$\endgroup\$
    – Andy aka
    Commented Jul 12, 2013 at 21:31
  • \$\begingroup\$ Yes 100ns resolution. This would allow for rounding to .001 seconds and make sure that the numbers were beyond doubt (you would be surprised how excited 2 parents get when the time shows the same for 2 cars but one is declared the winner). I have a track for testing and can put in place all the electronics and a dedicated PC to do the math and formatting from the timer information. \$\endgroup\$
    – sbardash
    Commented Jul 12, 2013 at 22:16
  • 1
    \$\begingroup\$ 100 ns is very small. Don't you mean 100 us (which would be enough for your need)? \$\endgroup\$
    – Renan
    Commented Jul 12, 2013 at 23:59

1 Answer 1

1
\$\begingroup\$

My suggestion on where to start is by understanding time and the fractions that time is usually broken down into. Your answer to my comment about the real need for 100ns resolution is this: -

Yes 100ns resolution. This would allow for rounding to .001 seconds and make sure that the numbers were beyond doubt (you would be surprised how excited 2 parents get when the time shows the same for 2 cars but one is declared the winner). I have a track for testing and can put in place all the electronics and a dedicated PC to do the math and formatting from the timer information

  • 1 whole second is 1000 milliseconds
  • 1 millisecond is 1000 microseconds
  • 1 microsecond is 1000 nano seconds

100ns is 0.0000001 seconds - you want 100 micro second resolution and may I also suggest you buy a modern calculator.

\$\endgroup\$
7
  • \$\begingroup\$ You are absolutely right. My mistake. I am looking for accuracy to 1 microsecond for 6 timers simultaneously. I'm so used to dealing in nanoseconds I missed my mark by ten to the third. So far, I am just looking for some help in picking the correct PSoC from Cypress that will let me implement the circuit the Rocketmagnet has shown in the mentioned article. Again, my apologies for my bad math. \$\endgroup\$
    – sbardash
    Commented Jul 13, 2013 at 14:35
  • \$\begingroup\$ if you are looking to round to 0.001 seconds (1 millisecond) then you need a resolution no "tighter" than one-tenth of this i.e. 100 microseconds and not 1 microsecond. Don't make things hard for yourself sbardash \$\endgroup\$
    – Andy aka
    Commented Jul 13, 2013 at 14:39
  • \$\begingroup\$ In the previous answer I ment to type 100 microseconds not 1 microsecond. \$\endgroup\$
    – sbardash
    Commented Jul 13, 2013 at 14:40
  • 1
    \$\begingroup\$ @sbardash Ah those pesky decimal places LOL. Anything else in the question you need help on? \$\endgroup\$
    – Andy aka
    Commented Jul 13, 2013 at 14:43
  • \$\begingroup\$ A few tips for picking a PSoC are listed at "Which PSoC to use" at Wikibooks. \$\endgroup\$
    – davidcary
    Commented Jul 13, 2013 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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