Fun with Electronics and Code

Just another WordPress.com site

Tag Archives: Awana

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.

Advertisements

First Race with new track and timer complete!!!

The Netduino based Track Timer has been a fun project and last weekend we finally got to see the new 8 lane track and timer in action. 50 racers came to race their cars in an attempt to win a speed or design trophy.  The timer performed great and the only real issue I had come when the person operating the start gate closed it before the race was finished. It would reset the timer and the software would not record any times (even though i send the times as each racer finishes). This resulted in us having to rerun 2 of the heats. I will look at ways to change the code so that the Grand Prix Race Manager software will still complete a race if the start gate is closed. We are hoping to bring it out again before the Grand Prix next year as we all had a blast (especially the kids) and we want to do it again. I have added a video and some pictures below

As for the project details (Bill of Materials,  process diagrams, code, and build pictures), I will be working over the next week or two to get the project page updated with all the details on this project. If you have any questions or would like additional details on a portion of the build.

Thanks for the support during this build. I have some ideas for my next project but I am taking suggestions, so if you have an idea leave a comment or send me an e-mail. If I like the idea then i’ll build it.

Demo of track operation

Pictures of setup (and a shameless plug for my kids cars).

This slideshow requires JavaScript.


FYI – sorry about the picture quality, My SLR died and we have not fixed / replaced it yet so these were taken with my cellphone.

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: