# Pinewood Derby Stopwatch/Timer Project

#### bertz

Joined Nov 11, 2013
327
First a word of introduction because I am new to this forum. I am a 72 year old retired mechanical engineer. During the spring, summer and fall my passions are fishing and giant scale radio control airplanes. During the winter I revert back to my interest in electronics. I earned my FCC license before I earned my drivers license. I have successfully built the following Picaxe projects: servo tester, simple robot, towers of Hanoi, LED cube. The programming was a result of cut and paste then hacking until I got the things to work. Therefore let it be known at the outset that I am not a programing whiz.

This winter I would like to build a stopwatch accurate to 0.01 seconds. The inspiration came from involvement in my grandsons cub scout Pinewood Derby event. Simply described, a group of wooden cars are released, roll down a ramp then on to a straightaway with a finish line at the end.

The attached schematic illustrates where my thought process lies at this point in time. The oscillator section derives a series of 100 Hz pulses, thus 10 pulses = 0.1 sec, 15 pulses = 0.15 sec, 615 pulses = 6.15 seconds, etc.

These pulses would be delivered to a multiplexed LED display driver. The start of the timing sequence would be initiated by a momentary contact limit switch at the starting gate. The end of the timing sequence would be determined when the car interrupts a limit switch at the finish line. Reset would be a simple push button.

I would appreciate any and all thoughts on the subject and any suggestions for changes at this stage of the game will be welcome. I would be particularly interested in any ideas to eliminate the latching relay and perhaps replace it with a microprocessor (Picaxe 08).

#### Attachments

• 268.5 KB Views: 547

#### wayneh

Joined Sep 9, 2010
17,027
If it was me, I'd eliminate mechanical switches and use an IR LED transmitter receiver pair for start and stop timing. Then I would use a commercially available timer triggered by my two gates.

But that's me. For most noobs this project would be too complex, but it sounds like you've got the chops to build it.

#### alexfreed

Joined Oct 8, 2012
72
This is a project that clearly calls for a microcontroller. A $1.50 PIC or AVR will do all the counting, displaying and even clock generation. And a laser pointer plus a photo-diode would be better than a mechanical switch. #### tracecom Joined Apr 16, 2010 3,944 Do the cars race one at a time, or in pairs/multiples? What is maximum time you need to measure? What size does the display need to be? What is the length (distance) of the course? Last edited: #### elec_mech Joined Nov 12, 2008 1,500 Sounds like a neat project. You can do this with a microcontroller if you'd like. Might be a little tricky with a PICAXE only because they are limited in speed, but I've read where others used RTC ICs to handle the counting, so it can be done. If you want to stick with a pure hardware solution, I'd suggest using a 3.2768 MHz crystal with a CD4060 - this brings you from three ICs to just one. Then you could use two pairs of CD4553 and CD4543. This will give you up to six digits if you so desire, but I would assume four would be enough: 99.99 seconds. While this is four ICs compared to your one, these will be far less expensive than the 74C926. Alternately, you could use a CD40110 for each digit to keep things simple. I agree with the others that a laser or IR sensor would make a far more accurate sensor than any mechanical switching method. You could connect these to a CD4013 D flip-flop configured as a T flip-flop to act as a latch to start and stop the timing portion. #### JohnInTX Joined Jun 26, 2012 4,379 #12's aversion to simple things getting complex is getting to me here so forgive me but if you took an off the shelf cheap stopwatch, you could actuate the start/stop button with two analog switches (4066) in parallel, each controlled by the two IR gates. Car rolls through the start gate and you get a pulse on Start/Stop. Car rolls through the end gate and you get another 'push' of the Start/Stop. All of the functions for display, timing and debounce are done for you. Route the two lines from the Start/Stop button outside and plug in the circuit. Unplug and you have your stopwatch back. Pull another pair from the Split button and get intermediate times if desired. The nice thing about it is that its a simple mod to something you can buy many of for all of the lanes and mod enough for the whole track plus spares in a sitting. EDIT: And props to wayneh who kind of said the same thing. I didn't see your skiz before but now recognize it from another thread. Perhaps you prefer to roll your own. The two IR gates could run a Set/Reset f/f to control the counters instead of the latching relay. Last edited: Thread Starter #### bertz Joined Nov 11, 2013 327 This is a project that clearly calls for a microcontroller. A$1.50 PIC or AVR will do all the counting, displaying and even clock generation. And a laser pointer plus a photo-diode would be better than a mechanical switch.
I agree! However I wouldn't have the foggiest notion where to start with a PIC. I can barely get around using PICAXE Basic.

