Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Jim Granville
02/23/13 15:51
Read: 903 times

#189451 - First, check number sizes and precisions
Responding to: Daniel Jenkins's previous message
Daniel Jenkins said:
Winners are usually within 0.02 second or less...

Some numbers :
a) Your winner spec of .02s/1800 = 11.11 parts per million (!)

b) 90*16124 = 1451160 ( appx 21 bits )

That figure in a) is already pushing Crystal specs, and you are into TCXO (or better) regions. Look for something like FOX924B or better

1-3ppm is affordable (sub $10), and fractions of ppm, are available.
eg Digikey shows 100ppb for $23.70

- but I'd check just how good the master clock really is, and getting a course distance to 11ppm, is also a serious challenge.

Traction creep, tyre wear, tyre pressure, and even lines taken thru bends, will all change your expected 1451160 pulses.

Can you do any way-point checks ?
How straight and predictable is the final part of the course ?

b) means you will need 32 bit maths, but you are best to run that at your ~10 times a second, not the 806+ pps pulse rate.
That means you would capture a Hardware counter, every ~100ms, and add that to your 32 bit running total. (you add an average of 80.6 each time)

The counter needs to be configured for External Clock, and Hardware Capture, and in the SiLabs parts, that means use the PCA, Clock via ECI, and HW capture via CEXn, [Capture triggered by transition on CEXn], and the 100ms loop, would toggle the CEXn you chose, to perform the capture.

There is no capture-and-clear in HW, so each capture needs to subtract the previous one, to give the new pulses in that 100ms window.

List of 19 messages in thread
Looking for direction - racing application      Daniel Jenkins      02/22/13 23:46      
   step by step      Erik Malund      02/23/13 06:29      
      First step...      Daniel Jenkins      02/23/13 11:20      
         well, you are new      Erik Malund      02/23/13 13:08      
         First, check number sizes and precisions       Jim Granville      02/23/13 15:51      
            Good catch on the clock accuracy.      Daniel Jenkins      02/24/13 01:10      
               Judging      J. Guy      02/25/13 11:17      
                  Judging      Daniel Jenkins      02/26/13 12:25      
                     Rethink your solution      J. Guy      02/27/13 11:04      
                        Not sure we're seeing eye to eye...      Daniel Jenkins      02/27/13 20:16      
                     think precision       Jim Granville      02/27/13 13:44      
                        Increasing accuarcy      Daniel Jenkins      02/27/13 20:28      
                           Precision still matters.      Jim Granville      02/28/13 02:17      
            Precision distance!      Oliver Sedlacek      02/28/13 05:09      
               Rulebook on timing      Daniel Jenkins      02/28/13 11:37      
                  They have a serious system      Jim Granville      02/28/13 13:09      
   very imprecise      Erik Malund      02/28/13 13:37      
      re:      Jacob Boyce      02/28/13 14:52      
         re: speed      Daniel Jenkins      02/28/13 16:45      

Back to Subject List