So let me set the stage for you (in case you didn’t do Awana Grand Prix or Boy Scouts Pinewood Derby as a kid). You are 9 years old – you and your Dad (or Mom) have just spend 2 weekends building a pine car. It is all painted; the axles and wheels have been polished and they are lubricated. You just know your car is fast. Now it’s your turn to race. Your car is set on the track along with 3 others. There is a count down and …. snap…. they are off. The cars go racing down the tack as all the parents stand over the finish line waiting to see who finishes… but wait!! It appears that 2 finish at the same time. Now all the parents rewind their video cameras and spend the next few minutes “discussing” who actually won.
Well there is an answer to this problem and it doesn’t involve replaying videos (unless you want an instant replay). It is called a track timer. Now there are commercial units available out there but since the spirit of these events is to spent time with your kids I figure why not build one?
Our church had a track but it was damage a few years back and was so warped that we decided it was not worth repairing. Last year we borrowed a track from another church, but the timer didn’t work all that well as it only showed positions (1st, 2nd, 3rd, etc). So after the race our Awana leader, Danny, decided to take on the task of building a track and I volunteered to build the timer.
In the following pages I will document the research, design, build and associated materials. I also plan on posting all schematics, source code, and BOMs (bill of materials) for others to use on future pages. If you have questions or comments please ask.
Requirements and Assumptions
Working with Danny we laid out some of the basic requirements that we had for the new timer. Along with a few of the assumption that we made about its operation.
- Support for 6+ lanes – when we started discussing this project we had not decided on the lane count but we knew that it would be at least 6 lanes given the number of racers were estimated having and wanting to have the kids race more (>100).
- Provide times for each lane – our previous timer was just listing wining order and so the final list that went into the grand finally was not always the fastest cars, just that car that happened to beat the others in their heat. The separation in completing between these cars in the final heat was great.
- Use a trigger that does not depend on shape of car to work (IE Optical and not mechanical)
- Finish line should be easily detachable from the track and easy to set up.
- Optional: Ability to time races without a computer attached.
Given that my timetable was short, I started sourcing components before I had prototyped how everything should work. For all except for the IR LEDs this proved to not be a problem. Also since shipping in some cases costs more than the part(s) it is recommended to order all you parts at one from a single supplier. In addition, if you like to experiment, order double on the sub dollar parts. It saves you from having to place a second order if parts fails and can build up your part inventory for other projects.
I started with looking over the other designs that have been posted online for track timers. For my timer, I also wanted to know finish times. Most out there were for 4 lanes and were PIC based. After talking to Jon Ficks about the Track Timer he built. I realized the I really did not have the time to edit the PIC based C / assemble code based solutions out there to meet our requirements.
I then started looking into devices called Arduinos. They are open sourced embedded computers that are easy to use and use a variant of a modern development language similar to C++. They looked interesting but at this point I want to use Interrupts on each lane and most of the Arduino boards only had 2 or 6 Interrupts. I was looking for a version that had 8 or more and ran across the Netduino on sparkfun. It is a .NET Micro Framework system that runs C# and all of its ports have interrupts with hardware timestamps so it was my pick for this project.
Nokia 5110 LCD from Sparkfun
Since this will be connected to a computer a UI was unnecessary, but I wanted to support independent operation, so I decided to use a Nokia 5110 LCD from Sparkfun. It is an easy to use display and only cost $9.95 US. I started with individual pieces of 20 AWG wire connecting this to the NetDuino but the wire was too stiff and I want to be able to open the completed box quickly. So I changed it for a piece of 26 AWG Ribbon cable. I then wired that to a piece of Perfboard that the Netduino will plug into. You can find information on connecting this to your Netduino at their forums (http://forums.netduino.com/index.php?/topic/860-lcd-help-needed-16x2s-are-boring/).
2.5mm Barrel Jack
To give the Finish line power I used a cable I already made up. It is a 2.5mm Barrel Jack attached to a piece of 20 AWG wire and then a piece of 1/4″ and 1/8″ shrink tube.
If you don’t have one then you can get one here and then solder it to some wire. NOTE: I usually prefer the all metal jacks to the plastic. First, the plastic ones tend to break easily and second is you get a better connection as the plastic ones just have this leaf spring on one side that pushes it against the plug and it does not hold it as well.
Keystone Jack – Wire End
The get the signal from the finish line and the start gate to the Netduino, I decided to go with ethernet cables. Their easy to find in long lengths and they (sometimes) have good shielding. To connect the ethernet cables to the finish line and the Netduino I got a bunch of Keystone Jacks and attached them to a 8″ – 12″ piece of Cat5. Two will be soldered to the perfboard which will then be attached to the Netduino and another pair to the Lane sensors on the other side. One additional set is used to connect the finish line with the start gate. I am using 24AWG wire and it is rated to handle .577 amps when transmitting power. Therefore once the Servo (rated 500 milliamp) is added to the start line, I should be able to use a single signaling pair to power it. However, I’ll use 2 pair to account for line resistance and voltage drop.
IR Emitter and Detector
Infrared Emitters and Detectors (pink)
There are many options when considering how to “trigger” your finish line. Some systems use mechanical switches, others use visible light, but most use Infrared light. This is the same type of light that comes out of your remote control. With each of these switch types there are pros and cons. For example: mechanical switch PRO: They are not bothered by any light sources in the environment. CON: the car has to actually “hit” the switch and they usually need to be reset by hand. After evaluating all the options, IR appeared to be the way to go for this project. once that decision was made the next challenge was finding a matched pair. That is a IR LED that emits that same light source needed by the IR Detector. Well this was made a little easier by Sparkfun. They have matched IR pairs that operate on 940nm center with a 50nm spectrum. The detector is basically just a NPN transistor that uses light rather than voltage to trigger. After testing the pairs it appeared that they would only saturate when less than 4 inches away. Given that the sensors will be mounted at least 4.5 inched apart, I decided to use a high power IR LED. The new LEDs have a radiant intensity 10 times high then the matched pair but its center is 950nm, 10 nm higher then the detector. After testing the new IR Leds the performance was much improved. I was able to get full saturation on the Photo Transistors at over 5.5 inches. Since the voltage only needs to drop to less than 1.5 volt that means I could go to 8+ inches away without trouble.
The box I used was from Mouser. It fits everything just about right. It came with mounts inside for easy attachment of a PCB or Perfboard. I opened up 4 holes in it, 2 for the modified Ethernet keystone jacks, 1 for the Netduino Power, and 1 for the Netduino USB programming interface. For the FTDI USB to Serial Adapter I just notched the top of the box so that I could snake a USB cable under the cover. I am not fond of the faceplate so I also picked up a piece of Lexan from Home Depot and cut a new faceplate from it.
FTDI USB to Serial TTL
FTDI USB to Serial
In order to have the Netduino communicate to the computer running the Grandprix Race Manager software the host computer needs a Serial port. Well most modern computers don’t have a serial port and this device solves that problem. It is a FTDI USB to serial interface that operates at TTL voltages and is self-powered by the USB. I added a 3 wire ribbon cable connected to the Ground, TX and RX pins.
Click Here to go to Page 2 – Design