#### bertz

Joined Nov 11, 2013
327
Do the cars race one at a time, or in pairs/multiples?

What is maximum time you need to measure?

What size does the display need to be?

What is the length (distance) of the course?
At the pack level cars race in pairs.

Display size doesn't matter - 1/2" high numerals are fine.

Average run time is between 3 and 5 seconds over a course length of 35 feet.

#### tracecom

Joined Apr 16, 2010
3,944
If the cars race in pairs, do you need to time both cars, or just the winner?

#### bertz

Joined Nov 11, 2013
327
Sounds like a neat project. You can do this with a microcontroller if you'd like. Might be a little tricky with a PICAXE only because they are limited in speed, but I've read where others used RTC ICs to handle the counting, so it can be done.

If you want to stick with a pure hardware solution, I'd suggest using a 3.2768 MHz crystal with a CD4060 - this brings you from three ICs to just one. Then you could use two pairs of CD4553 and CD4543. This will give you up to six digits if you so desire, but I would assume four would be enough: 99.99 seconds. While this is four ICs compared to your one, these will be far less expensive than the 74C926. Alternately, you could use a CD40110 for each digit to keep things simple.

I agree with the others that a laser or IR sensor would make a far more accurate sensor than any mechanical switching method. You could connect these to a CD4013 D flip-flop configured as a T flip-flop to act as a latch to start and stop the timing portion.
At the pack level things are pretty basic. We used to have an electronic timer but it's broke and so is the cub scout pack. Ready to go timing systems are available for $200 to$350. I was trying to cobble something together with parts I had on hand. (I have two 74C926). Keep in mind that I would have to double everything my circuit for two lanes. I have everything except the relays and crystal.

The starting gate is simplicity itself - two stops on a common shaft. No problem fitting it with a limit switch to initiate the race.

#### bertz

Joined Nov 11, 2013
327
If the cars race in pairs, do you need to time both cars, or just the winner?
Both, we need to record the times to determine pairings for the runoff heats.

#### tracecom

Joined Apr 16, 2010
3,944
Both, we need to record the times to determine pairings for the runoff heats.
That adds a complication, but it's still doable with a PIC and an LCD. I visualize a start button, that lights an LED to signal "Start" and simultaneously starts a counter in the PIC. Then, the PIC looks for an interruption of the finish line laser, records and displays the winner's time, then waits for a second interruption of the finish line laser, records and displays the loser's time. A complication that I don't have an answer for is when there is no gap between the winner and the loser, but I think that's a solvable issue as well. Worst case is you have two lasers, one for each lane.

Last edited:

#### wayneh

Joined Sep 9, 2010
17,027
EDIT: And props to wayneh who kind of said the same thing.
Thanks for the props, and for fleshing out in more detail what I was alluding to. I'm hugely averse to building something I can buy so cheaply as a stopwatch.

I wonder if a digital snapshot of the finish might address the "tie" issue tracecom just raised. Kids would love the suspense of a photo finish.

#### tracecom

Joined Apr 16, 2010
3,944
A little more armchair investigation reveals that tracks of 8 lanes or more exist, and all 8 cars must be timed. The SOP is to use a micro-controller and a series of LED/photo transistor pairs, one pair per lane, with one half the pair above the lane, and the other half below the lane. Lanes are constructed such that the wheels of each car are constrained to keep the cars in a straight line and in their own lane. The more sophisticated systems have muxed ET displays for each lane and communicate with a PC for data storage and sorting.

In other words, perhaps a little much for a stopwatch.

#### wayneh

