Fun with Electronics and Code

Just another WordPress.com site

Tag Archives: Grand Prix

Arduino vs Netduino

So I have had a few questions about if the Grand Prix / Pinewood derby track timer design or code would work on a Arduino. Well the short answer is no. Now that does not mean you can’t build a track timer with an arduino (I looked at them when initially consider the design) but there are a few reasons why (in my opinion) the Netduino is better in this situation. The most important is how the interrupt triggering works vs polling that you do on arduino.

If you want to know the “exact” time a car took to travel down a lane the resolution of that time is dependent on how small you can make the loop and that resolution can change if something else occurs on the arduino.

With the Netduino however you can set up hardware level interrupts on each of the input pins and those events have a timestamp from the hardware layer. Now it take considerable longer to process the events in the netduino but since you have that timestamp it is very easy to calculate the time elapsed. This allowed me to get to x.xxxx seconds vs x.xxx to x.xx seconds with the arduino.

Now some may ask if that is necessary and in response I will just give this example. In our first race after building the timer the final race was so close that on video you could not see a difference between the cars. Thier times were 3.1415 vs 3.1417.

If the time resolution was less than x.xxxx then this would have been recorded as a tie. Since using this system we have not had a single tie. This time resolution seems to fit the track we have which is 43′ long and only the first 10 to 12 feet has slope… if your track is shorter than that then you might need a higher time resolution.

Well I hope that helps. let me know if you have any other questions.

IT WORKS!!!

This evening my son and I setup and tested out the code for this Netduino based Track Timer.  It work extremely well and I only had to make a few minor changes and add about 15 lines of code.  Below is a video of us testing it out.  Tomorrow and Thursday I will be finishing the mechanical portion of the build and on Saturday we have a Car build and test day. This will be my first chance to see it all up and running.

 

Here are some close up shots:

%d bloggers like this: