View Single Post
  #1   Spotlight this post!  
Unread 24-01-2013, 13:18
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,368
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Disc Lauching Velocity

Quote:
Originally Posted by Ether View Post
I've never used an Arduino so I'm curious: Does anyone know what is the interrupt latency (the elapsed time from the occurrence of an interrupting event until all the context switching has completed and the user-written code in that event's ISR starts to execute)


From the sources I have been able to find, the latency for interrupts on the Arduino is around 18-20 clock cycles. On an Amtel atmega168/328 running at 16MHz, that translates to 1.25us. Considering the resolution of the "micros" command is 4us, the worst case error using two interrupts to calculate the velocity is 11us.

Now, we are currently measuring Frisbee velocity over a 1 foot span and seeing maximum velocities in the 40ft/sec range. 40ft/sec is a measurement of approx 25,000us. Therefore, an error of 11us only yields a velocity error of .044%. In the FRC world, that is negligible.

I also have to believe that much of the latency in the interrupts is negated by the way we are triggering them. The majority of the error is introduced by the "micros" command resolution of 4us. In this case, the max error is in the neighborhood of 8us or .032%. Again, close enough for FRC.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote