Marble racing timer

I have built a marble racing track, but I need several timers reporting times as the marble goes down the track. I have searched YouTube, the forum and other places, but nothing out there is what I'm trying to do. Mostly, it's some lame YouTube videos that are terrible to watch and unclear, or repairing code after the circuit is built. Can anyone help me? I'm going to use the Nano and an LCD display for numbers as the marble passes by. I want the time checked at four locations. Can I use a single Nano or does it have to have four Nanos? I need help finding a wiring schematic, parts list and code. Any help would be fantastic. Thanks

One Nano will be fine.

How do you plan to detect the passage of marbles? Optical, mechanical....

What LCD do you plan to use?

1 Like

I was thinking photo resitor or break beam

Is it one marble running down the track or multiple? Each "track" will need those 4 sensors plus a sensor to signal "start".

I have done a project similar to this for pinewood derby cars when my kids were in cubscouts. 1 mechanical switch on the start gate, photo diodes embedded in the race track at the finish line.

Very much a doable project. The key will be to figure out how you want to detect the marble(s) going by without interrupting their movement.

1 Like

Ok, get a few of each and try them. The exact model often doesn't matter too much.

For the LDR (Light Dependant Resistors) you will need a fixed resistor for each to form voltage dividers. 10K is often a good choice.

For the beam-break type make sure the "receivers" are phototransistors, not photodiodes. If the seller doesn't mention which they are, buy elsewhere.

Make sure to have a few more resistor values like 4K7, 2K2, 2K, 510R, 220R around to find the values that work best.

Don't buy modules which have these components on them. Waste of money.

1 Like

The most cutthroat race on the planet and no, I'm not even being sarcastic. :joy:
24 Hours of LeMans or even the Tour De France are exhibition matches compared to Cub Scouts Pinewood Derby!

1 Like

One marble at a time

Oh yeah, The Pinewood Derby is the end all be all of hardcore racing... lol it was for me

1 Like

I'm thinking a break beam might be the best, but if the marble is clear like a cat's eye, it might not see it.

If using these such that the marbles break a beam of light (laser, for instance), you can just wire these between A0-A5 and ground, using pinMode (sensX, INPUT_PULLUP);

Good to know. It will be a Bobsled track about two inches wide all the way to the end. Single track. I'll do a Grand Prix track. I'll need a lap counter for it but this is first. I'm going to make YouTube videos with different international events and MC them. My sixth grade students love it when they race, and I do their commentary, and they love the track the school bought. But that track is for learning science and physics. Mine's about racing and fun.

ironman-too-much-to-ask-for-both

1 Like

It would break a laser diode beam. And who doesn't love lasers?

1 Like

I meant one, they have to be able to explain all of the science, and the other, they race and learn the science because they want to learn it. Not because they're forced to.

1 Like

Right.... I don't have a lot of experience with these and need some kind of wiring diagram and parts list, code, you know, the stuff to make it happen. I know I'll need a Nano or Uno, a 7 digit display, sensors to start the clock, time it at key locations, and an end.
The code should be able to show the fastest time to beat and each marble's time as it races. If the time is faster than the top time, the display shows the new best time. What sensors will be best is one of the issues for a no touch time capture. The laser beam is probably the best but can I use it with an Nano or Uno?

Here's the links to what I think will work:
LCD screen
Sensors

And need some help with designing a circuit, pin connections and coding.

Light source is independent from Arduino. All the Arduino does is measure the sensors (switches, LDRs, photodiodes/transistors) and output the data.
The tricky part with lasers is keeping them on target. Across a narrow track, should be easy enough. How's your mechanical engineering and fabrication skill level?

Pretty good. I designed and fab'd my laser cutter with no help. The track will be built using it to cut the parts. I can wire a home. I think my skills are fair

1 Like

Track width is 2" so it shouldn't be hard. And I think I can design a short tunnel to external block lighting.

length of track may prove a bit tricky. The precise time measurement, consistently across four sensors likely won't be perfect, but it's for fun and a middle school audience, right?
If it was me designing this, I would be nailing down the hardware part first, meaning literally getting some sensors installed with access to their wiring first, the wiring harness connecting it all, the start switch as @blh64 indicated, the power supply.
Is this all meant to be portable or will it remain in place for some time like a fixed installation?

In short, get it built with access to the sensors such that you can swap out sensors and test around. For each sensor position, I would have access to three ports/plugs (like servo plugs) that you can plug different stuff into, either LDR (analog) or some digital sensor (voltage, gnd and signal). As long as you're taking the time to build all this, might as well make it modular.