Joined Sep 9, 2010
17,027
In other words, perhaps a little much for a stopwatch.
Haha, yes, even I would start looking at a micro for timing 8 simultaneous events.

#### JohnInTX

Joined Jun 26, 2012
4,379
In other words, perhaps a little much for a stopwatch.
Yes. But not too much for TWO stopwatches... Since the OP has two lanes and a simple setup, its not an unreasonable approach. The IR gates are the same in any case. Simple, and easier than hand-rolling a timer. And then duplicating it. Just an idea.

But, yeah! If you have the chops (*ahem*), you could program an N-lane system without breaking a sweat (I've timed bullets in flight with a PIC) but as #12 and I were kicking around on another thread.. sometimes simple is.. well, simple.

Fun to think about in any case. I did derby cars (the next size up from Pinewood Derby) with the kids way back when. Our timers were parents that pointed at the winner. Kids love it either way.

Have fun.

I have everything except the relays and crystal.
I have a couple of 1.0000MHz TTL oscillators that you can have for the asking. Probably a some .56" 7seg displays and various relays too, if you decide to go that way. But looking at your circuit, the relay switches the clock of the counter but contact bounce will likely be an issue.

Last edited:

#### tracecom

Joined Apr 16, 2010
3,944
Maybe I could get it done. I have a timer that I built and programmed to measure the difference in time that it takes a copper penny versus a zinc penny to roll past a neodymium magnet. I could use that as a starting point, but considering my relatively low level PIC skills, it would take me a while.

I didn't mean to minimize your stopwatch idea; I was just amazed at some of the pinewood derby tracks I found on the web.

Either way, I agree it could be a fun project.

#### JohnInTX

Joined Jun 26, 2012
4,379
I didn't mean to minimize your stopwatch idea; I was just amazed at some of the pinewood derby tracks I found on the web.
No problem!

I have a timer that I built and programmed to measure the difference in time that it takes a copper penny versus a zinc penny to roll past a neodymium magnet. I could use that as a starting point
I remember that as being a cool project.

Best!

#### bertz

Joined Nov 11, 2013
327
A little more armchair investigation reveals that tracks of 8 lanes or more exist, and all 8 cars must be timed.

In other words, perhaps a little much for a stopwatch.
Yes, the setups for district and regional competitions are quite elaborate and use microprocessors linked to PC's. At the pack level the kids race two at a time.

The inspiration for this project derives from the fact that we have been using two stop watches - one for each track. However, the actuation of the stop watches was voice command and we had to re-run close races to determine the winner.

I could try to fix the existing (non-functioning) system but no schematics so I'm not even sure how it works. (see photo)

That's why I wanted to come up with something that I could cobble together with parts I have laying around.

I appreciate the fact that this is an ideal PIC application - but it aint gonna happen! I wouldn't know where to begin learning how to program these devices. I have some ideas about possibly using a PICAXE device since I can stumble through their BASIC instruction set, but I'd like to see if my Rube Goldberg scheme would work.

Contact bounce is an issue with relay contacts but I think there is a workaround to that.

Thanks to everyone for their contributions! I am intrigued by the concept of hacking into the stopwatch. I like it! The problem is you have parents looking over yur shoulder to verify the times. They dont trust you. Ask me how I know.

#### Attachments

• 30.1 KB Views: 69

#### elec_mech

Joined Nov 12, 2008
1,500
You can use a uC, be it PIC, PICAXE, or something else, but given your comfort with hardwired circuits and the simplicity of the goal, I agree a uC solution would be a bit overkill. Short of being a programming whiz, it will take more time to program than to build a hardwired solution.

That said, I like the original design you had in your first post, moreso now if you have nearly all the parts. The only thing I'll stress is you really should look for a different sensor to trip the timer. A mechanical switch/relay is going to have all kinds of noise which wil negatively affect the results. This will be a problem for any setup be it a uC, custom circuit or hacking a stopwatch.

As you mention having a piece of non-working equipment that performed this function, we may even be able to help you troubleshoot that as well. Can you take good, clear close-up pictures of the circuit board, front and back, and post them? If they are not readable in the pictures, please let us know what IC's are used. What is the equipment doing or not doing?