A request for a Pinewood Derby Timer
Grandkids are fantastic but somehow they always think Pop Pop's can do anything.· The latest request is from a Cub Scout Pack my grandson belongs to.· They need a electronic timer for a 4 lane Pinewood derby track so that the kids and the audience will know who finished in what position and what their overall time was.· Since Pop Pop is a· computer person (BS2P) he can do it they said.··So I became the official builder of the track timer,· without even·a word froom me.·· So my problem is figuring out now how to use one of my favorite playtoys the Parallax Stamp which has no internal timer and monitor·4 lanes and display the results on a 4 digit led which will show the position of finishing.· That will be a·number from ·1-4 on the LED that will light up depending on that lanes finish.
Before I go further into wasting my time trying to accomplish this on the Stamp I would like to get the opinions of my fellow stampers if this can be accomplished.· I have belonged to this group for years and some of the·ideas that surface here are just brilliant.· Am I heading down the wrong path trying to use my playtoy to accomplish this?·· Thanks for the help.
Before I go further into wasting my time trying to accomplish this on the Stamp I would like to get the opinions of my fellow stampers if this can be accomplished.· I have belonged to this group for years and some of the·ideas that surface here are just brilliant.· Am I heading down the wrong path trying to use my playtoy to accomplish this?·· Thanks for the help.
Comments
Four counters would be cleared before the start of the race (manual button).
The free running clock would go to the clock input of each counter via an AND gate. The second input to each of the four AND gates would go HIGH (stamp controled) when the race is started. I assume the start is done via a mechanical means, of which could be electrically coupled to a stamp input.
When the car crosses the finish line, an optical sensor (photo receiver mounted below a hole at the finish line.....or a sensitive tape switch) monitored by the stamp would make the corresponding and gate for that lane low, thereby stopping any more pulses from getting to the counter.
Once the finish line has been crossed by all four cars, the stamp could get the number of pulses from each lane (fastest time) via a parallel to serial shift register (assuming the counters are a parallel output.
I am sure more (probably better) ideas will come in......this is just my quick and dirty method without putting a lot of thought into it.
And the very expensive solution is to use 4 stamps, one for each lane.
If you google Pinewood derby timer, there are a plethora of circuits or prebuilt timers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
A loop like that will run around and around in with a few milliseconds resolution on the BS2p. Multiplication (**) by a constant after the finish will convert the times X0..X3 into real time. All of the switches are sampled at the same instant, so it is fair, and there is a possibillity of a tie, which adds to the excitment.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I have a question relating to your timing idea. I think your code works as follows....please confirm.
The code will not return an actual time for the race (at first glance), but rather the order of finishers.
Each time through the loop, each lane (Xn) is incremented until the car crosses the·finish line·(bit = 0). Subsequent passes through the loop while other cars have not finished, the·car(s) that already finished, thier·"counter" is not incremented.
If one wanted to convert the "finished count" to a time, you could add a pin going high at the start of the loop then low at the end of the loop and use an o-scope to determine the time for a loop, or, use your documented timings for instructions to calculate how long the loop should take?
Thanks,
Ken
You could use an actual PC for keeping and displaying times, since they do that pretty well, receiving signals from the stamp when events occur.
You could use a little of Tracy's code for monitoring all 4 lanes simultaniously, and DEBUG when pinstate changes.· The software you write on the PC could handle starting and stopping times, as well as display the positions of the winners, along with race times and the time difference between 1st 2nd 3rd 4th places (preferrably in large easy to read fonts)
...and on a side note:· if you were to have a spring-loaded·wall·retained by a solonoid, you could hit a button on the computer, send the stamp a message, the stamp activates a relay which energizes the solonoid (maybe sounding a starter or other noise-maker also),·dropping the wall and starting the race, simultaniously starting the clocks.
Just a few ideas [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OIOOIOOO OIIOOIOI OIIOIIOO OIIOIIOO OIIOIIII OOIOOOOO OIIIOIII OIIOIIII OIIIOOIO OIIOIIOO OIIOOIOO OOIOOOOI"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
The best approach is to use photo-transistors put in to the track, with LED's in a finish gate structure above the track shining light into the photo-transistors.· Use the BS2 to read all 4 bits at the same time.· I don't know if you'll need any de-bounce here -- I would suspect not.
You can use LED's above the finish gate to indicate order of finish.· You can blink them in patterns to indicate the order -- constant on is the winner, blink twice and pause for second, blink three times and pause for third, leave off for fourth.· Or, since you're using a BS2 anyway, you might try to put in 7-segment LED's, and indicate 1, 2, 3, and 4.
Note this kind of thing is available from www.microwizard.com for $150 to $200 depending on options.